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