Skip to content

Commit

Permalink
Introduce output of hets on overlapping reads
Browse files Browse the repository at this point in the history
  • Loading branch information
avakel committed Jan 25, 2019
1 parent 753c201 commit ff79852
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ public Pileup getPileup() {
public final boolean deNovo;
public final boolean superNovo;
public final double meanHaplotypeConcordance;
public final int overlappingReadsHetCount;
public static final double MIN_HAPLOTYPE_CONCORDANCE = 0.95;
public final int overlappingReadsDiscordantHetCount;
public final int overlappingReadsDeNovoCount;
public final int overlapingReadsThirdAlleleCount;
public final Sample child;
Expand Down Expand Up @@ -149,11 +152,20 @@ public DeNovoResult(
.mapToDouble(Double::valueOf)
.summaryStatistics()
.getAverage();
overlappingReadsHetCount = hapResults.getConcordances().size();
overlappingReadsDiscordantHetCount =
(int)
hapResults
.getConcordances()
.stream()
.mapToDouble(Double::valueOf)
.filter(d -> d < MIN_HAPLOTYPE_CONCORDANCE)
.count();
superNovo =
biallelicHeterozygote
&& deNovo
&& hapResults.getOtherDeNovos() == 0
&& meanHaplotypeConcordance >= 0.95
&& meanHaplotypeConcordance >= MIN_HAPLOTYPE_CONCORDANCE
&& hapResults.getOtherTriallelics() == 0;
overlappingReadsDeNovoCount = hapResults.getOtherDeNovos();
overlapingReadsThirdAlleleCount = hapResults.getOtherTriallelics();
Expand Down

0 comments on commit ff79852

Please # to comment.