detect_table

The detect_table command is the main command of gtranslate. It is used to predict the translation table (TT) used by prokaryotic genomes. By analyzing specific sequence features — such as coding density differences, Trp ratios, and Gly ratios — gTranslate can accurately distinguish between the genetic codes associated with reassignment of the UGA stop codon, i.e. translation tables 11 (standard prokaryotic code), 4 (UGA=Trp), and 25 (UGA=Gly).

Arguments

usage: gtranslate detect_table [-h]
                               (--genome_dir GENOME_DIR | --batchfile BATCHFILE)
                               --out_dir OUT_DIR [-x EXTENSION]
                               [--tmpdir TMPDIR] [--cpus CPUS]
                               [--custom_model_path CUSTOM_MODEL_PATH]
                               [--keep_called_genes] [--prefix PREFIX]
                               [--force]

mutually exclusive required arguments

--genome_dir

directory containing genome files in FASTA format

--batchfile

path to file describing genomes - tab separated in 2 columns (FASTA file, genome ID)

required named arguments

--out_dir

directory to output files

optional arguments

-x, --extension

extension of files to process, e.g., “fna”, “fasta”, “gz” for gzipped files

Default: 'fna'

--tmpdir

specify alternative directory for temporary files

Default: '/tmp'

--cpus

number of CPUs to use

Default: 1

--custom_model_path

Path to file containing custom models.

--keep_called_genes

keep genes called with the right Translation table.

--prefix

prefix for all output files

Default: 'gtranslate'

--force

continue processing if an error occurs on a single genome

Files output

Example

Input

gtranslate detect_table --genome_dir test_command/genomes --out_dir test_command/output_multi --cpus 3

Output

[2026-03-05 20:36:09] INFO: gTranslate v0.0.2
[2026-03-05 20:36:09] INFO: gtranslate detect_table --genome_dir test_command/genomes --out_dir test_command/output_multi --cpus 3
[2026-03-05 20:36:09] INFO: Running detect_table
[2026-03-05 20:36:10] TASK: Running Prodigal V2.6.3 to identify genes.
[2026-03-05 20:36:27] INFO: Completed 3 genomes in 17.09 seconds (5.70 seconds/genome).
[2026-03-05 20:36:27] TASK: Summarising translation tables.
[2026-03-05 20:36:27] INFO: Completed 3 genomes in 0.00 seconds (31,615.36 genomes/second).
[2026-03-05 20:36:27] INFO: Cleaning up intermediate files.
[2026-03-05 20:36:27] INFO: Deleting generated gene files.
[2026-03-05 20:36:27] INFO: gene files deleted.
[2026-03-05 20:36:27] INFO: Done.