stoat graph - Pa-Tou/stoat GitHub Wiki
The stoat graph subcommand retrieves the genotypes of the haplotype paths of a graph, for each snarl in the pangenome.
The input is a variation graph with haplotype paths.
Within each snarl, paths are partitioned based on the walk they take through the snarl.
After running stoat graph, see how to run stoat test to perform the test between snarls and a phenotype.
stoat graph takes as input a variation graph, a distance index, and (optionally) an r-index.
The variation graph can be in .hg, .pg, or .gbz format (from libbdsg and gbwtgraph).
If the variation graph is in .gbz format, it is highly recommended to use an r-index as this will speed up the computation considerably.
Instructions for converting between graph formats and building the distance index can be found here.
The base command for retrieving the snarls genotypes is:
stoat graph --graph <graph.hg> --distance-index <graph.dist> -o <output_directory>The reference paths specified by --reference-file and/or --reference-prefix will be used for specifying coordinates of the variants.
If reference paths were not specified (or did not traverse a given snarl), then reference-sense paths will be used.
If neither are present, then any sample that traversed the variant may be used as reference path.
The output is written to a file snarl_genotypes.tsv.gz in the specified output directory.
The tsv output contains one locus per line.
The format is described here.
Stoat v0.0.4
Usage: stoat graph -g [graph] -d [distance index] [options]
Retrieves snarl genotypes based on the haplotype paths present in the graph
Output: snarl_genotypes.tsv.gz written to the specified output directory
input:
-g, --graph FILE Use this graph (required)
-G, --r-index FILE Use this r-index (recommended, requires -g be a gbz)
-d, --distance-index FILE Use this distance index
output:
-o, --output DIR Output directory name [stoat_output]
-L, --find-alleles Find the walks and lengths of alleles (they will be "." without this flag). This is slow if not using the r-index.
-u, --no-bgzip Don't compress the output file with bgzip
options:
-t, --threads N Number of threads to use
-V, --verbose INT Verbosity level (0=error, 1=warn, 2=info, 3=debug, 4=trace)
-l, --allele-size-limit INT Don't report variants smaller than this [0]
-R, --reference-file FILE Path to the reference file, one path name per line.
-r, --reference-prefix NAME The prefix of paths to be used as references.
If references are not given, use any reference-sense paths in the graph. Check paths with vg paths -M
-a, --ascii Print the STOAT ascii art banner
-h, --help Print this help message