Samples & Metadata
A Sample is one physical tube and everything SeqDesk knows about it. It is the unit that reads attach to, that pipelines run on, and that ENA registers as a BioSample. Every sample belongs to exactly one sequencing order, and optionally to one study.
What is stored where
The Sample record mixes four kinds of data, and knowing which is which explains
most editing rules.
Real database columns
| Column | Type | Set by |
|---|---|---|
sampleId | Text | Generated as S-{epoch-ms}-{5 chars}, editable, unique within the order |
sampleAlias | Text | User; optional short name |
sampleTitle | Text | User; required by the default form, used for ENA |
sampleDescription | Text | Optional longer description |
scientificName | Text | Organism autocomplete |
taxId | Text | Organism autocomplete, or typed in by hand |
sampleAccessionNumber | Text | Written by ENA submission |
biosampleNumber | Text | Written by ENA submission |
facilityStatus | Text | Facility; defaults to WAITING |
preferredAssemblyId | Relation | Chosen after assembly pipelines run |
Form-builder fields map onto these columns when their name matches — sample_alias,
sample_title, sample_description, scientific_name, tax_id and the
camelCase equivalents all resolve to the column of the same meaning, and an
organism field writes both taxId and scientificName. Anything else is
stored as JSON.
JSON blobs
| Column | Contains | Written by |
|---|---|---|
checklistData | MIxS checklist answers, keyed by field name | Order wizard and study metadata surfaces |
checklistUnits | Units for numeric MIxS fields | Only the order wizard and the order’s sample table |
customFields | Every non-MIxS custom field, including _barcode | Order wizard and sample table |
Editing MIxS metadata from a study writes checklistData only. It never
touches checklistUnits, so units captured during ordering survive, but units
cannot be entered or corrected from the study side.
Default per-sample columns
On a fresh installation the sample table has three researcher-visible columns:
| Column | Required | Purpose |
|---|---|---|
| Organism | Yes | Taxonomy lookup — see Organism & Taxonomy |
| Sample Title | Yes | Short descriptive title. Required for ENA submission |
| Sample Alias | No | Unique short name; can be auto-generated |
and two facility-only columns that researchers never see:
| Column | Options |
|---|---|
| Sample QC Result | Pending, Passed, Failed, Repeat Requested |
| Sample Notes | Free text |
The admin-only pair is special in one important way: facility admins can edit them after the order leaves DRAFT, through the facility-fields mode of the sample endpoint. Everything else in the table is frozen the moment the order is submitted.
Your admin can add further per-sample columns — volume, concentration, barcodes,
body site, storage location — through the
Form Builder. The Oxford Nanopore run-plan
preset, for example, adds _barcode, internal_sample_code,
material_body_site, sampling_date and three admin-only storage fields.
Facility processing status
Each sample carries a facilityStatus, tracked with a
facilityStatusUpdatedAt timestamp. It is independent of the order’s own
lifecycle: it describes where the tube is in the lab, not where the paperwork is.
| Value | Label | Meaning |
|---|---|---|
WAITING | Waiting | Received, not yet started (the default) |
PROCESSING | Processing | In sample prep or on the sequencer |
SEQUENCED | Sequenced | Sequencing finished |
QC_REVIEW | QC Review | Undergoing quality review |
READY | Ready | Cleared for delivery or analysis |
ISSUE | Issue | A problem was flagged |
Facility admins set these from the Sequencing Data page, but two transitions happen on their own:
- Assigning reads to a sample moves it from
WAITINGorPROCESSINGtoSEQUENCED. A sample already inQC_REVIEW,READYorISSUEis left alone. - Clearing a sample’s reads moves it from
SEQUENCEDback toWAITING. No other status is reverted.
Any other value is rejected with Invalid status, and an unknown sample
identifier with Sample not found.
MIxS metadata
MIxS — Minimum Information about any Sequence — is the Genomic Standards
Consortium’s family of checklists describing what contextual metadata a sequence
needs to be interpretable. ENA implements them as numbered checklists
(ERC0000nn), and SeqDesk ships the ENA catalog offline so a fresh install works
without network access.
Answers are stored per sample in checklistData. The checklist itself is chosen
once — on the order (stored as _mixsChecklist in the order’s customFields) or
on the study (stored as Study.checklistType).
The shipped catalog
Seventeen checklists live in data/field-templates/mixs-full/. They are exposed
by GET /api/mixs-checklists.
| Accession | Name | Fields | Mandatory |
|---|---|---|---|
ERC000011 | ENA default sample checklist | 30 | 2 |
ERC000012 | GSC MIxS air | 77 | 9 |
ERC000013 | GSC MIxS host associated | 89 | 8 |
ERC000014 | GSC MIxS human associated | 99 | 8 |
ERC000015 | GSC MIxS human gut | 82 | 8 |
ERC000016 | GSC MIxS human oral | 81 | 8 |
ERC000017 | GSC MIxS human skin | 82 | 8 |
ERC000018 | GSC MIxS human vaginal | 89 | 8 |
ERC000019 | GSC MIxS microbial mat biolfilm | 113 | 10 |
ERC000020 | GSC MIxS plant associated | 102 | 8 |
ERC000021 | GSC MIxS sediment | 107 | 10 |
ERC000022 | GSC MIxS soil | 106 | 10 |
ERC000023 | GSC MIxS wastewater sludge | 88 | 8 |
ERC000024 | GSC MIxS water | 130 | 9 |
ERC000025 | GSC MIxS miscellaneous natural or artificial environment | 94 | 8 |
ERC000047 | GSC MIMAGS | 57 | 18 |
ERC000050 | ENA binned metagenome | 52 | 14 |
Note the shape of the problem: GSC MIxS water asks for 130 fields, nine of them mandatory. You are not expected to fill all 130. The order wizard’s MIxS step and the study wizard’s Metadata Fields panel both let you pick which optional fields to collect on top of the mandatory ones — do that deliberately, because every field you enable becomes a column in the sample table.
The catalog can be refreshed from a remote registry; the active version is recorded so that studies authored against an older definition keep resolving their original fields. See Study Metadata & MIxS.
Editing samples
In the table
The sample table is a spreadsheet-style grid:
- Keyboard navigation — arrow keys, Tab and Enter move between cells.
- Inline editing — click a cell and type.
- Organism autocomplete — type two or more characters to search.
- Add rows at the bottom; delete rows while the order is DRAFT.
- Undo reverts unsaved changes.
Deleting a row deletes the Sample record and everything cascading from it
(reads, run-plan assignments, artifacts). It is only possible in DRAFT.
Quick Actions
| Action | What it does | When not to use it |
|---|---|---|
| Auto-generate sample aliases | Rewrites every alias to Sample_1, Sample_2, … in row order | After you have entered meaningful aliases — it overwrites them without asking |
| Copy organism to all samples | Copies taxId and scientificName from row 1 to every row | When the order mixes organisms |
Excel round-trip
The toolbar’s Excel Template button downloads
sample_template_<order name>.xlsx with one column per per-sample field,
pre-filled with the current rows. Upload Excel parses your edited file and
opens the Import Excel Data dialog, which shows the parsed row count, any
unmapped columns, and per-row errors and warnings before applying anything.
The import replaces the table. Both dialog buttons — Import Valid Only and Import — swap the whole sample table for the parsed rows. Always start from a freshly downloaded template so existing rows are carried through.
A separate Export CSV button produces samples_<order name>.csv containing
system fields, checklist fields and custom fields. It is a one-way snapshot and
cannot be re-imported.
Worked example
A wastewater surveillance order with 24 samples:
- In the wizard, set Number of Samples to
24; the table pre-fills with 24 blank rows. - On the MIxS step choose GSC MIxS wastewater sludge (
ERC000023) and enablegeographic location (country and/or sea),collection dateandenvironmental mediumon top of the eight mandatory fields. - Set the organism on row 1 to
wastewater metagenome(527639), then use Copy organism to all samples. - Download the Excel Template, paste in your sampling dates, plant names and barcodes, and Upload Excel.
- Review the import dialog. If a row reports an error, fix it in the spreadsheet and upload again rather than importing partially.
- Submit. From here the sample table is read-only and the facility takes over.
What a sample connects to
| Relation | Cardinality | Notes |
|---|---|---|
order | Exactly one, required | Never reassigned |
study | At most one, optional | Remove from the current study before moving it |
reads | Many | Only one is “active”; see read data classes |
sequencingRunSamples | Many | One barcode assignment per sequencing run |
assemblies / bins | Many | Produced by pipelines; one assembly can be marked preferred |
sequencingArtifacts | Many | QC reports, demux stats, delivery reports |
streamIngestedFiles | Many | Files ingested live from a MinKNOW stream |
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
Cannot modify samples after order submission | Order is not DRAFT | Only admin-only per-sample fields remain editable |
Facility sample edits can only update existing samples | A facility-fields save included a new or deleted row | Facility mode updates existing samples only |
Sample not found on this order | The sample id does not belong to this order | Reload the page; the sample may have been deleted |
| MIxS columns are missing from the table | No checklist selected, or the MIxS module is disabled | Pick a checklist on the order’s MIxS step, or ask an admin to enable the module |
| A field you filled in vanished | It was a per-sample field that the admin later hid | Hidden fields are not deleted; re-enable it in the form builder to see the value again |
Next
- Organism & Taxonomy — getting
taxIdright. - Studies — regrouping samples for analysis and publication.
- Preparing a Submission — what ENA checks before it accepts these records.