MaciekAber / pysam

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

add info to assert samfile._hasIndex() #50

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. open a bamfile with no index
2. get AssertionError with no indication of what happened.

changing line 819 of csamtools.pyx to:
  assert samfile._hasIndex(), ("%s must have index" % samfile.filename)

does the trick.

Original issue reported on code.google.com by bpederse on 28 Oct 2010 at 12:18

GoogleCodeExporter commented 8 years ago
Thanks,

converted assertions to test which throw appropriate exceptions.

Bw,
Andreas

Original comment by andreas....@gmail.com on 2 Nov 2010 at 9:27