Skip to content
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

Merged
merged 7 commits into from
Mar 13, 2019

Conversation

davidbenjamin
Copy link
Contributor

Closes #4959. Closes #4958. Closes #4933.

Improves indel sensitivity in particular without hurting precision.

@LeeTL1220 Can you review this one?

Copy link
Contributor

@LeeTL1220 LeeTL1220 left a 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
Copy link
Contributor

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?

Copy link
Contributor

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";
Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

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,
Copy link
Contributor

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
Copy link
Contributor

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,
Copy link
Contributor

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-io
Copy link

codecov-io commented Mar 13, 2019

Codecov Report

Merging #5794 into master will increase coverage by 0.064%.
The diff coverage is 93.103%.

@@               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
Impacted Files Coverage Δ Complexity Δ
.../tools/walkers/mutect/SomaticGenotypingEngine.java 93.548% <ø> (+0.558%) 70 <0> (-13) ⬇️
...bender/tools/walkers/annotator/StrandBiasTest.java 88.542% <ø> (+0.787%) 41 <0> (-1) ⬇️
...ecaller/AssemblyBasedCallerArgumentCollection.java 100% <ø> (ø) 2 <0> (ø) ⬇️
...walkers/haplotypecaller/HaplotypeCallerEngine.java 78.621% <0%> (-0.345%) 74 <0> (ø)
...lbender/utils/fragments/FragmentUtilsUnitTest.java 100% <100%> (ø) 10 <5> (ø) ⬇️
...der/tools/walkers/mutect/M2ArgumentCollection.java 90.244% <100%> (+0.244%) 14 <0> (ø) ⬇️
...r/tools/walkers/mutect/Mutect2IntegrationTest.java 87.586% <100%> (-0.517%) 89 <0> (-2)
...kers/haplotypecaller/AssemblyBasedCallerUtils.java 88.816% <100%> (+1.357%) 115 <1> (+2) ⬆️
...otypecaller/HaplotypeCallerArgumentCollection.java 100% <100%> (ø) 3 <0> (ø) ⬇️
...hellbender/tools/walkers/mutect/Mutect2Engine.java 89.868% <100%> (+0.535%) 90 <1> (ø) ⬇️
... and 44 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants