How to create an indexed VCF for BaseRecalibrator?

First, I searched the forum for answers to my question, but none of them seem to be working. I have a non-model organism and I'm trying to use BaseRecalibrator as recommended in the manual: run the HaplotypeCaller, filter the most robust variants and apply BaseRecalibrator using these variants as a database.

Let's say I select the most robust variants based on QUAL>10000 (an arbitrary limit). I use bcftools to do this:

bcftools filter --include 'QUAL>10000' --output-type v --output qual.vcf combined.vcf

This creates a new uncompressed VCF file with filtered variants. When I try it with BaseRecalibrator

BaseRecalibrator -nt 1 -nct 8 -R genome/A.pisum_genome_AphidBase_fixed.fasta -I bam/F1avr.bam -knownSites vcf/qual.vcf -o bam/F1avr.recal.table

I get an error

ERROR MESSAGE: An index is required, but none found., for input source: .../vcf/qual.vcf

I tried creating an index with bcftools, but BaseRecalibrator does not recognise a csi index. Renaming .csi to .idx threw an error about an incompatible index.

I tried following one of the suggestions from the forum and used a .bgzip compressed VCF. Again, "no index" error. When I created a bcf file with bcftools, it was not recognised.

I'm running out of options. What do I do?


Best Answer


Sign In or Register to comment.