Error with bam2wig.py

42 views
Skip to first unread message

rspreafico

unread,
Jun 20, 2015, 5:01:27 PM6/20/15
to rseqc-...@googlegroups.com
Hello,

Congrats on this awesome, useful package! 

I have been running bam2wig.py and sometimes got an error like this:

Overlap on chr_16b between items starting at 1459 and 1459.
Please remove overlaps and try again
Overlap on chr_16b between items starting at 14610 and 14610.
Please remove overlaps and try again

I took wigToBigWig out of PATH, and no error was reported, indicating that this was output from wigToBigWig, and that the wig file generated by bam2wig.py had something wrong. However, when I manually called wigToBigWig on the wig file, no error was reported anymore. When I restored wigToBigWig into the PATH, and then called bam2wig.py, the same error popped out. 

So I took a look at SAM.py and noticed that the connection to wig files was not closed after finishing writing, and before calling wigToBigWig. So I introduced the following chunk of code after line 2616:

FWO.close()
if len(strandRule) != 0:
RVO.close()

And reinstalled RSeQC. Tried again to call bam2wig.py, and this time it worked. I am not sure whether this is the best fix and the actual reason for the error I got, but it may be worth investigating in view of the next release. 

Thank you,

Roberto

Liguo Wang

unread,
Jun 22, 2015, 12:35:50 PM6/22/15
to rseqc-...@googlegroups.com
Hi Roberto,

Thanks for identifying this bug. Yes, your fix is perfect. We will update the code.

Liguo

--
You received this message because you are subscribed to the Google Groups "rseqc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rseqc-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages