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

Allow open-ended intervals in loadIndexedBam #1196

Closed
ryan-williams opened this issue Oct 4, 2016 · 1 comment
Closed

Allow open-ended intervals in loadIndexedBam #1196

ryan-williams opened this issue Oct 4, 2016 · 1 comment
Assignees
Milestone

Comments

@ryan-williams
Copy link
Member

@ryan-williams ryan-williams commented Oct 4, 2016

Intervals' start and end has to be specified in a ReferenceRegion before being passed to loadIndexedBam.

It would be nice to allow intervals of the form [N,∞) without resorting to making callers use Long.MaxValue or the like.

The right model would be a sort of ReferenceRegion-precursor, shaped like (String, Long, Option[Long]), that basically only exists ephemerally in the course of loading subsets of indexed BAMs.

Guacamole has some code that does basically this here, allowing open-ended intervals, whole contigs, and "all" and "none" keywords, then resolving things into concrete ReferenceRegions once contig-lengths are available, after parsing a BAM header.

@heuermh
Copy link
Member

@heuermh heuermh commented Oct 4, 2016

I've suggested before using Range from Guava, which handles bounded and unbounded ranges. It is well-designed and well-tested.

I abuse it for genomics here https://github.com/heuermh/dishevelled-bio/tree/master/range/src/main/java/org/dishevelled/bio/range

@fnothaft fnothaft added this to the 0.21.0 milestone Nov 8, 2016
@fnothaft fnothaft self-assigned this Nov 8, 2016
fnothaft added a commit to fnothaft/adam that referenced this issue Nov 8, 2016
heuermh added a commit that referenced this issue Nov 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.