This guide explains how to structure CSV files for importing sample data into Krill.
Krill supports importing sample data via CSV files. The import process creates:
- Sources: Sample sources/origins
- Samples: Cell lines or sample types
- Storage Hierarchy: Sites → Devices (freezers) → Shelves → Racks → Boxes
- Aliquots: Individual sample aliquots
- Tubes: Individual tubes within aliquots
- Locations: Physical storage positions within boxes
- Delimiter: Auto-detected — comma (
,), semicolon (;), tab (\t), or pipe (|) all work - Encoding: Auto-detected — UTF-8, UTF-8 with BOM (Excel default), UTF-16, or Latin-1
- Header Row: Required (first row must contain column names)
The CSV file must include the following columns (in any order):
| Column Name | Required | Description | Example |
|---|---|---|---|
Source |
Yes | Name of the sample source/origin | "Example Lab" |
Cell Line |
Yes | Name/identifier of the cell line or sample | "MM134" |
Experiment # |
No | Experiment identifier | "EXP_001" |
Sample Notes |
No | Notes about the sample | "Legacy sample from 2017" |
Site |
No | Name of the storage site/location | "Main Lab", "Satellite Facility" |
Freezer Name |
Yes* | Name of the freezer/storage device | "Freezer A" |
Position 1 |
Yes* | Rack identifier | "4" |
Position 2 |
Yes* | Shelf identifier | "F" |
Position 3 |
No | Row position within the box (1-based) | "1" |
Position 4 |
No | Column position within the box (1-based) | "5" |
Aliquot Type |
Yes | Type of aliquot | "Cells", "DNA", "RNA" |
Number of Aliquots Total |
Yes | Total number of tubes/aliquots | "6" |
Disposition |
Yes | Current status of the aliquot | "stored", "in_use", "exhausted", "disposed" (or legacy aliases) |
* Required if you want to assign storage locations. If omitted, samples will be imported without storage assignments.
Collef Aliquots Total- Alternative name forNumber of Aliquots Total(handles typos in source data)
- Creates a new Source record if it doesn't exist
- If empty, defaults to "Unknown"
- Used to group related samples
- Creates a new Sample record if it doesn't exist
- If the same Cell Line appears multiple times, notes are appended (not overwritten)
- This is the primary identifier for samples
- Optional experiment identifier
- Stored with both Sample and Aliquot records
- Free-form text notes about the sample
- If the same Cell Line appears multiple times, notes are concatenated with newlines
- Optional column to specify the storage site/location
- If provided, creates a new Site record if it doesn't exist
- If omitted or empty, defaults to "Default Site"
- Useful for multi-site organizations or when importing data from different locations
The storage hierarchy is built automatically:
- Site: Created from
Sitecolumn, or defaults to "Default Site" if not provided - Device (Freezer): Created from
Freezer Name - Shelf: Created from
Position 2 - Rack: Created from
Position 1 - Box: Created with name
{Position 1}_{Position 2}(e.g., "4_F")
Note: All storage objects are created automatically if they don't exist. Duplicate names are reused.
- Position 3: Row number within the box (1-based integer)
- Position 4: Column number within the box (1-based integer)
- Both must be provided together to create a storage location
- If omitted, aliquots are imported without specific box positions
- Creates a new AliquotType record if it doesn't exist
- Examples: "Cells", "DNA", "RNA", "Plasma", etc.
- Determines how many tubes are created for this aliquot
- Must be a positive integer
- Each tube gets a sequential tube number (1, 2, 3, ...)
- If empty or invalid, defaults to 1
-
Current status of the aliquot
-
Creates a new AliquotDisposition record if it doesn't exist
-
Accepted values:
CSV value Disposition type storedstored in_usein_use exhaustedexhausted disposeddisposed "In Storage"(legacy)stored "Used"(legacy)exhausted "Checked Out"(legacy)in_use "Disposed"(legacy)disposed -
Any unrecognised value defaults to
stored -
Use the short model values (
stored,in_use, etc.) for new imports; legacy aliases are still accepted for backwards compatibility
Comma-delimited (works with most editors and Excel "Save As CSV"):
Source,Cell Line,Experiment #,Sample Notes,Site,Freezer Name,Position 1,Position 2,Position 3,Position 4,Aliquot Type,Number of Aliquots Total,Disposition
Example Lab,MM134,,Legacy sample from 2017,Main Lab,Freezer A,4,F,1,1,Cells,6,In Storage
Example Lab,MM134,,Legacy sample from 2017,Main Lab,Freezer A,4,F,1,2,Cells,6,Checked OutSemicolon-delimited (also accepted):
Source;Cell Line;Experiment #;Sample Notes;Site;Freezer Name;Position 1;Position 2;Position 3;Position 4;Aliquot Type;Number of Aliquots Total;Disposition
Example Lab;MM134;;Legacy sample from 2017;Main Lab;Freezer A;4;F;1;1;Cells;6;In StorageNote: The Site column is optional. If omitted, all samples will be assigned to "Default Site".
- You must have the
lab_managerrole or higher to import data - Access the import page via: User Management → Data Import
- Prepare your CSV file following the format above
- Upload the file using the import form
- Review the preview (if dry-run is enabled)
- Confirm the import to create records in the database
For each row in your CSV:
- Source (if new)
- Sample (if new, based on Cell Line)
- Storage Hierarchy (if storage columns provided):
- Site → Device → Shelf → Rack → Box
- AliquotType (if new)
- AliquotDisposition (if new)
- Aliquot (one per row)
- AliquotTubes (one per
Number of Aliquots Total) - AliquotLocation (if Position 3 and Position 4 provided)
- Sources: Same name = same source (reused)
- Samples: Same Cell Line = same sample (notes appended)
- Storage: Same names = same objects (reused)
- AliquotTypes: Same name = same type (reused)
- AliquotDispositions: Same name = same disposition (reused)
- Aliquots: Each row creates a new aliquot (even if same sample)
Solution: Ensure your CSV header row exactly matches the column names (case-sensitive). The error message lists the missing columns alongside what was actually found, so you can quickly spot typos or extra spaces.
Solution: Ensure Freezer Name, Position 1, and Position 2 are provided. Position 3 and Position 4 are optional but both must be present together.
Solution: Check the Number of Aliquots Total column. It must be a positive integer. Empty values default to 1.
Solution: Use one of these exact values in the CSV: "In Storage", "Used", "Checked Out", or "Disposed". Other values will default to stored status. Note: these are the CSV-level labels; internally the model stores disposition types as stored, in_use, exhausted, or disposed.
Solution: The importer auto-detects encoding (UTF-8, UTF-8 with BOM, UTF-16, Latin-1), so most files — including those exported from Excel — work without changes. If you still see errors, try re-saving the file as UTF-8 from your spreadsheet application.
- Test with a small file first (5-10 rows) to verify format
- Use consistent naming for Sources, Freezer Names, and Aliquot Types
- Group related samples by using the same Source name
- Verify storage hierarchy before importing large datasets
- Keep backups of your original CSV files
The import process performs basic validation:
- Required columns are checked
- Numeric fields are validated (Position 3, Position 4, Number of Aliquots Total)
- Storage positions must be positive integers
- Empty strings are converted to empty values or defaults
After importing:
- Verify samples appear in the Samples list
- Check storage locations in the Storage section
- Review aliquots in sample detail pages
- Check audit logs for import history
If you encounter issues with data import:
- Check this guide for format requirements
- Verify your CSV matches the example format
- Check the application logs for detailed error messages
- Contact your system administrator