de_novo_wf
For arguments and output files, see each of the individual steps:
The de novo workflow infers a new bacterial or archaeal tree containing the user-supplied genomes and, by default, the GTDB reference genomes. The classify workflow is recommended for obtaining taxonomic classifications; this workflow is only recommended if a de novo domain-specific tree is desired. The taxonomic assignments should be taken as a guide, not as final classifications. In particular, no effort is made to resolve the taxonomic assignment of lineages composed exclusively of user-submitted genomes.
This workflow consists of five steps: identify, align, infer, root and decorate.
identifycalls genes with Prodigal and identifies the marker genes, as in the classify workflow. No ANI screen is performed.alignbuilds the multiple sequence alignment of the user genomes and, unless--skip_gtdb_refsis used, the GTDB reference genomes (optionally restricted with--taxa_filter). Columns are selected with the canonical mask, or with--custom_msa_filtersand its parameters (--cols_per_gene,--min_consensus,--max_consensus,--min_perc_taxa,--rnd_seed).inferbuilds the tree with FastTree (FastTreeMP when--cpus> 1) using the--prot_modelsubstitution model (default: WAG). Branch lengths are rescaled under the Gamma20 model only when--gammais used, and local support values are computed unless--no_supportis used.rootroots the tree on the--outgroup_taxon.decoratedecorates the rooted tree with the GTDB taxonomy.
The de novo workflow can be run as follows:
gtdbtk de_novo_wf --genome_dir <my_genomes> --<bacteria|archaea> --outgroup_taxon <outgroup> --out_dir <output_dir>
This will process all genomes in <my_genomes> using the specified marker set (--bacteria or --archaea) and
place the results in <output_dir>. Only genomes previously identified as bacterial (archaeal) should be included
when using the bacterial (archaeal) marker set. The tree is rooted on the <outgroup> taxon (typically a phylum in
the domain-specific tree) as required for correct decoration of the tree. In general, we suggest the resulting tree be
treated as unrooted when interpreting results. As in the classify workflow, genomes can also be specified with a batch
file (--batchfile), and gzipped FASTA files can be used with --extension gz.
The workflow supports several optional flags, including:
--cpus: maximum number of CPUs to use.--min_perc_aa: exclude genomes that do not have at least this percentage of amino acids in the MSA (default: 10).--taxa_filter: restrict the GTDB reference genomes to the given taxa (comma separated, e.g.p__Bacillota).--skip_gtdb_refs: do not include GTDB reference genomes in the MSA. Requires--custom_taxonomy_file, which must contain the genomes of the outgroup.--custom_taxonomy_file: taxonomy of user genomes (see below), used for rooting and decoration.--prot_model: protein substitution model for tree inference (JTT,WAGorLG; default:WAG).--gamma: rescale branch lengths to optimize the Gamma20 likelihood.--no_support: do not compute local support values (Shimodaira-Hasegawa test).--keep_intermediates: keep intermediate files in the output directory.
For all flags, see the arguments below or the command line interface.
Arguments
usage: gtdbtk de_novo_wf (--genome_dir GENOME_DIR | --batchfile BATCHFILE)
(--bacteria | --archaea) --outgroup_taxon
OUTGROUP_TAXON --out_dir OUT_DIR [-x EXTENSION]
[--skip_gtdb_refs] [--taxa_filter TAXA_FILTER]
[--min_perc_aa MIN_PERC_AA] [--custom_msa_filters]
[--cols_per_gene COLS_PER_GENE]
[--min_consensus MIN_CONSENSUS]
[--max_consensus MAX_CONSENSUS]
[--min_perc_taxa MIN_PERC_TAXA] [--rnd_seed RND_SEED]
[--prot_model {JTT,WAG,LG}] [--no_support] [--gamma]
[--gtdbtk_classification_file GTDBTK_CLASSIFICATION_FILE]
[--custom_taxonomy_file CUSTOM_TAXONOMY_FILE]
[--write_single_copy_genes] [--prefix PREFIX]
[--genes] [--cpus CPUS] [--force] [--tmpdir TMPDIR]
[--keep_intermediates] [--debug] [-h]
mutually exclusive required arguments
- --genome_dir
directory containing genome files in FASTA format
- --batchfile
path to file describing genomes - tab separated in 2 or 3 columns (FASTA file, genome ID, translation table [optional])
mutually exclusive required arguments
- --bacteria
process bacterial genomes
- --archaea
process archaeal genomes
required named arguments
- --outgroup_taxon
taxon to use as outgroup (e.g.,
p__Patescibacteriotaorp__Altiarchaeota)- --out_dir
directory to output files
optional arguments
- -x, --extension
extension of files to process,
gz= gzippedDefault:
'fna'- --skip_gtdb_refs
do not include GTDB reference genomes in multiple sequence alignment.
- --taxa_filter
filter GTDB genomes to taxa (comma separated) within specific taxonomic groups (e.g.:
d__Bacteriaorp__Pseudomonadota,p__Actinomycetota)- --min_perc_aa
exclude genomes that do not have at least this percentage of AA in the MSA (inclusive bound)
Default:
10- --custom_msa_filters
perform custom filtering of MSA with
cols_per_gene,min_consensusmax_consensus, andmin_perc_taxaparameters instead of using canonical mask- --cols_per_gene
maximum number of columns to retain per gene when generating the MSA
Default:
42- --min_consensus
minimum percentage of the same amino acid required to retain column (inclusive bound)
Default:
25- --max_consensus
maximum percentage of the same amino acid required to retain column (exclusive bound)
Default:
95- --min_perc_taxa
minimum percentage of taxa required to retain column (inclusive bound)
Default:
50- --rnd_seed
random seed to use for selecting columns, e.g.
42- --prot_model
Possible choices: JTT, WAG, LG
protein substitution model for tree inference
Default:
'WAG'- --no_support
do not compute local support values using the Shimodaira-Hasegawa test
- --gamma
rescale branch lengths to optimize the Gamma20 likelihood
- --gtdbtk_classification_file
file with GTDB-Tk classifications produced by the classify command
- --custom_taxonomy_file
file indicating custom taxonomy strings for user genomes, that should contain any genomes belonging to the outgroup. Format: GENOME_ID<TAB>d__;p__;c__;o__;f__;g__;s__
- --write_single_copy_genes
output unaligned single-copy marker genes
- --prefix
prefix for all output files
Default:
'gtdbtk'- --genes
indicates input files contain predicted proteins as amino acids (skip gene calling).Warning: This flag will skip the ANI comparison steps (ANI screen and classification).
- --cpus
number of CPUs to use
Default:
1- --force
continue processing if an error occurs on a single genome
- --tmpdir
specify alternative directory for temporary files
Default:
'/tmp'- --keep_intermediates
keep intermediate files in the final directory
- --debug
create intermediate files for debugging purposes
Example
Input
gtdbtk de_novo_wf --genome_dir genomes/ --outgroup_taxon p__Undinarchaeota --archaea --out_dir de_novo_wf --cpus 3
gtdbtk de_novo_wf --genome_dir genomes/ --outgroup_taxon p__Chloroflexota --bacteria --taxa_filter p__Bacillota,p__Chloroflexota --out_dir de_novo_output
# Skip GTDB reference genomes (requires --custom_taxonomy_file for the outgroup)
gtdbtk de_novo_wf --genome_dir genomes/ --outgroup_taxon p__Customphylum --bacteria --skip_gtdb_refs --custom_taxonomy_file custom_taxonomy.tsv --out_dir de_novo_output
# Use a subset of GTDB reference genomes (p__Bacillota) and root on a custom phylum (p__Customphylum)
gtdbtk de_novo_wf --genome_dir genomes/ --taxa_filter p__Bacillota --outgroup_taxon p__Customphylum --bacteria --custom_taxonomy_file custom_taxonomy.tsv --out_dir de_novo_output
Custom Taxonomy Format
The custom taxonomy file is a tab-separated file with the first column listing user genomes (i.e. the FASTA file name without the extension) and the second column listing the standardized 7-rank taxonomy.
# For genome_1.fna, genome_2.fna and genome_3.fna
genome_1 d__Bacteria;p__Pseudomonadota;c__Gammaproteobacteria;o__Enterobacterales;f__Enterobacteriaceae;g__Salmonella;s__Salmonella enterica
genome_2 d__Bacteria;p__Actinomycetota;c__Actinomycetes;o__Mycobacteriales;f__Mycobacteriaceae;g__Mycobacterium;s__Mycobacterium tuberculosis
genome_3 d__Bacteria;p__Bacillota;c__Bacilli;o__Lactobacillales;f__Streptococcaceae;g__Streptococcus;s__Streptococcus pyogenes