Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clickhouse mode of study view #11224

Open
wants to merge 124 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 112 commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
bd2918f
:heavy_plus_sign: Add infra to support multi db and Columnar DataSour…
haynescd Apr 8, 2024
86bd2cc
Add Columnar support for Mybatis
haynescd Apr 8, 2024
9db2295
Add Columnar Study View Controller /api/column-store
haynescd Apr 8, 2024
b4a8a38
Feature/ch/update poc base branch (#10776)
haynescd May 3, 2024
6485aa3
:white_check_mark: Add Unit test for StudyViewMapper Clickhouse
haynescd May 10, 2024
12b7b07
use regular views instead of materialized views (#10793)
onursumer May 14, 2024
83f2743
Feature/mutated genes AlterationFilter and Fix unit test (#10803)
haynescd May 21, 2024
63858cf
Add missing POC clinical data binning function (#10778)
onursumer May 23, 2024
b5fb29e
Create sample materialized view and use it (#10822)
alisman Jun 10, 2024
f566075
Feature/mutated genes total profiled counts and gene panels (#10824)
haynescd Jun 12, 2024
a03ec54
RFC80:density plot endpoint(#10837)
uklineale Jun 18, 2024
1051dea
Fix clinical data counts query/filter using new derived table (#10833)
alisman Jun 20, 2024
ed26ca7
Molecular-profile-counts service implementation (#10840)
alisman Jun 20, 2024
2015f69
Fix clinical data scatterplot (point at new derived cd table) (#10846)
alisman Jun 20, 2024
6e8e6c7
Rfc80/add cna genes endpoint (#10845)
haynescd Jun 20, 2024
5b0f2bd
:sparkles: Add StructuralVariant-genes endpoint (#10854)
haynescd Jun 24, 2024
3cac3a2
Implement study view sample-lists-counts endpoint in Clickhouse (#10849)
alisman Jun 24, 2024
3dd1e2a
Fix class import (#10856)
alisman Jun 24, 2024
a7af899
Move ClinicalCategoricalFilter to repository (#10847)
onursumer Jun 24, 2024
ab3000a
Rfc80/fix patient level filtering for alteration counts endpoints (#1…
haynescd Jun 24, 2024
fc03406
:bug: Fix totalCount calculation when WES not available (#10858)
haynescd Jun 25, 2024
604568f
Consolidate SQL files used to create CH Tables (#10867)
haynescd Jun 26, 2024
a569ec6
Demo rfc80 poc violin plot (#10863)
uklineale Jul 2, 2024
783b608
replace sample_mv references with sample_derived (#10880)
onursumer Jul 3, 2024
fc2f99d
:wrench: Update Sonar Cloud Token (#10888)
haynescd Jul 10, 2024
d50433d
Simplify clinical data binning related SQL (#10823)
onursumer Jul 11, 2024
0961680
Fix patient_derived table population (patient stable id was getting b…
alisman Jul 18, 2024
0a28546
Always load frontend over https (localdev mode) (#10901)
alisman Jul 18, 2024
827d587
Rfc80/clinical event timeline endpoint (#10899)
haynescd Jul 19, 2024
8ab5f25
Fix alteration count services (#10911)
haynescd Jul 29, 2024
94b431c
Rfc80/treatments patients endpoint (#10903)
haynescd Jul 29, 2024
dbaa897
Hide replacement clickhouse endpoints from swagger (except new treatm…
alisman Aug 2, 2024
89847e6
Rfc80/sample treatment endpoint (#10927)
haynescd Aug 5, 2024
71cf574
Rfc80/update open api annotation for sampleTreatment Endpoint (#10929)
haynescd Aug 6, 2024
d622c4e
Molecular-profile-counts-service (#10934)
alisman Aug 13, 2024
44e7c55
Add entrez_id to alteration Count endpoints (#10936)
haynescd Aug 13, 2024
21afb8b
Demo rfc80 poc mutation data counts & genomic data counts (#10807)
fuzhaoyuan Aug 13, 2024
0307a90
Add tests for case list sample counts endpoint (#10935)
alisman Aug 19, 2024
6ff724d
add unit tests for clinical data counts sql (#10933)
onursumer Aug 20, 2024
ff7ecbc
Implement custom-data-bin-counts endpoint (#10827)
gblaih Aug 21, 2024
3a975aa
normalize clinical data (#10943)
onursumer Aug 23, 2024
c34c28e
improve numerical clinical data filter (#10951)
onursumer Aug 27, 2024
c57362d
Update Treatment Endpoint to handle event_type TREATMENT, previously …
haynescd Aug 27, 2024
c83fc86
Remove need to filter via Patient-IDs, All filters utilize sample-ids…
haynescd Sep 5, 2024
8cb4ec7
add api test specs to backend (#10979)
alisman Sep 5, 2024
8712aed
fix api test merge writer (#10980)
alisman Sep 9, 2024
2b8499d
Genomic and Generic Assay bin counts endpoints (#10964)
dippindots Sep 11, 2024
cb7fb2d
Fix clinical data NA counts for multiple studies (#10978)
onursumer Sep 11, 2024
3c95157
Demo rfc80 poc mutation data count unit tests (#10981)
fuzhaoyuan Sep 12, 2024
b9afc4a
Delete custom specs (#10987)
alisman Sep 12, 2024
2900e6f
Fix GenomicDataFilterTest
dippindots Sep 12, 2024
8c6b5ae
Rfc80/add tests mutated-genes,cna-genes,structural-variants filters (…
haynescd Sep 13, 2024
c290bcd
Set custom http header with elapsed time on all api endpoints (#10994)
alisman Sep 16, 2024
64d263f
fix clinical data NA count logic (#10991)
onursumer Sep 17, 2024
beb1ade
Remove Sample Treatments with no counts (#10995)
haynescd Sep 17, 2024
a46d7e6
All custom header elapsed-time on CORS headers (#10999)
alisman Sep 18, 2024
0c22ed3
Remove caching from cd-bin-counts (#11001)
alisman Sep 18, 2024
65a97d3
We have to cast all numbers to floats in Clickhouse SQL in order to c…
alisman Sep 27, 2024
69d712a
Merge Alteration Counts that have conflicting HugoSymbols for Study V…
haynescd Sep 27, 2024
aec32c0
Add clickhouse custom data endpoints (#10963)
gblaih Oct 1, 2024
da299c5
Add samples field to custom filters to allow fetching samples without…
gblaih Oct 2, 2024
ed1165f
Add support for NA in genomic-data-bin-counts (#11006)
alisman Oct 2, 2024
218bf61
Update to add QValue for Alteration Count Services (#11034)
haynescd Oct 2, 2024
c9bd23b
Demo rfc80 poc na count for generic assay (#11039)
fuzhaoyuan Oct 2, 2024
70fb74f
Normalize data counts in a generic case-insensitive way (#11037)
onursumer Oct 4, 2024
2f48ea7
filter out null labels when counting sample lists (#11045)
onursumer Oct 8, 2024
29be4af
Rfc80/add na clinical data filtering (#11050)
haynescd Oct 8, 2024
a396f71
Add generic-assay-data-counts endpoint (#11059)
haynescd Oct 9, 2024
bd40799
Update SQL to remove duplicate Reference Genome entry (#11060)
haynescd Oct 11, 2024
e8ee142
Add checks to prevent null pointer on alterations in geneFilterQuery …
haynescd Oct 14, 2024
f88d85e
remove duplicate attributes when calculating missing NA (#11076)
onursumer Oct 14, 2024
e24a413
Re-apply caching to all study view service methods (#11091)
alisman Oct 18, 2024
1dd6462
fetch missing patient clinical data for violin plot (#11092)
onursumer Oct 18, 2024
3fc8001
Update to allow Qvalue when filtered cohort returns samples from a si…
haynescd Oct 18, 2024
fc691d0
Add new property for clickhouse cache enabling (#11109)
gblaih Oct 23, 2024
09e0917
Fix trim trailing error (#11085)
fuzhaoyuan Oct 24, 2024
928f5b1
SQL variable format clean up (#11110)
fuzhaoyuan Oct 24, 2024
302fdb4
ClinicalViolinPlot Serializable (#11124)
fuzhaoyuan Oct 28, 2024
b888b7f
Add isUnfiltered condition to cacheable clickhouse methods (#11120)
gblaih Oct 28, 2024
30b45c4
Fix violin plot sample filtering and counting issues (#11122)
onursumer Oct 28, 2024
1cfd84d
fetch missing patient clinical data for the density plot (#11132)
onursumer Oct 28, 2024
4efde5b
Fix profiling count issues in legacy (#11105)
alisman Oct 29, 2024
1934161
add internal id to sample and clinical data SQL queries (#11139)
onursumer Oct 30, 2024
aa04102
use case-insensitive ILIKE instead of case-sensitive LIKE when lookin…
onursumer Oct 30, 2024
5b6f136
ignore non-numeric values for violin plot to prevent number format ex…
onursumer Oct 30, 2024
6e2371f
Rfc80/clinical data counts refactor (#11084)
haynescd Nov 6, 2024
eff0c23
Filter out Mutations with Status UnCalled for Counts (#11166)
haynescd Nov 6, 2024
1b6d814
Update Profiled counts to use WES count when gene panel is not available
haynescd Nov 6, 2024
136dac2
Update to handle use case when sampleProfileWithoutGenePanel is 0 the…
haynescd Nov 7, 2024
bfab365
add custom driver filtering unit tests
Nov 7, 2024
076ecf6
add missing study filter param to clickhouse method for caching condi…
Nov 1, 2024
e00f084
CNA profile counts should only count samples once
alisman Nov 8, 2024
14b6a65
Add back NA counts when corresponding samples are filtered out of stu…
alisman Nov 14, 2024
5804a71
Update generic assay table schema (#11189)
fuzhaoyuan Nov 14, 2024
c56d3ea
Do not used prepared statements for the studyid lists (#11191)
alisman Nov 15, 2024
a4ced11
Api Tests Config for CircleCI (#11188)
zainasir Nov 15, 2024
74209d4
Revert "add custom driver filtering unit tests" (#11203)
alisman Nov 17, 2024
85329b6
Update Total profile Count to filter on genetic profile (#11198)
haynescd Nov 18, 2024
01b72a9
Add tests for profiled counts (#11190)
gblaih Nov 18, 2024
543f115
Remove test failing due to legacy miscount (#11205)
alisman Nov 18, 2024
4e3dc8f
cast all data filter start and end values to float (#11207)
onursumer Nov 18, 2024
242ca4d
Split clickhouse integration tests into separate files for each metho…
gblaih Nov 19, 2024
cad5ab8
Adding option for extracting study ids from sample identifiers for cl…
dippindots Nov 19, 2024
3174391
Add missing DROP TABLE statements (#11211)
sheridancbio Nov 19, 2024
db43621
Use PR-specific image for circleci api tests (#11217)
zainasir Nov 21, 2024
1e95a1c
Pretty print portal info in api-test logs
zainasir Nov 21, 2024
ce3354d
Add a frontend prop for clickhouse mode (#11219)
alisman Nov 21, 2024
a6ace50
require approval for restricted tests
zainasir Nov 22, 2024
ef25b13
rename approval job for circleci tests
zainasir Nov 22, 2024
53c7126
add integration tests for cna-genes and sv-genes (#11221)
gblaih Nov 22, 2024
2b45019
Fix Rebase issues with master
Nov 25, 2024
64fe5d0
Merge branch 'master' into demo-rfc80-poc
haynescd Nov 25, 2024
b44eb6e
Use upstream repo for api-tests
zainasir Nov 25, 2024
b780409
Fix swagger decorators for rfc80 clickhouse controller (#11230)
alisman Nov 25, 2024
2aac75e
check for non-numerical values in numerical clinical data count filter
onursumer Nov 20, 2024
9075f37
unify numerical data filters in one sql
onursumer Nov 21, 2024
17a5dad
do not normalize attribute value if not NA
onursumer Nov 22, 2024
c97fc06
add unit tests
onursumer Nov 22, 2024
97c5c5e
Add TransactionManager to handle lazy loading of data from db (cursor…
haynescd Dec 2, 2024
219c111
add unit tests for logic in service and repository methods
Nov 27, 2024
cc16f2c
fix error with case list counts method
Dec 2, 2024
b72ddaa
Add categorical patient level filtering for generic-assay-data-counts…
fuzhaoyuan Dec 3, 2024
04c9b42
Fix unfiltered method call in cacheable condition (#11250)
alisman Dec 3, 2024
68dfdaf
skip web-and-data image build for api tests (#11255)
zainasir Dec 4, 2024
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
152 changes: 152 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,135 @@ jobs:
DOCKER_IMAGE_SESSION_SERVICE: cbioportal/session-service:0.5.0
FRONTEND_TEST_DO_NOT_LOAD_EXTERNAL_FRONTEND: true

pull_cbioportal_test_codebase:
machine:
image: ubuntu-2204:2024.08.1
resource_class: medium
working_directory: /tmp/repos
steps:
- run:
name: Checkout cbioportal/cbioportal-test
environment:
TEST_REPO_URL: https://github.com/cBioPortal/cbioportal-test
command: |
git clone ${TEST_REPO_URL}
- persist_to_workspace:
root: /tmp/repos
paths:
- cbioportal-test

pull_cbioportal_frontend_codebase:
machine:
image: ubuntu-2204:2024.08.1
resource_class: medium
working_directory: /tmp/repos
steps:
- run:
name: Checkout cbioportal/cbioportal-frontend
environment:
FRONTEND_REPO_URL: https://github.com/alisman/cbioportal-frontend.git
FRONTEND_REPO_BRANCH: clickhouse
command: |
git clone -b ${FRONTEND_REPO_BRANCH} --single-branch ${FRONTEND_REPO_URL}
- persist_to_workspace:
root: /tmp/repos
paths:
- cbioportal-frontend

build_push_image:
machine:
image: ubuntu-2204:2024.08.1
resource_class: medium
working_directory: /tmp/repos
steps:
- attach_workspace:
at: /tmp/repos
- checkout:
path: /tmp/repos/cbioportal
- run:
name: Build cBioPortal docker image
environment:
DOCKER_REPO: cbioportal/cbioportal-dev
command: |
cd cbioportal-test
export DOCKER_TAG=$CIRCLE_SHA1
./scripts/build-push-image.sh --src=/tmp/repos/cbioportal --push=true
EXISTS=$(docker manifest inspect $DOCKER_REPO:$DOCKER_TAG-web-shenandoah > /dev/null; echo $?)
if [ $EXISTS -eq 0 ]; then
echo "Build succeeded!"
else
echo "Build failed!"
exit 1
fi

run_api_tests:
machine:
image: ubuntu-2204:2024.08.1
docker_layer_caching: true
resource_class: large
working_directory: /tmp/repos
steps:
- attach_workspace:
at: /tmp/repos
- checkout:
path: /tmp/repos/cbioportal
- run:
name: Instantiate a cbioportal instance
environment:
DOCKER_REPO: cbioportal/cbioportal-dev
command: |
cd cbioportal-test
export DOCKER_IMAGE_CBIOPORTAL=$DOCKER_REPO:$CIRCLE_SHA1-web-shenandoah
nohup ./scripts/docker-compose.sh >> /tmp/repos/docker-compose-logs.txt 2>&1 &
- run:
name: Wait for cbioportal to be live at localhost
command: |
for i in {1..20}; do
if curl -s http://localhost:8080 > /dev/null; then
echo "cbioportal is live at localhost:8080!"
exit 0
fi
echo "Waiting for cbioportal at localhost:8080 ..."
sleep 5
done
echo "Failed to connect to cbioportal at localhost:8080!"
exit 1
- run:
name: Confirm cbioportal config matches PR
command: |
cd cbioportal
echo "Matching gitCommitId..."
INSTANCE_COMMIT_ID=$(curl -s http://localhost:8080/api/info | jq -r '.["gitCommitId"]')
PR_COMMIT_ID=$CIRCLE_SHA1
if [ "$INSTANCE_COMMIT_ID" = "$PR_COMMIT_ID" ]; then
echo "gitCommitId successfully matched!"
echo "cBioPortal is ready:"
curl -s http://localhost:8080/api/info | jq
exit 0
else
echo "gitCommitIds do not match!"
echo "Instance Commit ID: $INSTANCE_COMMIT_ID"
echo "PR Commit ID: $PR_COMMIT_ID"
exit 1
fi
- run:
name: Run API Tests
environment:
API_TEST_HOST: http://localhost:8080
BACKEND_ROOT: /tmp/repos/cbioportal
command: |
cd cbioportal-frontend
nvm install 15.2.1
nvm use 15.2.1
npm install -g [email protected]
yarn --ignore-engines
yarn run apitests

- store_artifacts:
path: /tmp/repos/cbioportal-test/web-metadata.json
- store_artifacts:
path: /tmp/repos/docker-compose-logs.txt


workflows:
version: 2
Expand All @@ -238,3 +367,26 @@ workflows:
- build_backend
- pull_frontend_codebase
- install_yarn
api_tests:
jobs:
- pull_cbioportal_test_codebase
- pull_cbioportal_frontend_codebase
- wait_for_approval:
type: approval
requires:
- pull_cbioportal_test_codebase
- pull_cbioportal_frontend_codebase
- build_push_image:
context:
- api-tests
requires:
- wait_for_approval
- pull_cbioportal_test_codebase
- run_api_tests:
context:
- api-tests
requires:
- wait_for_approval
- pull_cbioportal_test_codebase
- pull_cbioportal_frontend_codebase
- build_push_image
6 changes: 3 additions & 3 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ jobs:
run: |
cd ./data && ./init.sh && rm -rf ./studies/* && cd ../config && \
cat $PORTAL_SOURCE_DIR/src/main/resources/application.properties | \
sed 's|spring.datasource.url=.*|spring.datasource.url=jdbc:mysql://cbioportal-database:3306/cbioportal?useSSL=false|' | \
sed 's|spring.datasource.username=.*|spring.datasource.username=cbio_user|' | \
sed 's|spring.datasource.password=.*|spring.datasource.password=somepassword|' \
sed 's|spring.datasource.mysql.url=.*|spring.datasource.mysql.url=jdbc:mysql://cbioportal-database:3306/cbioportal?useSSL=false|' | \
sed 's|spring.datasource.mysql.username=.*|spring.datasource.mysql.username=cbio_user|' | \
sed 's|spring.datasource.mysql.password=.*|spring.datasource.mysql.password=somepassword|' \
> application.properties
- name: 'Copy cgds.sql file into Docker Compose'
run: cp ./cbioportal/src/main/resources/db-scripts/cgds.sql ./cbioportal-docker-compose/data/.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
cp src/main/resources/application.properties.EXAMPLE src/main/resources/application.properties
- name: Build and analyze
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_TOKEN: de1b5cc660cd210dde840f492c371da6cc801763
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn clean install verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
- name: 'Add host.testcontainers.internal to /etc/hosts'
Expand All @@ -45,6 +45,6 @@ jobs:
mvn verify -Pintegration-test
- name: Code Coverage
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_TOKEN: de1b5cc660cd210dde840f492c371da6cc801763
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn sonar:sonar -Pcoverage
42 changes: 42 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
<selenium.version>4.17.0</selenium.version>
<sentry.version>7.1.0</sentry.version>
<apache_httpclient.version>5.2.1</apache_httpclient.version>
<clickhouse_testcontainer.version>1.19.7</clickhouse_testcontainer.version>


<!-- No sure what these are for -->
Expand Down Expand Up @@ -354,6 +355,31 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.clickhouse</groupId>
<artifactId>clickhouse-jdbc</artifactId>
<version>0.6.2</version>
<!-- use uber jar with all dependencies included, change classifier
to http for smaller jar -->
<classifier>all</classifier>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>clickhouse</artifactId>
<version>${clickhouse_testcontainer.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-test-autoconfigure</artifactId>
<version>3.0.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-testcontainers</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<dependencyManagement>
Expand Down Expand Up @@ -418,9 +444,25 @@
<includes>
<include>cgds.sql</include>
<include>migration.sql</include>
<include>clickhouse/clickhouse.sql</include>
<include>clickhouse/materialized_views.sql</include>
</includes>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/main/resources/db-scripts</directory>
<filtering>false</filtering>
<includes>
<include>clickhouse/clickhouse.sql</include>
<include>clickhouse/materialized_views.sql</include>
</includes>
</testResource>
<testResource>
<directory>src/test/resources</directory>
<filtering>false</filtering>
</testResource>
</testResources>

<plugins>
<plugin>
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/cbioportal/WebAppConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.util.List;

import org.cbioportal.web.ExecuterTimeInterceptor;
import org.cbioportal.web.util.InvolvedCancerStudyExtractorInterceptor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
Expand All @@ -12,6 +13,7 @@
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.handler.WebRequestHandlerInterceptorAdapter;

// TODO Consider creating separate DispatcherServlets as in the original web.xml
// See: https://stackoverflow.com/a/30686733/11651683
Expand Down Expand Up @@ -75,6 +77,9 @@ public HandlerInterceptor involvedCancerStudyExtractorInterceptor() {
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(involvedCancerStudyExtractorInterceptor());
registry.addInterceptor(new WebRequestHandlerInterceptorAdapter(
new ExecuterTimeInterceptor()
)).addPathPatterns("/**");
}

@Override
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/org/cbioportal/model/AlterationType.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.cbioportal.model;

public enum AlterationType {
MUTATION,
COPY_NUMBER_ALTERATION
MUTATION_EXTENDED,
COPY_NUMBER_ALTERATION,
STRUCTURAL_VARIANT,
GENERIC_ASSAY;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.cbioportal.model;

public class ClinicalViolinPlotBoxData {
import java.io.Serializable;

public class ClinicalViolinPlotBoxData implements Serializable {
private double whiskerLower;
private double whiskerUpper;
private double median;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package org.cbioportal.model;

import java.io.Serializable;
import java.util.List;

public class ClinicalViolinPlotData {
public class ClinicalViolinPlotData implements Serializable {
private List<ClinicalViolinPlotRowData> rows;
private Double axisStart;
private Double axisEnd;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.cbioportal.model;

public class ClinicalViolinPlotIndividualPoint {
import java.io.Serializable;

public class ClinicalViolinPlotIndividualPoint implements Serializable {
private String sampleId;
private String studyId;
private double value;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package org.cbioportal.model;

import java.io.Serializable;
import java.util.List;

public class ClinicalViolinPlotRowData {
public class ClinicalViolinPlotRowData implements Serializable {
private String category;
private Integer numSamples;
private List<Double> curveData;
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/org/cbioportal/model/GenomicDataCount.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ public class GenomicDataCount implements Serializable {
private Integer count;
private Integer uniqueCount;

public GenomicDataCount() {}

public GenomicDataCount(String label, String value, Integer count) {
this.label = label;
this.value = value;
this.count = count;
}

public GenomicDataCount(String label, String value, Integer count, Integer uniqueCount) {
this.label = label;
this.value = value;
this.count = count;
this.uniqueCount = uniqueCount;
}

public String getLabel() {
return label;
}
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/org/cbioportal/model/GenomicDataCountItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ public class GenomicDataCountItem implements Serializable {
private String profileType;
private List<GenomicDataCount> counts;

public GenomicDataCountItem() {}

public GenomicDataCountItem(String hugoGeneSymbol, String profileType, List<GenomicDataCount> counts) {
this.hugoGeneSymbol = hugoGeneSymbol;
this.profileType = profileType;
this.counts = counts;
}

public String getHugoGeneSymbol() {
return hugoGeneSymbol;
}
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/org/cbioportal/model/PatientTreatment.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package org.cbioportal.model;

import java.io.Serializable;

public record PatientTreatment (String treatment, int count) implements Serializable {

}
11 changes: 11 additions & 0 deletions src/main/java/org/cbioportal/model/PatientTreatmentReport.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package org.cbioportal.model;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;

public record PatientTreatmentReport (int totalPatients, int totalSamples, List<PatientTreatment> patientTreatments) implements Serializable {
public PatientTreatmentReport(int totalPatients, int totalSamples) {
this(totalPatients, totalSamples, Collections.emptyList());
}
}
4 changes: 4 additions & 0 deletions src/main/java/org/cbioportal/model/SampleTreatment.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package org.cbioportal.model;

public record SampleTreatment(String treatment, int preSampleCount, int postSampleCount) {
}
Loading
Loading