Overview of vg subcommands
masterThe vg toolkit is used for variation graph data structures, interchange formats, alignment, genotyping, and variant calling. Subcommands are categorized by their primary function:
Graph construction and indexing
Used to build graphs and various index types (xg, distance, GCSA, etc.).
vg autoindex: Automatically construct a graph and indexes for specific workflows (e.g., giraffe, rpvg).vg construct: Manually construct a graph from a reference and variants.vg index: Manually build individual indexes.vg gbwt: Manually build and manipulate GBWTs and indexes (GBWTgraph, GBZ, r-index).vg minimizer: Manually build a minimizer index for mapping.vg haplotypes: Haplotype sample a graph (recommended for mapping with giraffe).
Read mapping
Used to align reads to a variation graph.
vg giraffe: Fast haplotype-aware short read alignment.vg mpmap: Splice-aware multipath alignment of short reads.vg map: MEM-based read alignment.
Downstream analyses
Used for variant calling and graph-specific analysis.
vg pack: Convert alignments to a compact coverage index (used withvg call).vg call: Call or genotype VCF variants (requiresvg pack).vg rna: Construct splicing graphs and pantranscriptomes.vg deconstruct: Create a VCF from variation in the graph.
Working with read alignments
Tools for manipulating and converting alignment files.
vg gamsort: Sort a GAM/GAF file or index a sorted GAM file.vg filter: Filter alignments by properties.vg surject: Project alignments from a graph onto a linear reference (gam/gaf -> bam/sam/cram).vg inject: Project alignments from a linear reference onto a graph (bam/sam/cram -> gam/gaf).vg sim: Simulate reads from a graph.
Graph and read statistics
vg stats: Get statistics about the graph.vg paths: Get statistics about the paths.vg gbwt: Get statistics about a GBWT.vg filter: Get statistics about alignments (using--tsv-out).
Manipulating a graph
vg mod: Filter, transform, and edit the graph.vg prune: Prune the graph for GCSA2 indexing.vg ids: Manipulate graph node IDs.vg combine: Merge graphs into a combined graph.vg paths: Manipulate paths in a graph.vg gbwt: Manipulate GBWTs and associated indexes.vg annotate: Annotate a graph or alignments.
Conversion between formats
vg convert: Convert between handle graph formats and GFA, or between alignment formats.vg view: Convert between non-handle graph formats and alignment formats (dot, json, turtle...).vg surject: Project alignments from a graph onto a linear reference.vg inject: Project alignments from a linear reference onto a graph.vg paths: Extract a FASTA from a graph.
Subgraph extraction
vg chunk: Split a graph and/or alignment into smaller chunks.vg find: Use an index to find nodes, edges, kmers, paths, or positions.