Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more flexible FeatureDB.region #44

Closed
daler opened this issue Jan 20, 2015 · 4 comments
Closed

more flexible FeatureDB.region #44

daler opened this issue Jan 20, 2015 · 4 comments

Comments

@daler
Copy link
Owner

daler commented Jan 20, 2015

See comments in #42. It would be useful to select features by entire seqid rather than knowing ahead of time what the seqid size is.

Proposed interface:

# already works
db.region(('chr1', 1, 1000))

# already works
db.region("chr1:1-1000")

# String as first argument? Assume seqid.
db.region('chr1')

# None as "start" position in tuple? 
# Do not add start >= clause (interpret as chr1[:1000]).
db.region(('chr1', None, 1000))

# None as "stop" position in tuple?
# Do not add stop <= clause (interpret as chr1[1000:]
db.region(('chr1', 1000, None))
@rmzelle
Copy link
Contributor

rmzelle commented Jan 20, 2015

How about

db.region(seqid="chr1", start=1, stop=1000)

with "start" and "stop" being optional?

@daler
Copy link
Owner Author

daler commented Jan 20, 2015

I should be able to make that work without breaking existing code -- I want to be sure not to break backwards compatibility.

@daler daler closed this as completed in ca12256 Jan 23, 2015
@daler
Copy link
Owner Author

daler commented Jan 23, 2015

Please see the new FeatureDB.region docs which has examples and a table showing how args/kwargs are interpreted.

@rmzelle
Copy link
Contributor

rmzelle commented Jan 23, 2015

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants