Skip to Content

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

FieldSet fromNotes
runIdRun ID inputRequired, unique per order
runNameOptional nameThe Excel import sets it to the run id
platformOptionalFree text
instrumentOptionalFree text
runDateDate inputGerman dd.mm.yyyy and dd_mm_yyyy forms are parsed as well as ISO
folderPathOptionalPath to the run output directory
runParametersOptionalArbitrary 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:

GroupFields
Run AssignmentBarcode, Run-Specific Notes
PreparationDepletion (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:

LimitValueError
File size5 MBRun plan imports are limited to 5 MB (413)
Data rows1000Run plan imports are limited to 1000 data rows
Columns80Run 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:

TargetAccepted headers
Runrun, run id, run name, sequencing run, sequencing run id
Samplesample, sample id, sample code, patient, patient id, patient code, internal sample code, internal sample/patient code
Barcodebarcode, barcode id, barcode name
Material / body sitematerial, body site, material body site
Sampling datedate, sampling date
Storagestorage box, storage position, buffer
Concentrationsdna ng/µl, concentration ng/ul, nanodrop dna ng/µl after PCR and purification, 10ng dna 20 µl h2o and their variants
Prepdepletion, 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.

InputNormalised
1barcode01
01barcode01
BC01barcode01
bc 1barcode01
barcode007barcode07
Barcode12barcode12
NB104nb104
A07a07

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:

ConstraintMeaning
@@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 _barcode values are never assigned. They are returned as duplicateBarcodes for 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 fieldMeaning
file1 / file2Paths to R1 and R2, relative to the data base path
checksum1 / checksum2MD5 checksums, computed on demand
readCount1 / readCount2Read counts, written by QC pipelines
avgQuality1 / avgQuality2Mean quality, written by QC pipelines
fastqcReport1 / fastqcReport2Paths to per-file FastQC reports
experimentAccessionNumberENA experiment accession (ERX…), after submission
runAccessionNumberENA 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:

StageType
sample_receipt, sequencing, raw_reads, qc, deliveryqc_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:

PipelineFields it updates on Read
Simulate Readsfile1, file2, readCount1, readCount2
FASTQ Checksumchecksum1, checksum2
FastQCfastqcReport1, 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

SymptomCauseFix
Run ID is requiredBlank Run IDEnter a run identifier
Sequencing run plans can only be managed on submitted or completed sequencing ordersOrder is DRAFTSubmit the order first
Sequencing run not foundThe run id does not belong to this orderReload; it may have been deleted
Barcode barcode07 is already assigned in this runAnother sample outside this save holds itClear that sample’s barcode, then reassign
Barcode barcode07 is assigned more than once in this requestTwo rows in one save share a barcodeFix the duplicate before saving
Run assignment batch is limited to 500 rowsToo many rows in one saveSplit the save
No worksheet with sample rows foundThe workbook has no sheet with more than one rowName the sheet Run Samples
Prefill assigned fewer samples than expectedDuplicate _barcode values on the orderCheck duplicateBarcodes in the response and deduplicate
Files do not match despite a run planThe run id is not in the file path, or the barcode folder differsCompare the discovered paths against the normalised barcode

Next