forked from cBioPortal/cbioportal
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/add clinical data counts endpoint (cBioPortal#10262)
Migrate mutated-genes and clinical-data-counts to clickhouse-ish implementations --------- Co-authored-by: haynescd <haynescd@chop.edu>
- Loading branch information
Showing
12 changed files
with
643 additions
and
78 deletions.
There are no files selected for viewing
18 changes: 16 additions & 2 deletions
18
...istence/persistence-api/src/main/java/org/cbioportal/persistence/StudyViewRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,27 @@ | ||
package org.cbioportal.persistence; | ||
|
||
import org.cbioportal.model.AlterationCountByGene; | ||
import org.cbioportal.model.ClinicalData; | ||
import org.cbioportal.model.ClinicalDataCount; | ||
import org.cbioportal.model.Sample; | ||
import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; | ||
import org.cbioportal.persistence.enums.ClinicalAttributeDataType; | ||
import org.cbioportal.webparam.CategorizedClinicalDataCountFilter; | ||
import org.cbioportal.webparam.StudyViewFilter; | ||
|
||
import java.util.List; | ||
|
||
public interface StudyViewRepository { | ||
List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter); | ||
List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); | ||
|
||
List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); | ||
|
||
List<ClinicalDataCount> getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List<String> filteredAttributes); | ||
|
||
List<ClinicalDataCount> getSampleClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List<String> filteredAttributes); | ||
|
||
List<ClinicalDataCount> getPatientClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List<String> filteredAttributes); | ||
|
||
List<String> getClinicalDataAttributeNames(ClinicalAttributeDataSource clinicalAttributeDataSource, ClinicalAttributeDataType dataType); | ||
|
||
List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter); | ||
} |
15 changes: 15 additions & 0 deletions
15
...tence-api/src/main/java/org/cbioportal/persistence/enums/ClinicalAttributeDataSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.cbioportal.persistence.enums; | ||
|
||
public enum ClinicalAttributeDataSource { | ||
PATIENT("PATIENT"),SAMPLE("SAMPLE"); | ||
|
||
private final String value; | ||
|
||
ClinicalAttributeDataSource(String value) { | ||
this.value = value; | ||
} | ||
|
||
public String getValue() { | ||
return this.value; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...istence-api/src/main/java/org/cbioportal/persistence/enums/ClinicalAttributeDataType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.cbioportal.persistence.enums; | ||
|
||
public enum ClinicalAttributeDataType { | ||
CATEGORICAL("CATEGORICAL"), | ||
NUMERIC("NUMERIC"); | ||
|
||
private final String value; | ||
|
||
ClinicalAttributeDataType(String value) { | ||
this.value = value; | ||
} | ||
|
||
public String getValue() { | ||
return this.value; | ||
} | ||
} |
17 changes: 15 additions & 2 deletions
17
...-mybatis/src/main/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,25 @@ | ||
package org.cbioportal.persistence.mybatiscolumnstore; | ||
|
||
import org.cbioportal.model.AlterationCountByGene; | ||
import org.cbioportal.model.ClinicalDataCount; | ||
import org.cbioportal.model.Sample; | ||
import org.cbioportal.webparam.CategorizedClinicalDataCountFilter; | ||
import org.cbioportal.webparam.StudyViewFilter; | ||
|
||
import java.util.List; | ||
|
||
public interface StudyViewMapper { | ||
List<Sample> getFilteredSamples(StudyViewFilter studyViewFilter); | ||
List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter); | ||
List<Sample> getFilteredSamples(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); | ||
List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); | ||
|
||
List<ClinicalDataCount> getPatientClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, | ||
boolean applyPatientIdFilters, List<String> attributeIds, List<String> filteredAttributeValues); | ||
|
||
List<ClinicalDataCount> getSampleClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, | ||
boolean applyPatientIdFilters, List<String> attributeIds, List<String> filteredAttributeValues ); | ||
|
||
List<ClinicalDataCount> getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, | ||
boolean applyPatientIdFilters, List<String> attributeIds, List<String> filteredAttributeValues); | ||
|
||
List<String> getClinicalAttributeNames(String tableName); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.