BCFtools

Notitle

BCFtools are a set of utilities that manipulate variant calls in the Variant Call Format (VCF) and its binary counterpart, BCF.

BCFtools is available as a module on Apocrita.

Usage

To run the latest installed version of BCFtools, simply load the bcftoolsmodule:

$ module load bcftools
$ bcftools

Program: bcftools (Tools for variant calling and manipulating VCFs and BCFs)
Version: <VERSION> (using htslib <VERSION>)

Usage:   bcftools [--version|--version-only] [--help] <command> <argument>

Example jobs

Here are a couple of example jobs both running on 1 core and 2GB of memory:

Index Creation

This example will create an index for the compressed .bcf file genome_variants.bcf.

  • The -c option will generate the index in CSI format.
  • The -f will rewrite any existing .csi files.
#!/bin/bash
#$ -cwd
#$ -j y
#$ -pe smp 1
#$ -l h_rt=24:0:0
#$ -l h_vmem=2G

module load bcftools
bcftools index -c -f genome_variants.bcf

Processing Output Stats

This example will extract stats from the output.chk file to plot graphs and generate a PDF.

#!/bin/bash
#$ -cwd
#$ -j y
#$ -pe smp 1
#$ -l h_rt=24:0:0
#$ -l h_vmem=2G

module load bcftools
plot-vcfstats output.chk

References