freeseek / score

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

Liftover error: Reference allele does not match the reference #19

Open ktg25 opened 2 months ago

ktg25 commented 2 months ago

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

freeseek commented 2 months ago

PLINK does not generate conforming VCFs. You might want to try to fix your VCF with BCFtools/fixref (bcftools +fixref) and BCFtools/norm (bcftools norm --check-ref x) to make sure that your VCF file is conforming