MaciekAber / pysam

Automatically exported from code.google.com/p/pysam
0 stars 0 forks source link

IOError: could not open index `in.bam` #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Try to open a BAM file that is not co-ordinate sorted with no index (i.e.
no ".bai" file).

What is the expected output? What do you see instead?
I expect to be able to read in a SAM/BAM file regardless of sort order.

The error message is:
samfile = pysam.Samfile(input, "rb")
File "csamtools.pyx", line 195, in pysam.csamtools.Samfile.__cinit__
File "csamtools.pyx", line 288, in pysam.csamtools.Samfile._open
IOError: could not open index `in.bam` 

What version of the product are you using? On what operating system?
pysam-0.1.2
Cent OS 5

Original issue reported on code.google.com by nilsho...@gmail.com on 4 Mar 2010 at 5:50

GoogleCodeExporter commented 8 years ago
I have this fixed in my local branch, as well as a number of other 
improvements.  I'll 
send these on to the pysam authors.

Original comment by bioinformed@gmail.com on 30 Apr 2010 at 11:15

GoogleCodeExporter commented 8 years ago
Thanks, fixed in 0.2 -

use the flag until_eof to keep read reads without use of an index, e.g.

samfile.fetch( until_eof = True )

Original comment by andreas....@gmail.com on 4 May 2010 at 9:20

GoogleCodeExporter commented 8 years ago
Issue 27 has been merged into this issue.

Original comment by andreas....@gmail.com on 4 May 2010 at 9:22

GoogleCodeExporter commented 8 years ago

Original comment by andreas....@gmail.com on 4 May 2010 at 9:25