Bam2Occupancy fails on BAM files
Issue #1
new
dupre is running pretty stable here, but the tool to generate occupancy vectors isn't.
bam2occupancy bamfile.fq.sorted.bam
Traceback (most recent call last):
File "/usr/bin/bam2occupancy", line 9, in <module>
load_entry_point('dupre==0.1', 'console_scripts', 'bam2occupancy')()
File "/usr/lib/python3.5/site-packages/dupre/bam2occupancy.py", line 59, in main
print(*occupancy_array_from_values(memo))
File "/usr/lib/python3.5/site-packages/dupre/occupancy.py", line 160, in occupancy_array_from_values
first = new_objects_at[0] + 1
IndexError: index 0 is out of bounds for axis 0 with size 0
When trying to load the required pysam module, there is no error (and other tools relying on this are working fine, too).
python -c "import pysam"
runs fine for example.