anvi-run-scg-taxonomy

The purpose of this program is to affiliate single-copy core genes in an anvi'o contigs database with taxonomic names. A properly setup local SCG taxonomy database is required for this program to perform properly. After its successful run, anvi-estimate-scg-taxonomy will be useful to estimate taxonomy at genome-, collection-, or metagenome-level).

🔙 To the main page of anvi’o programs and artifacts.

Authors

Requires

contigs-db scgs-taxonomy-db

Can use

hmm-hits

Provides

scgs-taxonomy

Usage

This program associates the single-copy core genes in your contigs-db with taxnomy information.

Once this information is stored in your contigs-db (in the form of a scgs-taxonomy artifact), you can run anvi-estimate-scg-taxonomy or use the anvi-interactive and enable “Realtime taxonomy estimate for bins.” Check out this tutorial for more information.

In order to run this program, you’ll need a scgs-taxonomy-db, which you can set up by running anvi-setup-scg-taxonomy.

What does this program do?

In short, this program searches all of the single-copy core genes that it uses for this workflow (which are the 22 listed on this page) against the GTDB databases that you downloaded, and stores hits in your contigs-db. In other words, it finds your single-copy core genes and assigns them taxonomy. This way, it can use these single-copy core genes later to estimate the taxnomy of larger groups of contigs that include these single-copy core genes when you run anvi-estimate-scg-taxonomy.

Sweet. How do I run it?

anvi-run-scg-taxonomy -c contigs-db

In case you’re running this on a genome and not getting any hits, you have the option to try lowering the percent identity required for a hit (as long as you’re careful with it). The default value is 90 percent.

anvi-run-scg-taxonomy -c contigs-db \ --min-percent-identity 70

Edit this file to update this information.

Command line interface

The following is the list of parameters and their descriptions in the latest version of anvi-run-scg-taxonomy.

The code that generates this web page ensures that this information is the latest available in 9-dev (eunice). Which means, in some cases the information in this section (generated automatically) might be more comprehensive or up-to-date compared to the descriptions above (written by humans).


Command line usage

anvi-run-scg-taxonomy [-h] -c CONTIGS_DB [--scgs-taxonomy-data-dir PATH] [--min-percent-identity PERCENT_IDENTITY] [--max-num-target-sequences NUMBER] [-P NUM_PROCESSES] [-T NUM_THREADS] [--write-buffer-size INT] [--all-hits-output-file FILE_PATH]

Parameters and their descriptions

INPUT DATABASE An anvi'o contigs databaes to search for and store the taxonomic affiliations of SCGs.
-c, --contigs-db CONTIGS_DB required
Anvi'o contigs database generated by 'anvi-gen-contigs-database'
ADVANCED STUFF
--scgs-taxonomy-data-dir PATH
The directory for SCGs data to be stored (or read from, depending on the context). If you leave it as is without specifying anything, anvi'o will set up everything in (or try to read things from) a pre-defined default directory. The advantage of using the default directory at the time of set up is that every user of anvi'o on a computer system will be using a single data directory, but then you may need to run the setup program with superuser privileges. If you don't have superuser privileges, then you can use this parameter to tell anvi'o the location you wish to use to setup your databases. If you are using a program (such as `anvi-run-scg-taxonomy` or `anvi-estimate-scg-taxonomy`) you will have to use this parameter to tell those programs where your data are.
--min-percent-identity PERCENT_IDENTITY
The defualt value for this is 90.0%, and in an ideal world you sholdn't really change it. Lowering this value will probably give you too many hits from neighboring genomes, which may ruin your consensus taxonomy (imagine, at 90% identity you may match to a single species, but at 70% identity you may match to every species in a genus and your consensus assignment may be influenced by that). But once in a while you will have a genome that doesn't have any close match in GTDB, and you will be curious to find out what it could be. So, when you are getting no SCG hits whatsoever, only then you may want to play with this value. In those cases you can run anvi-estimate-scg-taxonomy with a `--debug` flag to see what is really going on. We strongly advice you to do this only with single genomes, and never with metagenomes. Default: 90
--max-num-target-sequences NUMBER
This parameter is used to determine how many hits from the database that has a reasonable match to the query sequence should be taken into consideration to make a final decision about the consensus taxonomy for each individual single-copy core gene sequence. The default is 20, which has been quite reasonable in our tests, however, you may need to increase this number to get more accurate results for your own data. In cases where you think this is what you need, the best way to test the parameter space for `--max-num-target-sequences` is to run the program multiple times on the same database with `--debug` and compare results. Default: 20
PERFORMANCE
-P, --num-parallel-processes NUM_PROCESSES
Maximum number of processes to run in parallel. Please note that this is different than number of threads. If you ask for 4 parallel processes, and 5 threads, anvi'o will run four processes in parallel and assign 5 threads to each. For resource allocation you must multiply the number of processes and threads. Default: 1
-T, --num-threads NUM_THREADS
Maximum number of threads to use for multithreading whenever possible. Very conservatively, the default is 1, unless the environmental variable `ANVIO_THREADS` sets another positive integer. If you use this parameter, it will override `ANVIO_THREADS`. It is a good idea to not exceed the number of CPUs / cores on your system. Plus, please be careful with this option if you are running your commands on a SGE -- if you are clusterizing your runs, and asking for multiple threads to use, you may deplete your resources very fast. Default: 1
--write-buffer-size INT
How many items should be kept in memory before they are written to the disk. The default is 5000. The larger the buffer size, the less frequently the program will access the disk, yet the more memory will be consumed since the processed items will be cleared off the memory only after they are written to the disk. The default buffer size will likely work for most cases, but if you feel you need to reduce it, we trust you. Please keep an eye on the memory usage output to make sure the memory use never exceeds the size of the physical memory. Default: 5000
OUTPUT By default, this program does not generate an output and instead simply store taxonomy information into the contigs database. But if the user wants more, they get more.
--all-hits-output-file FILE_PATH
If this flag is declared, anvi'o will store a comprehensive list of hits that led to the determination of the consensus hit per sequence (which is the only piece of information that is stored in the contigs database).

Additional Resources

Are you aware of resources that may help users better understand the utility of this program? Please feel free to edit this file on GitHub. If you are not sure how to do that, find the __resources__ tag in this file to see an example.