Use when summarizing `bcftools +vrfs`/`vrfs` `SITE` output into selected sites or variance vectors from a subset of loci.
Perl parser for bcftools/vrfs SITE lines. It sorts candidate loci by their trailing distribution vector, keeps either a fraction or an absolute number of sites, and then emits one of three things: a default mixed summary, a site list, or a pure variance vector suitable for feeding back into bcftools +vrfs -r.
bcftools +vrfs ... | vrfs-variances -n 0.2/home/vimalinx/miniforge3/envs/bio/bin/vrfs-variancesSITE\t... lines from stdinbcftools +vrfs sites by fraction or absolute countVAR2 vector expected by downstream bcftools +vrfs -r workflowsSITE lines survived the ranking step# Default summary from 20% of sites
bcftools +vrfs ... | vrfs-variances -n 0.2
# Emit only the variance vector for bcftools +vrfs -r
bcftools +vrfs ... | vrfs-variances -n 100 -v > var2.txt
# List the selected sites instead of summary numbers
bcftools +vrfs ... | vrfs-variances -n 100 -s > selected_sites.txt
SITE records from bcftools +vrfs into stdin.-n should be a fraction (<=1) or an absolute count (>1).-s for site inspection, or -v for downstream machine-readable variance values.-r <seed> only when you deliberately want stochastic perturbation and reproducibility.SITE are parsed; everything else is ignored.-n <= 1 is treated as a fraction of the sorted sites, while -n > 1 is treated as an absolute count.MEAN and VAR2 summaries to stderr but also prints the final selected SITE line to stdout, so capture streams intentionally.-s can duplicate the final selected site because the current code prints it once from the list-sites path and once again when the selection limit is reached.-v prints only the numeric variance vector, one value per line.