anvi-script-gen-functions-per-group-stats-output

Generate a TAB delimited file for the distribution of functions across groups of genomes/metagenomes.

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

Authors

Requires

functions external-genomes

Can use

internal-genomes genomes-storage-db

Provides

interactive

Usage

No one has described the usage of this program :/ If you would like to contribute, please see previous examples here, and feel free to add a Markdown formatted file in that directory named “anvi-script-gen-functions-per-group-stats-output.md”. For a template, you can use the markdown file for anvi-gen-contigs-database. THANK YOU!

Command line interface

The following is the list of parameters and their descriptions in the latest version of anvi-script-gen-functions-per-group-stats-output.

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-script-gen-functions-per-group-stats-output [-h] [-i FILE_PATH] [-e FILE_PATH] [-g GENOMES_STORAGE] --annotation-source FUNCTION_ANNOTATION_SOURCE [--aggregate-based-on-accession] [--aggregate-using-all-hits] [--min-occurrence NUM GENOMES] [-G TEXT_FILE] [-o FILE_PATH] [--skip-checking-genome-hashes]

Parameters and their descriptions

GENOMES Tell anvi'o where your genomes are.
-i, --internal-genomes FILE_PATH
A five-column TAB-delimited flat text file. The header line must contain these columns: 'name', 'bin_id', 'collection_id', 'profile_db_path', 'contigs_db_path'. Each line should list a single entry, where 'name' can be any name to describe the anvi'o bin identified as 'bin_id' that is stored in a collection.
-e, --external-genomes FILE_PATH
A two-column TAB-delimited flat text file that lists anvi'o contigs databases. The first item in the header line should read 'name', and the second should read 'contigs_db_path'. Each line in the file should describe a single entry, where the first column is the name of the genome (or MAG), and the second column is the anvi'o contigs database generated for this genome.
-g, --genomes-storage GENOMES_STORAGE
Anvi'o genomes storage file
FUNCTIONS Tell anvi'o which functional annotation source you like above all, and other important details you like about your analysis.
--annotation-source FUNCTION_ANNOTATION_SOURCE required
Get functional annotations for a specific annotation source. You can use the flag '--list-annotation-sources' to learn about what sources are available.
--aggregate-based-on-accession
This is important. When anvi'o aggregates functions for functional enrichment analyses or to display them, it uses by default the 'function text' as keys. This is because multiple accession IDs in various databases may correspond to the same function, and when you are doing a functional enrichment analysis, you most likely would like to avoid over-splitting of functions due to this. But then how can we know if you are doing something that requires things to be aggregated based on accession ids for functions rather than actual functions? We can't. But we have this flag here so you can instruct anvi'o to listen to you and not to us.
--aggregate-using-all-hits
This program will aggregate functions based on best hits only, and this flag will change that behavior. In some cases a gene may be annotated with multiple functions. This is a decision often made at the level of function annotation tool. For instance, when you run `anvi-run-ncbi-cogs`, you may end up having two COG annotations for a single gene because the gene hit both of them with significance scores that were above the default noise cutoff. While this can be useful when one visualizes functions or works with an `anvi-summarize` output where things should be most comprehensive, having some genes annotated with multiple functions and others with one function may over-split them (since in this scenario a gene with COGXXX and COGXXX;COGYYY would end up in different bins). Thus, when working on functional enrichment analyses or displaying functions anvi'o will only use the best hit for any gene that has multiple hits by default. But you can turn that behavior off explicitly and show anvi'o who is the boss by using this flag.
--min-occurrence NUM GENOMES
The minimum number of occurrence of any given function accross genomes. If you set a value, those functions that occur in less number of genomes will be excluded. Default: 1
GROUPS How should anvi'o divide your genomes into groups?
-G, --groups-txt TEXT_FILE
A tab-delimited text file specifying which group each item belongs to. Depending on the context, items here may be individual samples or genomes. The first column must contain item names matching to those that are in your input data. A different column should have the header 'group' and contain the group name for each item. Each item should be associated with a single group. It is always a good idea to define groups using single words without any fancy characters. For instance, `HIGH_TEMPERATURE` or `LOW_FITNESS` are good group names. `my group #1` or `IS-THIS-OK?`, are not good group names.
OUTPUT A.k.a., what you're really here for
-o, --output-file FILE_PATH
File path to store results.
--skip-checking-genome-hashes
Use this flag if you would like anvi'o to skip checking genome hashes. This is only relevant if you may have genomes in your internal or external genomes files that have identical sequences with different names AND if you are OK with it. You may be OK with it, for instance, if you are using `anvi-dereplicate-genomes` program to dereplicate genomes desribed in multiple collections in an anvi'o profile database that may be describing the same genome multiple times (see https://github.com/merenlab/anvio/issues/1397 for a case).

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.