Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Lai committed Nov 18, 2024
1 parent a8e7c10 commit 8bf44e4
Showing 1 changed file with 37 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public void getTotalProfiledCountsByGene() {
StudyViewFilter studyViewFilter = new StudyViewFilter();
studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB));

// Testing counts on samples with gene panel and WES
// Testing profiled counts on samples with gene panel data and WES for one study
var totalProfiledCountsForMutationsMap = studyViewMapper.getTotalProfiledCounts(StudyViewFilterHelper.build(studyViewFilter, null, null),
"MUTATION_EXTENDED");
var totalProfiledCountsForCnaMap = studyViewMapper.getTotalProfiledCounts(StudyViewFilterHelper.build(studyViewFilter, null, null),
Expand All @@ -239,40 +239,51 @@ public void getTotalProfiledCountsByGene() {
var sampleProfiledCountsForCnaWithoutPanelDataMap = studyViewMapper.getSampleProfileCountWithoutPanelData(StudyViewFilterHelper.build(studyViewFilter, null, null),
"COPY_NUMBER_ALTERATION");

// Assert the count of genes with profiled cases for mutations
assertEquals(5, totalProfiledCountsForMutationsMap.size());
// Assert the count of genes with profiled cases for CNA
assertEquals(5, totalProfiledCountsForCnaMap.size());
// Assert the profiled counts for mutations without panel data (WES)
assertEquals(6, sampleProfiledCountsForMutationsWithoutPanelDataMap);
// Assert the profiled counts for CNA without panel data (WES)
assertEquals(11, sampleProfiledCountsForCnaWithoutPanelDataMap);

// Testing counts on gene panels with and without particular genes
// akt2 is on one panel
// brca1 is on another panel
// akt1 is on both panels
// Assert the profiled counts for AKT2 mutations
// AKT2 is on testpanel2 in STUDY_TCGA_PUB
var akt2TotalProfiledCountsForMutations = totalProfiledCountsForMutationsMap.stream().filter(c -> c.getHugoGeneSymbol().equals("AKT2")).findFirst();
assertTrue(akt2TotalProfiledCountsForMutations.isPresent());
assertEquals(4, akt2TotalProfiledCountsForMutations.get().getNumberOfProfiledCases().intValue());
// Assert the profiled counts for BRCA1 mutations
// BRCA1 is on testpanel1 in STUDY_TCGA_PUB
var brca1TotalProfiledCountsForMutations = totalProfiledCountsForMutationsMap.stream().filter(c -> c.getHugoGeneSymbol().equals("BRCA1")).findFirst();
assertTrue(brca1TotalProfiledCountsForMutations.isPresent());
assertEquals(1, brca1TotalProfiledCountsForMutations.get().getNumberOfProfiledCases().intValue());
// Assert the profiled counts for AKT1 mutations
// AKT1 is on both testpanel1 and testpanel2 in STUDY_TCGA_PUB
var akt1TotalProfiledCountsForMutations = totalProfiledCountsForMutationsMap.stream().filter(c -> c.getHugoGeneSymbol().equals("AKT1")).findFirst();
assertTrue(akt1TotalProfiledCountsForMutations.isPresent());
assertEquals(4, akt1TotalProfiledCountsForMutations.get().getNumberOfProfiledCases().intValue());

// Assert the profiled counts for AKT2 CNA
// AKT2 is on testpanel2 in STUDY_TCGA_PUB
var akt2TotalProfiledCountsForCna = totalProfiledCountsForCnaMap.stream().filter(c -> c.getHugoGeneSymbol().equals("AKT2")).findFirst();
assertTrue(akt2TotalProfiledCountsForCna.isPresent());
assertEquals(3, akt2TotalProfiledCountsForCna.get().getNumberOfProfiledCases().intValue());
// Assert the profiled counts for BRCA1 CNA
// BRCA1 is on testpanel1 in STUDY_TCGA_PUB
var brca1TotalProfiledCountsForCna = totalProfiledCountsForCnaMap.stream().filter(c -> c.getHugoGeneSymbol().equals("BRCA1")).findFirst();
assertTrue(brca1TotalProfiledCountsForCna.isPresent());
assertEquals(2, brca1TotalProfiledCountsForCna.get().getNumberOfProfiledCases().intValue());
// Assert the profiled counts for AKT1 CNA
// AKT1 is on both testpanel1 and testpanel2 in STUDY_TCGA_PUB
var akt1TotalProfiledCountsForCna = totalProfiledCountsForCnaMap.stream().filter(c -> c.getHugoGeneSymbol().equals("AKT1")).findFirst();
assertTrue(akt1TotalProfiledCountsForCna.isPresent());
assertEquals(4, akt1TotalProfiledCountsForCna.get().getNumberOfProfiledCases().intValue());


// Testing counts on combined studies
// Testing profiled counts on combined studies
studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB, STUDY_GENIE_PUB));
// Testing counts on samples with gene panel and WES in two studies

