bbcf / bbcflib

Internal utility modules for the BBCF
http://bbcf.epfl.ch/bbcflib
GNU General Public License v3.0
7 stars 4 forks source link

Selection from strand and score intervals #11

Closed jrougemo closed 13 years ago

jrougemo commented 13 years ago

This should work: track.read({'chr':'chr1', 'strand':1})

jrougemo commented 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
xapple commented 13 years ago

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.

xapple commented 13 years ago

Unittests passing.