-
Notifications
You must be signed in to change notification settings - Fork 594
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
M2 modifies base quals instead of discarding overlapping read pairs #5794
Conversation
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.
Minor changes, but feel free to merge once done.
@@ -139,14 +141,13 @@ public static void finalizeRegion(final AssemblyRegion region, | |||
* Clean up reads/bases that overlap within read pairs | |||
* | |||
* @param reads the list of reads to consider |
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.
Can you describe the rest of the parameters?
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.
(and what can be null, etc etc)
And when making it public, please check for nulls and erroneous value ranges.
@@ -48,6 +47,8 @@ | |||
public static final String MEDIAN_AUTOSOMAL_COVERAGE_LONG_NAME = "median-autosomal-coverage"; | |||
public static final String MITOCHONDRIA_MODE_LONG_NAME = "mitochondria-mode"; | |||
public static final String CALLABLE_DEPTH_LONG_NAME = "callable-depth"; | |||
public static final String PCR_SNV_QUAL_LONG_NAME = "pcr-snv-qual"; | |||
public static final String PCR_INDEL_QUAL_LONG_NAME = "pcr-inel-qual"; |
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.
pcr-indel-qual
?
public int initialPCRErrorQual = 40; | ||
|
||
@Argument(fullName = PCR_SNV_QUAL_LONG_NAME, optional = true, doc = "Phred-scaled PCR SNV qual for overlapping fragments") | ||
public int PCRSnvQual = 40; |
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.
pcrSnvQual
public int PCRSnvQual = 40; | ||
|
||
@Argument(fullName = PCR_INDEL_QUAL_LONG_NAME, optional = true, doc = "Phred-scaled PCR SNV qual for overlapping fragments") | ||
public int PCRIndelQual = 40; |
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.
pcrIndelQual
@@ -237,6 +236,9 @@ public void writeHeader(final VariantContextWriter vcfWriter, final Set<VCFHeade | |||
|
|||
final AssemblyRegion regionForGenotyping = assemblyResult.getRegionForGenotyping(); | |||
removeReadStubs(regionForGenotyping); | |||
AssemblyBasedCallerUtils.cleanOverlappingReadPairs(regionForGenotyping.getReads(), samplesList, header, |
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.
Put a comment on why divide by 2.
@@ -433,7 +435,7 @@ public boolean emitReferenceConfidence() { | |||
* @return a list of variant contexts (can be empty) to emit for this ref region | |||
*/ | |||
private List<VariantContext> referenceModelForNoVariation(final AssemblyRegion region) { | |||
AssemblyBasedCallerUtils.finalizeRegion(region, false, true, (byte)9, header, samplesList, ! MTAC.doNotCorrectOverlappingBaseQualities); //take off soft clips and low Q tails before we calculate likelihoods | |||
AssemblyBasedCallerUtils.finalizeRegion(region, false, true, (byte)9, header, samplesList, false); //take off soft clips and low Q tails before we calculate likelihoods |
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.
Put a comment on why we do not need to correct here.
Utils.nonNull(clippedSecondRead); | ||
Utils.validateArg(clippedFirstRead.getName().equals(clippedSecondRead.getName()), () -> | ||
"attempting to merge two reads with different names " + clippedFirstRead + " and " + clippedSecondRead); | ||
public static void adjustQualsOfOverlappingPairedFragments(final List<GATKRead> pair, final boolean setConflictingToZero, |
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.
Put acceptable values and whether null is allowed in the doc.
Codecov Report
@@ Coverage Diff @@
## master #5794 +/- ##
===============================================
+ Coverage 87.002% 87.066% +0.064%
- Complexity 32103 32297 +194
===============================================
Files 1974 1975 +1
Lines 147214 148125 +911
Branches 16215 16360 +145
===============================================
+ Hits 128079 128966 +887
- Misses 13231 13248 +17
- Partials 5904 5911 +7
|
Closes #4959. Closes #4958. Closes #4933.
Improves indel sensitivity in particular without hurting precision.
@LeeTL1220 Can you review this one?