Skip to content

Commit

Permalink
fix study view service errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Lai committed Dec 6, 2024
1 parent 781d1d8 commit 58fee52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -393,26 +393,7 @@ private <S extends AlterationCountBase> Pair<List<S>, Long> getAlterationGeneCou
Long studyProfiledCasesCount = includeFrequencyFunction.apply(studyMolecularProfileCaseIdentifiers, studyAlterationCountByGenes);
profiledCasesCount.updateAndGet(v -> v + studyProfiledCasesCount);
}
studyAlterationCountByGenes.forEach(datum -> {
String key = datum.getUniqueEventKey();
if (totalResult.containsKey(key)) {
S alterationCountByGene = totalResult.get(key);
alterationCountByGene.setTotalCount(alterationCountByGene.getTotalCount() + datum.getTotalCount());
alterationCountByGene.setNumberOfAlteredCases(alterationCountByGene.getNumberOfAlteredCases() + datum.getNumberOfAlteredCases());
alterationCountByGene.setNumberOfProfiledCases(alterationCountByGene.getNumberOfProfiledCases() + datum.getNumberOfProfiledCases());
Set<String> matchingGenePanelIds = new HashSet<>();
if (!alterationCountByGene.getMatchingGenePanelIds().isEmpty()) {
matchingGenePanelIds.addAll(alterationCountByGene.getMatchingGenePanelIds());
}
if (!datum.getMatchingGenePanelIds().isEmpty()) {
matchingGenePanelIds.addAll(datum.getMatchingGenePanelIds());
}
alterationCountByGene.setMatchingGenePanelIds(matchingGenePanelIds);
totalResult.put(key, alterationCountByGene);
} else {
totalResult.put(key, datum);
}
});
AlterationCountServiceUtil.setupAlterationGeneCountsMap(studyAlterationCountByGenes, totalResult);
});
alterationCountByGenes = new ArrayList<>(totalResult.values());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public static List<ClinicalDataCount> normalizeDataCounts(List<ClinicalDataCount
public static GenomicDataCountItem createGenomicDataCountItemFromMutationCounts(GenomicDataFilter genomicDataFilter, Map<String, Integer> counts) {
List<GenomicDataCount> genomicDataCountList = new ArrayList<>();
if (counts.getOrDefault(MUTATED_COUNT, 0) > 0)
genomicDataCountList.add(new GenomicDataCount("Mutated", "MUTATED", counts.get("MUTATED_COUNT"), counts.get("MUTATED_COUNT")));
genomicDataCountList.add(new GenomicDataCount("Mutated", "MUTATED", counts.get(MUTATED_COUNT), counts.get(MUTATED_COUNT)));
if (counts.getOrDefault(NOT_MUTATED_COUNT, 0) > 0)
genomicDataCountList.add(new GenomicDataCount("Not Mutated", "NOT_MUTATED", counts.get(NOT_MUTATED_COUNT), counts.get(NOT_MUTATED_COUNT)));
if (counts.getOrDefault(NOT_PROFILED_COUNT, 0) > 0)
Expand Down

0 comments on commit 58fee52

Please sign in to comment.