public final class MultiIntervalLocalReadShard extends java.lang.Object implements MultiIntervalShard<GATKRead>
iterator()
).
The reads returned will overlap the intervals, including any padding requested.
Shards may be configured to apply custom filters, transformers and downsamplers to
the stream of reads returned by iterator()
.
IMPORTANT: For efficiency, all intervals within each shard are queried simultaneously.
This avoids the problem of decompressing the same file regions multiple times for
intervals that are close together, and is critical for performance!Constructor and Description |
---|
MultiIntervalLocalReadShard(java.util.List<SimpleInterval> intervals,
int intervalPadding,
ReadsDataSource readsSource)
Create a new MultiIntervalLocalReadShard spanning the given intervals, with each interval expanded
on both sides by the specified number of padding bases.
|
MultiIntervalLocalReadShard(java.util.List<SimpleInterval> intervals,
ReadsDataSource readsSource)
Create a new MultiIntervalLocalReadShard spanning the given intervals, with no padding around
intervals.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<SimpleInterval> |
getIntervals() |
java.util.List<SimpleInterval> |
getPaddedIntervals() |
java.util.Iterator<GATKRead> |
iterator() |
void |
setDownsampler(ReadsDownsampler downsampler)
Reads in this shard will be downsampled using this downsampler before being returned.
|
void |
setPostReadFilterTransformer(ReadTransformer transformer)
Reads in this shard will be transformed after filtering and before downsampling
|
void |
setPreReadFilterTransformer(ReadTransformer transformer)
Reads in this shard will be transformed before filtering
|
void |
setReadFilter(ReadFilter filter)
Reads in this shard will be filtered using this filter before being returned.
|
public MultiIntervalLocalReadShard(java.util.List<SimpleInterval> intervals, int intervalPadding, ReadsDataSource readsSource)
intervals
- The intervals that this shard spansintervalPadding
- Number of bases to pad each of the shard's intervals (on both sides)readsSource
- Source of readspublic MultiIntervalLocalReadShard(java.util.List<SimpleInterval> intervals, ReadsDataSource readsSource)
intervals
- The intervals that this shard spansreadsSource
- Source of readspublic java.util.List<SimpleInterval> getIntervals()
getIntervals
in interface MultiIntervalShard<GATKRead>
public java.util.List<SimpleInterval> getPaddedIntervals()
getPaddedIntervals
in interface MultiIntervalShard<GATKRead>
public void setPreReadFilterTransformer(ReadTransformer transformer)
transformer
- read transformer to apply before read filteringpublic void setReadFilter(ReadFilter filter)
filter
- filter to use (may be null, which signifies that no filtering is to be performed)public void setDownsampler(ReadsDownsampler downsampler)
downsampler
- downsampler to use (may be null, which signifies that no downsampling is to be performed)public void setPostReadFilterTransformer(ReadTransformer transformer)
transformer
- read transformer to apply after read filtering and before downsamplingpublic java.util.Iterator<GATKRead> iterator()
iterator
in interface java.lang.Iterable<GATKRead>