Export genomic loci that is in between two nodes in a given pangenome graph..
🔙 To the main page of anvi’o programs and artifacts.
This program exports the genomic loci that fall between two nodes of an anvi’o pan-graph-db as individual contigs-db files (one per genome).
You will typically identify the two nodes of interest by visualizing the pangenome graph with anvi-display-pan-graph, and then ask this program to extract, for each genome in the graph, the stretch of DNA that lies between the genes that correspond to those two nodes.
You will need to provide a pan-graph-db, an external-genomes file that describes the genomes that went into the graph (so anvi’o knows where to find each source contigs-db), an output directory, and a way to describe the loci to export. The loci can be described either by two graph nodes (--graph-nodes) or by a single region ID (--region-id). You must provide one of these two, but not both.
Provide the two graph nodes that flank the loci you wish to export with --graph-nodes:
anvi-export-pan-subgraph -p PAN-GRAPH.db \ -e external-genomes \ --graph-nodes NODE_1,NODE_2 \ -o OUTPUT_DIRECTORY
Alternatively, you can provide a single region ID with --region-id, and anvi’o will resolve the two boundary nodes of that region automatically:
anvi-export-pan-subgraph -p PAN-GRAPH.db \ -e external-genomes \ --region-id 234 \ -o OUTPUT_DIRECTORY
Please note that the way by which boundary nodes are resolved depends on the type of the region:
You will typically learn which nodes or region IDs you are interested in by visualizing the pangenome graph in anvi’o using the program anvi-display-pan-graph. Region IDs will appear as you zoom in to certain parts of the pangenome graph like shown below:
Regardless of how you describe the loci, the output directory will contain a separate contigs-db (along with a FASTA file and a blank profile-db) for the locus extracted from each genome.
By default, the gene caller IDs in each exported contigs-db match those in the source contigs-db that the locus was extracted from. This way you can trace every gene in an exported locus back to the gene it originated from in the original database.
If you would rather have the gene caller IDs reset so that they start from 0 in each output database (which was the historical behavior of this program), use the --reset-gene-caller-ids flag:
anvi-export-pan-subgraph -p PAN-GRAPH.db \ -e external-genomes \ --graph-nodes NODE_1,NODE_2 \ -o OUTPUT_DIRECTORY \ --reset-gene-caller-ids
Edit this file to update this information.
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.