build_genbank_submission
Turn a record into the SUBMISSION SET NCBI's table2asn consumes: a .fsa whose defline carries the source modifiers, and a 5-column feature table (.tbl) beside it. This is not a GenBank export — GenBank's submission pipeline takes neither a .gb nor a plain fasta. Its real work is REFUSING and MIGRATING what GenBank will not accept: twelve feature keys were retired in 2014 in favour of regulatory (promoter, terminator and RBS among them, so every plasmid map is affected), a qualifier not on a key's approved list is dropped by name, and an unapproved key is kept as a misc_feature carrying its original name. Since December 2024 GenBank has required collection_date and geo_loc_name on every submission, and both are validated here against the INSDC vocabularies BEFORE a file is written. It WRITES FILES and sends nothing: no account, no key, no upload — table2asn stays yours to run, and the submission template it also wants is yours to make.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _files | No | The project: record references shaped like _subject. Their records become library documents a tool names in sequences/parts/document; a trace or alignment is found by file name. | |
| genbank | Yes | the record to submit, as GenBank text. Its features and topology are read from it — wire it from an export, or paste it. | |
| _subject | No | The record to act on: exactly one of sequence, accession (+source), sample (an id from list_samples) or file ({name, text} or {name, base64}); record_index picks one record of several. | |
| mol_type | No | one of INSDC's two MANDATORY qualifiers on the source key. Omitting it lets table2asn choose, which is a scientific fact picked by a tool. | genomic DNA |
| organism | No | the scientific name of the source organism. `synthetic construct` is a real answer for a built vector, not an absence. | synthetic construct |
| topology | No | circular for a plasmid. With this omitted table2asn writes `linear` into the LOCUS line, so a plasmid is deposited as a linear molecule with no error anywhere. Left empty, the record's own topology is used. Values: (From the record), circular (Circular), linear (Linear). Advanced. | |
| geo_loc_name | No | where the sample came from: a country, ocean or sea from the INSDC vocabulary, optionally `:region` and `, locality`. MANDATORY since December 2024, and it takes the same missing-value terms. | missing: lab stock |
| collection_date | No | when the sample was collected. MANDATORY on every GenBank submission since December 2024. `DD-Mmm-YYYY`, `Mmm-YYYY`, `YYYY`, an ISO form, or two of them separated by `/` for a range. A construct that was never collected anywhere takes an INSDC missing-value term such as `missing: lab stock`. | missing: lab stock |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | the submission set: one entry per file, each with its `name` and `text`. The two names share a basename, which is how table2asn pairs them | |
| changes | Yes | every feature the writer migrated, relabelled, refused or stripped a qualifier from, each with the authority's reason. Never empty-because-nothing-was-checked | |
| command | Yes | the exact table2asn invocation for the set, naming the submission template the user must make first | |
| reading | Yes | what the set is, generated from the record that was written rather than from the request | |
| written | Yes | features written into the table. Branch on this rather than counting `changes` | |
| problems | Yes | why the set cannot be submitted as it stands — an illegal collection date or a locality outside the vocabulary. Empty means the two mandatory modifiers are good, never that NCBI will be silent | |
| featureTable | Yes | the `.tbl` alone, for pasting or diffing |