Failed to liftover from hg38 to hg19
0
0
Entering edit mode
5.9 years ago
BAGeno ▴ 190

Hi,

I am converting my file from hg38 to hg19. For this purpose I used crossmap and picard LiftoverVcf. But I am getting this error when I run crossmap.

Traceback (most recent call last):
  File "/home/linux/anaconda3/bin/CrossMap.py", line 1760, in <module>
    crossmap_vcf_file(mapping = mapTree, infile= in_file, outfile = out_file, liftoverfile = sys.argv[2], refgenome = genome_file)
  File "/home/linux/anaconda3/bin/CrossMap.py", line 384, in crossmap_vcf_file
    for line in ireader.reader(infile):
  File "/home/linux/anaconda3/lib/python3.6/site-packages/cmmodule/ireader.py", line 27, in reader
    yield l.decode('utf8').strip().replace("\r", "")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 636: invalid start byte

This is my command.

CrossMap.py vcf UCSC_chain/hg38ToHg19.over.chain.gz Input.vcf.gz hg19.fa Output.liftover.vcf

And picard LiftoverVcf does not liftover any variant. This is my picard command.

java  -Xmx12G -jar picard.jar LiftoverVcf I=Input.vcf.gz O=Ouput.liftover.vcf CHAIN=hg38ToHg19.over.chain.gz REJECT=rejected_variants.vcf R=hg19.fa

What should I do to resolve this error?

crossmap picard • 3.4k views
ADD COMMENT
0
Entering edit mode

Hello. I am attempting to convert from hg38 to hg19. My results so far are picard rejects all.

CrossMap.py does convert some but fails because of this in the chain file.

File "/usr/local/bin/CrossMap.py", line 1932, in <module> crossmap_vcf_file(mapping = mapTree, infile= in_file, outfile = out_file, liftoverfile = sys.argv[2], refgenome = genome_file) File "/usr/local/bin/CrossMap.py", line 605, in crossmap_vcf_file fields[3] = refFasta.fetch(target_chr,target_start,target_end).upper() File "pysam/libcfaidx.pyx", line 303, in pysam.libcfaidx.FastaFile.fetch KeyError: "sequence 'chr1_gl000192_random' not present"

Does anyone know of a way around this issue?

ADD REPLY

Login before adding your answer.

Traffic: 1972 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