Closed jrougemo closed 13 years ago
...and I don't think that selecting on score = X is often useful:
track.read({'score': '14'})
Ideally we should be able to select on a range of scores:
x<= score <= y
OK so, I will implement the read
method to accept all these kinds of dictionaries:
data = t.read({'chr':'chr1', 'start':10000})
data = t.read({'chr':'chr1', 'start':10000, 'end':15000})
data = t.read({'chr':'chr1', 'start':10000, 'end':15000, 'inclusion':'strict'})
data = t.read({'chr':'chr1', 'strand':1})
data = t.read({'chr':'chr1', 'score':(10,100)})
data = t.read({'chr':'chr1', 'start':10000, 'end':15000 'strand':-1 'score':(10,100)})
I will also modify the documentation and add the relevant tests.
Unittests passing.
This should work: track.read({'chr':'chr1', 'strand':1})