Skip to content

Commit

Permalink
restpored the log(1/3) for SNP het prior
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbenjamin committed Dec 7, 2023
1 parent 4817f53 commit 7412353
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ private OverlapDetector<HaploGenotypingResult> computeHaploGenotypingResults(All
final List<Event> allEvents = jdHaplotypes.stream().flatMap(haplotype -> haplotype.getEventMap().getEvents().stream()).distinct().toList();
final Map<Event, Double> log10EventHetPriors = new HashMap<>();
for (final Event event : allEvents) {
final double log10SNPHetPrior = Math.log10(snpHeterozygosity);
final double log10SNPHetPrior = Math.log10(snpHeterozygosity) - GenotypePriorCalculator.LOG10_SNP_NORMALIZATION_CONSTANT;
if (event.isSNP()) {
log10EventHetPriors.put(event, log10SNPHetPrior);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private enum AlleleType {

// A snp can go to 3 different bases (standard-nucs - 1), so we normalize SNP lks accordingly. Here is the
// log10 constant used for that:
private static final double LOG10_SNP_NORMALIZATION_CONSTANT =
public static final double LOG10_SNP_NORMALIZATION_CONSTANT =
Math.log10(Nucleotide.STANDARD_BASES.size() - 1);

private final double[] hetValues;
Expand Down

0 comments on commit 7412353

Please sign in to comment.