Skip to content

Fstic

Pairwise genetic distance matrices from allele-frequency data. Point it at a directory of single-sample VCFs, pick an estimator, get an N x N matrix.

What it does

Fstic reads variant calls with allele frequencies, one file per sample, and computes the pairwise distance between every pair of samples under one of eight standard estimators. It is built for within-host and population data where a sample is not a single genotype but a frequency spectrum: mixed infections, deep-sequenced isolates, pooled populations.

fstic --vcf sample*.vcf --output distances.csv --formula fst
  • Eight estimators


    FST, GST, Jost's D, Reynolds, Nei's D, Cavalli-Sforza chord, Rogers and Bray-Curtis, each with its formula written out.

    Choosing one

  • Two input formats


    Single-sample VCFs, or frequency tables in CSV/TSV. Pass files directly or a file of paths.

    Input formats

  • Filtering that reports itself


    Depth, frequency and strand-support thresholds, with a count of everything dropped and why.

    Filtering

  • Parallel and reproducible


    Work spread across all cores, with output that does not change when the core count does.

    Reliability

Install

conda install -c bioconda fstic
mamba install -c bioconda fstic
git clone https://github.com/PathoGenOmics-Lab/fstic.git
cd fstic
cargo build --release

Tutorial Install

New here? The tutorial walks a four-sample cluster from raw VCFs to a tree, and finds a mixed infection on the way. Ten minutes, no downloads.

What a distance means here

A sample is a vector of allele frequencies per site, not a genotype call. Where a sample has no record at a site, it is taken to be homozygous reference there, which is the usual convention for variant-only VCFs. The set of loci is the union of variant sites across all inputs.

That last point has a consequence worth stating: with the cumulative estimators a locus at which neither member of a pair carries a variant contributes nothing, so adding an unrelated sample to a run does not move the distances between the others. Nei's D and Rogers are defined over the whole locus set and do move, by design.

The model in full

Citation

Fstic is developed at I2SysBio (University of Valencia-CSIC) by Paula Ruiz-Rodriguez and Mireia Coscolla.

How to cite