This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Bcftools error: Reference allele does not match the reference

Hi,

I am new to using bcftools +liftover, I want to liftOver from hg38 to hg19. However, I get the error: "Error: the reference allele GT does not match the reference NN at..."

I converted my data from bed/bim/fam to VCF using PLINK. I then ran: bcftools +liftover -Ov input_vcf.vcf -- -s human_1kg_v37.fasta -f GCA_000001405.15_GRCh38_no_alt_analysis_set.fna -c hg38ToHg19.over.chain.gz | bcftools sort -Ov -o chr22_vcf_hg19.vcf.

Please could you let me know how I can resolve this error?

Thank you

bcftools liftover

1 answer

Please could you let me know how I can resolve this error?

may be, if your alleles are swapped, you could use bcftools norm -c e

-c, --check-ref e|w|x|s         Check REF alleles and exit (e), warn (w), exclude (x), or set (s) bad sites [e]

Hi Pierre, thanks for your help.

I ran: bcftools norm -f GCA_000001405.15_GRCh38_no_alt_analysis_set.fna input_vcf.vcf

And got the error: "[E::faidx_adjust_position] The sequence "22" was not found

faidx_fetch_seq failed at 22:10516450"

This is actually the same position I got the original error too. What does this mean?

If it is relevant, the input vcf I am running all of this on is chr22 data only as a test run.

Log in to answer this question.