quachtina96 / pysam

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

Tabix file fetch for region does not work for large coordinate values #128

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use Tabixfile.fetch(chrom, start, end) where start and end are large (>1e6)
2. No rows will be returned

What is the expected output? What do you see instead?
Rows in the specified region are returned

What version of the product are you using? On what operating system?
0.7.4, Linux

Please provide any additional information below.
$ zcat tmp2.bed
chr1    500000  500002  '1/1'   1000    +
chr1    600000  600002  '5/5'   1000    -
chr1    1050000 1050002 '5/10'  500 -
chr1    1500000 1500002 '6/12'  500 +
chr1    1700000 1700002 '11/11' 1000    -
chr1    5000000 5000002 '2/11'  222 +
chr1    5500000 5500002 '5/8'   675 -
copper:~/w/test 03:14 PM
$ python
Python 2.7.1 (r271:86832, Apr 17 2012, 22:46:32)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pysam
>>> tmp = pysam.Tabixfile("tmp2.bed.gz")
>>> rows = tmp.fetch("chr1", 1000000, 2000000, parser=pysam.asBed())
>>> row1 = rows.next()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "ctabix.pyx", line 554, in pysam.ctabix.TabixIteratorParsed.__next__ (pysam/ctabix.c:5836)
StopIteration
>>>

Original issue reported on code.google.com by ra...@genebrew.com on 12 Jun 2013 at 7:16

GoogleCodeExporter commented 9 years ago
Hi,

it seems to work on my side. Any possibility that something went wrong with 
the indexing?

Best wishes,
Andreas

Original comment by andreas....@gmail.com on 26 Jun 2013 at 9:14

GoogleCodeExporter commented 9 years ago
The issue resolved itself when I upgraded to the latest versions of tabix and 
pysam.

Original comment by ra...@genebrew.com on 14 Jul 2013 at 10:47

GoogleCodeExporter commented 9 years ago
Thanks for letting me know.

Best wishes,
Andreas

Original comment by andreas....@gmail.com on 17 Sep 2013 at 7:27