-
Notifications
You must be signed in to change notification settings - Fork 8
4. Obtaining genomes
The FlexTaxD tool requires genome sequences to format output for downstream applications, such as metagenomic read classification databases. Below you'll find instructions for gathering these sequences depending on the taxonomy source you have used to build your FlexTaxD database. These sequences must be collected and stored under a single folder, and can be obtained either manually or through FlexTaxD.
If you built your FlexTaxD database using NCBI taxonomy, you should already have the genome sequences from the previous steps detailed in the Creating a FlexTaxD database document. Make sure all genomes are downloaded and placed in a specified folder.
To download genome sequences when using a GTDB taxonomy based database, use the FlexTaxD command:
flextaxd-create --db gtdb.fdb --genomes_path genomes --downloadIf you need to use the smaller GTDB representative dataset, use the --rep_path argument with the command.
FlexTaxD can identify and download missing genomes from NCBI:
flextaxd-create --db francisellaceae.fdb --genomes_path genomesTo list missing genomes and save the accession numbers in a file for later use:
flextaxd-create --db francisellaceae.fdb --genomes_path genomes --keep
wc -l tmp/FlexTaxD.missingThis list can then be used to download sequences from other sources like NCBI datasets.
If you have genome sequences obtained from other sources or assembled locally, you can manually add them to the genomes folder. Be sure the file names match those expected by FlexTaxD:
- NCBI format:
GCA_123456789.fna.gz - Custom assembly:
my_local_assembly_file.fasta
In a scenario where a GTDB-based general database was created and some species require additional genomes for higher taxonomic resolution, follow these steps:
- Download GTDB representative genomes with FlexTaxD or manually:
# With FlexTaxD
flextaxd-create --db gtdb.fdb --genomes_path genomes --download
# Manually
wget https://data.gtdb.ecogenomic.org/releases/latest/genomic_files_reps/gtdb_genomes_reps.tar.gz
tar -zxf gtdb_genomes_reps*.tar.gz
mkdir genomes
find gtdb_genomes_reps* -name "*fna.gz" -exec mv {} genomes/ \;- Purge the GTDB database of entries not part of the representative genomes dataset:
flextaxd --db gtdb.fdb --purge_database genomes --purge_database_force- Download any remaining genomes:
flextaxd-create --db gtdb.fdb --genomes_path genomesThe tool will prompt you to download missing genomes from NCBI if there are any discrepancies.
By following these instructions, you should be able to compile a comprehensive set of genomes required for your FlexTaxD database to facilitate your downstream bioinformatics analyses.