Study Workflow
A study has no status column. Its state is the combination of a handful of
boolean and timestamp fields, and every badge and gate in the interface is
derived from them. Knowing which field means what is the fastest way to work out
why a button is disabled.
| Field | Type | Set by |
|---|---|---|
readyForSubmission | Boolean, default false | Mark as Ready on the Overview |
readyAt | Timestamp | Set when marking ready, cleared when unmarking |
testRegisteredAt | Timestamp | ENA test registration |
studyAccessionId | Text | ENA, on registration (PRJEB…) |
submitted | Boolean, default false | ENA production submission |
submittedAt | Timestamp | ENA production submission |
The badge you see
| Badge | Condition |
|---|---|
| Registered | submitted is true |
| Partial | studyAccessionId set, testRegisteredAt not set — the study registered but sample registration did not complete |
| Test Registered | studyAccessionId and testRegisteredAt set, less than 24 hours ago |
| Test Expired | Same, but more than 24 hours ago |
| Ready | readyForSubmission is true |
| Draft | None of the above |
The order matters: submitted wins over everything, and an accession outranks
the ready flag.
Draft
A newly created study starts with submitted: false and
readyForSubmission: false.
- Samples can be added and removed freely.
- Metadata can be edited without restriction.
- The study can be deleted (subject to the rules below).
- The Change Study Information button on the Overview opens the edit page.
Marking a study ready
readyForSubmission is a hand-raised signal: this study’s metadata is complete
and I want it registered. It does not lock anything.
The Submission Status card on the Overview holds the controls:
| Control | Who | When it is enabled |
|---|---|---|
| Mark as Ready | The study owner only | Only when all metadata is complete |
| Back to Draft | The owner or a facility admin | Whenever the study is ready and not yet submitted |
“All metadata is complete” means: the study’s schema has loaded, it has at
least one sample, and — when the questionnaire has a sample-metadata section —
every sample has at least one non-empty value in checklistData or
customFields. A study with no samples can never be marked ready. The
completion percentage next to the card is samples with metadata ÷ total samples.
Marking ready sets readyAt to the current time. Back to Draft clears both
readyForSubmission and readyAt — the original timestamp is not kept.
The completeness bar is deliberately shallow: one filled field on a sample counts as “has metadata”. It tells you nobody forgot a whole sample; it does not tell you that ENA’s mandatory fields are satisfied. The real check runs on the Publishing surface.
Test submissions
ENA runs a development server that accepts submissions and returns real-looking accessions without publishing anything. Use it. A production submission cannot be undone.
- A successful test registration stamps
testRegisteredAtand stores the returnedstudyAccessionId. - Test accessions expire 24 hours after registration. The interface counts
down (
expires in 6h,expires in 12m) and then shows Test Expired. - Production submission requires an active — not expired — test registration, in addition to the other checks.
The Publishing surface shows a Production Requirements checklist covering, at minimum:
| Check | Passes when |
|---|---|
| Requirements | Every metadata and validation check passed |
| Test Registration | An unexpired test accession exists |
| Marked as Ready | readyForSubmission is true |
If the test registration has expired, re-register on the test server before submitting to production.
After submission
submittedbecomes true,submittedAtis stamped andstudyAccessionIdholds the ENA project accession (PRJEB…).- Each sample receives its own
sampleAccessionNumber/biosampleNumber, and each read getsexperimentAccessionNumber(ERX…) andrunAccessionNumber(ERR…). - The interface treats the study as read-only for most fields: the Change Study Information button is hidden from non-admins, and the ready/unready controls disappear.
Read-only after submission is a UI convention only.
PUT /api/studies/[id] does not reject edits to a submitted study — it will
still apply title, description, alias, checklist, metadata and notes changes.
The one hard guard is deletion. Treat a registered study as immutable by
discipline, not because the API will stop you.
Running pipelines from a study
Studies are the launch point for analyses that combine several samples — assembly, binning, taxonomic profiling, submission preparation.
- Open the study and go to Analysis in the sidebar (facility admins only).
- Choose a pipeline.
- Select which of the study’s samples to include. Every selected sample must have reads linked.
- Set the pipeline parameters.
- Launch.
SeqDesk generates the pipeline’s input from canonical records — for MAG, a
samplesheet whose group column is the study id, so all the study’s samples
co-assemble. See Running a Pipeline.
Pipeline results
Completed runs link results back to the study:
| Result | Model | Notes |
|---|---|---|
| Assemblies | Assembly | Linked to a sample; one can be marked the sample’s preferred assembly |
| Bins | Bin | Genome bins with completeness and contamination scores |
| Artifacts | PipelineArtifact | QC reports, MultiQC summaries, logs and other outputs |
They appear on the study’s Analysis surface and on the individual samples. See Pipeline Results.
Internal notes
Every study has a free-text notes field, edited from the notes panel beside the
study. SeqDesk records notesEditedAt and notesEditedById on each save, so the
panel can show who last touched it and when. Notes are not versioned — a save
replaces the previous text.
Deleting a study
Deleting a study never deletes samples. It unassigns them
(studyId → null) and they stay in their sequencing orders with all their
metadata. Pipeline runs that referenced the study are preserved.
Two guards:
| Guard | Response |
|---|---|
| The study is submitted | 400 Cannot delete a submitted study |
The dynamic-studies module is enabled and the study still has samples | 409 Reassign or remove this study's 24 samples before deleting it. |
The second guard exists because with per-study questionnaires the samples’ answers were captured against this study’s form. Deleting the study would orphan them, so SeqDesk makes you decide where those samples go first. Remove them from the study (or move them to another study) and the delete proceeds.
Without the dynamic-studies module, an unsubmitted study can be deleted with
samples still attached; they are unassigned automatically.
Addressing a study
GET, PUT and DELETE on /api/studies/[id] resolve the path segment in
three ways, in order:
- as a study
id(cuid); - as a study alias;
- as a sequencing order id — returning the most recent study that contains a sample from that order.
So /studies/soil-2026 works if that is the alias, and a link built from an
order id resolves to the study its samples ended up in. Aliases are not enforced
unique, so the most recently created match wins.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Mark as Ready is disabled | Metadata is not complete, or the study has no samples | Fill at least one metadata field on every sample |
| Mark as Ready is not shown at all | You are not the study owner | Only the owner can mark ready; admins can only unmark |
| Badge says Test Expired | More than 24 hours since the test registration | Re-register on the ENA test server |
| Badge says Partial | The study registered but sample registration did not finish | Re-run the submission from the Publishing surface |
Cannot delete a submitted study | submitted is true | Submitted studies are permanent |
Reassign or remove this study's N samples before deleting it. | Per-study questionnaires are enabled | Remove or reassign the samples first |
readyForSubmission must be a boolean | An API caller sent a string | Send a JSON boolean |
| A sample vanished from the study | It was selected in another study’s wizard | Reassign it; the metadata travelled with the sample |
Next
- Preparing a Submission — the real pre-flight checks.
- Running a Pipeline — study-scoped analysis runs in detail.