anvi-script-process-genbank

This script takes a GenBank file, and outputs a FASTA file, as well as two additional TAB-delimited output files for external gene calls and gene functions that can be used with the programs anvi-gen-contigs-database and anvi-import-functions. It processes CDS, tRNA, and rRNA features by default, and reclassifies pseudogenes or CDS with internal stops as non-coding to ensure compatibility with anvi'o..

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

Authors

Requires

genbank-file

Provides

contigs-fasta external-gene-calls functions-txt

Usage

This program processes a genbank-file, and converts it into anvi’o friendly artifacts: namely, a contigs-fasta, external-gene-calls and a functions-txt.

The contigs-fasta and external-gene-calls can be given to anvi-gen-contigs-database to create a contigs-db, and then you can use anvi-import-functions to bring the function data (in the functions-txt) into the database. Then you’ll have all of the data in your genbank-file converted into a single contigs-db, which you can use for a variety of anvi’o analyses.

Features processed by default

By default, anvi-script-process-genbank will CDS, tRNA, and rRNA features by default.

  • CDS features are mapped to the anvi’o CODING gene call type.
  • tRNA and rRNA features are mapped to the NONCODING gene call type.

Handling problematic features

Genomic data often contains features that anvi’o may find difficult to process using standard workflows, such as gene calls with internal stop codons or frameshifts. This script identifies such features and handles them gracefully by reclassifying them as NONCODING:

  1. Pseudogenes: Any CDS explicitly marked as a /pseudogene or having /pseudo in its GenBank qualifiers will be reclassified as NONCODING.
  2. Internal Stops and Frameshifts: Any CDS with notes indicating internal stops or frameshifts (based on common NCBI PGAP terms) will also be reclassified as NONCODING.

This approach ensures that these features are preserved in your contigs-db without triggering translation errors during database creation.

Notes on Output

The parameters of this program entirely deal with the outputs. Besides telling the program where to put them, you can also give the function annotation source (in the functions-txt) a custom name.

One important note about this conversion is the following: During the conversion of GenBank entries, anvi’o will assign a new gene call id to each entry, breaking the link between locus tags defined in the GenBank file and the gene entries that will later appear in the anvi’o contigs-db. One way to avoid this is to use the flag --include-locus-tags-as-functions, which will instruct anvi’o to add a new ‘function’ source for each gene in the output file for functional annotations so that the user can trace back a given gene call to the original locus tag.

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-script-process-genbank.

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-process-genbank [-h] -i GENBANK [-O FILENAME_PREFIX] [--output-fasta FASTA] [--output-gene-calls TAB DELIMITED FILE] [--output-functions TAB DELIMITED FILE] [--annotation-source ANNOTATION_SOURCE] [--annotation-version ANNOTATION_VERSION] [--omit-aa-sequences-column] [--include-locus-tags-as-functions]

Parameters and their descriptions

INPUT Give us the preciousss...
-i, --input-genbank GENBANK required
Input GenBank file
OUTPUT You either provide a 'prefix', or provide specific output file names/paths. You can't mix the two (well, you can try).
-O, --output-file-prefix FILENAME_PREFIX
A prefix to be used while naming the output files. No file type extensions please; just a prefix -- all ouptut file names and extensions will be appended to this prefix.
--output-fasta FASTA
Output FASTA file path.
--output-gene-calls TAB DELIMITED FILE
Output file path for external gene calls
--output-functions TAB DELIMITED FILE
Output file path for anvi'o-importable gene functions file
DETAILS Setting the annotation source and version data to appear in the output file for functional annotations file.
--annotation-source ANNOTATION_SOURCE
Annotation source (default: "NCBI_PGAP") Default: NCBI_PGAP
--annotation-version ANNOTATION_VERSION
Annotation source version to be stored in the database (default: "v4.6") Default: v4.6
--omit-aa-sequences-column
If amino acid sequences for gene calls are present in the GFF file, anvi'o by default will include an `aa_sequences` column in the external gene calls output file. This is good because then anvi-gen-contigs-database can use that information directly, instead of trying to predict the translated sequences itself. If you would like this program to not report amino acid sequences even when they present and use anvi'o to predict translated sequences later, you can use this flag.
--include-locus-tags-as-functions
When anvi'o processes genes in a GenBank file, it will assign new gene caller ids to each entry. Using this flag will will instruct anvi'o to add a new 'function' source in the annotation of each gene call so the the user can trace back a given gene call to the original locus tag number in the GenBank file.

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.