Sequencing Runs
A Sequencing Run (SequencingRun) is one run on one instrument. It exists for
a single purpose that pays for itself immediately: it records which sample was
loaded under which barcode. That mapping is what lets SeqDesk find the right
FASTQ files later, when the sequencer has written a directory tree full of
barcode07/ folders that mention no sample names at all.
A Sequencing Run is not a Sequencing Order. An Order is the customer’s request; a Run is one physical instrument run inside it. One order can hold several runs — a re-run of failed samples is a second run under the same order. Pooling samples from different orders into one run is not supported.
Prerequisites
Run plans are managed from the Run Plan card on the order’s Sequencing
Data page (/orders/[id]/sequencing). You need all three of:
- the FACILITY_ADMIN role — anything else gets
Only facility admins can manage sequencing data; - an order in SUBMITTED or COMPLETED status — a DRAFT order gets
Sequencing run plans can only be managed on submitted or completed sequencing orders; - a non-demo session — the public demo returns
Sequencing data management is disabled in the public demo.
Creating a run
Open the order’s Sequencing Data page
From the sidebar, Sequencing Data under the order. Scroll to the Run Plan card.
Enter a Run ID and date
Run ID is the only required field. Use whatever the instrument calls the run
so the value also appears in the output directory path — a date stamp such as
20260415, or the vendor’s run folder name. It must be unique within the order
(@@unique([orderId, runId])); an empty value is rejected with
Run ID is required.
Press Create Run
The run is created and SeqDesk immediately prefills the run plan from the
per-sample _barcode values captured on the order.
Review the prefill result
The response reports how many assignments were made and which barcodes were skipped. Any barcode value that appears on more than one sample in the order is reported as a duplicate and assigned to neither sample — you resolve those by hand.
What a run stores
| Field | Set from | Notes |
|---|---|---|
runId | Run ID input | Required, unique per order |
runName | Optional name | The Excel import sets it to the run id |
platform | Optional | Free text |
instrument | Optional | Free text |
runDate | Date input | German dd.mm.yyyy and dd_mm_yyyy forms are parsed as well as ISO |
folderPath | Optional | Path to the run output directory |
runParameters | Optional | Arbitrary JSON |
The SequencingRun model also declares q30Score, clusterDensity,
passFilterPct, totalReads, totalBases, multiQcReport and demuxStats.
No part of SeqDesk currently writes or displays these columns — no form, no
API route and no importer. Run-level QC is handled instead through
sequencing artifacts and per-read fields on the
Read record. Treat the seven columns as reserved.
Populating the run plan
There are three ways to get barcodes onto samples, and they are checked in that order when files are matched later.
1. Automatic prefill from the order
If your order form collects a per-sample Barcode field (_barcode — added by
the Oxford Nanopore run-plan preset, or by hand in the
Form Builder), creating a run copies those
values straight into the run plan. Samples whose barcode is unique within the
order are assigned; duplicated barcodes are listed and skipped.
This is the path to design for. Collecting the barcode at order time means the run plan builds itself.
2. Manual editing
Facility admins can set or change a sample’s barcode and its run-specific preparation fields directly in the run plan table. On a default install the run-assignment form has two groups:
| Group | Fields |
|---|---|
| Run Assignment | Barcode, Run-Specific Notes |
| Preparation | Depletion (Host depletion / No depletion / Other), Extraction Date, Extraction Method, Analyte (DNA / RNA), Concentration (ng/uL), Post-PCR Concentration (ng/uL), Total Volume (uL) |
All of these are admin-only. A single save request is limited to 500 assignment rows.
3. Excel import
The Import Excel button on the Run Plan card uploads a spreadsheet and
bulk-assigns samples. The import runs in two phases: the first upload returns a
preview and changes nothing; only a second call with apply=true writes.
Limits, all enforced server-side:
| Limit | Value | Error |
|---|---|---|
| File size | 5 MB | Run plan imports are limited to 5 MB (413) |
| Data rows | 1000 | Run plan imports are limited to 1000 data rows |
| Columns | 80 | Run plan imports are limited to 80 columns |
SeqDesk looks for a worksheet named Run Samples, then Samples, then
Tabelle2, and finally the first sheet with more than one row. Row 1 is the
header.
Headers are normalised (lower-cased, non-alphanumerics collapsed to _, µ
rewritten to u, * stripped) and matched against a fixed alias table:
| Target | Accepted headers |
|---|---|
| Run | run, run id, run name, sequencing run, sequencing run id |
| Sample | sample, sample id, sample code, patient, patient id, patient code, internal sample code, internal sample/patient code |
| Barcode | barcode, barcode id, barcode name |
| Material / body site | material, body site, material body site |
| Sampling date | date, sampling date |
| Storage | storage box, storage position, buffer |
| Concentrations | dna ng/µl, concentration ng/ul, nanodrop dna ng/µl after PCR and purification, 10ng dna 20 µl h2o and their variants |
| Prep | depletion, extraction date, extraction method, analyte, total volume ul, run specific notes |
Unrecognised columns are reported in the preview as unmappedColumns and are
otherwise ignored.
Every row must have both a Run and a Sample value, otherwise it is reported as
Rows must include both Run and Sample/Patient columns. Sample codes are matched
against Sample.sampleId within this order; unknown ones produce
Sample not found on this order: <code>. A barcode used twice within one run
produces Barcode barcode07 appears 2 times in run 20260415.
The import can create runs. If a row names a run id that does not exist on the
order, SeqDesk creates it (with runName set to the same id) and prefills it from
the order barcodes before applying the imported rows.
Imported values are split by destination: fields that belong to the sample
(internal_sample_code, material_body_site, sampling_date, storage_box,
storage_position, storage_buffer) are merged into Sample.customFields;
everything else is stored on the run assignment.
Barcode normalisation
Barcodes are normalised on the way in and on every comparison, so you can be sloppy about format and still get a match.
The rule: trim, lower-case; if what remains matches an optional barcode/bc
prefix followed by 1–3 digits (leading zeros allowed), rewrite it as barcode
plus the digits zero-padded to two places. Otherwise keep the lower-cased string
as-is.
| Input | Normalised |
|---|---|
1 | barcode01 |
01 | barcode01 |
BC01 | barcode01 |
bc 1 | barcode01 |
barcode007 | barcode07 |
Barcode12 | barcode12 |
NB104 | nb104 |
A07 | a07 |
Note the last two rows. Only the barcode/bc + digits shape is canonicalised.
A kit-specific label such as NB104 is preserved verbatim (lower-cased), which
is correct — but it means NB104 and nb-104 are different barcodes.
Uniqueness rules
Three database constraints define what a run plan may contain:
| Constraint | Meaning |
|---|---|
@@unique([orderId, runId]) | Run ids are unique within an order |
@@unique([sequencingRunId, sampleId]) | A sample appears at most once per run |
@@unique([sequencingRunId, barcode]) | A barcode is used at most once per run |
A sample may appear in several runs — that is how a re-run is represented — and it may carry a different barcode in each.
When two samples claim one barcode
SeqDesk resolves this differently depending on where the conflict comes from:
- Within one save request, the request is rejected outright:
Barcode barcode07 is assigned more than once in this request. Nothing is written. - Against a barcode already held by another sample in the same run, and that other sample is also part of this request: the previous owner’s barcode is cleared first and the new assignment applied. This is what makes “shift every sample down one barcode” work in a single save.
- Against a barcode held by a sample that is not in this request:
Barcode barcode07 is already assigned in this run. Clear the other sample’s barcode first. - During automatic prefill from the order, duplicated
_barcodevalues are never assigned. They are returned asduplicateBarcodesfor you to fix by hand.
Why the run plan makes file matching work
When file discovery runs, it tries the
run-plan barcode first, before falling back to a sample barcode and finally
to fuzzy filename matching. A barcode match is checked against every path segment
of a discovered file — directory names as well as the filename — and, when the run
has a runId, the path must also contain that run id. A unique hit is treated as
an exact match with confidence 0.99 (paired) or 0.92 (single-end).
That is why a run plan pays for itself: with barcodes in place, a Nanopore output
tree of 20260415/barcode01/… matches deterministically, while filename-similarity
matching against S-1755262041412-K7QX2 would find nothing at all.
See Assigning Files to Samples for the full matching cascade.
Reads and their run
When reads are assigned, the assignment can carry a sequencingRunId, linking the
Read record back to the run it came off. The sequencing overview then shows the
run id and name alongside each sample’s files.
| Read field | Meaning |
|---|---|
file1 / file2 | Paths to R1 and R2, relative to the data base path |
checksum1 / checksum2 | MD5 checksums, computed on demand |
readCount1 / readCount2 | Read counts, written by QC pipelines |
avgQuality1 / avgQuality2 | Mean quality, written by QC pipelines |
fastqcReport1 / fastqcReport2 | Paths to per-file FastQC reports |
experimentAccessionNumber | ENA experiment accession (ERX…), after submission |
runAccessionNumber | ENA run accession (ERR…), after submission |
QC artifacts, not run columns
Run-level and sample-level outputs are stored as SequencingArtifact records
rather than on the run itself. Each artifact has a stage and a type:
| Stage | Type |
|---|---|
sample_receipt, sequencing, raw_reads, qc, delivery | qc_report, multiqc_report, demux_stats, sample_sheet, delivery_report, attachment |
Each artifact also carries a visibility of facility (the default) or
customer. Only customer artifacts with a viewable extension are ever released
to the researcher, and only after the order’s delivery is published — see
Releasing data to the researcher.
Artifacts can be uploaded through the sequencing page or linked to a file that already exists under the data base path.
Pipeline writeback to reads
Sequencing-order pipelines operate on the linked reads and write selected results
back onto the canonical Read record, so QC, validation and submission all read
the same numbers:
| Pipeline | Fields it updates on Read |
|---|---|
| Simulate Reads | file1, file2, readCount1, readCount2 |
| FASTQ Checksum | checksum1, checksum2 |
| FastQC | fastqcReport1, fastqcReport2, readCount1, readCount2, avgQuality1, avgQuality2 |
Read Cleaning is the exception: it does not write to Read directly but produces
candidates for review. See
Cleaned reads from pipelines.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
Run ID is required | Blank Run ID | Enter a run identifier |
Sequencing run plans can only be managed on submitted or completed sequencing orders | Order is DRAFT | Submit the order first |
Sequencing run not found | The run id does not belong to this order | Reload; it may have been deleted |
Barcode barcode07 is already assigned in this run | Another sample outside this save holds it | Clear that sample’s barcode, then reassign |
Barcode barcode07 is assigned more than once in this request | Two rows in one save share a barcode | Fix the duplicate before saving |
Run assignment batch is limited to 500 rows | Too many rows in one save | Split the save |
No worksheet with sample rows found | The workbook has no sheet with more than one row | Name the sheet Run Samples |
| Prefill assigned fewer samples than expected | Duplicate _barcode values on the order | Check duplicateBarcodes in the response and deduplicate |
| Files do not match despite a run plan | The run id is not in the file path, or the barcode folder differs | Compare the discovered paths against the normalised barcode |
Next
- File Discovery & Auto-Detect — how the scan finds the files a run plan will be matched against.
- Assigning Files to Samples — the matching cascade and what auto-assignment will and will not do.