Skip to content

Commit 71f01ce

Browse files
committed
Fix not using correct profiled count
1 parent 85d9327 commit 71f01ce

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,15 @@ public List<GenomicDataCountItem> getMutationCountsByGeneSpecific(List<String> s
161161
.map(Gene::getEntrezGeneId)
162162
.toList();
163163

164-
List<AlterationCountByGene> alterationCountByGenes = alterationCountService.getSampleMutationGeneCounts(
164+
Pair<List<AlterationCountByGene>, Long> alterationCountsWithProfiledTotal = alterationCountService.getSampleMutationGeneCounts(
165165
caseIdentifiers,
166166
Select.byValues(entrezGeneIds),
167167
true,
168168
false,
169-
alterationFilter).getFirst();
169+
alterationFilter);
170+
171+
List<AlterationCountByGene> alterationCountByGenes = alterationCountsWithProfiledTotal.getFirst();
172+
Long totalProfiledCases = alterationCountsWithProfiledTotal.getSecond();
170173

171174
return genomicDataFilters
172175
.stream()
@@ -184,7 +187,7 @@ public List<GenomicDataCountItem> getMutationCountsByGeneSpecific(List<String> s
184187

185188
int totalCount = sampleIds.size();
186189
int mutatedCount = 0;
187-
int profiledCount = 0;
190+
int profiledCount = Math.toIntExact(totalProfiledCases);
188191

189192
if(filteredAlterationCount.isPresent()) {
190193
mutatedCount = filteredAlterationCount.get().getNumberOfAlteredCases();

0 commit comments

Comments
 (0)