Plugins

Important
In order to use the BCFtools plugins, this environment variable must be set and point to the correct location:
export BCFTOOLS_PLUGINS=/path/to/bcftools/plugins
If a plugin still does not work, bcftools +name -vv explains why it would not load.
Note that plugins can be also run by giving the full path, for example bcftools +/path/to/plugin-name.so.

For developers

Please read here.

List of plugins

ad-bias

Finds positions with ALT allele frequency significantly different between two samples. Performs a Fisher test on the FORMAT/AD annotation.

add-variantkey

add VariantKey INFO fields VKX and RSX

af-dist

Collects AF deviation stats and GT probability distribution given AF and assuming HWE

allele-length

count the frequency of the length of REF, ALT and REF+ALT

check-ploidy

Checks if ploidy of samples is consistent for all sites.

check-sparsity

Prints samples without genotypes in a region (-r/-R) or chromosome (the default)

color-chrs

Colors shared chromosomal segments shared. Requires phased GTs.

contrast

Runs a basic association test, per-site or in a region, and checks for novel alleles and genotypes in two groups of samples. Adds the following INFO annotations:

  • PASSOC .. Fisher’s exact test probability of genotypic association (REF vs non-REF allele)

  • FASSOC .. proportion of non-REF allele in controls and cases

  • NASSOC .. number of control-ref, control-alt, case-ref and case-alt alleles

  • NOVELAL .. lists samples with a novel allele not observed in the control group

  • NOVELGT .. lists samples with a novel genotype not observed in the control group

counts

A minimal plugin which counts number of samples, SNPs, INDELs, MNPs and total number of sites.

dosage

Prints genotype dosage determined from FORMAT/PL, GL, or GT.

fill-from-fasta

Fills INFO or REF field based on values in a fasta file.

fill-tags

Sets INFO tags such as AF, AC, AC_Hemi, etc, for all samples or per population.

fixploidy

Fix ploidy

fixref

Diagnose and fix VCFs with genotypes on incorrect strand.

frameshifts

Annotates frameshift indels.

GTisec

Counts genotype intersections across all possible sample subsets in a vcf file.

GTsubset

Outputs sites where the requested samples all exclusively share a genotype (GT), i.e. all selected samples must have the same GT, while non of the others can have it.

guess-ploidy

Determines sample sex by checking genotype likelihoods (GL,PL) or genotypes (GT) in the non-PAR region of chrX.

gvcfz

compress gVCF file by resizing non-variant blocks according to specified criteria

impute-info

Adds imputation information metrics to the INFO field based on selected FORMAT tags. Only the IMPUTE2 INFO metric from FORMAT/GP tags is currently available.

indel-stats

Calculates per-sample or de novo indels stats. The usage and format is similar to smpl-stats and trio-stats.

isecGT

Compares two files and set non-identical genotypes in the first file to missing.

mendelian

Count Mendelian consistent / inconsistent genotypes

missing2ref

sets missing genotypes ("./.") to ref allele ("0/0" or "0|0"). DEPRECATED, use setGT instead.

parental-origin

determine parental origin of a CNV region

prune

Prune sites by missingness, allele frequency or linkage disequilibrium. Alternatively, annotate sites with r2, Lewontin’s D' (PMID:19433632), Ragsdale’s D (PMID:31697386).

setGT

Sets genotypes according to the specified criteria and filtering expressions. For example, missing genotypes can be set to ref, but much more than that.

smpl-stats

calculates basic per-sample stats. The usage and format is similar to indel-stats and trio-stats.

split

split VCF by sample, creating single-sample VCFs

split-vep

extract fields from structured annotations such as INFO/CSQ created by bcftools/csq or VEP. These can be added as a new INFO field to the VCF or in a custom text format

tag2tag

Converts between similar tags, such as GL,PL,GP or QR,QA,QS or localized alleles, eg LPL,LAD.

trio-dnm2

screen variants for possible de-novo mutations in trios

trio-stats

Calculate transmission rate in trio children. The usage and format is similar to indel-stats and smpl-stats.

trio-switch-rate

Calculates phase switch rate in trio children.

variantkey-hex

generate unsorted VariantKey-RSid index files in hexadecimal format

Feedback

We welcome your feedback, please help us improve this page by either opening an issue on github or editing it directly and sending a pull request.