Closed Z-Zen closed 2 years ago
Hi, You should use "hg19.fa" rather than "hg38.fa", as you were mapping variants from hg38 to hg19, CrossMap needs hg19 reference genome to find the REF alleles.
On Wed, Apr 6, 2022 at 9:20 AM Zen @.***> wrote:
Hi,
I tried to convert a VCF from hg38 to hg19 with CrossMap.py (v.0.6.3) using the following command:
CrossMap.py vcf hg38ToHg19.over.chain.gz test.vcf hg38.fa out.vcf
I got the following error:
Traceback (most recent call last): File "/usr/local/bin/CrossMap.py", line 319, in
crossmap_vcf_file(mapping = mapTree, infile= in_file, outfile = out_file, liftoverfile = chain_file, refgenome = genome_file, noCompAllele = args.no_comp_alleles, compress = args.compression, cstyle = args.cstyle) File "/usr/local/lib/python3.9/site-packages/cmmodule/mapvcf.py", line 168, in crossmap_vcf_file tmp = ref_allele[0] + alt_allele[1:] #replace the 1st nucleotide of ALT IndexError: string index out of range You can easily reproduce this example with the following VCF line:
chr1 248783950 . A G 60.28 . AC=2;AF=1.00;AN=2;DP=2;ExcessHet=3.0103;FS=0.000;MLEAC=1;MLEAF=0.500;MQ=60.00;POLYX=1;QD=30.14;SOR=2.303 GT:AD:DP:GQ:PL 1/1:0,2:2:6:72,6,0
— Reply to this email directly, view it on GitHub https://github.com/liguowang/CrossMap/issues/48, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACN443SXUYTACP2ZKUODARTVDWMQ5ANCNFSM5SWGLBHQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi,
I tried to convert a VCF from hg38 to hg19 with CrossMap.py (v.0.6.3) using the following command:
I got the following error:
You can easily reproduce this example with the following VCF line:
And this is another one