anvi-gen-gene-consensus-sequences

Collapse variability for a set of genes across samples.

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

Authors

Requires

profile-db contigs-db

Can use

genes-of-interest-txt

Provides

genes-fasta

Usage

This program provides consensus sequences for the genes within a contigs-db and profile-db pair.

In other words, this collapses variability by assigning the most abundant nucleotide in your sample at each position, giving single consensus sequences for each gene for each sample.

A basic run of this program will resemble the following:

anvi-gen-gene-consensus-seuqences -p profile-db \ -c contigs-db \ -o genes-fasta

The default output is a genes-fasta, but you can also get a tab-delimited output matrix by adding the flag --tab-delimited.

You also have the option to focus on a subset of the data in your contigs-db and profile-db by providing either:

  • A list of gene caller IDs (either as a parameter or through a file with one gene caller ID put line)
  • A list of samples to focus on (as a file with a single sample name per line)

Additional Parameters

  • You have the option to change the variability engine (i.e. to codons), where variability at this level will be resolved.
  • To compress all variability profiles for each of your samples for a single gene, use the flag --conpress samples. This way, the program will only report one consensus sequence for each gene instead of reporting one for each sample.
  • You can get consensus sequences for each contig instead of for each gene with --contigs-mode
  • To report all consensus sequences (even when there are no variable positions), activate --quince-mode

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-gen-gene-consensus-sequences.

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-gen-gene-consensus-sequences [-h] -p PROFILE_DB -c CONTIGS_DB [--gene-caller-ids GENE_CALLER_IDS] [--genes-of-interest FILE] [--samples-of-interest FILE] [-o FILE_PATH] [--tab-delimited] [--engine ENGINE] [--contigs-mode] [--quince-mode] [--compress-samples]

Parameters and their descriptions

options
--compress-samples
Normally all samples with variation will have their own consensus sequence. If this flag is provided, the coverages from each sample of interest will be summed and only a single consenus sequence for each gene/contig will be output.
DATABASES Declaring relevant anvi'o databases. First things first.
-p, --profile-db PROFILE_DB required
Anvi'o profile database
-c, --contigs-db CONTIGS_DB required
Anvi'o contigs database generated by 'anvi-gen-contigs-database'
FOCUS What do we want? A consensus sequence for a gene, or a list of genes. From where do we want it? All samples, by default. When do we want it? Whenever it is convenient.
--gene-caller-ids GENE_CALLER_IDS
Gene caller ids to focus on. Multiple of them can be declared separated by a delimiter (the default is a comma, and if there is no option to change the delimiter, you must use a comma).In anvi-gen-variability-profile, if you declare nothing you will get all genes matching your other filtering criteria. In other programs, you may get everything, nothing, or an error. It really depends on the situation. Fortunately, mistakes are cheap, so it's worth a try.
--genes-of-interest FILE
A file with anvi'o gene caller IDs. There should be only one column in the file, and each line should correspond to a unique gene caller id (without a column header).
--samples-of-interest FILE
A file with samples names. There should be only one column in the file, and each line should correspond to a unique sample name (without a column header).
OUTPUT Output file and output style
-o, --output-file FILE_PATH
The output file name. The boring default is "genes.fa". You can change the output file format to a TAB-delimited file using teh flag `--tab-delimited`, in which case please do not forget to change the file name, too. Default: genes.fa
--tab-delimited
Use the TAB-delimited format for the output file.
EXTRAS Parameters that will help you to do a very precise analysis. If you declare nothing from this bunch, you will get "everything" to play with, which is not necessarily a good thing...
--engine ENGINE
Variability engine. The default is 'NT'. Default: NT
--contigs-mode
Use this flag to output consensus sequences of contigs, instead of the default, which is genes
--quince-mode
Use this flag to output consensus sequences for cases even where there is no variability

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.