Add source classes for BED and generic Interval types #665
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I need helpers for reading generic interval data, so I added these classes!
BedSource
: A source for BED input (similar toIntervalListSource
).IntervalSource
: A source for interval data that wraps either BED or Interval List input.In both classes, you can optionally provide a sequence dictionary that will be used to validate the intervals. I did this because I find myself having a BED and reference FASTA, more often than I have an Interval List and reference FASTA, but I would still like the safety of knowing my intervals are well-formed.
I expect to use these classes like the following, (so even BED data is safe!):
This should be OK from a type-alias perspective too, since
PathToIntervals
is defined as: