Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ldgauthier committed Oct 23, 2019
1 parent 712a331 commit c5b0ba6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,10 @@ public void normalizeLikelihoods(final double maximumLikelihoodDifferenceCap) {
private void normalizeLikelihoodsPerEvidence(final double maximumBestAltLikelihoodDifference,
final double[][] sampleValues, final int sampleIndex, final int evidenceIndex) {

//allow the best "alternative" allele to be the reference because asymmetry leads to strange artifacts like het calls with >90% alt reads
final BestAllele bestAlternativeAllele = searchBestAllele(sampleIndex,evidenceIndex,true);
//allow the best allele to be the reference because asymmetry leads to strange artifacts like het calls with >90% alt reads
final BestAllele bestAllele = searchBestAllele(sampleIndex,evidenceIndex,true);

final double worstLikelihoodCap = bestAlternativeAllele.likelihood + maximumBestAltLikelihoodDifference;
final double worstLikelihoodCap = bestAllele.likelihood + maximumBestAltLikelihoodDifference;

final int alleleCount = alleles.numberOfAlleles();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1228,18 +1228,14 @@ public void testContaminatedHomVarDeletions() {

final File outputContaminatedHomVarDeletions = createTempFile("testContaminatedHomVarDeletions", ".vcf");

// Run both with and without --max-alternate-alleles over our interval, so that we can
// prove that the argument is working as intended.
final String[] argsNoMaxAlternateAlleles = {
"-I", bam,
"-R", hg38Reference,
"-L", intervals,
"-O", outputContaminatedHomVarDeletions.getAbsolutePath(),
"--interval-padding", "50"
};
runCommandLine(argsNoMaxAlternateAlleles);
final ArgumentsBuilder args = new ArgumentsBuilder().addInput(new File(bam))
.addReference(hg38Reference)
.addInterval(new SimpleInterval(intervals))
.addOutput(outputContaminatedHomVarDeletions)
.addNumericArgument(IntervalArgumentCollection.INTERVAL_PADDING_LONG_NAME, 50);
runCommandLine(args);

List<VariantContext> vcs = VariantContextTestUtils.readEntireVCFIntoMemory(outputContaminatedHomVarDeletions.getAbsolutePath()).getRight();
List<VariantContext> vcs = VariantContextTestUtils.getVariantContexts(outputContaminatedHomVarDeletions);

//check known homozygous deletion for correct genotype
for (final VariantContext vc : vcs) {
Expand Down

0 comments on commit c5b0ba6

Please sign in to comment.