// Testing profiled counts on samples with gene panel data and WES for a combined study
var totalProfiledCountsForMutationsMap1 = studyViewMapper.getTotalProfiledCounts(StudyViewFilterHelper.build(studyViewFilter, null, null),
"MUTATION_EXTENDED");
var totalProfiledCountsForCnaMap1 = studyViewMapper.getTotalProfiledCounts(StudyViewFilterHelper.build(studyViewFilter, null, null),
Expand All @@ -282,31 +293,43 @@ public void getTotalProfiledCountsByGene() {
var sampleProfiledCountsForCnaWithoutPanelDataMap1 = studyViewMapper.getSampleProfileCountWithoutPanelData(StudyViewFilterHelper.build(studyViewFilter, null, null),
"COPY_NUMBER_ALTERATION");

// Assert the count of genes with profiled cases for mutations in a combined study
assertEquals(8, totalProfiledCountsForMutationsMap1.size());
// Assert the count of genes with profiled cases for CNA in a combined study
assertEquals(8, totalProfiledCountsForCnaMap1.size());
// Assert the profiled counts for mutations without panel data (WES) in a combined study
assertEquals(8, sampleProfiledCountsForMutationsWithoutPanelDataMap1);
// Assert the profiled counts for CNA without panel data (WES) in a combined study
assertEquals(12, sampleProfiledCountsForCnaWithoutPanelDataMap1);

// Testing counts on gene panels with and without particular genes for two studies
// brca1 is on one panel in STUDY_TCGA_PUB
// brca2 is on two panels in STUDY_GENIE_PUB
// akt2 is on one panel in STUDY_TCGA_PUB and STUDY_GENIE_PUB
// Assert the profiled counts for BRCA1 mutations
// BRCA1 is on testpanel1 in STUDY_TCGA_PUB
var brca1TotalProfiledCountsForMutations1 = totalProfiledCountsForMutationsMap1.stream().filter(c -> c.getHugoGeneSymbol().equals("BRCA1")).findFirst();
assertTrue(brca1TotalProfiledCountsForMutations1.isPresent());
assertEquals(1, brca1TotalProfiledCountsForMutations1.get().getNumberOfProfiledCases().intValue());
// Assert the profiled counts for BRCA2 mutations
// BRCA2 is on testpanel3 and testpanel4 in STUDY_GENIE_PUB
var brca2TotalProfiledCountsForMutations1 = totalProfiledCountsForMutationsMap1.stream().filter(c -> c.getHugoGeneSymbol().equals("BRCA2")).findFirst();
assertTrue(brca2TotalProfiledCountsForMutations1.isPresent());
assertEquals(2, brca2TotalProfiledCountsForMutations1.get().getNumberOfProfiledCases().intValue());
// Assert the profiled counts for AKT2 mutations
// AKT2 is on testpanel2 in STUDY_TCGA_PUB and testpanel4 in STUDY_GENIE_PUB
var akt2TotalProfiledCountsForMutations1 = totalProfiledCountsForMutationsMap1.stream().filter(c -> c.getHugoGeneSymbol().equals("AKT2")).findFirst();
assertTrue(akt2TotalProfiledCountsForMutations1.isPresent());
assertEquals(4, akt2TotalProfiledCountsForMutations1.get().getNumberOfProfiledCases().intValue());


// Assert the profiled counts for BRCA1 CNA
// BRCA1 is on testpanel1 in STUDY_TCGA_PUB
var brca1TotalProfiledCountsForCna1 = totalProfiledCountsForCnaMap1.stream().filter(c -> c.getHugoGeneSymbol().equals("BRCA1")).findFirst();
assertTrue(brca1TotalProfiledCountsForCna1.isPresent());
assertEquals(2, brca1TotalProfiledCountsForCna1.get().getNumberOfProfiledCases().intValue());
// Assert the profiled counts for BRCA2 CNA
// BRCA2 is on testpanel3 and testpanel4 in STUDY_GENIE_PUB
var brca2TotalProfiledCountsForCna1 = totalProfiledCountsForCnaMap1.stream().filter(c -> c.getHugoGeneSymbol().equals("BRCA2")).findFirst();
assertTrue(brca2TotalProfiledCountsForCna1.isPresent());
assertEquals(3, brca2TotalProfiledCountsForCna1.get().getNumberOfProfiledCases().intValue());
// Assert the profiled counts for AKT2 CNA
// AKT2 is on testpanel2 in STUDY_TCGA_PUB and testpanel4 in STUDY_GENIE_PUB
var akt2TotalProfiledCountsForCna1 = totalProfiledCountsForCnaMap1.stream().filter(c -> c.getHugoGeneSymbol().equals("AKT2")).findFirst();
assertTrue(akt2TotalProfiledCountsForCna1.isPresent());
assertEquals(4, akt2TotalProfiledCountsForCna1.get().getNumberOfProfiledCases().intValue());
Expand Down

0 comments on commit 8bf44e4

Please sign in to comment.