freeseek / score

Tools to work with GWAS-VCF summary statistics files
MIT License
94 stars 6 forks source link

Single out of range variant causes program to exit #9

Closed davmlaw closed 1 month ago

davmlaw commented 2 months ago

A single record out of range (chr17 contig size is 83,257,441):

17      143074440       45      G       C       .       .       .

Expected:

Actual:

Entire program exits with message:

Unable to fetch sequence at 17:143074439-83257441
bcftools +liftover --version

Output:

bcftools  1.20-9-g4bd57e53 using htslib 1.20-4-gc93f5a57
plugin at 1.19 using htslib 1.20-4-gc93f5a57

Workaround

freeseek commented 2 months ago

I can provide a better error message but is it more appropriate for the program to run over such a VCF or to break and let you know that you either have a broken VCF and/or you are providing the wrong fasta reference or chain file?

davmlaw commented 1 month ago

You have a good point in that potentially someone could mix up the VCF/references, which would be caught by the error.

In my case, it was historical hand typed data, which I should have pre-processed.

I have changed my mind and think catching the reference mixup is more important than not relying on people providing a valid VCF, so am happy to close the issue