bcftools
Variant calling and VCF/BCF file manipulation
TLDR
View a VCF/BCF file
SYNOPSIS
bcftools subcommand [options] [file]
DESCRIPTION
bcftools is a suite of utilities for variant calling and manipulating files in the Variant Call Format (VCF) and its binary counterpart BCF. It is part of the SAMtools/HTSlib project and is widely used in bioinformatics for genomic variant analysis.
All commands work transparently with both VCF and BCF files, compressed or uncompressed. The tools are designed to work in pipelines, reading from stdin and writing to stdout.
PARAMETERS
-Ob
Output compressed BCF-Oz
Output compressed VCF (bgzipped)-Ov
Output uncompressed VCF-Ou
Output uncompressed BCF (fastest for piping)-r region
Restrict to regions (chr:from-to format)-s samples
Comma-separated list of samples to include-i expression
Include sites matching filter expression-e expression
Exclude sites matching filter expression-o file
Output file name
SUBCOMMANDS
Variant Calling
mpileup, callFile Operations
view, merge, concat, sort, index, convertFiltering & Querying
filter, query, normStatistics
stats, roh, gtcheckAnnotation
annotate, csq, fill-tagsManipulation
reheader, isec, +split, +scatterConsensus
consensus
CAVEATS
Use -Ou when piping between bcftools subcommands to avoid unnecessary compression overhead. Indexed files are required for random access and some operations. VCF/BCF files should be sorted by chromosome and position for most operations.
HISTORY
bcftools was developed as part of the SAMtools project, initially created by Heng Li at the Wellcome Sanger Institute. It became a separate project around 2014 with the HTSlib library rewrite, gaining significant functionality for variant analysis.
