use of org.broadinstitute.hellbender.engine.filters.CountingReadFilter in project gatk by broadinstitute.
the class AssemblyRegionWalker method traverse.
@Override
public final void traverse() {
CountingReadFilter countedFilter = makeReadFilter();
// Since we're processing regions rather than individual reads, tell the progress
// meter to check the time more frequently (every 10 regions instead of every 1000 regions).
progressMeter.setRecordsBetweenTimeChecks(10L);
for (final LocalReadShard readShard : readShards) {
// Since reads in each shard are lazily fetched, we need to pass the filter to the window
// instead of filtering the reads directly here
readShard.setReadFilter(countedFilter);
readShard.setDownsampler(maxReadsPerAlignmentStart > 0 ? new PositionalDownsampler(maxReadsPerAlignmentStart, getHeaderForReads()) : null);
currentReadShard = readShard;
processReadShard(readShard, // use the fully-padded window to fetch overlapping data
new ReferenceContext(reference, readShard.getPaddedInterval()), new FeatureContext(features, readShard.getPaddedInterval()));
}
logger.info(countedFilter.getSummaryLine());
}
use of org.broadinstitute.hellbender.engine.filters.CountingReadFilter in project gatk by broadinstitute.
the class FeatureWalker method traverse.
/**
* Implementation of Feature-based traversal.
* Subclasses can override to provide their own behavior but default implementation should be suitable for most uses.
*/
@Override
public void traverse() {
CountingReadFilter readFilter = makeReadFilter();
// Process each feature in the input stream.
Utils.stream(drivingFeatures).forEach(feature -> {
final SimpleInterval featureInterval = new SimpleInterval(feature);
apply(feature, new ReadsContext(reads, featureInterval, readFilter), new ReferenceContext(reference, featureInterval), new FeatureContext(features, featureInterval));
progressMeter.update(feature);
});
}
Aggregations