Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ public ResponseEntity<List<SampleDTO>> fetchFilteredSamples(
SampleMapper.INSTANCE.toDtos(studyViewService.getFilteredSamples(studyViewFilter)));
}

@Hidden // should unhide when we remove legacy controller
@PostMapping(
value = "/mutated-genes/fetch",
consumes = MediaType.APPLICATION_JSON_VALUE,
Expand All @@ -129,7 +128,6 @@ public ResponseEntity<List<AlterationCountByGene>> fetchMutatedGenes(
return ResponseEntity.ok(studyViewService.getMutatedGenes(studyViewFilter));
}

@Hidden // should unhide when we remove legacy controller
@PostMapping(
value = "/molecular-profile-sample-counts/fetch",
consumes = MediaType.APPLICATION_JSON_VALUE,
Expand All @@ -151,7 +149,6 @@ public ResponseEntity<List<GenomicDataCount>> fetchMolecularProfileSampleCounts(
return ResponseEntity.ok(studyViewService.getMolecularProfileSampleCounts(studyViewFilter));
}

@Hidden // should unhide when we remove legacy controller
@PostMapping(
value = "/cna-genes/fetch",
consumes = MediaType.APPLICATION_JSON_VALUE,
Expand All @@ -164,7 +161,6 @@ public ResponseEntity<List<CopyNumberCountByGene>> fetchCnaGenes(
return ResponseEntity.ok(studyViewService.getCnaGenes(studyViewFilter));
}

@Hidden // should unhide when we remove legacy controller
@PostMapping(
value = "/structuralvariant-genes/fetch",
consumes = MediaType.APPLICATION_JSON_VALUE,
Expand All @@ -187,7 +183,6 @@ public ResponseEntity<List<AlterationCountByGene>> fetchStructuralVariantGenes(
return ResponseEntity.ok(studyViewService.getStructuralVariantGenes(studyViewFilter));
}

@Hidden // should unhide when we remove legacy controller
@PostMapping(
value = "/clinical-data-counts/fetch",
consumes = MediaType.APPLICATION_JSON_VALUE,
Expand All @@ -210,7 +205,6 @@ public ResponseEntity<List<ClinicalDataCountItem>> fetchClinicalDataCounts(
return ResponseEntity.ok(result);
}

@Hidden // should unhide when we remove legacy controller
@PostMapping(
value = "/sample-lists-counts/fetch",
consumes = MediaType.APPLICATION_JSON_VALUE,
Expand All @@ -227,7 +221,6 @@ public List<CaseListDataCount> fetchCaseListCounts(
return studyViewService.getCaseListDataCounts(studyViewFilter);
}

@Hidden // should unhide when we remove legacy controller
@PostMapping(
value = "/clinical-data-bin-counts/fetch",
consumes = MediaType.APPLICATION_JSON_VALUE,
Expand All @@ -243,7 +236,6 @@ public ResponseEntity<List<ClinicalDataBin>> fetchClinicalDataBinCounts(
return new ResponseEntity<>(clinicalDataBins, HttpStatus.OK);
}

@Hidden // should unhide when we remove legacy controller
@PostMapping(
value = "/clinical-data-density-plot/fetch",
consumes = MediaType.APPLICATION_JSON_VALUE,
Expand Down Expand Up @@ -312,7 +304,6 @@ public ResponseEntity<DensityPlotData> fetchClinicalDataDensityPlot(
return new ResponseEntity<>(result, HttpStatus.OK);
}

@Hidden // should unhide when we remove legacy controller
@PreAuthorize(
"hasPermission(#studyViewFilter, 'StudyViewFilter', T(org.cbioportal.legacy.utils.security.AccessLevel).READ)")
@PostMapping(
Expand Down Expand Up @@ -365,7 +356,8 @@ public ResponseEntity<ClinicalViolinPlotData> fetchClinicalDataViolinPlots(
// this new modified filter is used to fetch sample and patient clinical data.
// this is required to get the complete violin plot data.
// filteredSamples reflects only the original unmodified study view filter.
// we will need to fetch samples again to get the samples corresponding to this modified filter,
// we will need to fetch samples again to get the samples corresponding to this
// modified filter,
// otherwise patient to sample mapping may be incomplete.
if (studyViewFilter.getClinicalDataFilters() != null) {
studyViewFilter.getClinicalDataFilters().stream()
Expand Down Expand Up @@ -402,7 +394,6 @@ public ResponseEntity<ClinicalViolinPlotData> fetchClinicalDataViolinPlots(
return new ResponseEntity<>(result, HttpStatus.OK);
}

@Hidden // should unhide when we remove legacy controller
@PostMapping(
value = "/genomic-data-counts/fetch",
consumes = MediaType.APPLICATION_JSON_VALUE,
Expand All @@ -424,9 +415,11 @@ public ResponseEntity<List<GenomicDataCountItem>> fetchGenomicDataCounts(
throws StudyNotFoundException {
List<GenomicDataFilter> genomicDataFilters = genomicDataCountFilter.getGenomicDataFilters();
StudyViewFilter studyViewFilter = genomicDataCountFilter.getStudyViewFilter();
// when there is only one filter, it means study view is doing a single chart filter operation
// when there is only one filter, it means study view is doing a single chart
// filter operation
// remove filter from studyViewFilter to return all data counts
// the reason we do this is to make sure after chart get filtered, user can still see unselected
// the reason we do this is to make sure after chart get filtered, user can
// still see unselected
// portion of the chart
if (genomicDataFilters.size() == 1) {
NewStudyViewFilterUtil.removeSelfFromGenomicDataFilter(
Expand All @@ -435,15 +428,15 @@ public ResponseEntity<List<GenomicDataCountItem>> fetchGenomicDataCounts(
studyViewFilter);
}

// This endpoint is CNA specific. The name choice of "genomic data" does not imply it support
// This endpoint is CNA specific. The name choice of "genomic data" does not
// imply it support
// other genomic data types
List<GenomicDataCountItem> result =
studyViewService.getCNACountsByGeneSpecific(studyViewFilter, genomicDataFilters);

return new ResponseEntity<>(result, HttpStatus.OK);
}

@Hidden // should unhide when we remove legacy controller
@PostMapping(
value = "/generic-assay-data-counts/fetch",
consumes = MediaType.APPLICATION_JSON_VALUE,
Expand All @@ -467,9 +460,11 @@ public ResponseEntity<List<GenericAssayDataCountItem>> fetchGenericAssayDataCoun
List<GenericAssayDataFilter> gaFilters =
genericAssayDataCountFilter.getGenericAssayDataFilters();
StudyViewFilter studyViewFilter = genericAssayDataCountFilter.getStudyViewFilter();
// when there is only one filter, it means study view is doing a single chart filter operation
// when there is only one filter, it means study view is doing a single chart
// filter operation
// remove filter from studyViewFilter to return all data counts
// the reason we do this is to make sure after chart get filtered, user can still see unselected
// the reason we do this is to make sure after chart get filtered, user can
// still see unselected
// portion of the chart

if (gaFilters.size() == 1) {
Expand All @@ -481,7 +476,6 @@ public ResponseEntity<List<GenericAssayDataCountItem>> fetchGenericAssayDataCoun
studyViewService.getGenericAssayDataCounts(studyViewFilter, gaFilters));
}

@Hidden // should unhide when we remove legacy controller
@PostMapping(
value = "/mutation-data-counts/fetch",
consumes = MediaType.APPLICATION_JSON_VALUE,
Expand All @@ -499,9 +493,11 @@ public ResponseEntity<List<GenomicDataCountItem>> fetchMutationDataCounts(
GenomicDataCountFilter genomicDataCountFilter) {
List<GenomicDataFilter> genomicDataFilters = genomicDataCountFilter.getGenomicDataFilters();
StudyViewFilter studyViewFilter = genomicDataCountFilter.getStudyViewFilter();
// when there is only one filter, it means study view is doing a single chart filter operation
// when there is only one filter, it means study view is doing a single chart
// filter operation
// remove filter from studyViewFilter to return all data counts
// the reason we do this is to make sure after chart get filtered, user can still see unselected
// the reason we do this is to make sure after chart get filtered, user can
// still see unselected
// portion of the chart
if (genomicDataFilters.size() == 1 && projection == Projection.SUMMARY) {
NewStudyViewFilterUtil.removeSelfFromMutationDataFilter(
Expand All @@ -520,7 +516,6 @@ public ResponseEntity<List<GenomicDataCountItem>> fetchMutationDataCounts(
return ResponseEntity.ok(result);
}

@Hidden // should unhide when we remove legacy controller
@PostMapping(
value = "/clinical-event-type-counts/fetch",
consumes = MediaType.APPLICATION_JSON_VALUE,
Expand Down Expand Up @@ -588,7 +583,6 @@ public ResponseEntity<SampleTreatmentReport> fetchSampleTreatmentCounts(
studyViewService.getSampleTreatmentReport(studyViewFilter, projection));
}

@Hidden // should unhide when we remove legacy controller
@PostMapping(
value = "/custom-data-counts/fetch",
consumes = MediaType.APPLICATION_JSON_VALUE,
Expand Down Expand Up @@ -638,7 +632,6 @@ public ResponseEntity<List<ClinicalDataCountItem>> fetchCustomDataCounts(
return new ResponseEntity<>(result, HttpStatus.OK);
}

@Hidden // should unhide when we remove legacy controller
@PostMapping(
value = "/custom-data-bin-counts/fetch",
consumes = MediaType.APPLICATION_JSON_VALUE,
Expand All @@ -663,7 +656,6 @@ public ResponseEntity<List<ClinicalDataBin>> fetchCustomDataBinCounts(
return ResponseEntity.ok(customDataBins);
}

@Hidden // should unhide when we remove legacy controller
@PostMapping(
value = "/genomic-data-bin-counts/fetch",
consumes = MediaType.APPLICATION_JSON_VALUE,
Expand All @@ -683,7 +675,6 @@ public ResponseEntity<List<GenomicDataBin>> fetchGenomicDataBinCounts(
return ResponseEntity.ok(genomicDataBins);
}

@Hidden // should unhide when we remove legacy controller
@PostMapping(
value = "/generic-assay-data-bin-counts/fetch",
consumes = MediaType.APPLICATION_JSON_VALUE,
Expand Down
Loading
Loading