-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mutect2 expose param #8447
mutect2 expose param #8447
Changes from 3 commits
fdbaf98
2f9bb34
44231ca
1c3b062
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,8 +122,8 @@ | |
|
||
private final Optional<F1R2CountsCollector> f1R2CountsCollector; | ||
|
||
private PileupQualBuffer tumorPileupQualBuffer = new PileupQualBuffer(); | ||
private PileupQualBuffer normalPileupQualBuffer = new PileupQualBuffer(); | ||
private PileupQualBuffer tumorPileupQualBuffer; | ||
private PileupQualBuffer normalPileupQualBuffer; | ||
|
||
/** | ||
* Create and initialize a new HaplotypeCallerEngine given a collection of HaplotypeCaller arguments, a reads header, | ||
|
@@ -144,6 +144,9 @@ | |
aligner = SmithWatermanAligner.getAligner(MTAC.smithWatermanImplementation); | ||
samplesList = new IndexedSampleList(new ArrayList<>(ReadUtils.getSamplesFromHeader(header))); | ||
|
||
tumorPileupQualBuffer = new PileupQualBuffer(MTAC.activeRegionMultipleSubstitutionBaseQualCorrection); | ||
normalPileupQualBuffer = new PileupQualBuffer(MTAC.activeRegionMultipleSubstitutionBaseQualCorrection); | ||
Check warning on line 148 in src/main/java/org/broadinstitute/hellbender/tools/walkers/mutect/Mutect2Engine.java Codecov / codecov/patchsrc/main/java/org/broadinstitute/hellbender/tools/walkers/mutect/Mutect2Engine.java#L147-L148
|
||
|
||
// optimize set operations for the common cases of no normal and one normal | ||
if (MTAC.normalSamples.isEmpty()) { | ||
normalSamples = Collections.emptySet(); | ||
|
@@ -675,13 +678,17 @@ | |
// as the *particular* alt base, whereas the qual actually means the probability of *any* substitution error. | ||
// since there are three possible substitutions for each ref base we must divide the error probability by three | ||
// which corresponds to adding 10*log10(3) = 4.77 ~ 5 to the qual. | ||
private static final int ONE_THIRD_QUAL_CORRECTION = 5; | ||
private static double MULTIPLE_SUBSTITUTION_BASE_QUAL_CORRECTION = 5; | ||
Check warning on line 681 in src/main/java/org/broadinstitute/hellbender/tools/walkers/mutect/Mutect2Engine.java Codecov / codecov/patchsrc/main/java/org/broadinstitute/hellbender/tools/walkers/mutect/Mutect2Engine.java#L681
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The constant default isn't needed anymore because now the default is set in the argument collection, right? |
||
|
||
// indices 0-3 are A,C,G,T; 4 is other substitution (just in case it's some exotic protocol); 5 is indel | ||
private List<ByteArrayList> buffers = IntStream.range(0,6).mapToObj(n -> new ByteArrayList()).collect(Collectors.toList()); | ||
|
||
public PileupQualBuffer() { } | ||
|
||
public PileupQualBuffer(final double multipleSubstitutionQualCorrection) { | ||
MULTIPLE_SUBSTITUTION_BASE_QUAL_CORRECTION = multipleSubstitutionQualCorrection; | ||
} | ||
Check warning on line 690 in src/main/java/org/broadinstitute/hellbender/tools/walkers/mutect/Mutect2Engine.java Codecov / codecov/patchsrc/main/java/org/broadinstitute/hellbender/tools/walkers/mutect/Mutect2Engine.java#L688-L690
|
||
|
||
public void accumulateQuals(final ReadPileup pileup, final byte refBase, final int pcrErrorQual) { | ||
clear(); | ||
final int position = pileup.getLocation().getStart(); | ||
|
@@ -731,7 +738,7 @@ | |
if (index == -1) { // -1 is the hard-coded value for non-simple bases in BaseUtils | ||
buffers.get(OTHER_SUBSTITUTION).add(qual); | ||
} else { | ||
buffers.get(index).add((byte) FastMath.min(qual + ONE_THIRD_QUAL_CORRECTION, QualityUtils.MAX_QUAL)); | ||
buffers.get(index).add((byte) FastMath.min(qual + MULTIPLE_SUBSTITUTION_BASE_QUAL_CORRECTION, QualityUtils.MAX_QUAL)); | ||
Check warning on line 741 in src/main/java/org/broadinstitute/hellbender/tools/walkers/mutect/Mutect2Engine.java Codecov / codecov/patchsrc/main/java/org/broadinstitute/hellbender/tools/walkers/mutect/Mutect2Engine.java#L741
|
||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be an
int
.