Category
Genome Variant Analysis
Usage
bcftools index [options] <in.bcf>|<in.vcf.gz>
Manual
bcftools index
is a command in the BCFtools suite.
Creates index for bgzip compressed VCF/BCF files for random access. CSI (coordinate-sorted index) is created by default. The CSI format supports indexing of chromosomes up to length $2^{31}$. TBI (tabix index) index files, which support chromosome lengths up to $2^{29}$, can be created by using the -t/--tbi option or using the tabix program packaged with htslib. When loading an index file, bcftools will try the CSI first and then the TBI.
Required arguments
- <in.bcf> or <in.vcf.gz>: Input bgzip compressed VCF/BCF file to be indexed for random access
Options
Indexing options
- -c, --csi: Generate CSI-format index for VCF/BCF files [default]
- -f, --force: Overwrite index if it already exists
- -m, --min-shift INT: Set minimal interval size for CSI indices to $2^{INT}$. By default, 14.
- -o, --output FILE: Optional output index file name
- -t, --tbi: Generate TBI-format index for VCF files
- --threads INT: Use multithreading with INT worker threads [0]
Stats options
- -a, --all: With --stats, print stats for all contigs even when zero
- -n, --nrecords: Print the number of records based on the existing index file
- -s, --stats: Print per-contig stats based on the existing index file
File formats this tool works with
Share your experience or ask a question