bcftools


Introduction:

BCFTOOLS is a collection of tools for variant calling and manipulating
VCF's and BCF's.

BCFTOOLS manipulate variant calls in the Variant Call Format (VCF)
and its binary counterpart BCF. All commands work transparently with
both VCFs and BCFs, both uncompressed and BGZF-compressed.

The command line tools include:

  • annotate: edit VCF files, add or remove annotations;
  • call: SNP/indel calling (former "view");
  • cnv: Copy Number Variation caller;
  • concat: concatenate VCF/BCF files from the same set of samples;
  • consensus: create consensus sequence by applying VCF variants;
  • convert: convert VCF/BCF to other formats and back;
  • csq: haplotype aware consequence caller
  • filter: filter VCF/BCF files using fixed thresholds;
  • gtcheck: check sample concordance, detect sample swaps and
    contamination;
  • index: index VCF/BCF;
  • isec: intersections of VCF/BCF files;
  • merge: merge VCF/BCF files files from non-overlapping sample sets;
  • mpileup: multi-way pileup producing genotype likelihoods;
  • norm: normalize indels;
  • plugin: run user-defined plugin;
  • polysomy: detect contaminations and whole-chromosome aberrations;
  • query: transform VCF/BCF into user-defined formats;
  • reheader: modify VCF/BCF header, change sample names;
  • roh: identify runs of homo/auto-zygosity;
  • stats: produce VCF/BCF stats (former vcfcheck);
  • view: subset, filter and convert VCF and BCF files;

Web Site:

The BCFTOOLS download page at htslib.org:

http://www.htslib.org/download/

Reference:

Usage:

On any ARC cluster, check the installation details
by typing "module spider bcftools".

BCFTOOLS requires that the appropriate modules be loaded before it can
be used. One version of the appropriate commands for use on NewRiver is:

module purge
module load gcc/5.2.0
module load bcftools/1.2
    

Examples:

The following batch file applies the BCFTOOLS call command to a BCF file,
creating a VCF file.

#! /bin/bash
#
#PBS -l walltime=0:05:00
#PBS -l nodes=1:ppn=1
#PBS -W group_list=newriver
#PBS -q open_q
#PBS -j oe
#
cd $PBS_O_WORKDIR
#
module purge
module load gcc/5.2.0
module load bcftools/1.2
#
bcftools call -c -v sim_variants.bcf > sim_variants.vcf

A complete set of files to carry out a similar process are available in
bcftools_example.tar