Skip to content

Example run

Xian Chang edited this page Oct 14, 2026 · 1 revision

This page walks through a simple example run of STOAT. Input files

  • Graph file: gbz
  • Distance index file: dist
  • r-index file: ri
  • Quantitative phenotype file: tsv
  • VCF file: vcf

Run stoat vcf to get just the snarl info file:

stoat vcf -r ref --output stoat_output -g pg.full.gbz -G pg.full.ri -d pg.full.dist

This creates a file snarl_info.tsv.gz which should look something like this

#SNARL_DATA_v1.1
#allele_size_limit:0
#REFS
#ref
#SNARLS
#START_NODE     END_NODE        REF_INDEX       START_OFFSET    END_OFFSET      DEPTH   ALLELE_LENGTHS  WALKS   SEQUENCES
<260    >257    0       14788   14789   1       1,1     >257>259>260,>257>258>260       .
<263    >260    0       15015   15016   1       1,1     >260>262>263,>260>261>263       .
<266    >263    0       15246   15247   1       1,1     >263>265>266,>263>264>266       .
<269    >266    0       15360   15361   1       1,1     >266>268>269,>266>267>269       .

Then run stoat vcf again with the VCF file to get the snarl genotypes file

stoat vcf -r ref --output stoat_output -s stoat_output/snarl_info.tsv.gz -v merged_output.vcf.gz

The output stoat_output.snarl_genotypes.tsv.gz file will look like the snarl_info.tsv file, but with added columns for the genotypes:

#SNARL_DATA_v1.1
#allele_size_limit:0
#REFS
#ref
#SNARLS
#START_NODE	END_NODE	REF_INDEX	START_OFFSET	END_OFFSET	DEPTH	ALLELE_LENGTHS	WALKS	SEQUENCES	samp_0#0	samp_0#1	samp_100#0	samp_100#1
<260	>257	0	14788	14789	1	1,1	>257>259>260,>257>258>260	.	1	1	1	1	

Now we can test the genotypes we found against the phenotypes. This is done using stoat test

stoat test -g stoat_output/snarl_genotypes.tsv.gz -p phenotype.tsv -m linreg

The output will have the p-values of running the given test on each variant:

#CHR    START_OFFSET    END_OFFSET      START_NODE      END_NODE        ALLELE_LENGTHS  P       ALLELE_COUNT    DEPTH
ref     179084  179085  <3095   >3092   1,1     0.995   198,202 1

Clone this wiki locally