Skip to content

Commit 9a71196

Browse files
committed
Update swagger methods for clickhouse
1 parent 19cbc33 commit 9a71196

File tree

2 files changed

+57
-40
lines changed

2 files changed

+57
-40
lines changed

src/main/java/org/cbioportal/application/rest/vcolumnstore/ColumnarStoreStudyViewController.java

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ public ResponseEntity<List<SampleDTO>> fetchFilteredSamples(
118118
SampleMapper.INSTANCE.toDtos(studyViewService.getFilteredSamples(studyViewFilter)));
119119
}
120120

121-
@Hidden // should unhide when we remove legacy controller
122121
@PostMapping(
123122
value = "/mutated-genes/fetch",
124123
consumes = MediaType.APPLICATION_JSON_VALUE,
@@ -131,7 +130,6 @@ public ResponseEntity<List<AlterationCountByGene>> fetchMutatedGenes(
131130
return ResponseEntity.ok(studyViewService.getMutatedGenes(studyViewFilter));
132131
}
133132

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

156-
@Hidden // should unhide when we remove legacy controller
157154
@PostMapping(
158155
value = "/cna-genes/fetch",
159156
consumes = MediaType.APPLICATION_JSON_VALUE,
@@ -166,7 +163,6 @@ public ResponseEntity<List<CopyNumberCountByGene>> fetchCnaGenes(
166163
return ResponseEntity.ok(studyViewService.getCnaGenes(studyViewFilter));
167164
}
168165

169-
@Hidden // should unhide when we remove legacy controller
170166
@PostMapping(
171167
value = "/structuralvariant-genes/fetch",
172168
consumes = MediaType.APPLICATION_JSON_VALUE,
@@ -189,7 +185,6 @@ public ResponseEntity<List<AlterationCountByGene>> fetchStructuralVariantGenes(
189185
return ResponseEntity.ok(studyViewService.getStructuralVariantGenes(studyViewFilter));
190186
}
191187

192-
@Hidden // should unhide when we remove legacy controller
193188
@PostMapping(
194189
value = "/clinical-data-counts/fetch",
195190
consumes = MediaType.APPLICATION_JSON_VALUE,
@@ -212,7 +207,6 @@ public ResponseEntity<List<ClinicalDataCountItem>> fetchClinicalDataCounts(
212207
return ResponseEntity.ok(result);
213208
}
214209

215-
@Hidden // should unhide when we remove legacy controller
216210
@PostMapping(
217211
value = "/sample-lists-counts/fetch",
218212
consumes = MediaType.APPLICATION_JSON_VALUE,
@@ -229,7 +223,6 @@ public List<CaseListDataCount> fetchCaseListCounts(
229223
return studyViewService.getCaseListDataCounts(studyViewFilter);
230224
}
231225

232-
@Hidden // should unhide when we remove legacy controller
233226
@PostMapping(
234227
value = "/clinical-data-bin-counts/fetch",
235228
consumes = MediaType.APPLICATION_JSON_VALUE,
@@ -245,7 +238,6 @@ public ResponseEntity<List<ClinicalDataBin>> fetchClinicalDataBinCounts(
245238
return new ResponseEntity<>(clinicalDataBins, HttpStatus.OK);
246239
}
247240

248-
@Hidden // should unhide when we remove legacy controller
249241
@PostMapping(
250242
value = "/clinical-data-density-plot/fetch",
251243
consumes = MediaType.APPLICATION_JSON_VALUE,
@@ -314,7 +306,6 @@ public ResponseEntity<DensityPlotData> fetchClinicalDataDensityPlot(
314306
return new ResponseEntity<>(result, HttpStatus.OK);
315307
}
316308

317-
@Hidden // should unhide when we remove legacy controller
318309
@PreAuthorize(
319310
"hasPermission(#studyViewFilter, 'StudyViewFilter', T(org.cbioportal.legacy.utils.security.AccessLevel).READ)")
320311
@PostMapping(
@@ -367,7 +358,8 @@ public ResponseEntity<ClinicalViolinPlotData> fetchClinicalDataViolinPlots(
367358
// this new modified filter is used to fetch sample and patient clinical data.
368359
// this is required to get the complete violin plot data.
369360
// filteredSamples reflects only the original unmodified study view filter.
370-
// we will need to fetch samples again to get the samples corresponding to this modified filter,
361+
// we will need to fetch samples again to get the samples corresponding to this
362+
// modified filter,
371363
// otherwise patient to sample mapping may be incomplete.
372364
if (studyViewFilter.getClinicalDataFilters() != null) {
373365
studyViewFilter.getClinicalDataFilters().stream()
@@ -404,7 +396,6 @@ public ResponseEntity<ClinicalViolinPlotData> fetchClinicalDataViolinPlots(
404396
return new ResponseEntity<>(result, HttpStatus.OK);
405397
}
406398

407-
@Hidden // should unhide when we remove legacy controller
408399
@PostMapping(
409400
value = "/genomic-data-counts/fetch",
410401
consumes = MediaType.APPLICATION_JSON_VALUE,
@@ -426,9 +417,11 @@ public ResponseEntity<List<GenomicDataCountItem>> fetchGenomicDataCounts(
426417
throws StudyNotFoundException {
427418
List<GenomicDataFilter> genomicDataFilters = genomicDataCountFilter.getGenomicDataFilters();
428419
StudyViewFilter studyViewFilter = genomicDataCountFilter.getStudyViewFilter();
429-
// when there is only one filter, it means study view is doing a single chart filter operation
420+
// when there is only one filter, it means study view is doing a single chart
421+
// filter operation
430422
// remove filter from studyViewFilter to return all data counts
431-
// the reason we do this is to make sure after chart get filtered, user can still see unselected
423+
// the reason we do this is to make sure after chart get filtered, user can
424+
// still see unselected
432425
// portion of the chart
433426
if (genomicDataFilters.size() == 1) {
434427
NewStudyViewFilterUtil.removeSelfFromGenomicDataFilter(
@@ -437,15 +430,15 @@ public ResponseEntity<List<GenomicDataCountItem>> fetchGenomicDataCounts(
437430
studyViewFilter);
438431
}
439432

440-
// This endpoint is CNA specific. The name choice of "genomic data" does not imply it support
433+
// This endpoint is CNA specific. The name choice of "genomic data" does not
434+
// imply it support
441435
// other genomic data types
442436
List<GenomicDataCountItem> result =
443437
studyViewService.getCNACountsByGeneSpecific(studyViewFilter, genomicDataFilters);
444438

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

448-
@Hidden // should unhide when we remove legacy controller
449442
@PostMapping(
450443
value = "/generic-assay-data-counts/fetch",
451444
consumes = MediaType.APPLICATION_JSON_VALUE,
@@ -469,9 +462,11 @@ public ResponseEntity<List<GenericAssayDataCountItem>> fetchGenericAssayDataCoun
469462
List<GenericAssayDataFilter> gaFilters =
470463
genericAssayDataCountFilter.getGenericAssayDataFilters();
471464
StudyViewFilter studyViewFilter = genericAssayDataCountFilter.getStudyViewFilter();
472-
// when there is only one filter, it means study view is doing a single chart filter operation
465+
// when there is only one filter, it means study view is doing a single chart
466+
// filter operation
473467
// remove filter from studyViewFilter to return all data counts
474-
// the reason we do this is to make sure after chart get filtered, user can still see unselected
468+
// the reason we do this is to make sure after chart get filtered, user can
469+
// still see unselected
475470
// portion of the chart
476471

477472
if (gaFilters.size() == 1) {
@@ -483,7 +478,6 @@ public ResponseEntity<List<GenericAssayDataCountItem>> fetchGenericAssayDataCoun
483478
studyViewService.getGenericAssayDataCounts(studyViewFilter, gaFilters));
484479
}
485480

486-
@Hidden // should unhide when we remove legacy controller
487481
@PostMapping(
488482
value = "/mutation-data-counts/fetch",
489483
consumes = MediaType.APPLICATION_JSON_VALUE,
@@ -501,9 +495,11 @@ public ResponseEntity<List<GenomicDataCountItem>> fetchMutationDataCounts(
501495
GenomicDataCountFilter genomicDataCountFilter) {
502496
List<GenomicDataFilter> genomicDataFilters = genomicDataCountFilter.getGenomicDataFilters();
503497
StudyViewFilter studyViewFilter = genomicDataCountFilter.getStudyViewFilter();
504-
// when there is only one filter, it means study view is doing a single chart filter operation
498+
// when there is only one filter, it means study view is doing a single chart
499+
// filter operation
505500
// remove filter from studyViewFilter to return all data counts
506-
// the reason we do this is to make sure after chart get filtered, user can still see unselected
501+
// the reason we do this is to make sure after chart get filtered, user can
502+
// still see unselected
507503
// portion of the chart
508504
if (genomicDataFilters.size() == 1 && projection == Projection.SUMMARY) {
509505
NewStudyViewFilterUtil.removeSelfFromMutationDataFilter(
@@ -522,7 +518,6 @@ public ResponseEntity<List<GenomicDataCountItem>> fetchMutationDataCounts(
522518
return ResponseEntity.ok(result);
523519
}
524520

525-
@Hidden // should unhide when we remove legacy controller
526521
@PostMapping(
527522
value = "/clinical-event-type-counts/fetch",
528523
consumes = MediaType.APPLICATION_JSON_VALUE,
@@ -590,7 +585,6 @@ public ResponseEntity<SampleTreatmentReport> fetchSampleTreatmentCounts(
590585
studyViewService.getSampleTreatmentReport(studyViewFilter, projection));
591586
}
592587

593-
@Hidden // should unhide when we remove legacy controller
594588
@PostMapping(
595589
value = "/custom-data-counts/fetch",
596590
consumes = MediaType.APPLICATION_JSON_VALUE,
@@ -640,7 +634,6 @@ public ResponseEntity<List<ClinicalDataCountItem>> fetchCustomDataCounts(
640634
return new ResponseEntity<>(result, HttpStatus.OK);
641635
}
642636

643-
@Hidden // should unhide when we remove legacy controller
644637
@PostMapping(
645638
value = "/custom-data-bin-counts/fetch",
646639
consumes = MediaType.APPLICATION_JSON_VALUE,
@@ -665,7 +658,6 @@ public ResponseEntity<List<ClinicalDataBin>> fetchCustomDataBinCounts(
665658
return ResponseEntity.ok(customDataBins);
666659
}
667660

668-
@Hidden // should unhide when we remove legacy controller
669661
@PostMapping(
670662
value = "/genomic-data-bin-counts/fetch",
671663
consumes = MediaType.APPLICATION_JSON_VALUE,
@@ -685,7 +677,6 @@ public ResponseEntity<List<GenomicDataBin>> fetchGenomicDataBinCounts(
685677
return ResponseEntity.ok(genomicDataBins);
686678
}
687679

688-
@Hidden // should unhide when we remove legacy controller
689680
@PostMapping(
690681
value = "/generic-assay-data-bin-counts/fetch",
691682
consumes = MediaType.APPLICATION_JSON_VALUE,

0 commit comments

Comments
 (0)