Skip to content

Sequence Translation

Parts of a SEGUL commandThe command segul sequence translate --dir loci/ --table 2 has five parts: the program segul, the command sequence for the task group, the subcommand translate for the task, the input --dir loci/ (folder or files), and the option --table 2 (optional).segulProgramsequenceCommandtask grouptranslateSubcommandtask--dir loci/Inputfolder or files--table 2Optionsoptional

To translate DNA alignment to amino acid:

Terminal window
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):

Terminal window
segul sequence translate -d loci/ -f fasta --table 2

You can also set the reading frame using the --reading-frame option:

Terminal window
segul sequence translate -d loci/ -f fasta --table 2 --reading-frame 2

To let SEGUL detect the reading frame of each alignment, use the --auto-read flag instead:

Terminal window
segul sequence translate -d loci/ -f fasta --table 2 --auto-read

To show all the table options, use the --show-tables flag:

Terminal window
segul sequence translate --show-tables
Table NoGenetic Code
1The Standard Code
2The Vertebrate Mitochondrial Code
3The Yeast Mitochondrial Code
4The Mold, Protozoan, and Coelenterate Mitochondrial Code and the Mycoplasma/Spiroplasma Code
5The Invertebrate Mitochondrial Code
6The Ciliate, Dasycladacean and Hexamita Nuclear Code
9The Echinoderm and Flatworm Mitochondrial Code
10The Euplotid Nuclear Code
11The Bacterial, Archaeal and Plant Plastid Code
12The Alternative Yeast Nuclear Code
13The Ascidian Mitochondrial Code
14The Alternative Flatworm Mitochondrial Code
16Chlorophycean Mitochondrial Code
21Trematode Mitochondrial Code
22Scenedesmus obliquus Mitochondrial Code
23Thraustochytrium Mitochondrial Code
24Rhabdopleuridae Mitochondrial Code
25Candidate Division SR1 and Gracilibacteria Code
26Pachysolen tannophilus Nuclear Code
29Mesodinium Nuclear Code
30Peritrich Nuclear Code
33Cephalodiscidae Mitochondrial UAA-Tyr Code

Sources: NCBI Genetic Code Tables

OptionDescription
-d, --dirDirectory with alignments
-i, --inputAlignment files. Allows wildcards
-f, --input-formatInput format: auto (default), fasta, nexus, or phylip
--datatypeData type: dna (default), aa, or ignore
--tableNCBI translation table. Default: 1
--reading-frameReading frame: 1 (default), 2, or 3
--auto-readDetect the reading frame of each alignment
--show-tablesPrint the supported translation tables
-F, --output-formatOutput format: nexus (default), phylip, fasta, nexus-int, phylip-int, or fasta-int
-o, --outputOutput directory. Default: Sequence-Translate
--forceOverwrite an existing output directory
--logLog file path. Default: segul.log

This material is based upon work supported by the National Science Foundation under grant numbers: DEB-1754393 and DEB-2244754. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.