Options (7)
-O, --output-typebooleanView BCF file and convert to [v]CF on `stdout`
bcftools view {{path/to/input.bcf}} {{[-O|--output-type]}} v-o, --outputbooleanSort a VCF file variants by chromosome and position, output to a [b]CF file, and index the sorted output
bcftools sort {{path/to/input.vcf.gz}} {{[-O|--output-type]}} b {{[-o|--output]}} {{path/to/sorted.bcf}} {{[-W|--write-index]}}-W, --write-indexbooleanSort a VCF file variants by chromosome and position, output to a [b]CF file, and index the sorted output
bcftools sort {{path/to/input.vcf.gz}} {{[-O|--output-type]}} b {{[-o|--output]}} {{path/to/sorted.bcf}} {{[-W|--write-index]}}-e, --excludebooleanFilter for low quality variants and annotate with "LowQual" tag in the FILTER column
bcftools filter {{[-e|--exclude]}} 'QUAL<20' {{[-s|--soft-filter]}} LowQual {{path/to/input.vcf.gz}}-s, --soft-filterbooleanFilter for low quality variants and annotate with "LowQual" tag in the FILTER column
bcftools filter {{[-e|--exclude]}} 'QUAL<20' {{[-s|--soft-filter]}} LowQual {{path/to/input.vcf.gz}}-a, --annotationsbooleanAdd annotated columns from a tabix-indexed table on `stdout`
bcftools annotate {{[-a|--annotations]}} {{path/to/annotations.tsv.gz}} {{[-c|--columns]}} CHROM,POS,REF,ALT,INFO/AF {{path/to/input.vcf.gz}}-c, --columnsbooleanAdd annotated columns from a tabix-indexed table on `stdout`
bcftools annotate {{[-a|--annotations]}} {{path/to/annotations.tsv.gz}} {{[-c|--columns]}} CHROM,POS,REF,ALT,INFO/AF {{path/to/input.vcf.gz}}Examples (8)
Sort a VCF file variants by chromosome and position, output to a [b]CF file, and index the sorted output
Concatenate sorted VCF files that share the same samples to [z]ipped VCF on `stdout`
Filter for low quality variants and annotate with "LowQual" tag in the FILTER column
bcftools filter [-e|--exclude] 'QUAL<20' [-s|--soft-filter] LowQual path/to/input.vcf.gzAdd annotated columns from a tabix-indexed table on `stdout`
bcftools annotate [-a|--annotations] path/to/annotations.tsv.gz [-c|--columns] CHROM,POS,REF,ALT,INFO/AF path/to/input.vcf.gzOutput variant [i]nter[sec]tion between VCF files using 4 threads
bcftools isec path/to/a.vcf.gz path/to/b.vcf.gz ... --threads 4 [-o|--output] path/to/intersection.vcfMerge non-overlapping samples from VCF files without indices on `stdout`
bcftools merge path/to/cohort1.vcf.gz path/to/cohort2.vcf.gz --no-indexCreate index for a bgzipped VCF file
bcftools index path/to/input.vcf.gz