use of org.broadinstitute.hellbender.engine.filters.WellformedReadFilter in project gatk by broadinstitute.
the class BaseRecalibrator method getStandardBQSRReadFilterList.
/**
* Return the full list of raw read filters used for BQSR contexts, including WellFormed.
* @return List of raw read filters not yet primed with a header
*/
public static List<ReadFilter> getStandardBQSRReadFilterList() {
final List<ReadFilter> bqsrFilters = getBQSRSpecificReadFilterList();
bqsrFilters.add(new WellformedReadFilter());
return bqsrFilters;
}
use of org.broadinstitute.hellbender.engine.filters.WellformedReadFilter in project gatk by broadinstitute.
the class IntervalAlignmentContextIteratorUnitTest method getAlignmentContexts.
private List<AlignmentContext> getAlignmentContexts(final List<SimpleInterval> locusIntervals, final String bamPath) {
final List<String> sampleNames = Collections.singletonList("NA12878");
final ReadsDataSource gatkReads = new ReadsDataSource(IOUtils.getPath(bamPath));
final SAMFileHeader header = gatkReads.getHeader();
final Stream<GATKRead> filteredReads = Utils.stream(gatkReads).filter(new WellformedReadFilter(header).and(new ReadFilterLibrary.MappedReadFilter()));
final SAMSequenceDictionary dictionary = header.getSequenceDictionary();
final LocusIteratorByState locusIteratorByState = new LocusIteratorByState(filteredReads.iterator(), LocusIteratorByState.NO_DOWNSAMPLING, false, sampleNames, header, true);
List<SimpleInterval> relevantIntervals = locusIntervals;
if (relevantIntervals == null) {
relevantIntervals = IntervalUtils.getAllIntervalsForReference(dictionary);
}
final IntervalLocusIterator intervalLocusIterator = new IntervalLocusIterator(relevantIntervals.iterator());
final IntervalAlignmentContextIterator intervalAlignmentContextIterator = new IntervalAlignmentContextIterator(locusIteratorByState, intervalLocusIterator, dictionary);
return StreamSupport.stream(Spliterators.spliteratorUnknownSize(intervalAlignmentContextIterator, Spliterator.ORDERED), false).collect(Collectors.toList());
}
use of org.broadinstitute.hellbender.engine.filters.WellformedReadFilter in project gatk by broadinstitute.
the class InsertSizeMetricsCollector method getDefaultReadFilters.
/**
* Return the read filter for InsertSizeMetrics collector.
* @return ReadFilter to be used to filter records
*/
public List<ReadFilter> getDefaultReadFilters() {
List<ReadFilter> readFilters = new ArrayList<>();
readFilters.add(new WellformedReadFilter());
readFilters.add(ReadFilterLibrary.MAPPED);
readFilters.add(ReadFilterLibrary.PAIRED);
readFilters.add(ReadFilterLibrary.NONZERO_FRAGMENT_LENGTH_READ_FILTER);
readFilters.add(ReadFilterLibrary.FIRST_OF_PAIR);
readFilters.add(ReadFilterLibrary.PROPERLY_PAIRED);
readFilters.add(ReadFilterLibrary.NOT_DUPLICATE);
readFilters.add(ReadFilterLibrary.NOT_SECONDARY_ALIGNMENT);
readFilters.add(ReadFilterLibrary.NOT_SUPPLEMENTARY_ALIGNMENT);
readFilters.add(new MappingQualityReadFilter(0));
return readFilters;
}
use of org.broadinstitute.hellbender.engine.filters.WellformedReadFilter in project gatk-protected by broadinstitute.
the class HaplotypeCallerEngine method makeStandardHCReadFilters.
/**
* @return the default set of read filters for use with the HaplotypeCaller
*/
public static List<ReadFilter> makeStandardHCReadFilters() {
List<ReadFilter> filters = new ArrayList<>();
filters.add(new MappingQualityReadFilter(READ_QUALITY_FILTER_THRESHOLD));
filters.add(ReadFilterLibrary.MAPPING_QUALITY_AVAILABLE);
filters.add(ReadFilterLibrary.MAPPED);
filters.add(ReadFilterLibrary.PRIMARY_ALIGNMENT);
filters.add(ReadFilterLibrary.NOT_DUPLICATE);
filters.add(ReadFilterLibrary.PASSES_VENDOR_QUALITY_CHECK);
filters.add(ReadFilterLibrary.NON_ZERO_REFERENCE_LENGTH_ALIGNMENT);
filters.add(ReadFilterLibrary.GOOD_CIGAR);
filters.add(new WellformedReadFilter());
return filters;
}
use of org.broadinstitute.hellbender.engine.filters.WellformedReadFilter in project gatk-protected by broadinstitute.
the class Mutect2Engine method makeStandardMutect2ReadFilters.
/**
* @return the default set of read filters for use with Mutect2
*/
public static List<ReadFilter> makeStandardMutect2ReadFilters() {
// The order in which we apply filters is important. Cheap filters come first so we fail fast
List<ReadFilter> filters = new ArrayList<>();
filters.add(new MappingQualityReadFilter(READ_QUALITY_FILTER_THRESHOLD));
filters.add(ReadFilterLibrary.MAPPING_QUALITY_AVAILABLE);
filters.add(ReadFilterLibrary.MAPPING_QUALITY_NOT_ZERO);
filters.add(ReadFilterLibrary.MAPPED);
filters.add(ReadFilterLibrary.PRIMARY_ALIGNMENT);
filters.add(ReadFilterLibrary.NOT_DUPLICATE);
filters.add(ReadFilterLibrary.PASSES_VENDOR_QUALITY_CHECK);
filters.add(ReadFilterLibrary.NON_ZERO_REFERENCE_LENGTH_ALIGNMENT);
filters.add(GOOD_READ_LENGTH_FILTER);
filters.add(ReadFilterLibrary.MATE_ON_SAME_CONTIG_OR_NO_MAPPED_MATE);
filters.add(ReadFilterLibrary.GOOD_CIGAR);
filters.add(new WellformedReadFilter());
return filters;
}
Aggregations