Question: CrossMap Error With BigWig Files
gravatar for skasowitz
2.9 years ago by
skasowitz10 wrote:

I am attempting to liftover coordinates of several files in BigWig format from mm10 to mm9 using CrossMap. Below is an example of the output I am receiving with any of my files.

 python ~/python-2.7.9/bin/ bigwig mm10ToMm9.over.chain.gz KO_mm9
    @ 2017-03-13 15:16:16: Read chain_file:  mm10ToMm9.over.chain.gz
    @ 2017-03-13 15:16:18: Liftover bigwig file: ==> KO_mm9.bgr
    @ 2017-03-13 15:16:18: Merging overlapped entries in bedGraph file ...
    @ 2017-03-13 15:16:18: Sorting bedGraph file:KO_mm9.bgr
    Traceback (most recent call last):
      File "/home/kasowitz/python-2.7.9/bin/", line 1636, in <module>
        crossmap_wig_file(mapTree, in_file, out_file, sourceChromSizes, targetChromSizes, in_format = 'bigwig')
      File "/home/kasowitz/python-2.7.9/bin/", line 1445, in crossmap_wig_file
        for (chr, start, end, score) in bgrMerge.merge(out_prefix + '.bgr'):
      File "/home/kasowitz/python-2.7.9/lib/python2.7/site-packages/cmmodule/", line 95, in merge
        (last_chr, last_start, last_end, last_score) = lines[-1].split()
    IndexError: list index out of range

The error looks like it is resulting from receiving an empty bgr file, but I am not sure whats happening to cause the liftover to fail before this step.

Thanks for any advice

crossmap • 1.1k views
ADD COMMENTlink modified 9 months ago by 15282774490 • written 2.9 years ago by skasowitz10

Hello I was wondering if you managed to find out what the issue was, I am having the same problem Thanks a lot

ADD REPLYlink written 22 months ago by amartin30
gravatar for 1528277449
9 months ago by
15282774490 wrote:

I encountered same problem. I found the key is the chromosome names in my wig file are numbers only (1,2,3...), but are chr1, chr2... in xx.over.chain.gz. After I added "chr" in my wig files, this problem was solved.

ADD COMMENTlink modified 9 months ago • written 9 months ago by 15282774490
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1508 users visited in the last hour