@Override public void addInfo(final AbstractLocusInfo<SamLocusIterator.RecordAndOffset> info, final ReferenceSequence ref, boolean referenceBaseN) { if (referenceBaseN) { return; } // Figure out the coverage while not counting overlapping reads twice, and excluding various things final HashSet<String> readNames = new HashSet<>(info.getRecordAndOffsets().size()); int pileupSize = 0; int unfilteredDepth = 0; for (final SamLocusIterator.RecordAndOffset recs : info.getRecordAndOffsets()) { if (recs.getBaseQuality() <= 2) { ++basesExcludedByBaseq; continue; } // we add to the base quality histogram any bases that have quality > 2 // the raw depth may exceed the coverageCap before the high-quality depth does. So stop counting once we reach the coverage cap. if (unfilteredDepth < coverageCap) { unfilteredBaseQHistogramArray[recs.getRecord().getBaseQualities()[recs.getOffset()]]++; unfilteredDepth++; } if (recs.getBaseQuality() < collectWgsMetrics.MINIMUM_BASE_QUALITY || SequenceUtil.isNoCall(recs.getReadBase())) { ++basesExcludedByBaseq; continue; } if (!readNames.add(recs.getRecord().getReadName())) { ++basesExcludedByOverlap; continue; } pileupSize++; } final int highQualityDepth = Math.min(pileupSize, coverageCap); if (highQualityDepth < pileupSize) basesExcludedByCapping += pileupSize - coverageCap; highQualityDepthHistogramArray[highQualityDepth]++; unfilteredDepthHistogramArray[unfilteredDepth]++; } }
@Override public void addInfo(final AbstractLocusInfo<SamLocusIterator.RecordAndOffset> info, final ReferenceSequence ref, boolean referenceBaseN) { if (referenceBaseN) { return; } // Figure out the coverage while not counting overlapping reads twice, and excluding various things final HashSet<String> readNames = new HashSet<>(info.getRecordAndOffsets().size()); int pileupSize = 0; int unfilteredDepth = 0; for (final SamLocusIterator.RecordAndOffset recs : info.getRecordAndOffsets()) { if (recs.getBaseQuality() <= 2) { ++basesExcludedByBaseq; continue; } // we add to the base quality histogram any bases that have quality > 2 // the raw depth may exceed the coverageCap before the high-quality depth does. So stop counting once we reach the coverage cap. if (unfilteredDepth < coverageCap) { unfilteredBaseQHistogramArray[recs.getRecord().getBaseQualities()[recs.getOffset()]]++; unfilteredDepth++; } if (recs.getBaseQuality() < collectWgsMetrics.MINIMUM_BASE_QUALITY || SequenceUtil.isNoCall(recs.getReadBase())) { ++basesExcludedByBaseq; continue; } if (!readNames.add(recs.getRecord().getReadName())) { ++basesExcludedByOverlap; continue; } pileupSize++; } final int highQualityDepth = Math.min(pileupSize, coverageCap); if (highQualityDepth < pileupSize) basesExcludedByCapping += pileupSize - coverageCap; highQualityDepthHistogramArray[highQualityDepth]++; unfilteredDepthHistogramArray[unfilteredDepth]++; } }
final HaplotypeProbabilitiesFromSequence probs = (HaplotypeProbabilitiesFromSequence) fingerprintsByReadGroup.get(details).get(haplotypeBlock); final byte base = StringUtil.toUpperCase(rec.getReadBase()); final byte qual = rec.getBaseQuality();
final HaplotypeProbabilitiesFromSequence probs = (HaplotypeProbabilitiesFromSequence) fingerprintsByReadGroup.get(details).get(haplotypeBlock); final byte base = StringUtil.toUpperCase(rec.getReadBase()); final byte qual = rec.getBaseQuality();
(HaplotypeProbabilitiesFromContaminatorSequence) fingerprintsBySample.get(rg.getSample()).get(haplotypeBlock); final byte base = StringUtil.toUpperCase(rec.getReadBase()); final byte qual = rec.getBaseQuality();
(HaplotypeProbabilitiesFromContaminatorSequence) fingerprintsBySample.get(rg.getSample()).get(haplotypeBlock); final byte base = StringUtil.toUpperCase(rec.getReadBase()); final byte qual = rec.getBaseQuality();
final byte[] oqs = samrec.getOriginalBaseQualities(); if (oqs != null) qual = oqs[rec.getOffset()]; else qual = rec.getBaseQuality(); } else { qual = rec.getBaseQuality();
final byte[] oqs = samrec.getOriginalBaseQualities(); if (oqs != null) qual = oqs[rec.getOffset()]; else qual = rec.getBaseQuality(); } else { qual = rec.getBaseQuality();
private static Byte stratifyBaseQuality(final RecordAndOffset recordAndOffset) { return recordAndOffset.getBaseQuality(); }
private static Byte stratifyBaseQuality(final RecordAndOffset recordAndOffset) { return recordAndOffset.getBaseQuality(); }