Skip to content

Commit 84a22ab

Browse files
committed
Merge remote-tracking branch 'upstream/master' into demo-clickhouse-only-db
# Conflicts: # pom.xml # src/main/resources/org/cbioportal/legacy/persistence/mybatis/CosmicCountMapper.xml # src/test/java/org/cbioportal/legacy/persistence/mybatis/CosmicCountMyBatisRepositoryTest.java
2 parents 95cb175 + d85c334 commit 84a22ab

File tree

74 files changed

+1940
-555
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1940
-555
lines changed

.github/workflows/integration-test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ jobs:
4949
sed 's|session.service.url=.*|session.service.url=http://cbioportal-session:5001/api/sessions/my_portal/|' | \
5050
sed 's|feature.study.export=.*|feature.study.export=true|' | \
5151
sed 's|#\?session.endpoint.publisher-api-key=.*|session.endpoint.publisher-api-key=TEST|' \
52-
> application.properties
52+
> application.properties && \
53+
DB_VERSION=$(mvn -q -DforceStdout -Dexpression=db.version -f $PORTAL_SOURCE_DIR/pom.xml help:evaluate || true) && \
54+
if [ -n "$DB_VERSION" ]; then echo "db.version=${DB_VERSION}" > maven.properties; else : > maven.properties; fi && \
55+
echo "maven.properties => $(cat maven.properties | tr -d '\n' || echo '(empty)')"
5356
- name: 'Dump Properties'
5457
working-directory: ./cbioportal-docker-compose
5558
run: cat config/application.properties

docker/web-and-data/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ RUN apt-get update; apt-get install -y --no-install-recommends \
4444
RUN mkdir -p /cbioportal
4545

4646
#Download core files
47-
RUN wget https://github.com/cBioPortal/cbioportal-core/releases/download/v1.0.10/core-1.0.10.jar -P core/ ; cd core ; jar -xf core-1.0.10.jar scripts/ requirements.txt ; chmod -R a+x scripts/ ; cd ..;
47+
RUN wget https://github.com/cBioPortal/cbioportal-core/releases/download/v1.0.15/core-1.0.15.jar -P core/ ; cd core ; jar -xf core-1.0.15.jar scripts/ requirements.txt ; chmod -R a+x scripts/ ; cd ..;
4848

4949

5050
COPY --from=build /cbioportal/src/main/resources/db-scripts /cbioportal/db-scripts

docs/Migration-Guide.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
This page describes various changes deployers will need to make as they deploy newer versions of the portal.
44

