Get sequences for genes with hits in a single functional annotation source, optionally only for those that match to specific accession ids, from one or more contigs-dbs, bins, or genomes. Similar to anvi-get-sequences-for-hmm-hits, but without any gene concatenation / phylogenomics functionality..
🔙 To the main page of anvi’o programs and artifacts.
profile-db
collection
bin
external-genomes
internal-genomes ![]()
This program writes a genes-fasta with one entry per gene that has at least one hit in a single functions source. You can limit the output to genes with hits to specific accession ids in that source.
It works with a contigs-db, bins in a collection, or many genomes described in external-genomes and/or internal-genomes files.
anvi-get-sequences-for-function-hits is very similar to anvi-get-sequences-for-hmm-hits, but unlike the latter, this program does not have any functionality to concatenate genes for downstream phylogenetic or phylogenomic analyses. While this was not difficult to implement, it was a mindful omission on our part. This is primarily due to the fact that genes that share a functional annotation can have extremely low sequence identity depending on the breadth of their representation in databases, so their sequences may not a reliable basis for phylogenetic or phylogenomic inferences even though it may not be immediately obvious for all functions. HMMs can also return not-so-ideal hits, but since they are built from aligned sequences by design, they are generally more appropriate to work with for such goals.
The primary purpose of this program is to give you all matching sequences annotated with a particular function, or all functions listed in a particular source.
anvi-get-sequences-for-function-hits -c contigs-db \ --list-annotation-sources
anvi-get-sequences-for-function-hits -c contigs-db \ --annotation-source Pfam \ -o genes-fasta
anvi-get-sequences-for-function-hits -c contigs-db \ --annotation-source Pfam \ --accession-ids PF00117,PF02786 \ -o genes-fasta
Instead of a comma-separated list, --accession-ids also accepts a file with one accession id per line. A gene is reported if any of its hits in the source matches any of the accession ids. If an accession id matches nothing in any of your inputs, anvi’o will stop with an error rather than ignore it.
For every bin in a collection (use --bin-id or --bin-ids-file to focus on specific bins):
anvi-get-sequences-for-function-hits -c contigs-db \ -p profile-db \ -C collection \ --annotation-source COG20_FUNCTION \ -o genes-fasta
For many genomes:
anvi-get-sequences-for-function-hits -e external-genomes \ -i internal-genomes \ --annotation-source KOfam \ --accession-ids K00001 \ -o genes-fasta
The annotation source must be present in every input contigs-db.
Sequences are reported in DNA alphabet by default. Add --get-aa-sequences to get amino acid sequences instead.
The default defline looks like this:
{genome_name}_{gene_callers_id} source:{source}|accession:{accession}|function:{function}
Here {genome_name} is the genome name, the bin name, or the project name of the contigs-db depending on the input. If a gene has multiple hits in the source, its accessions and functions are joined with !!!.
You can define your own defline with --defline-format, and see all available variables with --list-defline-variables. Your format must produce a unique defline for each sequence (e.g., by including {genome_name} and {gene_callers_id}), otherwise anvi’o will complain.
anvi-get-sequences-for-function-hits -c contigs-db \ --annotation-source Pfam \ --defline-format “{gene_callers_id}_{accession}” \ -o genes-fasta
Edit this file to update this information.
The following is the list of parameters and their descriptions in the latest version of anvi-get-sequences-for-function-hits.
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).
-c, --contigs-db CONTIGS_DB-p, --profile-db PROFILE_DB-C, --collection-name COLLECTION_NAME-b, --bin-id BIN_NAME-B, --bin-ids-file FILE_PATH-e, --external-genomes FILE_PATH-i, --internal-genomes FILE_PATH--annotation-source FUNCTION_ANNOTATION_SOURCE--accession-ids ACCESSION_IDS-l, --list-annotation-sources-o, --output-file FILE_PATH--get-aa-sequences--defline-format F-STRING--list-defline-variables--no-wrapAre 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.