could not load index bfc tools af-dis plugin
1
0
Entering edit mode
3.8 years ago

Hello,

I am attempting to use the af-dist bcftools plugin to detect potential strand issues using the instructions found here: https://samtools.github.io/bcftools/howtos/plugin.af-dist.html

My script:

bcftools annotate -c INFO/AF -a af.vcf.gz DAC14_chr1_hg38_nonduplicates_fix.vcf.gz | bcftools +af-dist | grep ^PROB > DAC14_chr1_hg38_nonduplicates_fix.dist.txt

Error received:

Failed to open DAC14_chr1_hg38_nonduplicates_fix.vcf.gz: could not load index

I checked to confirm that my data is there and it is the correct vcf.gz filetype needed:

fileformat=VCFv4.2
FILTER=<ID=PASS,Description="All filters passed">
fileDate=20210211

What's going wrong here? Tried to search, but no luck... Thank you.

bcftools vcf af-dist imputation • 2.8k views
ADD COMMENT
0
Entering edit mode

You should index your VCF file (bcftools index LINK) .

ADD REPLY
0
Entering edit mode

Index to make it a tbi file? Then should I use the tbi files for this af-dist script? Thanks

ADD REPLY
0
Entering edit mode

Instruction link you posted in original question shows bcftools index af.vcf.gz in first step. Indexing allows rapid access.

ADD REPLY
0
Entering edit mode

I actually did index the af.vcf.gz file upon downloading it from the site.... I also tried to index it again and it said that I already have done so. I don't think this indexing instruction applies to my data file...?

ADD REPLY
1
Entering edit mode
3.8 years ago
GenoMax 147k

You need to index the file mentioned below:

Failed to open DAC14_chr1_hg38_nonduplicates_fix.vcf.gz: could not load index

If that does not work:

Can you try this additional option?

 -t, --tbi
    generate TBI-format index for VCF files
ADD COMMENT
0
Entering edit mode

Thank you, I index it using bcftools index, but still used the vcf.gz for the script and it worked. Still learning what these types of files mean, and how the script uses these various types of files.

Appreciate your help!

ADD REPLY
1
Entering edit mode

After indexing your main file, you should still keep your CSI or TBI index files in the same folder. Then you will continue to use vcf.gz files in your next steps. Good luck!

ADD REPLY

Login before adding your answer.

Traffic: 2090 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6