5+
## v6.3 -> v6.4
6+
- The [v6.4.0](https://github.com/cBioPortal/cbioportal/releases/tag/v6.4.0) release includes database schema changes that aren’t backward compatible. Please review the [Database Migration Guide](https://docs.cbioportal.org/updating-your-cbioportal-installation/#running-the-migration-script) before upgrading.
7+
58
## v6.2 -> v6.3
69
- cBioPortal Database Migration: [v6.3.0](https://github.com/cBioPortal/cbioportal/releases/tag/v6.3.0) introduces breaking changes to the cBioPortal database schema. Please see the [Database Migration Guide](https://docs.cbioportal.org/updating-your-cbioportal-installation/#running-the-migration-script) before upgrading cBioPortal to v6.3.0.
710

docs/News.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
## April 17, 2025
1717
* Released a [new about page](https://about.cbioportal.org/), which includes a roadmap and an overview of 2024 accomplishments.
1818

19+
## April 11, 2025
20+
* **New Feature:** The Plots tab now has an option to draw a line connecting multiple samples from the same patient. This option is available when data is visualized as a box plot and when there is data from multiple samples from the same patient. [Example: Mutation count in a cohort of primary grade II glioma vs patient-matched recurrences of all grades](https://www.cbioportal.org/study/plots?id=lgg_ucsf_2014&plots_horz_selection=%7B%22dataType%22%3A%22clinical_attribute%22%2C%22selectedDataSourceOption%22%3A%22SAMPLE_TYPE%22%7D&plots_vert_selection=%7B%22dataType%22%3A%22clinical_attribute%22%2C%22selectedDataSourceOption%22%3A%22MUTATION_COUNT%22%7D&plots_coloring_selection=%7B%22selectedOption%22%3A%22undefined_%7B%5C%22clinicalAttributeId%5C%22%3A%5C%22GRADE%5C%22%2C%5C%22patientAttribute%5C%22%3Afalse%2C%5C%22studyId%5C%22%3A%5C%22lgg_ucsf_2014%5C%22%7D%22%7D)
21+
![image](https://github.com/user-attachments/assets/c6f54905-6167-40b9-af7f-0ef07ad21fdb)
22+
23+
1924
## January 28, 2025
2025
* **Enhancement:** You can now re-order the stacked bar charts in the Plots Tab alphabetically, by the number of samples or by the data category in the plot. This enhancement allows you to create more ready-to-publish figures using cBioPortal. As usual, the plots created in the Plots Tab can be downloaded in different formats. [Example: specimen type for each cancer type in MSK-IMPACT Clinical Sequencing Cohort (MSK, Nat Med 2017](https://www.cbioportal.org/study/plots?id=msk_impact_2017&plots_horz_selection=%7B%22dataType%22%3A%22clinical_attribute%22%2C%22selectedDataSourceOption%22%3A%22CANCER_TYPE%22%2C%22mutationCountBy%22%3A%22MutationType%22%2C%22logScale%22%3A%22false%22%7D&plots_vert_selection=%7B%22selectedGeneOption%22%3A7157%2C%22dataType%22%3A%22clinical_attribute%22%2C%22selectedDataSourceOption%22%3A%22SPECIMEN_TYPE%22%2C%22mutationCountBy%22%3A%22MutationType%22%2C%22logScale%22%3A%22false%22%7D&plots_coloring_selection=%7B%7D)
2126

docs/Updating-gene-and-gene_alias-tables.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ Execute these steps in case you want to reset your database to the most recent g
2323

2424
2- If DB engine supports foreign key (FK) constraints, e.g. InnoDB, drop constraints:
2525
```sql
26-
ALTER TABLE cosmic_mutation
27-
DROP FOREIGN KEY cosmic_mutation_ibfk_1;
28-
2926
ALTER TABLE uniprot_id_mapping
3027
DROP FOREIGN KEY uniprot_id_mapping_ibfk_1;
3128
```
@@ -84,7 +81,6 @@ SELECT count(*) FROM cbioportal.gene_alias;
8481
8- Clean-up old data:
8582
```sql
8683
SET SQL_SAFE_UPDATES = 0;
87-
DELETE FROM cosmic_mutation where ENTREZ_GENE_ID not in (SELECT ENTREZ_GENE_ID from gene);
8884
DELETE FROM sanger_cancer_census where ENTREZ_GENE_ID not in (SELECT ENTREZ_GENE_ID from gene);
8985
DELETE FROM uniprot_id_mapping where ENTREZ_GENE_ID not in (SELECT ENTREZ_GENE_ID from gene);
9086
DELETE FROM interaction where GENE_A not in (SELECT ENTREZ_GENE_ID from gene) or GENE_B not in (SELECT ENTREZ_GENE_ID from gene);
@@ -95,9 +91,6 @@ commit;
9591

9692
9- If DB engine supports FK constraints, e.g. InnoDB, restore constraints:
9793
```sql
98-
ALTER TABLE cosmic_mutation
99-
ADD CONSTRAINT cosmic_mutation_ibfk_1 FOREIGN KEY (`ENTREZ_GENE_ID`) REFERENCES `gene` (`ENTREZ_GENE_ID`);
100-
10194
ALTER TABLE uniprot_id_mapping
10295
ADD CONSTRAINT uniprot_id_mapping_ibfk_1 FOREIGN KEY (`ENTREZ_GENE_ID`) REFERENCES `gene` (`ENTREZ_GENE_ID`);
10396
```

docs/deployment/customization/application.properties-Reference.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -389,18 +389,6 @@ A private token is required to access the OncoKB Data (for details see the secti
389389
oncokb.token=
390390
```
391391

392-
"cBioPortal>=" driver annotation sources in the settings menu of Results View can be hidden by turning off the following property (default: true):
393-
394-
```
395-
show.cbioportal=true|false
396-
```
397-
398-
"COSMIC>=" driver annotation sources in the settings menu of Results View can be hidden by turning off the following property (default: true):
399-
400-
```
401-
show.cosmic=true|false
402-
```
403-
404392
## CIViC integration
405393

406394
CIViC integration can be turned on or off with the following property (default: true):

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<groupId>io.github.cbioportal</groupId>
1414
<artifactId>cbioportal</artifactId>
15-
<version>v6.3.7-SNAPSHOT</version>
15+
<version>v6.4.1</version>
1616
<packaging>jar</packaging>
1717
<description>cBioPortal for Cancer Genomics</description>
1818

@@ -28,9 +28,9 @@
2828
<!-- TODO replace with version of cbioportal frontend with compatible login url-->
2929
<frontend.groupId>io.github.cbioportal</frontend.groupId>
3030
<frontend.artifactId>frontend-cbioportal</frontend.artifactId>
31-
<frontend.version>v6.3.6</frontend.version>
31+
<frontend.version>v6.4.1</frontend.version>
3232
<!-- THIS SHOULD BE KEPT IN SYNC TO VERSION IN CGDS.SQL -->
33-
<db.version>2.14.2</db.version>
33+
<db.version>2.14.5</db.version>
3434
<derived_table.version>1.0.3</derived_table.version>
3535

3636
<!-- Version properties for dependencies that should have same version. -->
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
package org.cbioportal;
2+
3+
4+
import org.cbioportal.application.rest.response.MutationDTO;
5+
import org.cbioportal.shared.enums.ProjectionType;
6+
import org.springframework.http.HttpHeaders;
7+
import org.springframework.http.MediaType;
8+
import org.junit.jupiter.api.Test;
9+
import org.junit.jupiter.api.extension.ExtendWith;
10+
import org.springframework.beans.factory.annotation.Autowired;
11+
import org.springframework.boot.test.web.client.TestRestTemplate;
12+
import org.springframework.boot.test.web.server.LocalServerPort;
13+
import org.springframework.http.HttpEntity;
14+
import org.springframework.http.HttpStatus;
15+
import org.springframework.http.ResponseEntity;
16+
import org.springframework.http.HttpMethod;
17+
import org.springframework.test.context.junit.jupiter.SpringExtension;
18+
19+
import static org.junit.jupiter.api.Assertions.*;
20+
21+
@ExtendWith(SpringExtension.class)
22+
public class ColumnStoreMutationControllerE2ETest extends AbstractE2ETest{
23+
24+
@Autowired
25+
private TestRestTemplate restTemplate;
26+
27+
@LocalServerPort
28+
private int port;
29+
30+
private static final com.fasterxml.jackson.databind.ObjectMapper OBJECT_MAPPER = new com.fasterxml.jackson.databind.ObjectMapper();
31+
32+
33+
private MutationDTO[] callFetchMutationEndPoint(String testDataJson, ProjectionType projectionType)throws Exception{
34+
HttpHeaders headers = new HttpHeaders();
35+
headers.setContentType(MediaType.APPLICATION_JSON);
36+
HttpEntity<String> requestEntity = new HttpEntity<>(testDataJson, headers);
37+
38+
ResponseEntity<String> response = restTemplate.exchange(
39+
"http://localhost:" + port + "/api/column-store/mutations/fetch?projection="
40+
+ projectionType.name(),
41+
HttpMethod.POST,
42+
requestEntity,
43+
String.class
44+
);
45+
46+
assertEquals(HttpStatus.OK, response.getStatusCode());
47+
assertNotNull(response.getBody());
48+
49+
return OBJECT_MAPPER.readValue(response.getBody(), MutationDTO[].class);
50+
51+
}
52+
53+
private String loadTestData(String filename) throws Exception {
54+
return new String(java.nio.file.Files.readAllBytes(
55+
java.nio.file.Paths.get("src/e2e/java/org/cbioportal/ColumnStoreMutationControllerE2ETest/" + filename)));
56+
}
57+
58+
@Test
59+
void testFetchMutationEndPointWithDataJson_IdProjection() throws Exception {
60+
// The json has two molecularProfileId and a sampleId and entrezGeneIds to restrict search
61+
// Two profiles meet this criteria
62+
63+
String testDataJson = loadTestData("mutation_filter.json");
64+
MutationDTO[] mutationResultID = callFetchMutationEndPoint(testDataJson, ProjectionType.ID);
65+
66+
assertNotNull(mutationResultID, "Response should have mutation DTO");
67+
assertEquals(2, mutationResultID.length, "Two mutations meet the search criteria of the json file");
68+
69+
70+
//Compare the fields that should be equal
71+
//MolecularProfile id should be identical
72+
assertEquals(mutationResultID[0].molecularProfileId(), mutationResultID[1].molecularProfileId(), "molecularProfile IDs should match");
73+
//study id should be identical;
74+
assertEquals(mutationResultID[0].studyId(), mutationResultID[1].studyId(), "study IDs should match");
75+
76+
77+
}
78+
@Test
79+
void testFetchMutationEndPointWithDataJson_SummaryProjection() throws Exception {
80+
// The json has two molecularProfileId and a sampleId and entrezGeneIds to restrict search
81+
// Two profiles meet this criteria
82+
83+
String testDataJson = loadTestData("mutation_filter.json");
84+
MutationDTO[] mutationResultSummary = callFetchMutationEndPoint(testDataJson,ProjectionType.SUMMARY);
85+
86+
assertNotNull(mutationResultSummary, "Response should have mutation DTO");
87+
assertEquals(2, mutationResultSummary.length, "SUMMARY projection should not add or remove records");
88+
89+
90+
//Compare the fields that should be equal
91+
//MolecularProfile id should be identical
92+
assertEquals(mutationResultSummary[0].molecularProfileId(), mutationResultSummary[1].molecularProfileId(), "molecularProfile IDs should match");
93+
94+
//study id should be identical;
95+
assertEquals(mutationResultSummary[0].studyId(), mutationResultSummary[1].studyId(), "study IDs should match");
96+
97+
// Testing different projection expose different fields
98+
// SUMMARY projection should not have gene present or any AlleleSpecificCopyNumber. AlleleSpecificCopyNumber is null for this mutation profile
99+
for (MutationDTO mutationDTO : mutationResultSummary) {
100+
assertNull(mutationDTO.gene(), "Response should not have gene present");
101+
assertNull(mutationDTO.alleleSpecificCopyNumber(), "Response should not have AlleleSpecificCopyNumber present");
102+
}
103+
104+
}
105+
106+
@Test
107+
void testFetchMutationEndPointWithDataJson_DetailedProjection() throws Exception {
108+
// The json has two molecularProfileId and a sampleId and entrezGeneIds to restrict search
109+
// Two profiles meet this criteria
110+
111+
String testDataJson = loadTestData("mutation_filter.json");
112+
MutationDTO[] mutationResultDetailed = callFetchMutationEndPoint(testDataJson,ProjectionType.DETAILED);
113+
114+
assertNotNull(mutationResultDetailed, "Response should have mutation DTO");
115+
assertEquals(2, mutationResultDetailed.length, "DETAILED projection should not add or remove records");
116+
117+
118+
//Compare the fields that should be equal
119+
120+
//MolecularProfile id should be identical
121+
assertEquals(mutationResultDetailed[0].molecularProfileId(), mutationResultDetailed[1].molecularProfileId(), "molecularProfile IDs should match");
122+
//study id should be identical;
123+
assertEquals(mutationResultDetailed[0].studyId(), mutationResultDetailed[1].studyId(), "study IDs should match");
124+
125+
// Testing different projection expose different fields
126+
// Detailed projection should have gene present or any AlleleSpecificCopyNumber. AlleleSpecificCopyNumber is null for this mutation profile
127+
for (MutationDTO mutationDTO : mutationResultDetailed) {
128+
assertNotNull(mutationDTO.gene(), "Response should have gene present");
129+
assertNull(mutationDTO.alleleSpecificCopyNumber(), "Response should not have AlleleSpecificCopyNumber present ");
130+
}
131+
}
132+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"sampleMolecularIdentifiers": [
3+
{"sampleId": "P01_Pri", "molecularProfileId": "lgg_ucsf_2014_mutations"},
4+
{"sampleId": "P05_Rec", "molecularProfileId": "lgg_ucsf_2014_mutations"}
5+
],
6+
"entrezGeneIds": [287,2]
7+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package org.cbioportal.application.rest.mapper;
2+
3+
import org.cbioportal.application.rest.response.AlleleSpecificCopyNumberDTO;
4+
import org.cbioportal.legacy.model.AlleleSpecificCopyNumber;
5+
import org.mapstruct.Mapper;
6+
import org.mapstruct.factory.Mappers;
7+
8+
@Mapper
9+
public interface AlleleSpecificCopyNumberMapper {
10+
AlleleSpecificCopyNumberMapper INSTANCE = Mappers.getMapper(AlleleSpecificCopyNumberMapper.class);
11+
12+
AlleleSpecificCopyNumberDTO toAlleleSpecificCopyNumberDTO(
13+
AlleleSpecificCopyNumber alleleSpecificCopyNumber);
14+
}

0 commit comments

Comments
 (0)