Submitting to ENA
Both ENA paths start from the same place: open the study, go to the Publishing tab. You get two cards.
- Register at ENA — “Register and publish study metadata to the European Nucleotide Archive”. Carries a status badge: Draft, Ready, Test Registered, Test Expired, Partial, or Registered.
- Submit to ENA — “Submit reads, assemblies, and bins to ENA using SubMG”. Only visible to facility admins, and only when the study has at least one sample.
Everything on this page requires the FACILITY_ADMIN role. Demo accounts see the screens but every action is disabled.
Registering the study and samples
The test-first gate
SeqDesk deliberately makes it hard to publish to Production by accident. The Register at ENA screen has a Test / Production toggle, and the button below it changes with the toggle.
Register at Test Server is disabled when:
- any of the five submission requirements fails;
- the study already has a production accession but is not yet marked submitted — re-registering on Test would overwrite the stored production accession;
- the study already has an unexpired test registration and every sample already has an accession, so there is nothing left to send.
Register at Production is disabled unless all three of these hold:
| Production requirement | Meaning |
|---|---|
| Requirements | All five test-mode checks pass |
| Test Registration | The study has a test accession that is less than 24 hours old — an expired one reads “Expired — re-register on test server” |
| Marked as Ready | readyForSubmission is set on the study, from the Overview tab |
Hovering a disabled button explains which condition is blocking it. The practical effect is that you cannot reach Production without having proved the same study, with the same metadata, against ENA’s real validator within the last day.
What happens when you click
Validation
The API re-checks credentials, the study fields, sample count and taxonomy IDs server-side. A failure here returns HTTP 400 and nothing is sent to ENA. This is recorded as step 1, Validation.
Generate XML
SeqDesk builds three documents: PROJECT XML for the study, SAMPLE XML for the
samples, and a SUBMISSION XML wrapper containing a single ADD action. All
three are stored on the Submission record so you can read exactly what
shipped. This is step 2, Generate XML.
Send the study to ENA
A multipart POST to the drop-box endpoint with HTTP Basic auth, carrying
SUBMISSION and PROJECT parts. SeqDesk parses the receipt XML for a
PROJECT element with an accession attribute, preferring the one whose
alias matches the study’s. This is step 3, Send Study to ENA — or
Reuse Existing Study when the study already holds an accession for this
target, in which case no project call is made at all.
Send the samples to ENA
A second multipart POST with SUBMISSION and SAMPLE parts, all samples in
one SAMPLE_SET. Sample accessions are read out of the receipt and keyed by
alias. This is step 4, Send Samples to ENA.
On a re-run against a target the study is already registered with, only the samples that still lack an accession are sent; the rest are reported as reused.
Update the database
Step 5. Accessions are written to the study and samples, and the Submission
row is finalised. A progress dialog titled ENA Registration shows each step
live and ends with Registration Successful, Partial Registration, or
Registration Failed.
Where the accessions land
| Value | Format | Stored on | Written by |
|---|---|---|---|
| Study accession | PRJEB… | Study.studyAccessionId | XML registration |
| Test registration timestamp | — | Study.testRegisteredAt | XML registration against Test; cleared on a production registration |
| Submitted flag and time | — | Study.submitted, Study.submittedAt | Only when a production registration returns a study accession and every sample has one |
| Sample accession | ERS… | Sample.sampleAccessionNumber | XML registration and submg |
| BioSample accession | SAMEA… | Sample.biosampleNumber | submg only |
| Run and experiment accessions | ERR… / ERX… | Read.runAccessionNumber, Read.experimentAccessionNumber | submg only |
| Assembly accession | ERZ… | Assembly.assemblyAccession | submg only |
| Bin accession | — | Bin.binAccession | submg only |
A test registration writes a real-looking PRJEB… into
studyAccessionId but leaves submitted false, which is why the study badge
reads Test Registered rather than Registered.
The XML SeqDesk generates
Study (PROJECT):
<?xml version="1.0" encoding="UTF-8"?>
<PROJECT_SET>
<PROJECT alias="human-gut-shotgun-prjeb54724">
<TITLE>Human Gut Shotgun Metagenomes (PRJEB54724)</TITLE>
<DESCRIPTION>Twelve paired-end Illumina shotgun metagenomes...</DESCRIPTION>
<SUBMISSION_PROJECT>
<SEQUENCING_PROJECT/>
</SUBMISSION_PROJECT>
</PROJECT>
</PROJECT_SET>Samples, with the study’s checklist type emitted first as ENA-CHECKLIST and
the merged attributes after it:
<?xml version="1.0" encoding="UTF-8"?>
<SAMPLE_SET>
<SAMPLE alias="HGM-01">
<TITLE>Human faecal shotgun metagenome Subject-01</TITLE>
<SAMPLE_NAME>
<TAXON_ID>408170</TAXON_ID>
<SCIENTIFIC_NAME>human gut metagenome</SCIENTIFIC_NAME>
</SAMPLE_NAME>
<SAMPLE_ATTRIBUTES>
<SAMPLE_ATTRIBUTE>
<TAG>ENA-CHECKLIST</TAG>
<VALUE>host-associated</VALUE>
</SAMPLE_ATTRIBUTE>
<SAMPLE_ATTRIBUTE>
<TAG>collection date</TAG>
<VALUE>2016-05-12</VALUE>
</SAMPLE_ATTRIBUTE>
<SAMPLE_ATTRIBUTE>
<TAG>geographic location (country and/or sea)</TAG>
<VALUE>Netherlands</VALUE>
</SAMPLE_ATTRIBUTE>
</SAMPLE_ATTRIBUTES>
</SAMPLE>
</SAMPLE_SET>The SAMPLE alias is the sample’s sampleId, and the title falls back to the
sampleId when sampleTitle is empty. The SCIENTIFIC_NAME element is
omitted entirely when the sample has no scientific name.
Wrapper:
<?xml version="1.0" encoding="UTF-8"?>
<SUBMISSION>
<ACTIONS>
<ACTION>
<ADD/>
</ACTION>
</ACTIONS>
</SUBMISSION>Endpoints and authentication
| Target | URL |
|---|---|
| Test | https://wwwdev.ebi.ac.uk/ena/submit/drop-box/submit/ |
| Production | https://www.ebi.ac.uk/ena/submit/drop-box/submit/ |
HTTP Basic auth with the Webin credentials, multipart/form-data with the XML
documents as file parts. Your SeqDesk host needs outbound HTTPS to
ebi.ac.uk.
The connection test
Test connection in ENA settings registers nothing. It POSTs a throwaway
project (alias test-connection-<timestamp>) wrapped in a VALIDATE action
rather than ADD. Any receipt containing success="true" or
success="false" counts as a pass, because either proves the credentials
authenticated — a VALIDATE that fails on the dummy data is still a
successful login. A 401 fails the test. The username is checked against
^Webin-\d+$ before any network call is made.
The Register at ENA screen runs this same check automatically when a facility admin opens it, which is why the button can briefly read Checking ENA… and may turn into Set ENA credentials.
Broker-account mode
If the installation is configured as an ENA broker
(brokerAccount enabled with a center name in ENA settings), the registration
path adds a center_name attribute to both the PROJECT and every SAMPLE
element, so records are attributed to the brokering center. Broker mode
applies to XML registration only — the submg path does not inject a center
name.
Concurrency
A study can have only one registration in flight. The API takes a PostgreSQL
advisory lock keyed on the study and rejects a second attempt with
A submission for this study is already in progress while a PENDING or
SUBMITTED submission exists. If a row is stuck in PENDING because the
server died mid-request, delete it from the
Submissions Dashboard before
retrying.
Re-running a registration
There is no per-sample retry. Fix the underlying records and run the whole registration again — from the study page, or with Retry Submission on the dashboard, which re-POSTs the same study against the same target.
SeqDesk regenerates fresh XML every time, so database fixes take effect immediately. When the study already has an accession for that target, the project call is skipped and only the samples still missing an accession are submitted.
Submitting data files with submg
The registration path publishes metadata. To publish the actual sequencing
data, SeqDesk runs submg — a wrapper around the
submg CLI, which in turn drives ENA’s
webin-cli. It appears in the pipeline catalog as Submit to ENA,
category submission.
It is a normal pipeline run: it appears in
the run list, writes logs and artifacts, and can be scoped to a whole study or
a subset of samples. Researchers can see it but cannot start it — the package
declares userCanStart: false.
Which server it submits to
Unlike registration, submg does not offer a per-run toggle. It reads the
global enaTestMode setting and passes --development-service 1 (test) or
0 (production) to submg. Check the ENA setting in
Administration → ENA Credentials before
you start a run — the pipeline configuration screen will not tell you which
archive you are about to write to.
What the runner builds
For each selected sample the runner writes a YAML manifest into the run folder and a shell script that calls submg once per sample. The manifest carries:
STUDY— the study’sPRJ…accession, andPROJECT_NAME— the study title.METAGENOME_TAXIDandMETAGENOME_SCIENTIFIC_NAMEfrom the sample (scientificNamedefaults tometagenomewhen unset).NEW_SAMPLESwith the sample title,collection date,geographic location (country and/or sea), and every other scalar checklist field underADDITIONAL_SAMPLESHEET_FIELDS.PAIRED_END_READS— one entry per paired read, with the FASTQ paths,LIBRARY_SOURCE/LIBRARY_SELECTION/LIBRARY_STRATEGYfrom the sequencing order (defaulting toMETAGENOMIC/RANDOM/WGS),INSERT_SIZE(default300) andSEQUENCING_INSTRUMENT.ASSEMBLY— the resolved FASTA path,ASSEMBLY_SOFTWARE(defaultMEGAHIT) and the resolvedCOVERAGE_VALUE.BINS— only when bins exist on disk, with generated CheckM-style quality and taxonomy TSVs alongside.
SEQUENCING_INSTRUMENT is normalised onto ENA’s controlled vocabulary before
it is written. An exact case-insensitive match wins; otherwise SeqDesk retries
with an Illumina prefix, so NovaSeq 6000 becomes
Illumina NovaSeq 6000. Anything it still cannot map becomes unspecified,
which ENA accepts — so a wrong instrument model degrades to a vague record
rather than a failed submission. If the instrument matters, set it correctly
on the sequencing order.
The generated script then runs, per sample:
submg-cli submit --config <manifest>.yaml \
--staging-dir … --logging-dir … \
--development-service 1 \
--submit-samples --submit-reads --submit-assembly \
[--submit-bins] [--skip-checks]--submit-bins is added only when that sample has usable bin files.
--skip-checks is added when the skipChecks option is on — and it is on by
default in the package configuration, on the assumption that SeqDesk’s own
validation has already covered the same ground. Turn it off if you want
submg’s independent pre-flight checks as a second opinion.
Gzipped FASTQs are decompressed into a per-run scratch directory before submg sees them, and that directory is deleted afterwards.
Configurable options
| Option | Default | Effect |
|---|---|---|
Skip Validation Checks (skipChecks) | on | Passes --skip-checks to submg |
Submit Bins (submitBins) | on | Include bins when the sample has them |
Conda Environment (condaEnv) | submg | The environment that provides the submg CLI |
Assembly Software (assemblySoftware) | MEGAHIT | Written into the assembly manifest |
Completeness Software (completenessSoftware) | CheckM | Written into the bins manifest |
Binning Software (binningSoftware) | MetaBAT2 | Written into the bins manifest |
What comes back
When the run finishes, SeqDesk walks the submg logging directories and parses:
sample_preliminary_accessions.txtunderbiological_samples/— a tab-separated alias / accession / external-accession table. BothsampleAccessionNumber(ERS…) andbiosampleNumber(SAMEA…) are written to the sample. This is the only path that populatesbiosampleNumber.webin-cli.reportunder eachreads_*directory — run and experiment accessions, matched back to the rightReadrow by comparing the checksums in the emittedrun.xmlagainst the stored MD5s.webin-cli.reportunderassembly_fasta/— theERZ…analysis accession.bin_to_preliminary_accession.tsvunderbins/— per-bin accessions.
The run’s results field records samplesUpdated, readsUpdated,
assembliesUpdated, binsUpdated, artifactsCreated and any warnings. A run
that reports zero updates but no errors means submg ran and SeqDesk could not
find or map its receipts — read the warnings and the run artifacts before
assuming nothing was submitted.
Test versus Production, side by side
| Test | Production | |
|---|---|---|
| Host | wwwdev.ebi.ac.uk | www.ebi.ac.uk |
| Lifetime | ENA drops the records after 24 hours | Permanent and public |
| Accessions | Correct format, temporary | Permanent, citable |
Study.submitted | Left false | Set true on full success |
Study.testRegisteredAt | Set | Cleared |
| Reversible from SeqDesk | Yes — delete the submission row | No |
A test registration expires 24 hours after it was made, on ENA’s side and in SeqDesk’s own gating. If you register on Test on Friday afternoon and come back Monday, the Register at Production button will refuse until you re-register on Test — and so will submg, as long as the global ENA target is still Test.
Where to go next
- Submissions Dashboard — inspect, retry, and clean up submissions.
- Troubleshooting ENA — the errors both paths produce.
- Running a Pipeline — how pipeline runs work in general, including execution settings for submg.