Sequence Translation
To translate DNA alignment to amino acid:
segul sequence translate -d [path-to-alignment-files] -f [sequence-format-keyword]The app will default to the standard code table (NCBI Table 1). Use the --table option to set the translation table. For example, to translate DNA sequences using NCBI Table 2 (vertebrate MtDNA):
segul sequence translate -d loci/ -f fasta --table 2You can also set the reading frame using the --reading-frame option:
segul sequence translate -d loci/ -f fasta --table 2 --reading-frame 2To let SEGUL detect the reading frame of each alignment, use the --auto-read flag instead:
segul sequence translate -d loci/ -f fasta --table 2 --auto-readTo show all the table options, use the --show-tables flag:
segul sequence translate --show-tablesSupported translation tables
Section titled “Supported translation tables”| Table No | Genetic Code |
|---|---|
| 1 | The Standard Code |
| 2 | The Vertebrate Mitochondrial Code |
| 3 | The Yeast Mitochondrial Code |
| 4 | The Mold, Protozoan, and Coelenterate Mitochondrial Code and the Mycoplasma/Spiroplasma Code |
| 5 | The Invertebrate Mitochondrial Code |
| 6 | The Ciliate, Dasycladacean and Hexamita Nuclear Code |
| 9 | The Echinoderm and Flatworm Mitochondrial Code |
| 10 | The Euplotid Nuclear Code |
| 11 | The Bacterial, Archaeal and Plant Plastid Code |
| 12 | The Alternative Yeast Nuclear Code |
| 13 | The Ascidian Mitochondrial Code |
| 14 | The Alternative Flatworm Mitochondrial Code |
| 16 | Chlorophycean Mitochondrial Code |
| 21 | Trematode Mitochondrial Code |
| 22 | Scenedesmus obliquus Mitochondrial Code |
| 23 | Thraustochytrium Mitochondrial Code |
| 24 | Rhabdopleuridae Mitochondrial Code |
| 25 | Candidate Division SR1 and Gracilibacteria Code |
| 26 | Pachysolen tannophilus Nuclear Code |
| 29 | Mesodinium Nuclear Code |
| 30 | Peritrich Nuclear Code |
| 33 | Cephalodiscidae Mitochondrial UAA-Tyr Code |
Sources: NCBI Genetic Code Tables
All options
Section titled “All options”| Option | Description |
|---|---|
-d, --dir |
Directory with alignments |
-i, --input |
Alignment files. Allows wildcards |
-f, --input-format |
Input format: auto (default), fasta, nexus, or phylip |
--datatype |
Data type: dna (default), aa, or ignore |
--table |
NCBI translation table. Default: 1 |
--reading-frame |
Reading frame: 1 (default), 2, or 3 |
--auto-read |
Detect the reading frame of each alignment |
--show-tables |
Print the supported translation tables |
-F, --output-format |
Output format: nexus (default), phylip, fasta, nexus-int, phylip-int, or fasta-int |
-o, --output |
Output directory. Default: Sequence-Translate |
--force |
Overwrite an existing output directory |
--log |
Log file path. Default: segul.log |
Copyright © 2026 H. Handika & J. A. Esselstyn.