Expand description
Translation of DNA to protein and open-reading-frame discovery.
Genetic codes are the pinned NCBI tables in [crate::genetic_codes]. Translation is
IUPAC-aware: a codon translates to an amino acid only when every expansion of its
ambiguity codes agrees (otherwise X); a stop requires every expansion to be a stop;
starts must be exact. Coordinates are zero-based reference positions on the forward
strand. Multipart features are spliced in source order; reverse-strand features are
the reverse complement of that splice (GenBank complement(join(...))). Nothing here
infers genes, splicing, frames beyond the declared inputs, or experimental validity.
Structs§
- Codon
- One translated codon with the reference positions of its three coding bases (in coding order, so they decrease on the reverse strand and may jump at joins).
- Frame
Translation - One reading frame of the whole molecule for display: codon
icovers forward positionsfirst + 3i .. first + 3i + 3(forward) orfirst - 3i - 2 ..= first - 3i(reverse;firstis the 5′ base on the reverse strand). Codons that would cross the origin are omitted. - Genetic
Code - A pinned NCBI translation table.
- Imported
Comparison - Comparison between the computed protein and an imported translation.
- Orf
- One complete open reading frame (start codon through stop codon).
- OrfOptions
- Explicit ORF search parameters.
- OrfScan
- ORF search result with the effective parameters.
- Translation
- Translation of an explicit coding sequence.
Enums§
- Coding
Strand - Coding direction relative to the forward reference.
- Start
Policy - Which codons may open an ORF.
- Translation
Error - Errors raised by translation requests.
Constants§
Functions§
- compare_
imported - Compare with an imported translation, ignoring one terminal stop on either side.
- feature_
translation_ qualifiers - Parsed
codon_start(default 1) andtransl_table(default: none) qualifiers. - find_
orfs - Six-frame search for complete ORFs: the longest ORF per stop codon (first start after
the previous in-frame stop), at least
min_codonsamino acids. On circular molecules ORFs may wrap the origin but never exceed one molecule length; frames without any stop are not reported. - imported_
translation - Imported
translationqualifier with SnapGene’s per-part commas and whitespace removed. - six_
frames - Six-frame translation for display, frames +1..+3 then -1..-3.
- translate_
feature - Translate a feature’s spliced coding sequence.
tableoverridestransl_table. - translate_
range - Translate the forward-coordinate range
[start, end)(on circular moleculesend < startwraps through the origin) on either strand, skippingframe(0–2) bases from the 5′ end of the coding strand.