From db9e6ea7ae22f6d4607f5b0f23e9f0e7401d0ff6 Mon Sep 17 00:00:00 2001 From: haynescd Date: Mon, 8 Apr 2024 12:35:01 -0400 Subject: [PATCH 01/87] :heavy_plus_sign: Add infra to support multi db and Columnar DataSource Properties --- pom.xml | 8 ++++ .../mybatis/config/PersistenceConfig.java | 3 +- .../CustomDataSourceConfiguration.java | 39 +++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 src/main/java/org/cbioportal/properties/CustomDataSourceConfiguration.java diff --git a/pom.xml b/pom.xml index d1f7dbe00d2..2f92b70ce29 100644 --- a/pom.xml +++ b/pom.xml @@ -357,6 +357,14 @@ sentry-spring-boot-starter-jakarta ${sentry.version} + + com.clickhouse + clickhouse-jdbc + 0.5.0 + + all + diff --git a/src/main/java/org/cbioportal/persistence/mybatis/config/PersistenceConfig.java b/src/main/java/org/cbioportal/persistence/mybatis/config/PersistenceConfig.java index 933be27cc4a..8eb76a8b34a 100644 --- a/src/main/java/org/cbioportal/persistence/mybatis/config/PersistenceConfig.java +++ b/src/main/java/org/cbioportal/persistence/mybatis/config/PersistenceConfig.java @@ -5,6 +5,7 @@ import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.boot.autoconfigure.ConfigurationCustomizer; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -31,7 +32,7 @@ public void customize(org.apache.ibatis.session.Configuration configuration) { } @Bean - public SqlSessionFactoryBean sqlSessionFactory(DataSource dataSource, ApplicationContext applicationContext) throws IOException { + public SqlSessionFactoryBean sqlSessionFactory(@Qualifier("mysqlDataSource") DataSource dataSource, ApplicationContext applicationContext) throws IOException { SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); sessionFactory.setDataSource(dataSource); sessionFactory.setMapperLocations( diff --git a/src/main/java/org/cbioportal/properties/CustomDataSourceConfiguration.java b/src/main/java/org/cbioportal/properties/CustomDataSourceConfiguration.java new file mode 100644 index 00000000000..f0562cd2f7b --- /dev/null +++ b/src/main/java/org/cbioportal/properties/CustomDataSourceConfiguration.java @@ -0,0 +1,39 @@ +package org.cbioportal.properties; + +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import javax.sql.DataSource; + +@Configuration +public class CustomDataSourceConfiguration { + @Bean + @ConfigurationProperties("spring.datasource.mysql") + public DataSourceProperties mysqlDataSourceProperties() { + return new DataSourceProperties(); + } + + @Bean + @ConfigurationProperties("spring.datasource.columnar") + public DataSourceProperties columnarDatSourceProperties() { + return new DataSourceProperties(); + } + + @Bean + @Qualifier("mysqlDataSource") + public DataSource mysqlDataSource() { + return mysqlDataSourceProperties() + .initializeDataSourceBuilder() + .build(); + } + + @Bean + public DataSource columnarDataSource() { + return columnarDatSourceProperties() + .initializeDataSourceBuilder() + .build(); + } +} From 7d8b9f7c619d469bf3501ce998fc74c6ebd6f2ba Mon Sep 17 00:00:00 2001 From: haynescd Date: Mon, 8 Apr 2024 14:01:55 -0400 Subject: [PATCH 02/87] Add Columnar support for Mybatis --- .../persistence/StudyViewRepository.java | 31 ++ .../enums/ClinicalAttributeDataSource.java | 15 + .../enums/ClinicalAttributeDataType.java | 16 + .../mybatiscolumnar/StudyViewMapper.java | 31 ++ .../StudyViewMyBatisRepository.java | 74 +++++ .../config/PersistenceConfig.java | 30 ++ .../CustomDataSourceConfiguration.java | 1 + .../CategorizedClinicalDataCountFilter.java | 71 +++++ .../mybatiscolumnar/StudyViewMapper.xml | 282 ++++++++++++++++++ 9 files changed, 551 insertions(+) create mode 100644 src/main/java/org/cbioportal/persistence/StudyViewRepository.java create mode 100644 src/main/java/org/cbioportal/persistence/enums/ClinicalAttributeDataSource.java create mode 100644 src/main/java/org/cbioportal/persistence/enums/ClinicalAttributeDataType.java create mode 100644 src/main/java/org/cbioportal/persistence/mybatiscolumnar/StudyViewMapper.java create mode 100644 src/main/java/org/cbioportal/persistence/mybatiscolumnar/StudyViewMyBatisRepository.java create mode 100644 src/main/java/org/cbioportal/persistence/mybatiscolumnar/config/PersistenceConfig.java create mode 100644 src/main/java/org/cbioportal/web/parameter/CategorizedClinicalDataCountFilter.java create mode 100644 src/main/resources/org/cbioportal/persistence/mybatiscolumnar/StudyViewMapper.xml diff --git a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java new file mode 100644 index 00000000000..91733a0151b --- /dev/null +++ b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java @@ -0,0 +1,31 @@ +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.web.parameter.CategorizedClinicalDataCountFilter; +import org.cbioportal.web.parameter.StudyViewFilter; + +import java.util.List; + +public interface StudyViewRepository { + List getFilteredSamples(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + + List getSampleClinicalData(StudyViewFilter studyViewFilter, List attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + + List getPatientClinicalData(StudyViewFilter studyViewFilter, List attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + + List getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + + List getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List filteredAttributes); + + List getSampleClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List filteredAttributes); + + List getPatientClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List filteredAttributes); + + List getClinicalDataAttributeNames(ClinicalAttributeDataSource clinicalAttributeDataSource, ClinicalAttributeDataType dataType); + +} diff --git a/src/main/java/org/cbioportal/persistence/enums/ClinicalAttributeDataSource.java b/src/main/java/org/cbioportal/persistence/enums/ClinicalAttributeDataSource.java new file mode 100644 index 00000000000..ed320c1cebd --- /dev/null +++ b/src/main/java/org/cbioportal/persistence/enums/ClinicalAttributeDataSource.java @@ -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; + } +} diff --git a/src/main/java/org/cbioportal/persistence/enums/ClinicalAttributeDataType.java b/src/main/java/org/cbioportal/persistence/enums/ClinicalAttributeDataType.java new file mode 100644 index 00000000000..591f67e117d --- /dev/null +++ b/src/main/java/org/cbioportal/persistence/enums/ClinicalAttributeDataType.java @@ -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; + } +} diff --git a/src/main/java/org/cbioportal/persistence/mybatiscolumnar/StudyViewMapper.java b/src/main/java/org/cbioportal/persistence/mybatiscolumnar/StudyViewMapper.java new file mode 100644 index 00000000000..a1ed790107b --- /dev/null +++ b/src/main/java/org/cbioportal/persistence/mybatiscolumnar/StudyViewMapper.java @@ -0,0 +1,31 @@ +package org.cbioportal.persistence.mybatiscolumnar; + +import org.cbioportal.model.AlterationCountByGene; +import org.cbioportal.model.ClinicalData; +import org.cbioportal.model.ClinicalDataCount; +import org.cbioportal.model.Sample; +import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; +import org.cbioportal.web.parameter.StudyViewFilter; + +import java.util.List; + +public interface StudyViewMapper { + List getFilteredSamples(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); + + List getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); + + List getPatientClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, + boolean applyPatientIdFilters, List attributeIds, List filteredAttributeValues); + + List getSampleClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, + boolean applyPatientIdFilters, List attributeIds, List filteredAttributeValues ); + + List getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, + boolean applyPatientIdFilters, List attributeIds, List filteredAttributeValues); + + List getClinicalAttributeNames(String tableName); + + List getSampleClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, List attributeIds); + + List getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, List attributeIds); +} diff --git a/src/main/java/org/cbioportal/persistence/mybatiscolumnar/StudyViewMyBatisRepository.java b/src/main/java/org/cbioportal/persistence/mybatiscolumnar/StudyViewMyBatisRepository.java new file mode 100644 index 00000000000..477e5c73dd4 --- /dev/null +++ b/src/main/java/org/cbioportal/persistence/mybatiscolumnar/StudyViewMyBatisRepository.java @@ -0,0 +1,74 @@ +package org.cbioportal.persistence.mybatiscolumnar; + +import org.cbioportal.model.AlterationCountByGene; +import org.cbioportal.model.ClinicalData; +import org.cbioportal.model.ClinicalDataCount; +import org.cbioportal.model.Sample; +import org.cbioportal.persistence.StudyViewRepository; +import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; +import org.cbioportal.persistence.enums.ClinicalAttributeDataType; +import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; +import org.cbioportal.web.parameter.StudyViewFilter; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public class StudyViewMyBatisRepository implements StudyViewRepository { + + private final List FILTERED_CLINICAL_ATTR_VALUES = List.of("NA", "NAN", "N/A"); + private final StudyViewMapper mapper; + + @Autowired + public StudyViewMyBatisRepository(StudyViewMapper mapper) { + this.mapper = mapper; + } + @Override + public List getFilteredSamples(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + + return mapper.getFilteredSamples(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter)); + } + + @Override + public List getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + return mapper.getMutatedGenes(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter)); + } + + @Override + public List getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List filteredAttributes) { + return mapper.getClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), + filteredAttributes, FILTERED_CLINICAL_ATTR_VALUES ); + } + + @Override + public List getSampleClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List filteredAttributes) { + return mapper.getSampleClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), + filteredAttributes, FILTERED_CLINICAL_ATTR_VALUES ); + } + + @Override + public List getPatientClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List filteredAttributes) { + return mapper.getPatientClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), + filteredAttributes, FILTERED_CLINICAL_ATTR_VALUES); + } + + @Override + public List getClinicalDataAttributeNames(ClinicalAttributeDataSource clinicalAttributeDataSource, ClinicalAttributeDataType dataType) { + String tableName = clinicalAttributeDataSource.getValue().toLowerCase() + "_clinical_attribute_" + dataType.getValue().toLowerCase(); + return mapper.getClinicalAttributeNames(tableName); + } + + private boolean shouldApplyPatientIdFilters(CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + return categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters().isEmpty() + || categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters().isEmpty(); + } + + public List getSampleClinicalData(StudyViewFilter studyViewFilter, List attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + return mapper.getSampleClinicalDataFromStudyViewFilter(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), attributeIds); + } + + public List getPatientClinicalData(StudyViewFilter studyViewFilter, List attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + return mapper.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), attributeIds); + } +} \ No newline at end of file diff --git a/src/main/java/org/cbioportal/persistence/mybatiscolumnar/config/PersistenceConfig.java b/src/main/java/org/cbioportal/persistence/mybatiscolumnar/config/PersistenceConfig.java new file mode 100644 index 00000000000..1d5c0d58342 --- /dev/null +++ b/src/main/java/org/cbioportal/persistence/mybatiscolumnar/config/PersistenceConfig.java @@ -0,0 +1,30 @@ +package org.cbioportal.persistence.mybatiscolumnar.config; + +import org.cbioportal.persistence.mybatis.typehandler.SampleTypeTypeHandler; +import org.mybatis.spring.SqlSessionFactoryBean; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import javax.sql.DataSource; +import java.io.IOException; + + +@Configuration +@MapperScan("org.cbioportal.persistence.mybatiscolumnar") +public class PersistenceConfig { + + @Bean + public SqlSessionFactoryBean sqlSessionFactory(@Qualifier("columnarDataSource") DataSource dataSource, ApplicationContext applicationContext) throws IOException { + SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); + sessionFactory.setDataSource(dataSource); + sessionFactory.setMapperLocations( + applicationContext.getResources("classpath:org/cbioportal/persistence/mybatiscolumnar/*.xml") + ); + sessionFactory.setTypeHandlers(new SampleTypeTypeHandler()); + return sessionFactory; + } + +} diff --git a/src/main/java/org/cbioportal/properties/CustomDataSourceConfiguration.java b/src/main/java/org/cbioportal/properties/CustomDataSourceConfiguration.java index f0562cd2f7b..fe6ae6a6205 100644 --- a/src/main/java/org/cbioportal/properties/CustomDataSourceConfiguration.java +++ b/src/main/java/org/cbioportal/properties/CustomDataSourceConfiguration.java @@ -31,6 +31,7 @@ public DataSource mysqlDataSource() { } @Bean + @Qualifier("columnarDataSource") public DataSource columnarDataSource() { return columnarDatSourceProperties() .initializeDataSourceBuilder() diff --git a/src/main/java/org/cbioportal/web/parameter/CategorizedClinicalDataCountFilter.java b/src/main/java/org/cbioportal/web/parameter/CategorizedClinicalDataCountFilter.java new file mode 100644 index 00000000000..734d9bb53e7 --- /dev/null +++ b/src/main/java/org/cbioportal/web/parameter/CategorizedClinicalDataCountFilter.java @@ -0,0 +1,71 @@ +package org.cbioportal.web.parameter; + +import java.util.List; + +public final class CategorizedClinicalDataCountFilter { + + public static Builder getBuilder() { + return new Builder(); + } + private final List sampleNumericalClinicalDataFilters; + private final List sampleCategoricalClinicalDataFilters; + private final List patientNumericalClinicalDataFilters; + private final List patientCategoricalClinicalDataFilters; + private CategorizedClinicalDataCountFilter(Builder builder) { + this.sampleCategoricalClinicalDataFilters = builder.sampleCategoricalClinicalDataFilters; + this.sampleNumericalClinicalDataFilters = builder.sampleNumericalClinicalDataFilters; + this.patientCategoricalClinicalDataFilters = builder.patientCategoricalClinicalDataFilters; + this.patientNumericalClinicalDataFilters = builder.patientNumericalClinicalDataFilters; + } + + public List getSampleNumericalClinicalDataFilters() { + return sampleNumericalClinicalDataFilters; + } + + public List getSampleCategoricalClinicalDataFilters() { + return sampleCategoricalClinicalDataFilters; + } + + public List getPatientNumericalClinicalDataFilters() { + return patientNumericalClinicalDataFilters; + } + + public List getPatientCategoricalClinicalDataFilters() { + return patientCategoricalClinicalDataFilters; + } + + + public static class Builder { + private List sampleNumericalClinicalDataFilters; + private List sampleCategoricalClinicalDataFilters; + private List patientNumericalClinicalDataFilters; + private List patientCategoricalClinicalDataFilters; + + private Builder(){ + + } + public Builder setSampleCategoricalClinicalDataFilters(List sampleCategoricalClinicalDataFilters) { + this.sampleCategoricalClinicalDataFilters = sampleCategoricalClinicalDataFilters; + return this; + } + + public Builder setSampleNumericalClinicalDataFilters(List sampleNumericalClinicalDataFilters) { + this.sampleNumericalClinicalDataFilters = sampleNumericalClinicalDataFilters; + return this; + } + + public Builder setPatientCategoricalClinicalDataFilters(List patientCategoricalClinicalDataFilters) { + this.patientCategoricalClinicalDataFilters = patientCategoricalClinicalDataFilters; + return this; + } + + public Builder setPatientNumericalClinicalDataFilters(List patientNumericalClinicalDataFilters) { + this.patientNumericalClinicalDataFilters = patientNumericalClinicalDataFilters; + return this; + } + + public CategorizedClinicalDataCountFilter build() { + return new CategorizedClinicalDataCountFilter(this); + } + } +} diff --git a/src/main/resources/org/cbioportal/persistence/mybatiscolumnar/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatiscolumnar/StudyViewMapper.xml new file mode 100644 index 00000000000..95f4e844515 --- /dev/null +++ b/src/main/resources/org/cbioportal/persistence/mybatiscolumnar/StudyViewMapper.xml @@ -0,0 +1,282 @@ + + + + + + + + + + + + + + + + + + + + + SELECT + attribute_name as attributeId, + CASE WHEN attribute_value = 'NULL' THEN 'NA' ELSE attribute_value END AS value, + Count(*) as count + FROM ${table_name_prefix}_clinical_attribute_categorical + + patient_unique_id IN ( + + INTERSECT + + ) + AND UPPER(attribute_value) NOT IN + + #{filteredAttributeValue} + + AND attribute_name IN + + #{attributeId} + + + GROUP BY attribute_name, + attribute_value + + + + + + + + + INTERSECT + SELECT sample_unique_id + FROM sample + WHERE cancer_study_identifier IN + + #{studyId} + + + + INTERSECT + SELECT sample_unique_id + FROM sample + WHERE sample_unique_id IN + + '${sampleIdentifier.studyId}_${sampleIdentifier.sampleId}' + + + + + + SELECT sample_unique_id + FROM genomic_event + + genetic_profile_stable_id IN + + #{molecularProfileId} + + AND hugo_gene_symbol IN ( + + #{geneFilterQuery.hugoGeneSymbol} + + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT ${unique_id} + FROM ${table_name} + WHERE attribute_name = '${clinicalDataFilter.attributeId}' + + + + AND attribute_value = -1000000 + + + + AND ABS(attribute_value - ${dataFilterValue.start}) < EXP(-11) + + + + AND attribute_value > ${dataFilterValue.start} + + + AND attribute_value <= ${dataFilterValue.end} + + + + + + + + + SELECT ${unique_id} + FROM ${table_name} + WHERE attribute_name = '${clinicalDataFilter.attributeId}' + + + AND attribute_value = '${dataFilterValue.value}' + + + + + + SELECT sample_unique_id + FROM sample + + patient_unique_id IN () + + + + + SELECT patient_unique_id + FROM sample + + sample_unique_id IN () + + + + + From 8b07d3fd7422594e81d55ebb787a77ef02dac2e6 Mon Sep 17 00:00:00 2001 From: haynescd Date: Mon, 8 Apr 2024 15:38:41 -0400 Subject: [PATCH 03/87] Add Columnar Study View Controller /api/column-store --- .../mybatis/config/PersistenceConfig.java | 5 +- ...ig.java => PersistenceColumnarConfig.java} | 8 +- .../service/StudyViewColumnarService.java | 22 +++ .../impl/StudyViewColumnarServiceImpl.java | 114 ++++++++++++++++ .../StudyViewColumnStoreController.java | 129 ++++++++++++++++++ .../columnar/util/NewStudyViewFilterUtil.java | 13 ++ ...volvedCancerStudyExtractorInterceptor.java | 2 + .../mybatiscolumnar/StudyViewMapper.xml | 2 +- 8 files changed, 288 insertions(+), 7 deletions(-) rename src/main/java/org/cbioportal/persistence/mybatiscolumnar/config/{PersistenceConfig.java => PersistenceColumnarConfig.java} (71%) create mode 100644 src/main/java/org/cbioportal/service/StudyViewColumnarService.java create mode 100644 src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java create mode 100644 src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java create mode 100644 src/main/java/org/cbioportal/web/columnar/util/NewStudyViewFilterUtil.java diff --git a/src/main/java/org/cbioportal/persistence/mybatis/config/PersistenceConfig.java b/src/main/java/org/cbioportal/persistence/mybatis/config/PersistenceConfig.java index 8eb76a8b34a..eb8f23801cd 100644 --- a/src/main/java/org/cbioportal/persistence/mybatis/config/PersistenceConfig.java +++ b/src/main/java/org/cbioportal/persistence/mybatis/config/PersistenceConfig.java @@ -6,6 +6,7 @@ import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.boot.autoconfigure.ConfigurationCustomizer; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -15,7 +16,7 @@ @Configuration -@MapperScan("org.cbioportal.persistence.mybatis") +@MapperScan(value="org.cbioportal.persistence.mybatis", sqlSessionFactoryRef="sqlSessionFactory") public class PersistenceConfig { // This is the only way I was able to register the SampleType TypeHandler to MyBatis. @@ -31,7 +32,7 @@ public void customize(org.apache.ibatis.session.Configuration configuration) { }; } - @Bean + @Bean("sqlSessionFactory") public SqlSessionFactoryBean sqlSessionFactory(@Qualifier("mysqlDataSource") DataSource dataSource, ApplicationContext applicationContext) throws IOException { SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); sessionFactory.setDataSource(dataSource); diff --git a/src/main/java/org/cbioportal/persistence/mybatiscolumnar/config/PersistenceConfig.java b/src/main/java/org/cbioportal/persistence/mybatiscolumnar/config/PersistenceColumnarConfig.java similarity index 71% rename from src/main/java/org/cbioportal/persistence/mybatiscolumnar/config/PersistenceConfig.java rename to src/main/java/org/cbioportal/persistence/mybatiscolumnar/config/PersistenceColumnarConfig.java index 1d5c0d58342..8678123a246 100644 --- a/src/main/java/org/cbioportal/persistence/mybatiscolumnar/config/PersistenceConfig.java +++ b/src/main/java/org/cbioportal/persistence/mybatiscolumnar/config/PersistenceColumnarConfig.java @@ -13,11 +13,11 @@ @Configuration -@MapperScan("org.cbioportal.persistence.mybatiscolumnar") -public class PersistenceConfig { +@MapperScan(value="org.cbioportal.persistence.mybatiscolumnar", sqlSessionFactoryRef ="sqlColumnarSessionFactory") +public class PersistenceColumnarConfig { - @Bean - public SqlSessionFactoryBean sqlSessionFactory(@Qualifier("columnarDataSource") DataSource dataSource, ApplicationContext applicationContext) throws IOException { + @Bean("sqlColumnarSessionFactory") + public SqlSessionFactoryBean sqlColumnarSessionFactory(@Qualifier("columnarDataSource") DataSource dataSource, ApplicationContext applicationContext) throws IOException { SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); sessionFactory.setDataSource(dataSource); sessionFactory.setMapperLocations( diff --git a/src/main/java/org/cbioportal/service/StudyViewColumnarService.java b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java new file mode 100644 index 00000000000..0d08f2a1f8f --- /dev/null +++ b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java @@ -0,0 +1,22 @@ +package org.cbioportal.service; + +import org.cbioportal.model.AlterationCountByGene; +import org.cbioportal.model.ClinicalData; +import org.cbioportal.model.ClinicalDataCountItem; +import org.cbioportal.model.Sample; +import org.cbioportal.web.parameter.StudyViewFilter; + +import java.util.List; + +public interface StudyViewColumnarService { + + List getFilteredSamples(StudyViewFilter studyViewFilter); + + List getMutatedGenes(StudyViewFilter interceptedStudyViewFilter); + + List getClinicalDataCounts(StudyViewFilter studyViewFilter, List filteredAttributes); + + List getPatientClinicalData(StudyViewFilter studyViewFilter, List attributeIds); + + List getSampleClinicalData(StudyViewFilter studyViewFilter, List attributeIds); +} diff --git a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java new file mode 100644 index 00000000000..e3961a9eeed --- /dev/null +++ b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java @@ -0,0 +1,114 @@ +package org.cbioportal.service.impl; + +import org.cbioportal.model.AlterationCountByGene; +import org.cbioportal.model.ClinicalData; +import org.cbioportal.model.ClinicalDataCount; +import org.cbioportal.model.ClinicalDataCountItem; +import org.cbioportal.model.Sample; +import org.cbioportal.persistence.StudyViewRepository; +import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; +import org.cbioportal.persistence.enums.ClinicalAttributeDataType; +import org.cbioportal.service.StudyViewColumnarService; +import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; +import org.cbioportal.web.parameter.StudyViewFilter; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@Service +public class StudyViewColumnarServiceImpl implements StudyViewColumnarService { + + private final Map> clinicalAttributeNameMap = new HashMap<>(); + + + private final StudyViewRepository studyViewRepository; + + @Autowired + public StudyViewColumnarServiceImpl(StudyViewRepository studyViewRepository) { + this.studyViewRepository = studyViewRepository; + } + + @Override + public List getFilteredSamples(StudyViewFilter studyViewFilter) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); + return studyViewRepository.getFilteredSamples(studyViewFilter, categorizedClinicalDataCountFilter); + } + + @Override + public List getMutatedGenes(StudyViewFilter studyViewFilter) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); + return studyViewRepository.getMutatedGenes(studyViewFilter, categorizedClinicalDataCountFilter); + } + + @Override + public List getClinicalDataCounts(StudyViewFilter studyViewFilter, List filteredAttributes) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); + + return studyViewRepository.getClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, filteredAttributes) + .stream().collect(Collectors.groupingBy(ClinicalDataCount::getAttributeId)) + .entrySet().parallelStream().map(e -> { + ClinicalDataCountItem item = new ClinicalDataCountItem(); + item.setAttributeId(e.getKey()); + item.setCounts(e.getValue()); + return item; + }).collect(Collectors.toList()); + } + + private CategorizedClinicalDataCountFilter extractClinicalDataCountFilters(final StudyViewFilter studyViewFilter) { + if(clinicalAttributeNameMap.isEmpty()) { + buildClinicalAttributeNameMap(); + } + + if(studyViewFilter.getClinicalDataFilters() == null) { + return CategorizedClinicalDataCountFilter.getBuilder().build(); + } + + final String patientCategoricalKey = ClinicalAttributeDataSource.PATIENT.getValue() + ClinicalAttributeDataType.CATEGORICAL.getValue(); + final String patientNumericKey = ClinicalAttributeDataSource.PATIENT.getValue() + ClinicalAttributeDataType.NUMERIC.getValue(); + final String sampleCategoricalKey = ClinicalAttributeDataSource.SAMPLE.getValue() + ClinicalAttributeDataType.CATEGORICAL.getValue(); + final String sampleNumericKey = ClinicalAttributeDataSource.SAMPLE.getValue() + ClinicalAttributeDataType.NUMERIC.getValue(); + + return CategorizedClinicalDataCountFilter.getBuilder() + .setPatientCategoricalClinicalDataFilters(studyViewFilter.getClinicalDataFilters() + .stream().filter(clinicalDataFilter -> clinicalAttributeNameMap.get(patientCategoricalKey).contains(clinicalDataFilter.getAttributeId())) + .collect(Collectors.toList())) + .setPatientNumericalClinicalDataFilters(studyViewFilter.getClinicalDataFilters().stream() + .filter(clinicalDataFilter -> clinicalAttributeNameMap.get(patientNumericKey).contains(clinicalDataFilter.getAttributeId())) + .collect(Collectors.toList())) + .setSampleCategoricalClinicalDataFilters(studyViewFilter.getClinicalDataFilters().stream() + .filter(clinicalDataFilter -> clinicalAttributeNameMap.get(sampleCategoricalKey).contains(clinicalDataFilter.getAttributeId())) + .collect(Collectors.toList())) + .setSampleNumericalClinicalDataFilters(studyViewFilter.getClinicalDataFilters().stream() + .filter(clinicalDataFilter -> clinicalAttributeNameMap.get(sampleNumericKey).contains(clinicalDataFilter.getAttributeId())) + .collect(Collectors.toList())) + .build(); + } + + private void buildClinicalAttributeNameMap() { + List clinicalAttributeDataSources = List.of(ClinicalAttributeDataSource.values()); + for(ClinicalAttributeDataSource clinicalAttributeDataSource : clinicalAttributeDataSources) { + String categoricalKey = clinicalAttributeDataSource.getValue() + ClinicalAttributeDataType.CATEGORICAL; + String numericKey = clinicalAttributeDataSource.getValue() + ClinicalAttributeDataType.NUMERIC; + clinicalAttributeNameMap.put(categoricalKey, studyViewRepository.getClinicalDataAttributeNames(clinicalAttributeDataSource, ClinicalAttributeDataType.CATEGORICAL)); + clinicalAttributeNameMap.put(numericKey, studyViewRepository.getClinicalDataAttributeNames(clinicalAttributeDataSource, ClinicalAttributeDataType.NUMERIC)); + } + } + + @Override + public List getPatientClinicalData(StudyViewFilter studyViewFilter, List attributeIds) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); + return studyViewRepository.getPatientClinicalData(studyViewFilter, attributeIds, categorizedClinicalDataCountFilter); + } + + @Override + public List getSampleClinicalData(StudyViewFilter studyViewFilter, List attributeIds) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); + return studyViewRepository.getSampleClinicalData(studyViewFilter, attributeIds, categorizedClinicalDataCountFilter); + } + + +} diff --git a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java new file mode 100644 index 00000000000..e6deab5a65b --- /dev/null +++ b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java @@ -0,0 +1,129 @@ +package org.cbioportal.web.columnar; + +import org.cbioportal.model.AlterationCountByGene; +import org.cbioportal.model.AlterationFilter; +import org.cbioportal.model.ClinicalDataBin; +import org.cbioportal.model.ClinicalDataCountItem; +import org.cbioportal.model.Sample; +import org.cbioportal.service.StudyViewColumnarService; +import org.cbioportal.service.StudyViewService; +import org.cbioportal.service.exception.StudyNotFoundException; +import org.cbioportal.web.columnar.util.NewStudyViewFilterUtil; +import org.cbioportal.web.config.annotation.InternalApi; +import org.cbioportal.web.parameter.ClinicalDataBinCountFilter; +import org.cbioportal.web.parameter.ClinicalDataCountFilter; +import org.cbioportal.web.parameter.ClinicalDataFilter; +import org.cbioportal.web.parameter.DataBinMethod; +import org.cbioportal.web.parameter.StudyViewFilter; +import org.cbioportal.web.util.ClinicalDataBinUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestAttribute; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.stream.Collectors; + +@InternalApi +@RestController() +@RequestMapping("/api") +@Validated +public class StudyViewColumnStoreController { + + private final StudyViewColumnarService studyViewColumnarService; + private final StudyViewService studyViewService; + private final ClinicalDataBinUtil clinicalDataBinUtil; + + @Autowired + public StudyViewColumnStoreController(StudyViewColumnarService studyViewColumnarService, StudyViewService studyViewService, ClinicalDataBinUtil clinicalDataBinUtil) { + this.studyViewColumnarService = studyViewColumnarService; + this.studyViewService = studyViewService; + this.clinicalDataBinUtil = clinicalDataBinUtil; + } + + @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") + @PostMapping(value = "/column-store/filtered-samples/fetch", + consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity> fetchFilteredSamples( + @RequestParam(defaultValue = "false") Boolean negateFilters, + @RequestAttribute(required = false, value = "involvedCancerStudies") Collection involvedCancerStudies, + @RequestAttribute(required = false, value = "interceptedStudyViewFilter") StudyViewFilter interceptedStudyViewFilter, + @RequestBody(required = false) StudyViewFilter studyViewFilter) { + return new ResponseEntity<>( + studyViewColumnarService.getFilteredSamples(interceptedStudyViewFilter), + HttpStatus.OK + ); + } + + @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") + @PostMapping(value = "/column-store/mutated-genes/fetch", + consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity> fetchMutatedGenes( + @RequestBody(required = false) StudyViewFilter studyViewFilter, + @RequestAttribute(required = false, value = "involvedCancerStudies") Collection involvedCancerStudies, + @RequestAttribute(required = false, value = "interceptedStudyViewFilter") StudyViewFilter interceptedStudyViewFilter + ) throws StudyNotFoundException { + AlterationFilter annotationFilters = interceptedStudyViewFilter.getAlterationFilter(); + List samples = studyViewColumnarService.getFilteredSamples(interceptedStudyViewFilter); + List studyIds = new ArrayList<>(); + List sampleIds = new ArrayList<>(); + for(Sample sample : samples) { + studyIds.add(sample.getCancerStudyIdentifier()); + sampleIds.add(sample.getStableId()); + } + return new ResponseEntity<>( + studyViewService.getMutationAlterationCountByGenes(studyIds, sampleIds, annotationFilters), + HttpStatus.OK + ); + } + + @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") + @PostMapping(value = "/column-store/clinical-data-counts/fetch", + consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity> fetchClinicalDataCounts( + @RequestBody(required = false) ClinicalDataCountFilter clinicalDataCountFilter, + @RequestAttribute(required = false, value = "involvedCancerStudies") Collection involvedCancerStudies, + @RequestAttribute(required = false, value = "interceptedClinicalDataCountFilter") ClinicalDataCountFilter interceptedClinicalDataCountFilter) { + + List attributes = interceptedClinicalDataCountFilter.getAttributes(); + StudyViewFilter studyViewFilter = interceptedClinicalDataCountFilter.getStudyViewFilter(); + + if (attributes.size() == 1) { + NewStudyViewFilterUtil.removeSelfFromFilter(attributes.get(0).getAttributeId(), studyViewFilter); + } + // boolean singleStudyUnfiltered = studyViewFilterUtil.isSingleStudyUnfiltered(studyViewFilter); + List result = studyViewColumnarService.getClinicalDataCounts(studyViewFilter, + attributes.stream().map(ClinicalDataFilter::getAttributeId).collect(Collectors.toList())); + //studyIds, sampleIds, attributes.stream().map(a -> a.getAttributeId()).collect(Collectors.toList())); + return new ResponseEntity<>(result, HttpStatus.OK); + + } + + @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") + @RequestMapping(value = "/column-store/clinical-data-bin-counts/fetch", method = RequestMethod.POST, + consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity> fetchClinicalDataBinCounts( + @RequestParam(defaultValue = "DYNAMIC") DataBinMethod dataBinMethod, + @RequestBody(required = false) ClinicalDataBinCountFilter clinicalDataBinCountFilter, + @RequestAttribute(required = false, value = "involvedCancerStudies") Collection involvedCancerStudies, + @RequestAttribute(required = false, value = "interceptedClinicalDataBinCountFilter") ClinicalDataBinCountFilter interceptedClinicalDataBinCountFilter + ) { + List clinicalDataBins = clinicalDataBinUtil.fetchClinicalDataBinCounts( + dataBinMethod, + interceptedClinicalDataBinCountFilter, + true + ); + return new ResponseEntity<>(clinicalDataBins, HttpStatus.OK); + } +} diff --git a/src/main/java/org/cbioportal/web/columnar/util/NewStudyViewFilterUtil.java b/src/main/java/org/cbioportal/web/columnar/util/NewStudyViewFilterUtil.java new file mode 100644 index 00000000000..2b56b33852c --- /dev/null +++ b/src/main/java/org/cbioportal/web/columnar/util/NewStudyViewFilterUtil.java @@ -0,0 +1,13 @@ +package org.cbioportal.web.columnar.util; + + +import org.cbioportal.web.parameter.StudyViewFilter; + +public class NewStudyViewFilterUtil { + + public static void removeSelfFromFilter(String attributeId, StudyViewFilter studyViewFilter) { + if (studyViewFilter!= null && studyViewFilter.getClinicalDataFilters() != null) { + studyViewFilter.getClinicalDataFilters().removeIf(f -> f.getAttributeId().equals(attributeId)); + } + } +} diff --git a/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.java b/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.java index 314627baf2e..32b90daf01c 100644 --- a/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.java +++ b/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.java @@ -35,6 +35,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; +import org.apache.commons.lang3.StringUtils; import org.cbioportal.model.AlterationFilter; import org.cbioportal.model.MolecularProfile; import org.cbioportal.model.MolecularProfileCaseIdentifier; @@ -140,6 +141,7 @@ public class InvolvedCancerStudyExtractorInterceptor implements HandlerIntercept // reset this to 'String requestPathInfo = request.getPathInfo();' String requestPathInfo = request.getPathInfo() == null? request.getServletPath() : request.getPathInfo(); requestPathInfo = requestPathInfo.replaceFirst("^/api", ""); + requestPathInfo = StringUtils.removeStart(requestPathInfo, "/column-store"); if (requestPathInfo.equals(PATIENT_FETCH_PATH)) { return extractAttributesFromPatientFilter(request); } else if (requestPathInfo.equals(SAMPLE_FETCH_PATH)) { diff --git a/src/main/resources/org/cbioportal/persistence/mybatiscolumnar/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatiscolumnar/StudyViewMapper.xml index 95f4e844515..7d8beb5785a 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatiscolumnar/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatiscolumnar/StudyViewMapper.xml @@ -1,7 +1,7 @@ - + + SELECT attribute_name as attributeId, @@ -128,139 +129,22 @@ GROUP BY attribute_name, attribute_value + + - - - - - INTERSECT - SELECT sample_unique_id - FROM sample - WHERE cancer_study_identifier IN - - #{studyId} - - - - INTERSECT - SELECT sample_unique_id - FROM sample - WHERE sample_unique_id IN - - '${sampleIdentifier.studyId}_${sampleIdentifier.sampleId}' - - - - - - SELECT sample_unique_id - FROM genomic_event - - genetic_profile_stable_id IN - - #{molecularProfileId} - - AND hugo_gene_symbol IN ( - - #{geneFilterQuery.hugoGeneSymbol} - - ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SELECT ${unique_id} - FROM ${table_name} - WHERE attribute_name = '${clinicalDataFilter.attributeId}' - - - - AND attribute_value = -1000000 - - - - AND ABS(attribute_value - ${dataFilterValue.start}) < EXP(-11) - - - - AND attribute_value > ${dataFilterValue.start} - - - AND attribute_value <= ${dataFilterValue.end} - - - - - - - - - SELECT ${unique_id} - FROM ${table_name} - WHERE attribute_name = '${clinicalDataFilter.attributeId}' - - - AND attribute_value = '${dataFilterValue.value}' - - - - SELECT sample_unique_id - FROM sample + FROM sample_columnstore patient_unique_id IN () @@ -268,7 +152,7 @@ SELECT patient_unique_id - FROM sample + FROM sample_columnstore sample_unique_id IN () From e073a31bab61787125efba03338cdfabdfb80a6f Mon Sep 17 00:00:00 2001 From: Charles Haynes <33608920+haynescd@users.noreply.github.com> Date: Fri, 10 May 2024 14:36:50 -0400 Subject: [PATCH 05/87] :white_check_mark: Add Unit test for StudyViewMapper Clickhouse * :white_check_mark: Add Unit test for StudyViewMapper Clickhouse * :white_check_mark: Update db props to include mysql and clickhouse datasources to fix tests * Address comments * Rename package to clickhouse * Update to static final * Use bean name instead of qualifier --- .github/workflows/integration-test.yml | 6 +- pom.xml | 20 +- .../StudyViewMapper.java | 3 +- .../StudyViewMyBatisRepository.java | 4 +- .../config/PersistenceColumnarConfig.java | 8 +- .../CustomDataSourceConfiguration.java | 14 +- .../resources/application.properties.EXAMPLE | 12 +- .../StudyViewFilterMapper.xml | 2 +- .../StudyViewMapper.xml | 2 +- .../AbstractTestcontainers.java | 47 ++ .../StudyViewMapperTest.java | 40 ++ .../config/MyBatisConfig.java | 47 ++ .../test/integration/DatabaseInitializer.java | 25 + .../test/integration/MysqlInitializer.java | 20 - .../integration/security/ContainerConfig.java | 4 +- src/test/resources/clickhouse_cgds.sql | 601 ++++++++++++++++++ src/test/resources/clickhouse_data.sql | 527 +++++++++++++++ src/test/resources/clickhouse_views.sql | 216 +++++++ src/test/resources/testContextDatabase.xml | 74 --- 19 files changed, 1551 insertions(+), 121 deletions(-) rename src/main/java/org/cbioportal/persistence/{mybatiscolumnar => mybatisclickhouse}/StudyViewMapper.java (97%) rename src/main/java/org/cbioportal/persistence/{mybatiscolumnar => mybatisclickhouse}/StudyViewMyBatisRepository.java (96%) rename src/main/java/org/cbioportal/persistence/{mybatiscolumnar => mybatisclickhouse}/config/PersistenceColumnarConfig.java (74%) rename src/main/resources/org/cbioportal/persistence/{mybatiscolumnar => mybatisclickhouse}/StudyViewFilterMapper.xml (98%) rename src/main/resources/org/cbioportal/persistence/{mybatiscolumnar => mybatisclickhouse}/StudyViewMapper.xml (98%) create mode 100644 src/test/java/org/cbioportal/persistence/mybatisclickhouse/AbstractTestcontainers.java create mode 100644 src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java create mode 100644 src/test/java/org/cbioportal/persistence/mybatisclickhouse/config/MyBatisConfig.java create mode 100644 src/test/java/org/cbioportal/test/integration/DatabaseInitializer.java delete mode 100644 src/test/java/org/cbioportal/test/integration/MysqlInitializer.java create mode 100644 src/test/resources/clickhouse_cgds.sql create mode 100644 src/test/resources/clickhouse_data.sql create mode 100644 src/test/resources/clickhouse_views.sql delete mode 100644 src/test/resources/testContextDatabase.xml diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 3accb07566c..d834c6d03c5 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -43,9 +43,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/. diff --git a/pom.xml b/pom.xml index 2f92b70ce29..22ceefd48bd 100644 --- a/pom.xml +++ b/pom.xml @@ -98,6 +98,7 @@ 3.14.0 4.17.0 7.1.0 + 1.19.7 @@ -365,7 +366,24 @@ to http for smaller jar --> all - + + org.testcontainers + clickhouse + ${clickhouse_testcontainer.version} + test + + + org.mybatis.spring.boot + mybatis-spring-boot-test-autoconfigure + 3.0.3 + test + + + org.springframework.boot + spring-boot-testcontainers + test + + diff --git a/src/main/java/org/cbioportal/persistence/mybatiscolumnar/StudyViewMapper.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java similarity index 97% rename from src/main/java/org/cbioportal/persistence/mybatiscolumnar/StudyViewMapper.java rename to src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java index a1ed790107b..f8077f16315 100644 --- a/src/main/java/org/cbioportal/persistence/mybatiscolumnar/StudyViewMapper.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java @@ -1,4 +1,4 @@ -package org.cbioportal.persistence.mybatiscolumnar; +package org.cbioportal.persistence.mybatisclickhouse; import org.cbioportal.model.AlterationCountByGene; import org.cbioportal.model.ClinicalData; @@ -28,4 +28,5 @@ List getClinicalDataCounts(StudyViewFilter studyViewFilter, C List getSampleClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, List attributeIds); List getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, List attributeIds); + } diff --git a/src/main/java/org/cbioportal/persistence/mybatiscolumnar/StudyViewMyBatisRepository.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java similarity index 96% rename from src/main/java/org/cbioportal/persistence/mybatiscolumnar/StudyViewMyBatisRepository.java rename to src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java index 477e5c73dd4..07e8f8aa763 100644 --- a/src/main/java/org/cbioportal/persistence/mybatiscolumnar/StudyViewMyBatisRepository.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java @@ -1,4 +1,4 @@ -package org.cbioportal.persistence.mybatiscolumnar; +package org.cbioportal.persistence.mybatisclickhouse; import org.cbioportal.model.AlterationCountByGene; import org.cbioportal.model.ClinicalData; @@ -17,7 +17,7 @@ @Repository public class StudyViewMyBatisRepository implements StudyViewRepository { - private final List FILTERED_CLINICAL_ATTR_VALUES = List.of("NA", "NAN", "N/A"); + private static final List FILTERED_CLINICAL_ATTR_VALUES = List.of("NA", "NAN", "N/A"); private final StudyViewMapper mapper; @Autowired diff --git a/src/main/java/org/cbioportal/persistence/mybatiscolumnar/config/PersistenceColumnarConfig.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/config/PersistenceColumnarConfig.java similarity index 74% rename from src/main/java/org/cbioportal/persistence/mybatiscolumnar/config/PersistenceColumnarConfig.java rename to src/main/java/org/cbioportal/persistence/mybatisclickhouse/config/PersistenceColumnarConfig.java index 8678123a246..531926a1141 100644 --- a/src/main/java/org/cbioportal/persistence/mybatiscolumnar/config/PersistenceColumnarConfig.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/config/PersistenceColumnarConfig.java @@ -1,4 +1,4 @@ -package org.cbioportal.persistence.mybatiscolumnar.config; +package org.cbioportal.persistence.mybatisclickhouse.config; import org.cbioportal.persistence.mybatis.typehandler.SampleTypeTypeHandler; import org.mybatis.spring.SqlSessionFactoryBean; @@ -13,15 +13,15 @@ @Configuration -@MapperScan(value="org.cbioportal.persistence.mybatiscolumnar", sqlSessionFactoryRef ="sqlColumnarSessionFactory") +@MapperScan(value= "org.cbioportal.persistence.mybatisclickhouse", sqlSessionFactoryRef ="sqlColumnarSessionFactory") public class PersistenceColumnarConfig { @Bean("sqlColumnarSessionFactory") - public SqlSessionFactoryBean sqlColumnarSessionFactory(@Qualifier("columnarDataSource") DataSource dataSource, ApplicationContext applicationContext) throws IOException { + public SqlSessionFactoryBean sqlColumnarSessionFactory(@Qualifier("clickhouseDataSource") DataSource dataSource, ApplicationContext applicationContext) throws IOException { SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); sessionFactory.setDataSource(dataSource); sessionFactory.setMapperLocations( - applicationContext.getResources("classpath:org/cbioportal/persistence/mybatiscolumnar/*.xml") + applicationContext.getResources("classpath:org/cbioportal/persistence/mybatisclickhouse/*.xml") ); sessionFactory.setTypeHandlers(new SampleTypeTypeHandler()); return sessionFactory; diff --git a/src/main/java/org/cbioportal/properties/CustomDataSourceConfiguration.java b/src/main/java/org/cbioportal/properties/CustomDataSourceConfiguration.java index fe6ae6a6205..6df58286dda 100644 --- a/src/main/java/org/cbioportal/properties/CustomDataSourceConfiguration.java +++ b/src/main/java/org/cbioportal/properties/CustomDataSourceConfiguration.java @@ -17,23 +17,21 @@ public DataSourceProperties mysqlDataSourceProperties() { } @Bean - @ConfigurationProperties("spring.datasource.columnar") - public DataSourceProperties columnarDatSourceProperties() { + @ConfigurationProperties("spring.datasource.clickhouse") + public DataSourceProperties clickhouseDatSourceProperties() { return new DataSourceProperties(); } - @Bean - @Qualifier("mysqlDataSource") + @Bean("mysqlDataSource") public DataSource mysqlDataSource() { return mysqlDataSourceProperties() .initializeDataSourceBuilder() .build(); } - @Bean - @Qualifier("columnarDataSource") - public DataSource columnarDataSource() { - return columnarDatSourceProperties() + @Bean("clickhouseDataSource") + public DataSource clickhouseDataSource() { + return clickhouseDatSourceProperties() .initializeDataSourceBuilder() .build(); } diff --git a/src/main/resources/application.properties.EXAMPLE b/src/main/resources/application.properties.EXAMPLE index 50a440c0bca..f00c43d83cd 100644 --- a/src/main/resources/application.properties.EXAMPLE +++ b/src/main/resources/application.properties.EXAMPLE @@ -5,10 +5,14 @@ app.name=cbioportal spring.mvc.pathmatch.matching-strategy = ANT_PATH_MATCHER # database -spring.datasource.url=jdbc:mysql://localhost:3306/cbioportal?useSSL=false -spring.datasource.username=cbio -spring.datasource.password=P@ssword1 -spring.datasource.driver-class-name=com.mysql.jdbc.Driver +spring.datasource.mysql.url=jdbc:mysql://localhost:3306/cbioportal?useSSL=false +spring.datasource.mysql.username=cbio +spring.datasource.mysql.password=P@ssword1 +spring.datasource.mysql.driver-class-name=com.mysql.jdbc.Driver +spring.datasource.clickhouse.url=jdbc:ch://localhost:8443/cbioportal +spring.datasource.clickhouse.username=dummy +spring.datasource.clickhouse.password=dummy +spring.datasource.clickhouse.driver-class-name=com.clickhouse.jdbc.ClickHouseDriver spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect # this should normally be set to false. In some cases you could set this to true (e.g. for testing a feature of a newer release that is not related to the schema change in expected db version above): diff --git a/src/main/resources/org/cbioportal/persistence/mybatiscolumnar/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml similarity index 98% rename from src/main/resources/org/cbioportal/persistence/mybatiscolumnar/StudyViewFilterMapper.xml rename to src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index 4008c9e0991..46dcc293ef3 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatiscolumnar/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -1,7 +1,7 @@ - + diff --git a/src/main/resources/org/cbioportal/persistence/mybatiscolumnar/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml similarity index 98% rename from src/main/resources/org/cbioportal/persistence/mybatiscolumnar/StudyViewMapper.xml rename to src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index d5883df1c72..512b1e944bd 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatiscolumnar/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -1,7 +1,7 @@ - + - - - - UNION ALL + + + + @@ -113,7 +113,8 @@ Count(*) as count FROM ${table_name_prefix}_clinical_attribute_categorical_view - patient_unique_id IN ( + sample_unique_id IN ( + INTERSECT @@ -145,7 +146,7 @@ SELECT sample_unique_id - FROM sample_view + FROM sample_mv patient_unique_id IN () @@ -153,7 +154,7 @@ SELECT patient_unique_id - FROM sample_view + FROM sample_mv sample_unique_id IN () From 66615422bfd8ef6ef6da0c41d32491d314920411 Mon Sep 17 00:00:00 2001 From: Charles Haynes <33608920+haynescd@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:58:20 -0400 Subject: [PATCH 10/87] Feature/mutated genes total profiled counts and gene panels (#10824) * Add Support for TotalProfiledCase Counts for Mutated-genes endpoint. * Create sql files to create new tables * Add unit test for totalProfiledCount * Add matching gene panel ids * Add TotalProfiledCountsWithoutPanelData * Add profileCount for genes without gene panel data * Add Comments for SQL * Update matching Gene Panel Ids * Clean up code * Fix test * Add query to get correct Gene Panels * Fix unit test * Add comments --- pom.xml | 2 + .../org/cbioportal/model/AlterationType.java | 6 +- .../persistence/StudyViewRepository.java | 7 + .../mybatisclickhouse/StudyViewMapper.java | 10 ++ .../StudyViewMyBatisRepository.java | 19 +++ .../typehandler/GenePanelIdsTypeHandler.java | 39 +++++ .../service/AlterationCountService.java | 4 + .../impl/AlterationCountServiceImpl.java | 99 +++++++++-- .../impl/StudyViewColumnarServiceImpl.java | 20 ++- .../db-scripts/clickhouse/clickhouse.sql | 22 ++- .../clickhouse/clickhouse_migration.sql | 28 +++- .../clickhouse/materialized_views.sql | 154 +----------------- .../StudyViewFilterMapper.xml | 2 +- .../mybatisclickhouse/StudyViewMapper.xml | 72 +++++++- .../AbstractTestcontainers.java | 2 + .../StudyViewMapperTest.java | 16 ++ .../impl/AlterationCountServiceImplTest.java | 31 +++- src/test/resources/clickhouse_data.sql | 28 ++-- src/test/resources/logback.xml | 27 +-- 19 files changed, 363 insertions(+), 225 deletions(-) create mode 100644 src/main/java/org/cbioportal/persistence/mybatisclickhouse/typehandler/GenePanelIdsTypeHandler.java diff --git a/pom.xml b/pom.xml index ad616142a12..a1ff655502c 100644 --- a/pom.xml +++ b/pom.xml @@ -450,6 +450,7 @@ clickhouse/clickhouse.sql clickhouse/clickhouse_views.sql clickhouse/clickhouse_migration.sql + clickhouse/materialized_views.sql @@ -461,6 +462,7 @@ clickhouse/clickhouse.sql clickhouse/views.sql clickhouse/clickhouse_migration.sql + clickhouse/materialized_views.sql diff --git a/src/main/java/org/cbioportal/model/AlterationType.java b/src/main/java/org/cbioportal/model/AlterationType.java index c7b77bea59d..b20a642669d 100644 --- a/src/main/java/org/cbioportal/model/AlterationType.java +++ b/src/main/java/org/cbioportal/model/AlterationType.java @@ -1,6 +1,8 @@ package org.cbioportal.model; public enum AlterationType { - MUTATION, - COPY_NUMBER_ALTERATION + MUTATION_EXTENDED, + COPY_NUMBER_ALTERATION, + STRUCTURAL_VARIANT, + GENERIC_ASSAY; } diff --git a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java index 91733a0151b..ae8f285a104 100644 --- a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java +++ b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java @@ -10,6 +10,7 @@ import org.cbioportal.web.parameter.StudyViewFilter; import java.util.List; +import java.util.Map; public interface StudyViewRepository { List getFilteredSamples(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); @@ -28,4 +29,10 @@ public interface StudyViewRepository { List getClinicalDataAttributeNames(ClinicalAttributeDataSource clinicalAttributeDataSource, ClinicalAttributeDataType dataType); + Map getTotalProfiledCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, String alterationType); + + int getFilteredSamplesCount(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + + Map getMatchingGenePanelIds(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, String alterationType); + } diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java index b8c247f415b..7b0c8ac91c0 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java @@ -1,5 +1,6 @@ package org.cbioportal.persistence.mybatisclickhouse; +import org.apache.ibatis.annotations.MapKey; import org.cbioportal.model.AlterationCountByGene; import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCount; @@ -9,6 +10,7 @@ import org.cbioportal.web.parameter.StudyViewFilter; import java.util.List; +import java.util.Map; public interface StudyViewMapper { List getFilteredSamples(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); @@ -31,4 +33,12 @@ List getClinicalDataCounts(StudyViewFilter studyViewFilter, C List getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, List attributeIds); + @MapKey("hugoGeneSymbol") + Map getTotalProfiledCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, String alterationType); + + int getFilteredSamplesCount(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); + + @MapKey("hugoGeneSymbol") + Map getMatchingGenePanelIds(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, String alterationType); + } diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java index 1d2ae017f57..c723806885b 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java @@ -14,6 +14,7 @@ import org.springframework.stereotype.Repository; import java.util.List; +import java.util.Map; @Repository public class StudyViewMyBatisRepository implements StudyViewRepository { @@ -74,4 +75,22 @@ public List getSampleClinicalData(StudyViewFilter studyViewFilter, public List getPatientClinicalData(StudyViewFilter studyViewFilter, List attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { return mapper.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), attributeIds); } + + public Map getTotalProfiledCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, String alterationType) { + return mapper.getTotalProfiledCounts(studyViewFilter, categorizedClinicalDataCountFilter, + shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), alterationType); + } + + @Override + public int getFilteredSamplesCount(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + return mapper.getFilteredSamplesCount(studyViewFilter, categorizedClinicalDataCountFilter, + shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter)); + } + + @Override + public Map getMatchingGenePanelIds(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, String alterationType) { + return mapper.getMatchingGenePanelIds(studyViewFilter, categorizedClinicalDataCountFilter, + shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), alterationType); + } + } \ No newline at end of file diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/typehandler/GenePanelIdsTypeHandler.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/typehandler/GenePanelIdsTypeHandler.java new file mode 100644 index 00000000000..397cdf01bd2 --- /dev/null +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/typehandler/GenePanelIdsTypeHandler.java @@ -0,0 +1,39 @@ +package org.cbioportal.persistence.mybatisclickhouse.typehandler; + +import org.apache.ibatis.type.BaseTypeHandler; +import org.apache.ibatis.type.JdbcType; + +import java.sql.CallableStatement; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.HashSet; +import java.util.Set; +import java.util.Arrays; + +public class GenePanelIdsTypeHandler extends BaseTypeHandler> { + + @Override + public void setNonNullParameter(PreparedStatement ps, int i, Set parameter, JdbcType jdbcType) throws SQLException { + // Convert Set to array for storage (if needed) + throw new UnsupportedOperationException("Storage of GenePanelIds not supported"); + } + + @Override + public Set getNullableResult(ResultSet rs, String columnName) throws SQLException { + String[] array = (String[]) rs.getArray(columnName).getArray(); + return new HashSet<>(Arrays.asList(array)); + } + + @Override + public Set getNullableResult(ResultSet rs, int columnIndex) throws SQLException { + String[] array = (String[]) rs.getArray(columnIndex).getArray(); + return new HashSet<>(Arrays.asList(array)); + } + + @Override + public Set getNullableResult(CallableStatement cs, int columnIndex) throws SQLException { + String[] array = (String[]) cs.getArray(columnIndex).getArray(); + return new HashSet<>(Arrays.asList(array)); + } +} diff --git a/src/main/java/org/cbioportal/service/AlterationCountService.java b/src/main/java/org/cbioportal/service/AlterationCountService.java index 5966f725a8d..2ce5c649158 100644 --- a/src/main/java/org/cbioportal/service/AlterationCountService.java +++ b/src/main/java/org/cbioportal/service/AlterationCountService.java @@ -3,6 +3,8 @@ import org.apache.commons.math3.util.Pair; import org.cbioportal.model.*; import org.cbioportal.model.util.Select; +import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; +import org.cbioportal.web.parameter.StudyViewFilter; import java.util.List; @@ -75,4 +77,6 @@ Pair, Long> getPatientCnaGeneCounts(List getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + } diff --git a/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java b/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java index 4175ce3cf10..6fc13d12294 100644 --- a/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java @@ -1,17 +1,35 @@ package org.cbioportal.service.impl; -import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.math3.util.Pair; -import org.cbioportal.model.*; +import org.cbioportal.model.AlterationCountBase; +import org.cbioportal.model.AlterationCountByGene; +import org.cbioportal.model.AlterationCountByStructuralVariant; +import org.cbioportal.model.AlterationFilter; +import org.cbioportal.model.AlterationType; +import org.cbioportal.model.CopyNumberCountByGene; +import org.cbioportal.model.MolecularProfile; +import org.cbioportal.model.MolecularProfileCaseIdentifier; import org.cbioportal.model.util.Select; import org.cbioportal.persistence.AlterationRepository; import org.cbioportal.persistence.MolecularProfileRepository; +import org.cbioportal.persistence.StudyViewRepository; import org.cbioportal.service.AlterationCountService; import org.cbioportal.service.util.AlterationEnrichmentUtil; +import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; +import org.cbioportal.web.parameter.StudyViewFilter; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.lang.NonNull; +import org.springframework.lang.Nullable; import org.springframework.stereotype.Service; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeSet; import java.util.concurrent.atomic.AtomicReference; import java.util.function.BiFunction; import java.util.function.Function; @@ -20,17 +38,30 @@ @Service public class AlterationCountServiceImpl implements AlterationCountService { + private final AlterationRepository alterationRepository; + private final AlterationEnrichmentUtil alterationEnrichmentUtil; + private final AlterationEnrichmentUtil alterationEnrichmentUtilCna; + private final AlterationEnrichmentUtil alterationEnrichmentUtilStructVar; + private final MolecularProfileRepository molecularProfileRepository; + + private final StudyViewRepository studyViewRepository; + + private static final String WHOLE_EXOME_SEQUENCING = "WES"; + + @Autowired - private AlterationRepository alterationRepository; - @Autowired - private AlterationEnrichmentUtil alterationEnrichmentUtil; - @Autowired - private AlterationEnrichmentUtil alterationEnrichmentUtilCna; - @Autowired - private AlterationEnrichmentUtil alterationEnrichmentUtilStructVar; - @Autowired - private MolecularProfileRepository molecularProfileRepository; - + public AlterationCountServiceImpl(AlterationRepository alterationRepository, AlterationEnrichmentUtil alterationEnrichmentUtil, + AlterationEnrichmentUtil alterationEnrichmentUtilCna, + AlterationEnrichmentUtil alterationEnrichmentUtilStructVar, + MolecularProfileRepository molecularProfileRepository, + StudyViewRepository studyViewRepository) { + this.alterationRepository = alterationRepository; + this.alterationEnrichmentUtil = alterationEnrichmentUtil; + this.alterationEnrichmentUtilCna = alterationEnrichmentUtilCna; + this.alterationEnrichmentUtilStructVar = alterationEnrichmentUtilStructVar; + this.molecularProfileRepository = molecularProfileRepository; + this.studyViewRepository = studyViewRepository; + } @Override public Pair, Long> getSampleAlterationGeneCounts(List molecularProfileCaseIdentifiers, Select entrezGeneIds, @@ -223,6 +254,48 @@ public Pair, Long> getPatientCnaGeneCounts(List getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + var alterationCountByGenes = studyViewRepository.getMutatedGenes(studyViewFilter, categorizedClinicalDataCountFilter); + var profiledCountsMap = studyViewRepository.getTotalProfiledCounts(studyViewFilter, + categorizedClinicalDataCountFilter, + AlterationType.MUTATION_EXTENDED.toString()); + var profiledCountWithoutGenePanelData = studyViewRepository.getFilteredSamplesCount(studyViewFilter, categorizedClinicalDataCountFilter); + var matchingGenePanelIdsMap = studyViewRepository.getMatchingGenePanelIds(studyViewFilter, + categorizedClinicalDataCountFilter, AlterationType.MUTATION_EXTENDED.toString()); + + alterationCountByGenes.parallelStream() + .forEach(alterationCountByGene -> { + String hugoGeneSymbol = alterationCountByGene.getHugoGeneSymbol(); + var matchingGenePanelIds = matchingGenePanelIdsMap.get(hugoGeneSymbol) != null ? + matchingGenePanelIdsMap.get(hugoGeneSymbol).getMatchingGenePanelIds() : null; + + int totalProfiledCount = getTotalProfiledCount(alterationCountByGene.getHugoGeneSymbol(), + profiledCountsMap, profiledCountWithoutGenePanelData, matchingGenePanelIds); + + alterationCountByGene.setNumberOfProfiledCases(totalProfiledCount); + + alterationCountByGene.setMatchingGenePanelIds(matchingGenePanelIds); + }); + + return alterationCountByGenes; + } + + private int getTotalProfiledCount(@NonNull String hugoGeneSymbol, @NonNull Map profiledCountsMap, + int profiledCountWithoutGenePanelData, @Nullable Set matchingGenePanelIds) { + int totalProfiledCount = profiledCountWithoutGenePanelData; + + if (hasGenePanelData(matchingGenePanelIds)) { + totalProfiledCount = profiledCountsMap.get(hugoGeneSymbol).getNumberOfProfiledCases(); + } + return totalProfiledCount; + } + + private boolean hasGenePanelData(@Nullable Set matchingGenePanelIds) { + return matchingGenePanelIds != null && matchingGenePanelIds.contains(WHOLE_EXOME_SEQUENCING) + && matchingGenePanelIds.size() > 1; + } + private Pair, Long> getAlterationGeneCounts( List molecularProfileCaseIdentifiers, boolean includeFrequency, diff --git a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java index e3961a9eeed..3178105b6da 100644 --- a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java @@ -8,6 +8,7 @@ import org.cbioportal.persistence.StudyViewRepository; import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; import org.cbioportal.persistence.enums.ClinicalAttributeDataType; +import org.cbioportal.service.AlterationCountService; import org.cbioportal.service.StudyViewColumnarService; import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; import org.cbioportal.web.parameter.StudyViewFilter; @@ -27,21 +28,24 @@ public class StudyViewColumnarServiceImpl implements StudyViewColumnarService { private final StudyViewRepository studyViewRepository; + private final AlterationCountService alterationCountService; + @Autowired - public StudyViewColumnarServiceImpl(StudyViewRepository studyViewRepository) { + public StudyViewColumnarServiceImpl(StudyViewRepository studyViewRepository, AlterationCountService alterationCountService) { this.studyViewRepository = studyViewRepository; + this.alterationCountService = alterationCountService; } - + @Override public List getFilteredSamples(StudyViewFilter studyViewFilter) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return studyViewRepository.getFilteredSamples(studyViewFilter, categorizedClinicalDataCountFilter); + return studyViewRepository.getFilteredSamples(studyViewFilter, categorizedClinicalDataCountFilter); } - + @Override public List getMutatedGenes(StudyViewFilter studyViewFilter) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return studyViewRepository.getMutatedGenes(studyViewFilter, categorizedClinicalDataCountFilter); + return alterationCountService.getMutatedGenes(studyViewFilter, categorizedClinicalDataCountFilter); } @Override @@ -59,11 +63,11 @@ public List getClinicalDataCounts(StudyViewFilter studyVi } private CategorizedClinicalDataCountFilter extractClinicalDataCountFilters(final StudyViewFilter studyViewFilter) { - if(clinicalAttributeNameMap.isEmpty()) { + if (clinicalAttributeNameMap.isEmpty()) { buildClinicalAttributeNameMap(); } - if(studyViewFilter.getClinicalDataFilters() == null) { + if (studyViewFilter.getClinicalDataFilters() == null) { return CategorizedClinicalDataCountFilter.getBuilder().build(); } @@ -90,7 +94,7 @@ private CategorizedClinicalDataCountFilter extractClinicalDataCountFilters(final private void buildClinicalAttributeNameMap() { List clinicalAttributeDataSources = List.of(ClinicalAttributeDataSource.values()); - for(ClinicalAttributeDataSource clinicalAttributeDataSource : clinicalAttributeDataSources) { + for (ClinicalAttributeDataSource clinicalAttributeDataSource : clinicalAttributeDataSources) { String categoricalKey = clinicalAttributeDataSource.getValue() + ClinicalAttributeDataType.CATEGORICAL; String numericKey = clinicalAttributeDataSource.getValue() + ClinicalAttributeDataType.NUMERIC; clinicalAttributeNameMap.put(categoricalKey, studyViewRepository.getClinicalDataAttributeNames(clinicalAttributeDataSource, ClinicalAttributeDataType.CATEGORICAL)); diff --git a/src/main/resources/db-scripts/clickhouse/clickhouse.sql b/src/main/resources/db-scripts/clickhouse/clickhouse.sql index 97729afabaf..fb8f2c94885 100644 --- a/src/main/resources/db-scripts/clickhouse/clickhouse.sql +++ b/src/main/resources/db-scripts/clickhouse/clickhouse.sql @@ -1,5 +1,7 @@ DROP TABLE IF EXISTS genomic_event_mutation; DROP TABLE IF EXISTS genomic_event; +DROP TABLE IF EXISTS sample_to_gene_panel; +DROP TABLE IF EXISTS gene_panel_to_gene; CREATE TABLE IF NOT EXISTS genomic_event ( @@ -11,7 +13,7 @@ CREATE TABLE IF NOT EXISTS genomic_event cancer_study_identifier String, genetic_profile_stable_id String ) ENGINE = MergeTree - ORDER BY ( variant_type, sample_unique_id, hugo_gene_symbol); +ORDER BY ( variant_type, sample_unique_id, hugo_gene_symbol); CREATE TABLE IF NOT EXISTS genomic_event_mutation ( @@ -26,4 +28,20 @@ CREATE TABLE IF NOT EXISTS genomic_event_mutation driver_filter String, driver_tiers_filter String ) ENGINE = MergeTree -ORDER BY ( hugo_gene_symbol, genetic_profile_stable_id); \ No newline at end of file +ORDER BY ( hugo_gene_symbol, genetic_profile_stable_id); + +CREATE TABLE sample_to_gene_panel +( + sample_unique_id String, + alteration_type String, + gene_panel_id String, + cancer_study_identifier String +) ENGINE = MergeTree() +ORDER BY (gene_panel_id, alteration_type, sample_unique_id); + +CREATE TABLE gene_panel_to_gene +( + gene_panel_id String, + gene String +) ENGINE = MergeTree() +ORDER BY (gene_panel_id); \ No newline at end of file diff --git a/src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql b/src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql index 8cea8b08993..5595c729f8e 100644 --- a/src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql +++ b/src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql @@ -88,4 +88,30 @@ FROM INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id INNER JOIN gene gene1 ON sv.site1_entrez_gene_id = gene1.entrez_gene_id INNER JOIN sample_profile on s.internal_id = sample_profile.sample_id - INNER JOIN gene_panel on sample_profile.panel_id = gene_panel.internal_id; \ No newline at end of file + INNER JOIN gene_panel on sample_profile.panel_id = gene_panel.internal_id; + +INSERT INTO sample_to_gene_panel +select + concat(cs.cancer_study_identifier, '_', sample.stable_id) as sample_unique_id, + genetic_alteration_type as alteration_type, + ifnull(gene_panel.stable_id, 'WES') as gene_panel_id, + cs.cancer_study_identifier as cancer_study_identifier +from sample_profile sp + inner join genetic_profile gp on sample_profile.genetic_profile_id = gp.genetic_profile_id + left join gene_panel on sp.panel_id = gene_panel.internal_id + inner join sample on sp.sample_id = sample.internal_id + inner join cancer_study cs on gp.cancer_study_id = cs.cancer_study_id; + +INSERT INTO gene_panel_to_gene +select + gp.stable_id as gene_panel_id, + g.hugo_gene_symbol as gene +from gene_panel gp + inner join gene_panel_list gpl ON gp.internal_id = gpl.internal_id + inner join gene g ON g.entrez_gene_id = gpl.gene_id +UNION ALL +select + 'WES' as gene_panel_id, + gene.hugo_gene_symbol as gene +from gene +where gene.entrez_gene_id > 0; \ No newline at end of file diff --git a/src/main/resources/db-scripts/clickhouse/materialized_views.sql b/src/main/resources/db-scripts/clickhouse/materialized_views.sql index d14d18b88e5..6704ecd9bad 100644 --- a/src/main/resources/db-scripts/clickhouse/materialized_views.sql +++ b/src/main/resources/db-scripts/clickhouse/materialized_views.sql @@ -11,9 +11,6 @@ DROP VIEW IF EXISTS patient_clinical_attribute_numeric_mv; DROP VIEW IF EXISTS patient_clinical_attribute_categorical_mv; DROP VIEW IF EXISTS sample_columnstore_mv; DROP VIEW IF EXISTS sample_list_columnstore_mv; -DROP VIEW IF EXISTS genomic_event_mutation_mv; -DROP VIEW IF EXISTS genomic_event_cna_mv; -DROP VIEW IF EXISTS genomic_event_struct_var_mv; CREATE TABLE sample_clinical_attribute_numeric ( @@ -216,162 +213,13 @@ FROM sample_list as sl INNER JOIN sample AS s on s.internal_id = sll.sample_id INNER JOIN cancer_study cs on sl.cancer_study_id = cs.cancer_study_id; -CREATE TABLE IF NOT EXISTS genomic_event -( - sample_unique_id String, - variant String, - variant_type String, - hugo_gene_symbol String, - gene_panel_stable_id String, - cancer_study_identifier String, - genetic_profile_stable_id String -) ENGINE = MergeTree -ORDER BY - ( - variant_type, - sample_unique_id, - hugo_gene_symbol - ); - -Insert into genomic_event -SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) as sample_unique_id, - me.protein_change as variant, - 'mutation' as variant_type, - gene.hugo_gene_symbol as hugo_gene_symbol, - gp.stable_id as gene_panel_stable_id, - cs.cancer_study_identifier as cancer_study_identifier, - g.stable_id as genetic_profile_stable_id -FROM mutation - INNER JOIN mutation_event as me on mutation.mutation_event_id = me.mutation_event_id - INNER JOIN sample_profile sp - on mutation.sample_id = sp.sample_id and mutation.genetic_profile_id = sp.genetic_profile_id - LEFT JOIN gene_panel gp on sp.panel_id = gp.internal_id - LEFT JOIN genetic_profile g on sp.genetic_profile_id = g.genetic_profile_id - INNER JOIN cancer_study cs on g.cancer_study_id = cs.cancer_study_id - INNER JOIN sample on mutation.sample_id = sample.internal_id - LEFT JOIN gene on mutation.entrez_gene_id = gene.entrez_gene_id -UNION ALL -SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) as sample_unique_id, - toString(ce.alteration) as variant, - 'cna' as variant_type, - gene.hugo_gene_symbol as hugo_gene_symbol, - gp.stable_id as gene_panel_stable_id, - cs.cancer_study_identifier as cancer_study_identifier, - g.stable_id as genetic_profile_stable_id -FROM cna_event ce - INNER JOIN sample_cna_event sce ON ce.cna_event_id = sce.cna_event_id - INNER JOIN sample_profile sp ON sce.sample_id = sp.sample_id AND sce.genetic_profile_id = sp.genetic_profile_id - INNER JOIN gene_panel gp ON sp.panel_id = gp.internal_id - INNER JOIN genetic_profile g ON sp.genetic_profile_id = g.genetic_profile_id - INNER JOIN cancer_study cs ON g.cancer_study_id = cs.cancer_study_id - INNER JOIN sample ON sce.sample_id = sample.internal_id - INNER JOIN gene ON ce.entrez_gene_id = gene.entrez_gene_id -UNION ALL -SELECT - concat(cs.cancer_study_identifier, '_', s.stable_id) as sample_unique_id, - event_info as variant, - 'structural_variant' as variant_type, - gene2.hugo_gene_symbol as hugo_gene_symbol, - gene_panel.stable_id as gene_panel_stable_id, - cs.cancer_study_identifier as cancer_study_identifier, - gp.stable_id as genetic_profile_stable_id -FROM - structural_variant sv - INNER JOIN genetic_profile gp ON sv.genetic_profile_id = gp.genetic_profile_id - INNER JOIN sample s ON sv.sample_id = s.internal_id - INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id - INNER JOIN gene gene2 ON sv.site2_entrez_gene_id = gene2.entrez_gene_id - INNER JOIN sample_profile on s.internal_id = sample_profile.sample_id - INNER JOIN gene_panel on sample_profile.panel_id = gene_panel.internal_id -UNION ALL -SELECT - concat(cs.cancer_study_identifier, '_', s.stable_id) as sample_unique_id, - event_info as variant, - 'structural_variant' as variant_type, - gene1.hugo_gene_symbol as hugo_gene_symbol, - gene_panel.stable_id as gene_panel_stable_id, - cs.cancer_study_identifier as cancer_study_identifier, - gp.stable_id as genetic_profile_stable_id -FROM - structural_variant sv - INNER JOIN genetic_profile gp ON sv.genetic_profile_id = gp.genetic_profile_id - INNER JOIN sample s ON sv.sample_id = s.internal_id - INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id - INNER JOIN gene gene1 ON sv.site1_entrez_gene_id = gene1.entrez_gene_id - INNER JOIN sample_profile on s.internal_id = sample_profile.sample_id - INNER JOIN gene_panel on sample_profile.panel_id = gene_panel.internal_id; - -CREATE MATERIALIZED VIEW genomic_event_mutation_mv TO genomic_event AS -SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) as sample_unique_id, - me.protein_change as variant, - 'mutation' as variant_type, - gene.hugo_gene_symbol as hugo_gene_symbol, - gp.stable_id as gene_panel_stable_id, - cs.cancer_study_identifier as cancer_study_identifier, - g.stable_id as genetic_profile_stable_id -FROM mutation - LEFT JOIN mutation_event as me on mutation.mutation_event_id = me.mutation_event_id - LEFT JOIN sample_profile sp - on mutation.sample_id = sp.sample_id and mutation.genetic_profile_id = sp.genetic_profile_id - LEFT JOIN gene_panel gp on sp.panel_id = gp.internal_id - LEFT JOIN genetic_profile g on sp.genetic_profile_id = g.genetic_profile_id - LEFT JOIN cancer_study cs on g.cancer_study_id = cs.cancer_study_id - LEFT JOIN sample on mutation.sample_id = sample.internal_id - LEFT JOIN gene on mutation.entrez_gene_id = gene.entrez_gene_id; - -CREATE MATERIALIZED VIEW genomic_event_cna_mv TO genomic_event AS -SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) as sample_unique_id, - toString(ce.alteration) as variant, - 'cna' as variant_type, - gene.hugo_gene_symbol as hugo_gene_symbol, - gp.stable_id as gene_panel_stable_id, - cs.cancer_study_identifier as cancer_study_identifier, - gp.stable_id as genetic_profile_stable_id -FROM cna_event ce - INNER JOIN sample_cna_event sce ON ce.cna_event_id = sce.cna_event_id - INNER JOIN sample_profile sp ON sce.sample_id = sp.sample_id AND sce.genetic_profile_id = sp.genetic_profile_id - INNER JOIN gene_panel gp ON sp.panel_id = gp.internal_id - INNER JOIN genetic_profile g ON sp.genetic_profile_id = g.genetic_profile_id - INNER JOIN cancer_study cs ON g.cancer_study_id = cs.cancer_study_id - INNER JOIN sample ON sce.sample_id = sample.internal_id - INNER JOIN gene ON ce.entrez_gene_id = gene.entrez_gene_id; -CREATE MATERIALIZED VIEW genomic_event_struct_var_mv TO genomic_event AS -SELECT concat(cs.cancer_study_identifier, '_', s.stable_id) as sample_unique_id, - event_info as variant, - 'structural_variant' as variant_type, - gene1.hugo_gene_symbol as hugo_gene_symbol, - gene_panel.stable_id as gene_panel_stable_id, - cs.cancer_study_identifier as cancer_study_identifier, - gp.stable_id as genetic_profile_stable_id -FROM structural_variant sv - INNER JOIN genetic_profile gp ON sv.genetic_profile_id = gp.genetic_profile_id - INNER JOIN sample s ON sv.sample_id = s.internal_id - INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id - INNER JOIN gene gene1 ON sv.site1_entrez_gene_id = gene1.entrez_gene_id - INNER JOIN sample_profile on s.internal_id = sample_profile.sample_id - INNER JOIN gene_panel on sample_profile.panel_id = gene_panel.internal_id -UNION ALL -SELECT concat(cs.cancer_study_identifier, '_', s.stable_id) as sample_unique_id, - event_info as variant, - 'structural_variant' as variant_type, - gene2.hugo_gene_symbol as hugo_gene_symbol, - gene_panel.stable_id as gene_panel_stable_id, - cs.cancer_study_identifier as cancer_study_identifier, - gp.stable_id as genetic_profile_stable_id -FROM structural_variant sv - INNER JOIN genetic_profile gp ON sv.genetic_profile_id = gp.genetic_profile_id - INNER JOIN sample s ON sv.sample_id = s.internal_id - INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id - INNER JOIN gene gene2 ON sv.site2_entrez_gene_id = gene2.entrez_gene_id - INNER JOIN sample_profile on s.internal_id = sample_profile.sample_id - INNER JOIN gene_panel on sample_profile.panel_id = gene_panel.internal_id; -- SAMPLE_MV DROP VIEW IF EXISTS sample_mv; CREATE MATERIALIZED VIEW sample_mv ENGINE = AggregatingMergeTree() - ORDER BY cancer_study_identifier + ORDER BY internal_id SETTINGS allow_nullable_key = 1 POPULATE AS diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index c200c081586..5ed126acaa6 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -26,7 +26,7 @@ SELECT sample_unique_id - FROM genomic_event_view + FROM genomic_event_mutation genetic_profile_stable_id IN diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index ab48ba8e3e5..d177d4a5892 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -22,13 +22,11 @@ ORDER BY sample_stable_id ASC; - - SELECT hugo_gene_symbol as hugoGeneSymbol, 1 as entrezGeneId, - -- TODO incorporate logic on gene panels to assess the number of profiled cases. - COUNT(DISTINCT sample_unique_id) as numberOfProfiledCases, COUNT(DISTINCT sample_unique_id) as numberOfAlteredCases, COUNT(*) as totalCount FROM genomic_event_mutation @@ -165,4 +163,70 @@ DISTINCT(attribute_name) FROM ${tableName}; + + + + + + + + + + + + + + + + + + diff --git a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/AbstractTestcontainers.java b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/AbstractTestcontainers.java index 2f31fc81594..c194624ac5f 100644 --- a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/AbstractTestcontainers.java +++ b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/AbstractTestcontainers.java @@ -30,6 +30,8 @@ public static void beforeAll() { .withClasspathResourceMapping("clickhouse/clickhouse.sql", "/docker-entrypoint-initdb.d/d_schema.sql", BindMode.READ_ONLY) .withClasspathResourceMapping("clickhouse/clickhouse_migration.sql", "/docker-entrypoint-initdb.d/e_schema.sql", + BindMode.READ_ONLY) + .withClasspathResourceMapping("clickhouse/materialized_views.sql", "/docker-entrypoint-initdb.d/f_schema.sql", BindMode.READ_ONLY); public static class Initializer implements ApplicationContextInitializer { diff --git a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java index de343ee5f2f..dfde0006df9 100644 --- a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java +++ b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java @@ -98,5 +98,21 @@ public void getMutatedGenesWithAlterationFilter() { AlterationFilterHelper.build(onlyMutationStatusFilter)); assertEquals(1, alterationCountByGenes2.size()); } + + @Test + public void getTotalProfiledCountsByGene() { + StudyViewFilter studyViewFilter = new StudyViewFilter(); + studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB)); + + var totalProfiledCountsMap = studyViewMapper.getTotalProfiledCounts(studyViewFilter, + CategorizedClinicalDataCountFilter.getBuilder().build(), false, + "MUTATION_EXTENDED"); + + assertEquals(3, totalProfiledCountsMap.size()); + + var akt2TotalProfiledCounts = totalProfiledCountsMap.get("akt2"); + assertEquals(4, akt2TotalProfiledCounts.getNumberOfProfiledCases().intValue()); + + } } \ No newline at end of file diff --git a/src/test/java/org/cbioportal/service/impl/AlterationCountServiceImplTest.java b/src/test/java/org/cbioportal/service/impl/AlterationCountServiceImplTest.java index bd2c4955826..c000835c32d 100644 --- a/src/test/java/org/cbioportal/service/impl/AlterationCountServiceImplTest.java +++ b/src/test/java/org/cbioportal/service/impl/AlterationCountServiceImplTest.java @@ -1,10 +1,18 @@ package org.cbioportal.service.impl; import org.apache.commons.math3.util.Pair; -import org.cbioportal.model.*; +import org.cbioportal.model.AlterationCountByGene; +import org.cbioportal.model.AlterationCountByStructuralVariant; +import org.cbioportal.model.AlterationFilter; +import org.cbioportal.model.CNA; +import org.cbioportal.model.CopyNumberCountByGene; +import org.cbioportal.model.MolecularProfile; +import org.cbioportal.model.MolecularProfileCaseIdentifier; +import org.cbioportal.model.MutationEventType; import org.cbioportal.model.util.Select; import org.cbioportal.persistence.AlterationRepository; import org.cbioportal.persistence.MolecularProfileRepository; +import org.cbioportal.persistence.StudyViewRepository; import org.cbioportal.service.exception.MolecularProfileNotFoundException; import org.cbioportal.service.util.AlterationEnrichmentUtil; import org.cbioportal.service.util.MolecularProfileUtil; @@ -14,17 +22,25 @@ import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; +import org.mockito.MockitoAnnotations; import org.mockito.Spy; import org.mockito.junit.MockitoJUnitRunner; -import java.util.*; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.TreeSet; -import static org.mockito.Mockito.*; +import static org.mockito.Mockito.anyBoolean; +import static org.mockito.Mockito.anyList; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; @RunWith(MockitoJUnitRunner.class) public class AlterationCountServiceImplTest extends BaseServiceImplTest { - @InjectMocks private AlterationCountServiceImpl alterationCountService; @Mock private AlterationRepository alterationRepository; @@ -39,6 +55,8 @@ public class AlterationCountServiceImplTest extends BaseServiceImplTest { private MolecularProfileUtil molecularProfileUtil; @Mock private MolecularProfileRepository molecularProfileRepository; + @Mock + private StudyViewRepository studyViewRepository; List caseIdentifiers = Arrays.asList(new MolecularProfileCaseIdentifier("A", MOLECULAR_PROFILE_ID)); Select mutationEventTypes = Select.byValues(Arrays.asList(MutationEventType.missense_mutation)); @@ -64,6 +82,11 @@ public class AlterationCountServiceImplTest extends BaseServiceImplTest { @Before public void setup() { + MockitoAnnotations.openMocks(this); + + alterationCountService = new AlterationCountServiceImpl(alterationRepository, alterationEnrichmentUtil, + alterationEnrichmentUtilCna, alterationEnrichmentUtilStructVar, molecularProfileRepository, studyViewRepository); + MolecularProfile molecularProfile = new MolecularProfile(); molecularProfile.setStableId(MOLECULAR_PROFILE_ID); molecularProfile.setCancerStudyIdentifier(STUDY_ID); diff --git a/src/test/resources/clickhouse_data.sql b/src/test/resources/clickhouse_data.sql index e513f9540cc..bbc0fb76143 100644 --- a/src/test/resources/clickhouse_data.sql +++ b/src/test/resources/clickhouse_data.sql @@ -65,14 +65,14 @@ insert into reference_genome_gene (entrez_gene_id,cytoband,start,end,chr,referen insert into reference_genome_gene (entrez_gene_id,cytoband,start,end,chr,reference_genome_id) values(208,'19q13.2', 40736224, 40791443,19,1); insert into reference_genome_gene (entrez_gene_id,cytoband,start,end,chr,reference_genome_id) values(208,'19q13.2', 40230317, 40285536,19,2); -insert into genetic_profile (genetic_profile_id,stable_id,cancer_study_id,genetic_alteration_type,datatype,name,description,show_profile_in_analysis_tab) values (2,'study_tcga_pub_gistic',1,'copy_number_alteration','discrete','putative copy-number alterations from gistic','putative copy-number from gistic 2.0. values: -2 = homozygous deletion; -1 = hemizygous deletion; 0 = neutral / no change; 1 = gain; 2 = high level amplification.',1); +insert into genetic_profile (genetic_profile_id,stable_id,cancer_study_id,genetic_alteration_type,datatype,name,description,show_profile_in_analysis_tab) values (2,'study_tcga_pub_gistic',1,'COPY_NUMBER_ALTERATION','discrete','putative copy-number alterations from gistic','putative copy-number from gistic 2.0. values: -2 = homozygous deletion; -1 = hemizygous deletion; 0 = neutral / no change; 1 = gain; 2 = high level amplification.',1); insert into genetic_profile (genetic_profile_id,stable_id,cancer_study_id,genetic_alteration_type,datatype,name,description,show_profile_in_analysis_tab) values (3,'study_tcga_pub_mrna',1,'mrna_expression','z-score','mrna expression (microarray)','expression levels (agilent microarray).',0); insert into genetic_profile (genetic_profile_id,stable_id,cancer_study_id,genetic_alteration_type,datatype,name,description,show_profile_in_analysis_tab) values (10,'study_tcga_pub_m_na',1,'mrna_expression','z-score','mrna expression (microarray)','expression levels (agilent microarray).',0); -insert into genetic_profile (genetic_profile_id,stable_id,cancer_study_id,genetic_alteration_type,datatype,name,description,show_profile_in_analysis_tab) values (4,'study_tcga_pub_log2cna',1,'copy_number_alteration','log2-value','log2 copy-number values','log2 copy-number valuesfor each gene (from affymetrix snp6).',0); +insert into genetic_profile (genetic_profile_id,stable_id,cancer_study_id,genetic_alteration_type,datatype,name,description,show_profile_in_analysis_tab) values (4,'study_tcga_pub_log2cna',1,'COPY_NUMBER_ALTERATION','log2-value','log2 copy-number values','log2 copy-number valuesfor each gene (from affymetrix snp6).',0); insert into genetic_profile (genetic_profile_id,stable_id,cancer_study_id,genetic_alteration_type,datatype,name,description,show_profile_in_analysis_tab) values (5,'study_tcga_pub_methylation_hm27',1,'methylation','continuous','methylation (hm27)','methylation beta-values (hm27 platform). for genes with multiple methylation probes, the probe least correlated with expression is selected.',0); -insert into genetic_profile (genetic_profile_id,stable_id,cancer_study_id,genetic_alteration_type,datatype,name,description,show_profile_in_analysis_tab) values (6,'study_tcga_pub_mutations',1,'mutation_extended','maf','mutations','mutation data from whole exome sequencing.',1); +insert into genetic_profile (genetic_profile_id,stable_id,cancer_study_id,genetic_alteration_type,datatype,name,description,show_profile_in_analysis_tab) values (6,'study_tcga_pub_mutations',1,'MUTATION_EXTENDED','maf','mutations','mutation data from whole exome sequencing.',1); insert into genetic_profile (genetic_profile_id,stable_id,cancer_study_id,genetic_alteration_type,datatype,name,description,show_profile_in_analysis_tab) values (7,'study_tcga_pub_sv',1,'structural_variant','sv','structural variants','structural variants detected by illumina hiseq sequencing.',1); -insert into genetic_profile (genetic_profile_id,stable_id,cancer_study_id,genetic_alteration_type,datatype,name,description,show_profile_in_analysis_tab) values (8,'acc_tcga_mutations',2,'mutation_extended','maf','mutations','mutation data from whole exome sequencing.',1); +insert into genetic_profile (genetic_profile_id,stable_id,cancer_study_id,genetic_alteration_type,datatype,name,description,show_profile_in_analysis_tab) values (8,'acc_tcga_mutations',2,'MUTATION_EXTENDED','maf','mutations','mutation data from whole exome sequencing.',1); insert into genetic_profile (genetic_profile_id,stable_id,cancer_study_id,genetic_alteration_type,datatype,name,description,show_profile_in_analysis_tab) values (13,'acc_tcga_sv',2,'structural_variant','sv','structural variants','structural variants detected by illumina hiseq sequencing.',1); insert into genetic_profile (genetic_profile_id,stable_id,cancer_study_id,genetic_alteration_type,datatype,name,description,show_profile_in_analysis_tab) values (9,'study_tcga_pub_gsva_scores',1,'geneset_score','gsva-score','gsva scores','gsva scores for oncogenic signature gene sets from msigdb calculated with gsva version 1.22.4, r version 3.3.2.',1); insert into genetic_profile (genetic_profile_id,stable_id,cancer_study_id,genetic_alteration_type,datatype,name,description,show_profile_in_analysis_tab,generic_assay_type) values (11,'study_tcga_pub_treatment_ic50',1,'generic_assay','ic50','treatment ic50 values','treatment response ic50 values',1,'treatment_response'); @@ -165,24 +165,24 @@ insert into gene_panel_list (internal_id,gene_id) values (2,4893); insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (1,2,1); insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (1,3,1); insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (1,4,null); -insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (1,6,null); +insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (1,6,2); insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (2,2,2); insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (2,3,1); insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (2,4,2); -insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (2,5,null); -insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (2,6,null); -insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (3,2,null); +insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (2,5,2); +insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (2,6,2); +insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (3,2,2); insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (3,3,null); -insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (3,4,null); -insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (3,6,null); +insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (3,4,2); +insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (3,6,2); insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (4,2,null); insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (4,4,null); insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (5,2,null); insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (5,4,null); -insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (6,2,null); -insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (6,3,null); -insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (6,4,null); -insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (6,6,null); +insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (6,2,2); +insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (6,3,2); +insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (6,4,2); +insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (6,6,2); insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (7,2,null); insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (7,4,null); insert into sample_profile (sample_id,genetic_profile_id,panel_id) values (7,6,null); diff --git a/src/test/resources/logback.xml b/src/test/resources/logback.xml index 9d21a927c45..d243e7dfa34 100644 --- a/src/test/resources/logback.xml +++ b/src/test/resources/logback.xml @@ -1,24 +1,5 @@ + - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - - - - \ No newline at end of file + + + From 1d1606b25d4e8ddf68fe42df3ee5b87b9e0197f0 Mon Sep 17 00:00:00 2001 From: Neel Kuila Date: Tue, 18 Jun 2024 16:19:22 -0400 Subject: [PATCH 11/87] RFC80:density plot endpoint(#10837) * working poc * refactor logic into service, so clean * refactor for parameters builder, simplify min max logic, streamline service call * remove unused services and imports * remove more unused imports --- .../ClinicalDataDensityPlotService.java | 12 ++ .../ClinicalDataDensityPlotServiceImpl.java | 138 ++++++++++++++++++ .../StudyViewColumnStoreController.java | 81 +++++++++- .../web/util/DensityPlotParameters.java | 118 +++++++++++++++ 4 files changed, 345 insertions(+), 4 deletions(-) create mode 100644 src/main/java/org/cbioportal/service/ClinicalDataDensityPlotService.java create mode 100644 src/main/java/org/cbioportal/service/impl/ClinicalDataDensityPlotServiceImpl.java create mode 100644 src/main/java/org/cbioportal/web/util/DensityPlotParameters.java diff --git a/src/main/java/org/cbioportal/service/ClinicalDataDensityPlotService.java b/src/main/java/org/cbioportal/service/ClinicalDataDensityPlotService.java new file mode 100644 index 00000000000..641ea3dbeb4 --- /dev/null +++ b/src/main/java/org/cbioportal/service/ClinicalDataDensityPlotService.java @@ -0,0 +1,12 @@ +package org.cbioportal.service; + +import org.cbioportal.model.ClinicalData; +import org.cbioportal.model.DensityPlotData; +import org.cbioportal.web.util.DensityPlotParameters; + +import java.math.BigDecimal; +import java.util.List; + +public interface ClinicalDataDensityPlotService { + DensityPlotData getDensityPlotData(List filteredClinicalData, DensityPlotParameters densityPlotParameters); +} diff --git a/src/main/java/org/cbioportal/service/impl/ClinicalDataDensityPlotServiceImpl.java b/src/main/java/org/cbioportal/service/impl/ClinicalDataDensityPlotServiceImpl.java new file mode 100644 index 00000000000..cfbb8c5fdd0 --- /dev/null +++ b/src/main/java/org/cbioportal/service/impl/ClinicalDataDensityPlotServiceImpl.java @@ -0,0 +1,138 @@ +package org.cbioportal.service.impl; + +import org.apache.commons.lang3.math.NumberUtils; +import org.apache.commons.math3.stat.correlation.PearsonsCorrelation; +import org.apache.commons.math3.stat.correlation.SpearmansCorrelation; +import org.cbioportal.model.ClinicalData; +import org.cbioportal.model.DensityPlotBin; +import org.cbioportal.model.DensityPlotData; +import org.cbioportal.service.ClinicalDataDensityPlotService; +import org.cbioportal.web.columnar.StudyViewColumnStoreController; +import org.cbioportal.web.util.DensityPlotParameters; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@Service +public class ClinicalDataDensityPlotServiceImpl implements ClinicalDataDensityPlotService { + @Override + public DensityPlotData getDensityPlotData(List sampleClinicalData, DensityPlotParameters densityPlotParameters) { + DensityPlotData result = new DensityPlotData(); + result.setBins(new ArrayList<>()); + + Map> clinicalDataGroupedBySampleId = sampleClinicalData.stream(). + collect(Collectors.groupingBy(ClinicalData::getSampleId)); + + List extractedXYClinicalData = clinicalDataGroupedBySampleId.entrySet().stream() + .filter(entry -> entry.getValue().size() == 2 && + NumberUtils.isCreatable(entry.getValue().get(0).getAttrValue()) && + NumberUtils.isCreatable(entry.getValue().get(1).getAttrValue()) + ).flatMap(entry -> entry.getValue().stream()) + .toList(); + + if (extractedXYClinicalData.isEmpty()) { + return result; + } + + Map> partition = extractedXYClinicalData.stream().collect( + Collectors.partitioningBy(c -> c.getAttrId().equals(densityPlotParameters.getXAxisAttributeId()))); + + boolean useXLogScale = densityPlotParameters.getXAxisLogScale() && ClinicalDataDensityPlotServiceImpl.isLogScalePossibleForAttribute(densityPlotParameters.getXAxisAttributeId()); + boolean useYLogScale = densityPlotParameters.getYAxisLogScale() && ClinicalDataDensityPlotServiceImpl.isLogScalePossibleForAttribute(densityPlotParameters.getYAxisAttributeId()); + + double[] xValues = partition.get(true).stream().mapToDouble( + useXLogScale ? ClinicalDataDensityPlotServiceImpl::parseValueLog : ClinicalDataDensityPlotServiceImpl::parseValueLinear + ).toArray(); + double[] yValues = partition.get(false).stream().mapToDouble( + useYLogScale ? ClinicalDataDensityPlotServiceImpl::parseValueLog : ClinicalDataDensityPlotServiceImpl::parseValueLinear + ).toArray(); + double[] xValuesCopy = Arrays.copyOf(xValues, xValues.length); + double[] yValuesCopy = Arrays.copyOf(yValues, yValues.length); // Why copy these? + Arrays.sort(xValuesCopy); + Arrays.sort(yValuesCopy); + + double xAxisStartValue = densityPlotParameters.getXAxisStart() == null ? xValuesCopy[0] : + (useXLogScale ? ClinicalDataDensityPlotServiceImpl.logScale(densityPlotParameters.getXAxisStart().doubleValue()) : densityPlotParameters.getXAxisStart().doubleValue()); + double xAxisEndValue = densityPlotParameters.getXAxisEnd() == null ? xValuesCopy[xValuesCopy.length - 1] : + (useXLogScale ? ClinicalDataDensityPlotServiceImpl.logScale(densityPlotParameters.getXAxisEnd().doubleValue()) : densityPlotParameters.getXAxisEnd().doubleValue()); + double yAxisStartValue = densityPlotParameters.getYAxisStart() == null ? yValuesCopy[0] : + (useYLogScale ? ClinicalDataDensityPlotServiceImpl.logScale(densityPlotParameters.getYAxisStart().doubleValue()) : densityPlotParameters.getYAxisStart().doubleValue()); + double yAxisEndValue = densityPlotParameters.getYAxisEnd() == null ? yValuesCopy[yValuesCopy.length - 1] : + (useYLogScale ? ClinicalDataDensityPlotServiceImpl.logScale(densityPlotParameters.getYAxisEnd().doubleValue()) : densityPlotParameters.getYAxisEnd().doubleValue()); + double xAxisBinInterval = (xAxisEndValue - xAxisStartValue) / densityPlotParameters.getXAxisBinCount(); + double yAxisBinInterval = (yAxisEndValue - yAxisStartValue) / densityPlotParameters.getYAxisBinCount(); + List bins = result.getBins(); + for (int i = 0; i < densityPlotParameters.getXAxisBinCount(); i++) { + for (int j = 0; j < densityPlotParameters.getYAxisBinCount(); j++) { + DensityPlotBin densityPlotBin = new DensityPlotBin(); + densityPlotBin.setBinX(BigDecimal.valueOf(xAxisStartValue + (i * xAxisBinInterval))); + densityPlotBin.setBinY(BigDecimal.valueOf(yAxisStartValue + (j * yAxisBinInterval))); + densityPlotBin.setCount(0); + bins.add(densityPlotBin); + } + } + + for (int i = 0; i < xValues.length; i++) { + double xValue = xValues[i]; + double yValue = yValues[i]; + int xBinIndex = (int) ((xValue - xAxisStartValue) / xAxisBinInterval); + int yBinIndex = (int) ((yValue - yAxisStartValue) / yAxisBinInterval); + int index = (int) (((xBinIndex - (xBinIndex == densityPlotParameters.getXAxisBinCount() ? 1 : 0)) * densityPlotParameters.getYAxisBinCount()) + + (yBinIndex - (yBinIndex == densityPlotParameters.getYAxisBinCount() ? 1 : 0))); + DensityPlotBin densityPlotBin = bins.get(index); + densityPlotBin.setCount(densityPlotBin.getCount() + 1); + BigDecimal xValueBigDecimal = BigDecimal.valueOf(xValue); + BigDecimal yValueBigDecimal = BigDecimal.valueOf(yValue); + + // Set new min and max as needed + if (densityPlotBin.getMinX() == null || densityPlotBin.getMinX().compareTo(xValueBigDecimal) > 0){ + densityPlotBin.setMinX(xValueBigDecimal); + } + if (densityPlotBin.getMaxX() == null || densityPlotBin.getMaxX().compareTo(xValueBigDecimal) < 0){ + densityPlotBin.setMaxX(xValueBigDecimal); + } + if (densityPlotBin.getMinY() == null || densityPlotBin.getMinY().compareTo(yValueBigDecimal) > 0){ + densityPlotBin.setMinY(yValueBigDecimal); + } + if (densityPlotBin.getMaxY() == null || densityPlotBin.getMaxY().compareTo(yValueBigDecimal) < 0){ + densityPlotBin.setMaxY(yValueBigDecimal); + } + } + + if (xValues.length > 1) { + // need at least 2 entries in each to compute correlation + result.setPearsonCorr(new PearsonsCorrelation().correlation(xValues, yValues)); + result.setSpearmanCorr(new SpearmansCorrelation().correlation(xValues, yValues)); + } else { + // if less than 1 entry, just set 0 correlation + result.setSpearmanCorr(0.0); + result.setPearsonCorr(0.0); + } + + // filter out empty bins + result.setBins(result.getBins().stream().filter((bin)->(bin.getCount() > 0)).collect(Collectors.toList())); + return result; + } + + + private static boolean isLogScalePossibleForAttribute(String clinicalAttributeId) { + return clinicalAttributeId.equals("MUTATION_COUNT"); + } + + private static double logScale(double val) { + return Math.log(1+val); + } + + private static double parseValueLog(ClinicalData c) { + return ClinicalDataDensityPlotServiceImpl.logScale(Double.parseDouble(c.getAttrValue())); + } + + private static double parseValueLinear(ClinicalData c) { + return Double.parseDouble(c.getAttrValue()); + } +} diff --git a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java index cf65ed4cc78..dffc99a9797 100644 --- a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java +++ b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java @@ -1,12 +1,20 @@ package org.cbioportal.web.columnar; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import jakarta.validation.Valid; import org.cbioportal.model.AlterationCountByGene; import org.cbioportal.model.AlterationFilter; +import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataBin; import org.cbioportal.model.ClinicalDataCountItem; +import org.cbioportal.model.DensityPlotData; import org.cbioportal.model.Sample; +import org.cbioportal.service.ClinicalDataDensityPlotService; import org.cbioportal.service.StudyViewColumnarService; -import org.cbioportal.service.StudyViewService; import org.cbioportal.service.exception.StudyNotFoundException; import org.cbioportal.web.columnar.util.NewStudyViewFilterUtil; import org.cbioportal.web.config.annotation.InternalApi; @@ -15,6 +23,7 @@ import org.cbioportal.web.parameter.ClinicalDataFilter; import org.cbioportal.web.parameter.DataBinMethod; import org.cbioportal.web.parameter.StudyViewFilter; +import org.cbioportal.web.util.DensityPlotParameters; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -29,7 +38,9 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.stream.Collectors; @@ -41,16 +52,21 @@ public class StudyViewColumnStoreController { private final StudyViewColumnarService studyViewColumnarService; - private final StudyViewService studyViewService; private final ClinicalDataBinner clinicalDataBinner; + private final ClinicalDataDensityPlotService clinicalDataDensityPlotService; @Autowired - public StudyViewColumnStoreController(StudyViewColumnarService studyViewColumnarService, StudyViewService studyViewService, ClinicalDataBinner clinicalDataBinner) { + public StudyViewColumnStoreController(StudyViewColumnarService studyViewColumnarService, + ClinicalDataBinner clinicalDataBinner, + ClinicalDataDensityPlotService clinicalDataDensityPlotService + ) { this.studyViewColumnarService = studyViewColumnarService; - this.studyViewService = studyViewService; this.clinicalDataBinner = clinicalDataBinner; + this.clinicalDataDensityPlotService = clinicalDataDensityPlotService; } + + @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") @PostMapping(value = "/column-store/filtered-samples/fetch", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @@ -118,4 +134,61 @@ public ResponseEntity> fetchClinicalDataBinCounts( ); return new ResponseEntity<>(clinicalDataBins, HttpStatus.OK); } + + @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") + @RequestMapping(value = "/column-store/clinical-data-density-plot/fetch", method = RequestMethod.POST, + consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + @Operation(description = "Fetch clinical data density plot bins by study view filter") + @ApiResponse(responseCode = "200", description = "OK", + content = @Content(schema = @Schema(implementation = DensityPlotData.class))) + @Validated + public ResponseEntity fetchClinicalDataDensityPlot( + @Parameter(required = true, description = "Clinical Attribute ID of the X axis") + @RequestParam String xAxisAttributeId, + @Parameter(description = "Number of the bins in X axis") + @RequestParam(defaultValue = "50") Integer xAxisBinCount, + @Parameter(description = "Starting point of the X axis, if different than smallest value") + @RequestParam(required = false) BigDecimal xAxisStart, + @Parameter(description = "Starting point of the X axis, if different than largest value") + @RequestParam(required = false) BigDecimal xAxisEnd, + @Parameter(required = true, description = "Clinical Attribute ID of the Y axis") + @RequestParam String yAxisAttributeId, + @Parameter(description = "Number of the bins in Y axis") + @RequestParam(defaultValue = "50") Integer yAxisBinCount, + @Parameter(description = "Starting point of the Y axis, if different than smallest value") + @RequestParam(required = false) BigDecimal yAxisStart, + @Parameter(description = "Starting point of the Y axis, if different than largest value") + @RequestParam(required = false) BigDecimal yAxisEnd, + @Parameter(description="Use log scale for X axis") + @RequestParam(required = false, defaultValue = "false") Boolean xAxisLogScale, + @Schema(defaultValue = "false") + @Parameter(description="Use log scale for Y axis") + @RequestParam(required = false, defaultValue = "false") Boolean yAxisLogScale, + @Parameter(hidden = true) // prevent reference to this attribute in the swagger-ui interface + @RequestAttribute(required = false, value = "involvedCancerStudies") Collection involvedCancerStudies, + @Parameter(hidden = true) // prevent reference to this attribute in the swagger-ui interface. this attribute is needed for the @PreAuthorize tag above. + @Valid @RequestAttribute(required = false, value = "interceptedStudyViewFilter") StudyViewFilter interceptedStudyViewFilter, + @Parameter(required = true, description = "Study view filter") + @RequestBody(required = false) StudyViewFilter studyViewFilter) { + + List xyAttributeId = new ArrayList<>(Arrays.asList(xAxisAttributeId, yAxisAttributeId)); + DensityPlotParameters densityPlotParameters = + new DensityPlotParameters.Builder() + .xAxisAttributeId(xAxisAttributeId) + .yAxisAttributeId(yAxisAttributeId) + .xAxisBinCount(xAxisBinCount) + .yAxisBinCount(yAxisBinCount) + .xAxisStart(xAxisStart) + .yAxisStart(yAxisStart) + .xAxisEnd(xAxisEnd) + .yAxisEnd(yAxisEnd) + .xAxisLogScale(xAxisLogScale) + .yAxisLogScale(yAxisLogScale) + .build(); + + List sampleClinicalDataList = studyViewColumnarService.getSampleClinicalData(interceptedStudyViewFilter, xyAttributeId); + DensityPlotData result = clinicalDataDensityPlotService.getDensityPlotData(sampleClinicalDataList, densityPlotParameters); + + return new ResponseEntity<>(result, HttpStatus.OK); + } } diff --git a/src/main/java/org/cbioportal/web/util/DensityPlotParameters.java b/src/main/java/org/cbioportal/web/util/DensityPlotParameters.java new file mode 100644 index 00000000000..47e65543680 --- /dev/null +++ b/src/main/java/org/cbioportal/web/util/DensityPlotParameters.java @@ -0,0 +1,118 @@ +package org.cbioportal.web.util; + +import java.math.BigDecimal; + +public class DensityPlotParameters { + private final Integer xAxisBinCount; + private final Integer yAxisBinCount; + private final BigDecimal xAxisStart; + private final BigDecimal xAxisEnd; + private final BigDecimal yAxisStart; + private final BigDecimal yAxisEnd; + private final Boolean xAxisLogScale; + private final Boolean yAxisLogScale; + private final String xAxisAttributeId; + private final String yAxisAttributeId; + + DensityPlotParameters(Builder builder) { + this.xAxisBinCount = builder.xAxisBinCount; + this.yAxisBinCount = builder.yAxisBinCount; + this.xAxisStart = builder.xAxisStart; + this.xAxisEnd = builder.xAxisEnd; + this.yAxisStart = builder.yAxisStart; + this.yAxisEnd = builder.yAxisEnd; + this.xAxisAttributeId = builder.xAxisAttributeId; + this.yAxisAttributeId = builder.yAxisAttributeId; + this.xAxisLogScale = builder.xAxisLogScale; + this.yAxisLogScale = builder.yAxisLogScale; + } + + public Integer getXAxisBinCount() { + return xAxisBinCount; + } + public Integer getYAxisBinCount() { + return yAxisBinCount; + } + public BigDecimal getXAxisStart() { + return xAxisStart; + } + public BigDecimal getXAxisEnd() { + return xAxisEnd; + } + public BigDecimal getYAxisStart() { + return yAxisStart; + } + public BigDecimal getYAxisEnd() { + return yAxisEnd; + } + public Boolean getXAxisLogScale() { + return xAxisLogScale; + } + public Boolean getYAxisLogScale() { + return yAxisLogScale; + } + public String getXAxisAttributeId() { + return xAxisAttributeId; + } + public String getYAxisAttributeId() { + return yAxisAttributeId; + } + + public static class Builder { + private Integer xAxisBinCount; + private Integer yAxisBinCount; + private BigDecimal xAxisStart; + private BigDecimal xAxisEnd; + private BigDecimal yAxisStart; + private BigDecimal yAxisEnd; + private Boolean xAxisLogScale; + private Boolean yAxisLogScale; + private String xAxisAttributeId; + private String yAxisAttributeId; + + public Builder xAxisBinCount(Integer xAxisBinCount) { + this.xAxisBinCount = xAxisBinCount; + return this; + } + public Builder yAxisBinCount(Integer yAxisBinCount) { + this.yAxisBinCount = yAxisBinCount; + return this; + } + public Builder xAxisStart(BigDecimal xAxisStart) { + this.xAxisStart = xAxisStart; + return this; + } + public Builder xAxisEnd(BigDecimal xAxisEnd) { + this.xAxisEnd = xAxisEnd; + return this; + } + public Builder yAxisStart(BigDecimal yAxisStart) { + this.yAxisStart = yAxisStart; + return this; + } + public Builder yAxisEnd(BigDecimal yAxisEnd) { + this.yAxisEnd = yAxisEnd; + return this; + } + public Builder xAxisLogScale(Boolean xAxisLogScale) { + this.xAxisLogScale = xAxisLogScale; + return this; + } + public Builder yAxisLogScale(Boolean yAxisLogScale) { + this.yAxisLogScale = yAxisLogScale; + return this; + } + public Builder xAxisAttributeId(String xAxisAttributeId) { + this.xAxisAttributeId = xAxisAttributeId; + return this; + } + public Builder yAxisAttributeId(String yAxisAttributeId) { + this.yAxisAttributeId = yAxisAttributeId; + return this; + } + public DensityPlotParameters build() { + return new DensityPlotParameters(this); + + } + } +} From 464f442ec6145f431f620c591cec913bdebd7f9f Mon Sep 17 00:00:00 2001 From: alisman Date: Thu, 20 Jun 2024 11:31:50 -0400 Subject: [PATCH 12/87] Fix clinical data counts query/filter using new derived table (#10833) --- .../StudyViewMyBatisRepository.java | 5 +- .../db-scripts/clickhouse/derived_tables.sql | 46 ++++++++ .../clickhouse/materialized_views.sql | 100 +++++++++++++++--- .../resources/db-scripts/clickhouse/views.sql | 51 --------- .../StudyViewFilterMapper.xml | 15 ++- .../mybatisclickhouse/StudyViewMapper.xml | 82 ++++++++++++-- 6 files changed, 215 insertions(+), 84 deletions(-) create mode 100644 src/main/resources/db-scripts/clickhouse/derived_tables.sql diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java index c723806885b..b227d71f23e 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java @@ -13,13 +13,14 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; +import java.util.Collections; import java.util.List; import java.util.Map; @Repository public class StudyViewMyBatisRepository implements StudyViewRepository { - private static final List FILTERED_CLINICAL_ATTR_VALUES = List.of("NA", "NAN", "N/A"); + private static final List FILTERED_CLINICAL_ATTR_VALUES = Collections.emptyList(); private final StudyViewMapper mapper; @Autowired @@ -59,7 +60,7 @@ public List getPatientClinicalDataCounts(StudyViewFilter stud @Override public List getClinicalDataAttributeNames(ClinicalAttributeDataSource clinicalAttributeDataSource, ClinicalAttributeDataType dataType) { - String tableName = clinicalAttributeDataSource.getValue().toLowerCase() + "_clinical_attribute_" + dataType.getValue().toLowerCase() + "_view"; + String tableName = clinicalAttributeDataSource.getValue().toLowerCase() + "_clinical_attribute_" + dataType.getValue().toLowerCase() + "_mv"; return mapper.getClinicalAttributeNames(tableName); } diff --git a/src/main/resources/db-scripts/clickhouse/derived_tables.sql b/src/main/resources/db-scripts/clickhouse/derived_tables.sql new file mode 100644 index 00000000000..3b2ffbcd17c --- /dev/null +++ b/src/main/resources/db-scripts/clickhouse/derived_tables.sql @@ -0,0 +1,46 @@ +-- clinical_data_derived +DROP TABLE IF EXISTS clinical_data_derived +CREATE TABLE IF NOT EXISTS clinical_data_derived +( + sample_unique_id String, + patient_unique_id String, + attribute_name String, + attribute_value String, + cancer_study_identifier String, + type String +) + ENGINE=MergeTree + ORDER BY sample_unique_id + +-- Insert sample attribute data +INSERT INTO TABLE clinical_data_derived +SELECT sm.sample_unique_id AS sample_unique_id, + sm.patient_unique_id AS patient_unique_id, + cam.attr_id AS attribute_name, + csamp.attr_value AS attribute_value, + cs.cancer_study_identifier AS cancer_study_identifier, + 'sample' AS type +FROM sling_db_2024_05_23_original.sample_mv AS sm + INNER JOIN sling_db_2024_05_23_original.cancer_study AS cs + ON sm.cancer_study_identifier = cs.cancer_study_identifier + FULL OUTER JOIN sling_db_2024_05_23_original.clinical_attribute_meta AS cam + ON cs.cancer_study_id = cam.cancer_study_id + FULL OUTER JOIN sling_db_2024_05_23_original.clinical_sample AS csamp + ON (sm.internal_id = csamp.internal_id) AND (csamp.attr_id = cam.attr_id) +WHERE cam.patient_attribute = 0 + +-- INSERT patient attribute data +INSERT INTO TABLE clinical_data_derived +SELECT NULL AS sample_unique_id, + concat(cs.cancer_study_identifier, '_', p.stable_id) AS patient_unique_id, + cam.attr_id AS attribute_name, + clinpat.attr_value AS attribute_value, + cs.cancer_study_identifier AS cancer_study_identifier, + 'patient' AS type +FROM sling_db_2024_05_23_original.patient AS p + INNER JOIN sling_db_2024_05_23_original.cancer_study AS cs ON p.cancer_study_id = cs.cancer_study_id + FULL OUTER JOIN sling_db_2024_05_23_original.clinical_attribute_meta AS cam + ON cs.cancer_study_id = cam.cancer_study_id + FULL OUTER JOIN sling_db_2024_05_23_original.clinical_patient AS clinpat + ON (p.internal_id = clinpat.internal_id) AND (clinpat.attr_id = cam.attr_id) +WHERE cam.patient_attribute = 1 diff --git a/src/main/resources/db-scripts/clickhouse/materialized_views.sql b/src/main/resources/db-scripts/clickhouse/materialized_views.sql index 6704ecd9bad..c5168ae4b14 100644 --- a/src/main/resources/db-scripts/clickhouse/materialized_views.sql +++ b/src/main/resources/db-scripts/clickhouse/materialized_views.sql @@ -1,14 +1,6 @@ -DROP TABLE IF EXISTS sample_clinical_attribute_numeric; -DROP TABLE IF EXISTS sample_clinical_attribute_categorical; -DROP TABLE IF EXISTS patient_clinical_attribute_numeric; -DROP TABLE IF EXISTS patient_clinical_attribute_categorical; DROP TABLE IF EXISTS sample_columnstore; DROP TABLE IF EXISTS sample_list_columnstore; DROP TABLE IF EXISTS genomic_event; -DROP VIEW IF EXISTS sample_clinical_attribute_numeric_mv; -DROP VIEW IF EXISTS sample_clinical_attribute_categorical_mv; -DROP VIEW IF EXISTS patient_clinical_attribute_numeric_mv; -DROP VIEW IF EXISTS patient_clinical_attribute_categorical_mv; DROP VIEW IF EXISTS sample_columnstore_mv; DROP VIEW IF EXISTS sample_list_columnstore_mv; @@ -135,17 +127,91 @@ FROM cancer_study cs INNER JOIN clinical_patient cp on p.internal_id = cp.internal_id WHERE NOT match(cp.attr_value, '^[\d\.]+$'); +--patient_clinical_attribute_categorical_mv +DROP VIEW IF EXISTS patient_clinical_attribute_categorical_mv; CREATE MATERIALIZED VIEW patient_clinical_attribute_categorical_mv - TO patient_clinical_attribute_categorical AS -SELECT concat(cs.cancer_study_identifier, '_', p.stable_id) as patient_unique_id, - cp.attr_id as attribute_name, - cp.attr_value as attribute_value, - cs.cancer_study_identifier as cancer_study_identifier -FROM cancer_study cs - INNER JOIN patient p on cs.cancer_study_id = p.cancer_study_id - INNER JOIN clinical_patient cp on p.internal_id = cp.internal_id -WHERE NOT match(cp.attr_value, '^[\d\.]+$'); + ENGINE = MergeTree() + ORDER BY cancer_study_identifier + SETTINGS allow_nullable_key = 1 + POPULATE +AS +SELECT concat(cs.cancer_study_identifier, '_', p.stable_id) AS patient_unique_id, + cp.attr_id AS attribute_name, + cp.attr_value AS attribute_value, + cs.cancer_study_identifier AS cancer_study_identifier +FROM clinical_patient AS cp + INNER JOIN patient AS p ON cp.internal_id = p.internal_id + INNER JOIN cancer_study AS cs ON p.cancer_study_id = cs.cancer_study_id + INNER JOIN clinical_attribute_meta AS cam + ON (cp.attr_id = cam.attr_id) AND (cs.cancer_study_id = cam.cancer_study_id) +WHERE cam.datatype = 'STRING' + + +--patient_clinical_attribute_numeric_mv +DROP VIEW IF EXISTS patient_clinical_attribute_numeric_mv; +CREATE MATERIALIZED VIEW patient_clinical_attribute_numeric_mv + ENGINE = MergeTree() + ORDER BY cancer_study_identifier + SETTINGS allow_nullable_key = 1 + POPULATE +AS +SELECT concat(cs.cancer_study_identifier, '_', p.stable_id) AS patient_unique_id, + cp.attr_id AS attribute_name, + cp.attr_value AS attribute_value, + cs.cancer_study_identifier AS cancer_study_identifier +FROM sling_db_2024_05_23_original.clinical_patient AS cp + INNER JOIN sling_db_2024_05_23_original.patient AS p ON cp.internal_id = p.internal_id + INNER JOIN sling_db_2024_05_23_original.cancer_study AS cs ON p.cancer_study_id = cs.cancer_study_id + INNER JOIN sling_db_2024_05_23_original.clinical_attribute_meta AS cam + ON (cp.attr_id = cam.attr_id) AND (cs.cancer_study_id = cam.cancer_study_id) +WHERE cam.datatype = 'NUMBER' + +-- sample_clinical_attribute_categorical_mv +DROP VIEW IF EXISTS sample_clinical_attribute_categorical_mv; +CREATE MATERIALIZED VIEW sample_clinical_attribute_categorical_mv + ENGINE = MergeTree() + ORDER BY cancer_study_identifier + SETTINGS allow_nullable_key = 1 + POPULATE +AS +SELECT s.sample_unique_id, + s.patient_unique_id, + csamp.attr_id AS attribute_name, + csamp.attr_value AS attribute_value, + s.cancer_study_identifier AS cancer_study_identifier +FROM sling_db_2024_05_23_original.clinical_sample AS csamp + INNER JOIN sling_db_2024_05_23_original.sample_mv AS s ON csamp.internal_id = s.internal_id + INNER JOIN sling_db_2024_05_23_original.cancer_study AS cs + ON s.cancer_study_identifier = cs.cancer_study_identifier + INNER JOIN sling_db_2024_05_23_original.clinical_attribute_meta AS cam + ON (csamp.attr_id = cam.attr_id) AND (cs.cancer_study_id = cam.cancer_study_id) +WHERE cam.datatype = 'STRING' + +-- sample_clinical_attribute_numeric_mv +DROP VIEW IF EXISTS sample_clinical_attribute_numeric_mv; +CREATE MATERIALIZED VIEW sample_clinical_attribute_numeric_mv + ENGINE = MergeTree() + ORDER BY cancer_study_identifier + SETTINGS allow_nullable_key = 1 + POPULATE +AS +SELECT s.sample_unique_id, + s.patient_unique_id, + csamp.attr_id AS attribute_name, + csamp.attr_value AS attribute_value, + s.cancer_study_identifier AS cancer_study_identifier +FROM clinical_sample AS csamp + INNER JOIN sample_mv AS s ON csamp.internal_id = s.internal_id + INNER JOIN cancer_study AS cs + ON s.cancer_study_identifier = cs.cancer_study_identifier + INNER JOIN clinical_attribute_meta AS cam + ON (csamp.attr_id = cam.attr_id) AND (cs.cancer_study_id = cam.cancer_study_id) +WHERE cam.datatype = 'NUMBER' + + + +-- sample_columnstore CREATE TABLE IF NOT EXISTS sample_columnstore ( sample_unique_id VARCHAR(45), diff --git a/src/main/resources/db-scripts/clickhouse/views.sql b/src/main/resources/db-scripts/clickhouse/views.sql index 60d6c5f8388..27845d1052b 100644 --- a/src/main/resources/db-scripts/clickhouse/views.sql +++ b/src/main/resources/db-scripts/clickhouse/views.sql @@ -1,57 +1,6 @@ -DROP VIEW IF EXISTS sample_clinical_attribute_numeric_view; -DROP VIEW IF EXISTS sample_clinical_attribute_categorical_view; -DROP VIEW IF EXISTS patient_clinical_attribute_numeric_view; -DROP VIEW IF EXISTS patient_clinical_attribute_categorical_view; DROP VIEW IF EXISTS sample_view; DROP VIEW IF EXISTS sample_list_view; -CREATE VIEW sample_clinical_attribute_numeric_view - AS -SELECT concat(cs.cancer_study_identifier, '_', s.stable_id) as sample_unique_id, - concat(cs.cancer_study_identifier, '_', p.stable_id) as patient_unique_id, - clinical_sample.attr_id as attribute_name, - cast(clinical_sample.attr_value as float) as attribute_value, - cs.cancer_study_identifier as cancer_study_identifier -FROM cancer_study cs - INNER JOIN patient p on cs.cancer_study_id = p.cancer_study_id - INNER JOIN sample s on p.internal_id = s.patient_id - INNER JOIN clinical_sample ON s.internal_id = clinical_sample.internal_id -WHERE match(clinical_sample.attr_value, '^[\d\.]+$'); - -CREATE VIEW sample_clinical_attribute_categorical_view - AS -SELECT concat(cs.cancer_study_identifier, '_', s.stable_id) as sample_unique_id, - concat(cs.cancer_study_identifier, '_', p.stable_id) as patient_unique_id, - cl.attr_id as attribute_name, - cl.attr_value as attribute_value, - cs.cancer_study_identifier as cancer_study_identifier -FROM cancer_study cs - INNER JOIN patient p on cs.cancer_study_id = p.cancer_study_id - INNER JOIN sample s on p.internal_id = s.patient_id - INNER JOIN clinical_sample cl on s.internal_id = cl.internal_id -WHERE NOT match(cl.attr_value, '^[\d\.]+$'); - -CREATE VIEW patient_clinical_attribute_numeric_view - AS -SELECT concat(cs.cancer_study_identifier, '_', p.stable_id) as patient_unique_id, - cp.attr_id as attribute_name, - cast(cp.attr_value as float) as attribute_value, - cs.cancer_study_identifier as cancer_study_identifier -FROM cancer_study cs - INNER JOIN patient p on cs.cancer_study_id = p.cancer_study_id - INNER JOIN clinical_patient cp on p.internal_id = cp.internal_id -WHERE match(cp.attr_value, '^[\d\.]+$'); - -CREATE VIEW patient_clinical_attribute_categorical_view - AS -SELECT concat(cs.cancer_study_identifier, '_', p.stable_id) as patient_unique_id, - cp.attr_id as attribute_name, - cp.attr_value as attribute_value, - cs.cancer_study_identifier as cancer_study_identifier -FROM cancer_study cs - INNER JOIN patient p on cs.cancer_study_id = p.cancer_study_id - INNER JOIN clinical_patient cp on p.internal_id = cp.internal_id -WHERE NOT match(cp.attr_value, '^[\d\.]+$'); CREATE VIEW sample_view AS diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index 5ed126acaa6..046f37afcfd 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -46,7 +46,8 @@ - + + @@ -54,7 +55,8 @@ - + + @@ -68,7 +70,8 @@ - + + @@ -76,7 +79,8 @@ - + + @@ -112,7 +116,8 @@ SELECT ${unique_id} FROM ${table_name} - WHERE attribute_name = '${clinicalDataFilter.attributeId}' + WHERE attribute_name = '${clinicalDataFilter.attributeId}' AND + type='${type}' AND attribute_value = '${dataFilterValue.value}' diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index d177d4a5892..8e491a54296 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -52,7 +52,7 @@ attribute_name as attrId, attribute_value as attrValue, cancer_study_identifier as studyId - FROM sample_clinical_attribute_numeric_view + FROM sample_clinical_attribute_numeric_mv sample_unique_id IN ( @@ -76,7 +76,7 @@ attribute_name as attrId, attribute_value as attrValue, cancer_study_identifier as studyId - FROM patient_clinical_attribute_numeric_view + FROM patient_clinical_attribute_numeric_mv patient_unique_id IN ( @@ -95,13 +95,13 @@ @@ -111,8 +111,7 @@ Count(*) as count FROM ${table_name_prefix}_clinical_attribute_categorical_view - sample_unique_id IN ( - + patient_unique_id IN ( INTERSECT @@ -129,6 +128,71 @@ GROUP BY attribute_name, attribute_value + + + + + + + + SELECT + attribute_name as attributeId, + if(attribute_value='', 'NA', attribute_value) AS value, + count(value) as count + FROM clinical_data_derived + + type='sample' AND + sample_unique_id IN ( + + INTERSECT + SELECT sample_unique_id from sample_mv WHERE sample_mv.patient_unique_id IN + () + + ) + + AND UPPER(value) NOT IN + + #{filteredAttributeValue} + + + AND attribute_name IN + + #{attributeId} + + + GROUP BY attribute_name, + value + + + + SELECT + attribute_name as attributeId, + if(attribute_value='', 'NA', attribute_value) AS value, + count(value) as count + FROM clinical_data_derived + + type='patient' AND + patient_unique_id IN ( + + INTERSECT + + ) + + AND UPPER(value) NOT IN + + #{filteredAttributeValue} + + + AND attribute_name IN + + #{attributeId} + + + GROUP BY attribute_name, + value + + + + + + + + SELECT @@ -128,11 +146,6 @@ GROUP BY attribute_name, attribute_value - - - - - SELECT From 0b8c89e0dc14b396aeb33418d9f50dcffb2f73e2 Mon Sep 17 00:00:00 2001 From: alisman Date: Thu, 20 Jun 2024 13:50:00 -0400 Subject: [PATCH 14/87] Fix clinical data scatterplot (point at new derived cd table) (#10846) --- .../persistence/mybatisclickhouse/StudyViewMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index 0bc5ac165db..2c204a3c64c 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -52,7 +52,7 @@ attribute_name as attrId, attribute_value as attrValue, cancer_study_identifier as studyId - FROM sample_clinical_attribute_numeric_mv + FROM clinical_data_derived sample_unique_id IN ( From bb5456a6cd8427c4ecf0c2be7fc5a70752ba61a3 Mon Sep 17 00:00:00 2001 From: Charles Haynes <33608920+haynescd@users.noreply.github.com> Date: Thu, 20 Jun 2024 15:32:01 -0400 Subject: [PATCH 15/87] Rfc80/add cna genes endpoint (#10845) * :sparkles: Add CNA Gene Endpoint * :bug: Fix StudyViewFilterMapper.xml to allow ability to filter on gene and alteration * Fix merge conflict * Address comments * Fix unit tests * Fix sonar issues --- .../persistence/StudyViewRepository.java | 6 +- .../helper/AlterationFilterHelper.java | 17 +- .../mybatisclickhouse/StudyViewMapper.java | 5 + .../StudyViewMyBatisRepository.java | 14 ++ .../service/AlterationCountService.java | 1 + .../service/StudyViewColumnarService.java | 2 + .../impl/AlterationCountServiceImpl.java | 37 +++- .../impl/StudyViewColumnarServiceImpl.java | 13 +- .../StudyViewColumnStoreController.java | 29 +-- .../db-scripts/clickhouse/clickhouse.sql | 47 ++-- .../clickhouse/clickhouse_migration.sql | 207 ++++++++--------- .../db-scripts/clickhouse/derived_tables.sql | 8 +- .../clickhouse/materialized_views.sql | 208 ------------------ .../StudyViewAlterationFilterMapper.xml | 22 +- .../StudyViewFilterMapper.xml | 13 +- .../mybatisclickhouse/StudyViewMapper.xml | 62 ++++-- .../helper/AlterationFilterHelperTest.java | 2 +- 17 files changed, 294 insertions(+), 399 deletions(-) diff --git a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java index dcedba98211..3ff72d01829 100644 --- a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java +++ b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java @@ -4,6 +4,7 @@ import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCount; import org.cbioportal.model.GenomicDataCount; +import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.Sample; import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; import org.cbioportal.persistence.enums.ClinicalAttributeDataType; @@ -22,6 +23,8 @@ public interface StudyViewRepository { List getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + List getCnaGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + List getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List filteredAttributes); List getSampleClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List filteredAttributes); @@ -37,5 +40,6 @@ public interface StudyViewRepository { int getFilteredSamplesCount(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); Map getMatchingGenePanelIds(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, String alterationType); - + + int getTotalProfiledCountsByAlterationType(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, String alterationType); } diff --git a/src/main/java/org/cbioportal/persistence/helper/AlterationFilterHelper.java b/src/main/java/org/cbioportal/persistence/helper/AlterationFilterHelper.java index 75bd6e1cdbf..1d8f63a55f2 100644 --- a/src/main/java/org/cbioportal/persistence/helper/AlterationFilterHelper.java +++ b/src/main/java/org/cbioportal/persistence/helper/AlterationFilterHelper.java @@ -20,10 +20,13 @@ public static AlterationFilterHelper build(@Nullable AlterationFilter alteration private final AlterationFilter alterationFilter; private final Select mappedMutationTypes; + + private final Select mappedCnaTypes; private AlterationFilterHelper(@NonNull AlterationFilter alterationFilter){ this.alterationFilter = alterationFilter; this.mappedMutationTypes = buildMutationTypeList(); + this.mappedCnaTypes = buildCnaTypeList(); } private Select buildMutationTypeList() { @@ -42,8 +45,12 @@ private Select buildMutationTypeList() { public Select getMutationTypeList() { return mappedMutationTypes; } - + public Select getCnaTypeList() { + return mappedCnaTypes; + } + + public Select buildCnaTypeList() { if (alterationFilter.getCNAEventTypeSelect().hasNone()) { return Select.none(); } @@ -128,11 +135,17 @@ public boolean isSomeTierOptionsSelected() { return !isAllTierOptionsSelected() && !isNoTierOptionsSelected(); } - public boolean shouldApply() { + public boolean shouldApplyMutationAlterationFilter() { return isSomeDriverAnnotationsSelected() || isSomeMutationStatusSelected() || isSomeTierOptionsSelected() || mappedMutationTypes.hasNone() || (!mappedMutationTypes.hasNone() && !mappedMutationTypes.hasAll()); } + + public boolean shouldApplyCnaAlterationFilter() { + return isSomeDriverAnnotationsSelected() + || mappedCnaTypes.hasNone() + || (!mappedCnaTypes.hasNone() && !mappedCnaTypes.hasAll()); + } } diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java index 9100cb29b1b..8aa0d71321e 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java @@ -5,6 +5,7 @@ import org.cbioportal.model.AlterationCountByGene; import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCount; +import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.Sample; import org.cbioportal.persistence.helper.AlterationFilterHelper; import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; @@ -21,6 +22,9 @@ public interface StudyViewMapper { List getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, AlterationFilterHelper alterationFilterHelper); + List getCnaGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, + boolean applyPatientIdFilters, AlterationFilterHelper alterationFilterHelper); + List getPatientClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, List attributeIds, List filteredAttributeValues); @@ -44,4 +48,5 @@ List getClinicalDataCounts(StudyViewFilter studyViewFilter, C @MapKey("hugoGeneSymbol") Map getMatchingGenePanelIds(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, String alterationType); + int getTotalProfiledCountByAlterationType(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, String alterationType); } diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java index 5383d500900..309c26b087a 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java @@ -3,6 +3,7 @@ import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCount; import org.cbioportal.model.GenomicDataCount; +import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.Sample; import org.cbioportal.persistence.StudyViewRepository; import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; @@ -39,6 +40,13 @@ public List getMutatedGenes(StudyViewFilter studyViewFilt AlterationFilterHelper.build(studyViewFilter.getAlterationFilter())); } + @Override + public List getCnaGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + return mapper.getCnaGenes(studyViewFilter, categorizedClinicalDataCountFilter, + shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), + AlterationFilterHelper.build(studyViewFilter.getAlterationFilter())); + } + @Override public List getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List filteredAttributes) { return mapper.getClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), @@ -100,4 +108,10 @@ public Map getMatchingGenePanelIds(StudyViewFilte shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), alterationType); } + @Override + public int getTotalProfiledCountsByAlterationType(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, String alterationType) { + return mapper.getTotalProfiledCountByAlterationType(studyViewFilter, categorizedClinicalDataCountFilter, + shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), alterationType); + } + } \ No newline at end of file diff --git a/src/main/java/org/cbioportal/service/AlterationCountService.java b/src/main/java/org/cbioportal/service/AlterationCountService.java index 2ce5c649158..0b927e591e1 100644 --- a/src/main/java/org/cbioportal/service/AlterationCountService.java +++ b/src/main/java/org/cbioportal/service/AlterationCountService.java @@ -78,5 +78,6 @@ Pair, Long> getPatientCnaGeneCounts(List getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + List getCnaGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); } diff --git a/src/main/java/org/cbioportal/service/StudyViewColumnarService.java b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java index 7b2af099500..a8966d8fc2a 100644 --- a/src/main/java/org/cbioportal/service/StudyViewColumnarService.java +++ b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java @@ -4,6 +4,7 @@ import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCountItem; import org.cbioportal.model.GenomicDataCount; +import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.Sample; import org.cbioportal.web.parameter.StudyViewFilter; @@ -14,6 +15,7 @@ public interface StudyViewColumnarService { List getFilteredSamples(StudyViewFilter studyViewFilter); List getMutatedGenes(StudyViewFilter interceptedStudyViewFilter); + List getCnaGenes(StudyViewFilter interceptedStudyViewFilter); List getClinicalDataCounts(StudyViewFilter studyViewFilter, List filteredAttributes); diff --git a/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java b/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java index 6fc13d12294..7a57276013f 100644 --- a/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java @@ -1,5 +1,6 @@ package org.cbioportal.service.impl; +import org.apache.commons.lang3.SerializationUtils; import org.apache.commons.math3.util.Pair; import org.cbioportal.model.AlterationCountBase; import org.cbioportal.model.AlterationCountByGene; @@ -257,36 +258,48 @@ public Pair, Long> getPatientCnaGeneCounts(List getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { var alterationCountByGenes = studyViewRepository.getMutatedGenes(studyViewFilter, categorizedClinicalDataCountFilter); + return populateAlterationCounts(alterationCountByGenes, studyViewFilter, categorizedClinicalDataCountFilter, AlterationType.MUTATION_EXTENDED); + } + + public List getCnaGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + var copyNumberCountByGenes = studyViewRepository.getCnaGenes(studyViewFilter, categorizedClinicalDataCountFilter); + return populateAlterationCounts(copyNumberCountByGenes, studyViewFilter, categorizedClinicalDataCountFilter, AlterationType.COPY_NUMBER_ALTERATION); + } + + private < T extends AlterationCountByGene> List populateAlterationCounts(@NonNull List alterationCounts, + @NonNull StudyViewFilter studyViewFilter, + @NonNull CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, + @NonNull AlterationType alterationType) { + var updatedAlterationCounts = alterationCounts.stream().map(SerializationUtils::clone).toList(); var profiledCountsMap = studyViewRepository.getTotalProfiledCounts(studyViewFilter, categorizedClinicalDataCountFilter, - AlterationType.MUTATION_EXTENDED.toString()); - var profiledCountWithoutGenePanelData = studyViewRepository.getFilteredSamplesCount(studyViewFilter, categorizedClinicalDataCountFilter); + alterationType.toString()); + var profiledCountWithoutGenePanelData = studyViewRepository.getTotalProfiledCountsByAlterationType(studyViewFilter, categorizedClinicalDataCountFilter, alterationType.toString()); var matchingGenePanelIdsMap = studyViewRepository.getMatchingGenePanelIds(studyViewFilter, categorizedClinicalDataCountFilter, AlterationType.MUTATION_EXTENDED.toString()); - alterationCountByGenes.parallelStream() + updatedAlterationCounts .forEach(alterationCountByGene -> { String hugoGeneSymbol = alterationCountByGene.getHugoGeneSymbol(); - var matchingGenePanelIds = matchingGenePanelIdsMap.get(hugoGeneSymbol) != null ? + var matchingGenePanelIds = matchingGenePanelIdsMap.get(hugoGeneSymbol) != null ? matchingGenePanelIdsMap.get(hugoGeneSymbol).getMatchingGenePanelIds() : null; - + int totalProfiledCount = getTotalProfiledCount(alterationCountByGene.getHugoGeneSymbol(), profiledCountsMap, profiledCountWithoutGenePanelData, matchingGenePanelIds); - + alterationCountByGene.setNumberOfProfiledCases(totalProfiledCount); - + alterationCountByGene.setMatchingGenePanelIds(matchingGenePanelIds); - }); - - return alterationCountByGenes; + }); + return updatedAlterationCounts; } private int getTotalProfiledCount(@NonNull String hugoGeneSymbol, @NonNull Map profiledCountsMap, int profiledCountWithoutGenePanelData, @Nullable Set matchingGenePanelIds) { int totalProfiledCount = profiledCountWithoutGenePanelData; - if (hasGenePanelData(matchingGenePanelIds)) { - totalProfiledCount = profiledCountsMap.get(hugoGeneSymbol).getNumberOfProfiledCases(); + if (hasGenePanelData(matchingGenePanelIds) && profiledCountsMap.containsKey(hugoGeneSymbol)) { + totalProfiledCount = profiledCountsMap.get(hugoGeneSymbol).getNumberOfProfiledCases(); } return totalProfiledCount; } diff --git a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java index 554cdca0705..42c59686090 100644 --- a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java @@ -1,6 +1,12 @@ package org.cbioportal.service.impl; -import org.cbioportal.model.*; +import org.cbioportal.model.AlterationCountByGene; +import org.cbioportal.model.ClinicalData; +import org.cbioportal.model.ClinicalDataCount; +import org.cbioportal.model.ClinicalDataCountItem; +import org.cbioportal.model.CopyNumberCountByGene; +import org.cbioportal.model.GenomicDataCount; +import org.cbioportal.model.Sample; import org.cbioportal.persistence.StudyViewRepository; import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; import org.cbioportal.persistence.enums.ClinicalAttributeDataType; @@ -50,6 +56,11 @@ public List getGenomicDataCounts(StudyViewFilter studyViewFilt return studyViewRepository.getGenomicDataCounts(studyViewFilter, categorizedClinicalDataCountFilter); } + public List getCnaGenes(StudyViewFilter studyViewFilter) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); + return alterationCountService.getCnaGenes(studyViewFilter, categorizedClinicalDataCountFilter); + } + @Override public List getClinicalDataCounts(StudyViewFilter studyViewFilter, List filteredAttributes) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); diff --git a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java index 1daa69843e8..cfba847c2c8 100644 --- a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java +++ b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java @@ -2,6 +2,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; @@ -11,23 +12,11 @@ import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataBin; import org.cbioportal.model.ClinicalDataCountItem; +import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.DensityPlotData; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.Sample; import org.cbioportal.service.ClinicalDataDensityPlotService; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.media.ArraySchema; -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import jakarta.validation.Valid; -import org.apache.commons.collections4.CollectionUtils; -import org.cbioportal.model.AlterationCountByGene; -import org.cbioportal.model.AlterationFilter; -import org.cbioportal.model.ClinicalDataBin; -import org.cbioportal.model.ClinicalDataCountItem; -import org.cbioportal.model.Sample; import org.cbioportal.service.StudyViewColumnarService; import org.cbioportal.service.exception.StudyNotFoundException; import org.cbioportal.web.columnar.util.NewStudyViewFilterUtil; @@ -39,7 +28,6 @@ import org.cbioportal.web.parameter.StudyViewFilter; import org.cbioportal.web.util.DensityPlotParameters; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.cache.annotation.Cacheable; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -131,6 +119,19 @@ public ResponseEntity> fetchMolecularProfileSampleCounts( , HttpStatus.OK); } + @PostMapping(value = "/column-store/cna-genes/fetch", + consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + public ResponseEntity> fetchCnaGenes( + @RequestBody(required = false) StudyViewFilter studyViewFilter, + @RequestAttribute(required = false, value = "involvedCancerStudies") Collection involvedCancerStudies, + @RequestAttribute(required = false, value = "interceptedStudyViewFilter") StudyViewFilter interceptedStudyViewFilter + ) { + return new ResponseEntity<>( + studyViewColumnarService.getCnaGenes(interceptedStudyViewFilter), + HttpStatus.OK + ); + } + @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") @PostMapping(value = "/column-store/clinical-data-counts/fetch", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) diff --git a/src/main/resources/db-scripts/clickhouse/clickhouse.sql b/src/main/resources/db-scripts/clickhouse/clickhouse.sql index fb8f2c94885..a6c749d9e20 100644 --- a/src/main/resources/db-scripts/clickhouse/clickhouse.sql +++ b/src/main/resources/db-scripts/clickhouse/clickhouse.sql @@ -1,47 +1,38 @@ -DROP TABLE IF EXISTS genomic_event_mutation; -DROP TABLE IF EXISTS genomic_event; +DROP TABLE IF EXISTS genomic_event_derived; DROP TABLE IF EXISTS sample_to_gene_panel; DROP TABLE IF EXISTS gene_panel_to_gene; -CREATE TABLE IF NOT EXISTS genomic_event +CREATE TABLE IF NOT EXISTS genomic_event_derived ( sample_unique_id String, - variant String, - variant_type String, hugo_gene_symbol String, - gene_panel_stable_id String, - cancer_study_identifier String, - genetic_profile_stable_id String + gene_panel_stable_id LowCardinality(String), + cancer_study_identifier LowCardinality(String), + genetic_profile_stable_id LowCardinality(String), + variant_type LowCardinality(String), + mutation_variant String, + mutation_type LowCardinality(String), + mutation_status LowCardinality(String), + driver_filter LowCardinality(String), + driver_tiers_filter LowCardinality(String), + cna_alteration Nullable(Int8), + cna_cytoband String, + sv_event_info String ) ENGINE = MergeTree -ORDER BY ( variant_type, sample_unique_id, hugo_gene_symbol); - -CREATE TABLE IF NOT EXISTS genomic_event_mutation -( - sample_unique_id String, - variant String, - hugo_gene_symbol String, - gene_panel_stable_id String, - cancer_study_identifier String, - genetic_profile_stable_id String, - mutation_type String, - mutation_status String, - driver_filter String, - driver_tiers_filter String -) ENGINE = MergeTree -ORDER BY ( hugo_gene_symbol, genetic_profile_stable_id); +ORDER BY ( variant_type, hugo_gene_symbol, genetic_profile_stable_id, sample_unique_id); CREATE TABLE sample_to_gene_panel ( sample_unique_id String, - alteration_type String, - gene_panel_id String, - cancer_study_identifier String + alteration_type LowCardinality(String), + gene_panel_id LowCardinality(String), + cancer_study_identifier LowCardinality(String) ) ENGINE = MergeTree() ORDER BY (gene_panel_id, alteration_type, sample_unique_id); CREATE TABLE gene_panel_to_gene ( - gene_panel_id String, + gene_panel_id LowCardinality(String), gene String ) ENGINE = MergeTree() ORDER BY (gene_panel_id); \ No newline at end of file diff --git a/src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql b/src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql index 5595c729f8e..2a508ee1584 100644 --- a/src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql +++ b/src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql @@ -1,52 +1,70 @@ --- Genomic Event Mutation Data -Insert into genomic_event_mutation -SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) as sample_unique_id, - me.protein_change as variant, - gene.hugo_gene_symbol as hugo_gene_symbol, - gp.stable_id as gene_panel_stable_id, - cs.cancer_study_identifier as cancer_study_identifier, - g.stable_id as genetic_profile_stable_id, - me.mutation_type as mutation_type, - mutation.mutation_status as mutation_status, - 'NA' as driver_filter, - 'NA' as drivet_tiers_filter -FROM mutation - INNER JOIN mutation_event as me on mutation.mutation_event_id = me.mutation_event_id - INNER JOIN sample_profile sp - on mutation.sample_id = sp.sample_id and mutation.genetic_profile_id = sp.genetic_profile_id - LEFT JOIN gene_panel gp on sp.panel_id = gp.internal_id - LEFT JOIN genetic_profile g on sp.genetic_profile_id = g.genetic_profile_id - INNER JOIN cancer_study cs on g.cancer_study_id = cs.cancer_study_id - INNER JOIN sample on mutation.sample_id = sample.internal_id - LEFT JOIN gene on mutation.entrez_gene_id = gene.entrez_gene_id; +INSERT INTO sample_to_gene_panel +SELECT + concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_unique_id, + genetic_alteration_type AS alteration_type, + -- If a mutation is found in a gene that is not in a gene panel we assume Whole Exome Sequencing WES + ifnull(gene_panel.stable_id, 'WES') AS gene_panel_id, + cs.cancer_study_identifier AS cancer_study_identifier +FROM sample_profile sp + INNER JOIN genetic_profile gp ON sample_profile.genetic_profile_id = gp.genetic_profile_id + LEFT JOIN gene_panel ON sp.panel_id = gene_panel.internal_id + INNER JOIN sample ON sp.sample_id = sample.internal_id + INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id; + +INSERT INTO gene_panel_to_gene +SELECT + gp.stable_id AS gene_panel_id, + g.hugo_gene_symbol AS gene +FROM gene_panel gp + INNER JOIN gene_panel_list gpl ON gp.internal_id = gpl.internal_id + INNER JOIN gene g ON g.entrez_gene_id = gpl.gene_id +UNION ALL +SELECT + 'WES' AS gene_panel_id, + gene.hugo_gene_symbol AS gene +FROM gene +WHERE gene.entrez_gene_id > 0; --- Genomic Event Data -Insert into genomic_event -SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) as sample_unique_id, - me.protein_change as variant, - 'mutation' as variant_type, - gene.hugo_gene_symbol as hugo_gene_symbol, - gp.stable_id as gene_panel_stable_id, - cs.cancer_study_identifier as cancer_study_identifier, - g.stable_id as genetic_profile_stable_id +INSERT INTO genomic_event_derived +SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_unique_id, + gene.hugo_gene_symbol AS hugo_gene_symbol, + gp.stable_id AS gene_panel_stable_id, + cs.cancer_study_identifier AS cancer_study_identifier, + g.stable_id AS genetic_profile_stable_id, + 'mutation' AS variant_type, + me.protein_change AS mutation_variant, + me.mutation_type AS mutation_type, + mutation.mutation_status AS mutation_status, + 'NA' AS driver_filter, + 'NA' AS drivet_tiers_filter, + NULL AS cna_alteration, + '' AS cna_cytoband, + '' AS sv_event_info FROM mutation - INNER JOIN mutation_event as me on mutation.mutation_event_id = me.mutation_event_id + INNER JOIN mutation_event AS me ON mutation.mutation_event_id = me.mutation_event_id INNER JOIN sample_profile sp - on mutation.sample_id = sp.sample_id and mutation.genetic_profile_id = sp.genetic_profile_id - LEFT JOIN gene_panel gp on sp.panel_id = gp.internal_id - LEFT JOIN genetic_profile g on sp.genetic_profile_id = g.genetic_profile_id - INNER JOIN cancer_study cs on g.cancer_study_id = cs.cancer_study_id - INNER JOIN sample on mutation.sample_id = sample.internal_id - LEFT JOIN gene on mutation.entrez_gene_id = gene.entrez_gene_id + ON mutation.sample_id = sp.sample_id AND mutation.genetic_profile_id = sp.genetic_profile_id + LEFT JOIN gene_panel gp ON sp.panel_id = gp.internal_id + LEFT JOIN genetic_profile g ON sp.genetic_profile_id = g.genetic_profile_id + INNER JOIN cancer_study cs ON g.cancer_study_id = cs.cancer_study_id + INNER JOIN sample ON mutation.sample_id = sample.internal_id + LEFT JOIN gene ON mutation.entrez_gene_id = gene.entrez_gene_id UNION ALL -SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) as sample_unique_id, - toString(ce.alteration) as variant, - 'cna' as variant_type, - gene.hugo_gene_symbol as hugo_gene_symbol, - gp.stable_id as gene_panel_stable_id, - cs.cancer_study_identifier as cancer_study_identifier, - g.stable_id as genetic_profile_stable_id +SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_unique_id, + gene.hugo_gene_symbol AS hugo_gene_symbol, + gp.stable_id AS gene_panel_stable_id, + cs.cancer_study_identifier AS cancer_study_identifier, + g.stable_id AS genetic_profile_stable_id, + 'cna' AS variant_type, + 'NA' AS mutation_variant, + 'NA' AS mutation_type, + 'NA' AS mutation_status, + 'NA' AS driver_filter, + 'NA' AS drivet_tiers_filter, + ce.alteration AS cna_alteration, + rgg.cytoband AS cna_cytoband, + '' AS sv_event_info FROM cna_event ce INNER JOIN sample_cna_event sce ON ce.cna_event_id = sce.cna_event_id INNER JOIN sample_profile sp ON sce.sample_id = sp.sample_id AND sce.genetic_profile_id = sp.genetic_profile_id @@ -55,63 +73,48 @@ FROM cna_event ce INNER JOIN cancer_study cs ON g.cancer_study_id = cs.cancer_study_id INNER JOIN sample ON sce.sample_id = sample.internal_id INNER JOIN gene ON ce.entrez_gene_id = gene.entrez_gene_id + INNER JOIN reference_genome_gene rgg ON rgg.entrez_gene_id = ce.entrez_gene_id UNION ALL -SELECT - concat(cs.cancer_study_identifier, '_', s.stable_id) as sample_unique_id, - event_info as variant, - 'structural_variant' as variant_type, - gene2.hugo_gene_symbol as hugo_gene_symbol, - gene_panel.stable_id as gene_panel_stable_id, - cs.cancer_study_identifier as cancer_study_identifier, - gp.stable_id as genetic_profile_stable_id -FROM - structural_variant sv - INNER JOIN genetic_profile gp ON sv.genetic_profile_id = gp.genetic_profile_id - INNER JOIN sample s ON sv.sample_id = s.internal_id - INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id - INNER JOIN gene gene2 ON sv.site2_entrez_gene_id = gene2.entrez_gene_id - INNER JOIN sample_profile on s.internal_id = sample_profile.sample_id - INNER JOIN gene_panel on sample_profile.panel_id = gene_panel.internal_id -UNION ALL -SELECT - concat(cs.cancer_study_identifier, '_', s.stable_id) as sample_unique_id, - event_info as variant, - 'structural_variant' as variant_type, - gene1.hugo_gene_symbol as hugo_gene_symbol, - gene_panel.stable_id as gene_panel_stable_id, - cs.cancer_study_identifier as cancer_study_identifier, - gp.stable_id as genetic_profile_stable_id -FROM - structural_variant sv - INNER JOIN genetic_profile gp ON sv.genetic_profile_id = gp.genetic_profile_id - INNER JOIN sample s ON sv.sample_id = s.internal_id - INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id - INNER JOIN gene gene1 ON sv.site1_entrez_gene_id = gene1.entrez_gene_id - INNER JOIN sample_profile on s.internal_id = sample_profile.sample_id - INNER JOIN gene_panel on sample_profile.panel_id = gene_panel.internal_id; - -INSERT INTO sample_to_gene_panel -select - concat(cs.cancer_study_identifier, '_', sample.stable_id) as sample_unique_id, - genetic_alteration_type as alteration_type, - ifnull(gene_panel.stable_id, 'WES') as gene_panel_id, - cs.cancer_study_identifier as cancer_study_identifier -from sample_profile sp - inner join genetic_profile gp on sample_profile.genetic_profile_id = gp.genetic_profile_id - left join gene_panel on sp.panel_id = gene_panel.internal_id - inner join sample on sp.sample_id = sample.internal_id - inner join cancer_study cs on gp.cancer_study_id = cs.cancer_study_id; - -INSERT INTO gene_panel_to_gene -select - gp.stable_id as gene_panel_id, - g.hugo_gene_symbol as gene -from gene_panel gp - inner join gene_panel_list gpl ON gp.internal_id = gpl.internal_id - inner join gene g ON g.entrez_gene_id = gpl.gene_id +SELECT concat(cs.cancer_study_identifier, '_', s.stable_id) AS sample_unique_id, + gene2.hugo_gene_symbol AS hugo_gene_symbol, + gene_panel.stable_id AS gene_panel_stable_id, + cs.cancer_study_identifier AS cancer_study_identifier, + gp.stable_id AS genetic_profile_stable_id, + 'structural_variant' AS variant_type, + 'NA' AS mutation_variant, + 'NA' AS mutation_type, + 'NA' AS mutation_status, + 'NA' AS driver_filter, + 'NA' AS drivet_tiers_filter, + NULL AS cna_alteration, + '' AS cna_cytoband, + event_info AS sv_event_info +FROM structural_variant sv + INNER JOIN genetic_profile gp ON sv.genetic_profile_id = gp.genetic_profile_id + INNER JOIN sample s ON sv.sample_id = s.internal_id + INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id + INNER JOIN gene gene2 ON sv.site2_entrez_gene_id = gene2.entrez_gene_id + INNER JOIN sample_profile ON s.internal_id = sample_profile.sample_id + INNER JOIN gene_panel ON sample_profile.panel_id = gene_panel.internal_id UNION ALL -select - 'WES' as gene_panel_id, - gene.hugo_gene_symbol as gene -from gene -where gene.entrez_gene_id > 0; \ No newline at end of file +SELECT concat(cs.cancer_study_identifier, '_', s.stable_id) AS sample_unique_id, + gene1.hugo_gene_symbol AS hugo_gene_symbol, + gene_panel.stable_id AS gene_panel_stable_id, + cs.cancer_study_identifier AS cancer_study_identifier, + gp.stable_id AS genetic_profile_stable_id, + 'structural_variant' AS variant_type, + 'NA' AS mutation_variant, + 'NA' AS mutation_type, + 'NA' AS mutation_status, + 'NA' AS driver_filter, + 'NA' AS drivet_tiers_filter, + NULL AS cna_alteration, + '' AS cna_cytoband, + event_info AS sv_event_info +FROM structural_variant sv + INNER JOIN genetic_profile gp ON sv.genetic_profile_id = gp.genetic_profile_id + INNER JOIN sample s ON sv.sample_id = s.internal_id + INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id + INNER JOIN gene gene1 ON sv.site1_entrez_gene_id = gene1.entrez_gene_id + INNER JOIN sample_profile ON s.internal_id = sample_profile.sample_id + INNER JOIN gene_panel ON sample_profile.panel_id = gene_panel.internal_id; \ No newline at end of file diff --git a/src/main/resources/db-scripts/clickhouse/derived_tables.sql b/src/main/resources/db-scripts/clickhouse/derived_tables.sql index 3b2ffbcd17c..73a35cd4f69 100644 --- a/src/main/resources/db-scripts/clickhouse/derived_tables.sql +++ b/src/main/resources/db-scripts/clickhouse/derived_tables.sql @@ -1,5 +1,5 @@ -- clinical_data_derived -DROP TABLE IF EXISTS clinical_data_derived +DROP TABLE IF EXISTS clinical_data_derived; CREATE TABLE IF NOT EXISTS clinical_data_derived ( sample_unique_id String, @@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS clinical_data_derived type String ) ENGINE=MergeTree - ORDER BY sample_unique_id + ORDER BY sample_unique_id; -- Insert sample attribute data INSERT INTO TABLE clinical_data_derived @@ -27,7 +27,7 @@ FROM sling_db_2024_05_23_original.sample_mv AS sm ON cs.cancer_study_id = cam.cancer_study_id FULL OUTER JOIN sling_db_2024_05_23_original.clinical_sample AS csamp ON (sm.internal_id = csamp.internal_id) AND (csamp.attr_id = cam.attr_id) -WHERE cam.patient_attribute = 0 +WHERE cam.patient_attribute = 0; -- INSERT patient attribute data INSERT INTO TABLE clinical_data_derived @@ -43,4 +43,4 @@ FROM sling_db_2024_05_23_original.patient AS p ON cs.cancer_study_id = cam.cancer_study_id FULL OUTER JOIN sling_db_2024_05_23_original.clinical_patient AS clinpat ON (p.internal_id = clinpat.internal_id) AND (clinpat.attr_id = cam.attr_id) -WHERE cam.patient_attribute = 1 +WHERE cam.patient_attribute = 1; diff --git a/src/main/resources/db-scripts/clickhouse/materialized_views.sql b/src/main/resources/db-scripts/clickhouse/materialized_views.sql index c5168ae4b14..8595d6edb4d 100644 --- a/src/main/resources/db-scripts/clickhouse/materialized_views.sql +++ b/src/main/resources/db-scripts/clickhouse/materialized_views.sql @@ -1,216 +1,8 @@ DROP TABLE IF EXISTS sample_columnstore; DROP TABLE IF EXISTS sample_list_columnstore; -DROP TABLE IF EXISTS genomic_event; DROP VIEW IF EXISTS sample_columnstore_mv; DROP VIEW IF EXISTS sample_list_columnstore_mv; -CREATE TABLE sample_clinical_attribute_numeric -( - sample_unique_id VARCHAR(45), - patient_unique_id VARCHAR(45), - attribute_name VARCHAR(45), - attribute_value FLOAT, - cancer_study_identifier VARCHAR(45) -) - ENGINE = MergeTree() - ORDER BY (sample_unique_id, patient_unique_id, attribute_name, cancer_study_identifier); - -INSERT INTO sample_clinical_attribute_numeric -SELECT concat(cs.cancer_study_identifier, '_', s.stable_id) as sample_unique_id, - concat(cs.cancer_study_identifier, '_', p.stable_id) as patient_unique_id, - clinical_sample.attr_id as attribute_name, - cast(clinical_sample.attr_value as float) as attribute_value, - cs.cancer_study_identifier as cancer_study_identifier -FROM cancer_study cs - INNER JOIN patient p on cs.cancer_study_id = p.cancer_study_id - INNER JOIN sample s on p.internal_id = s.patient_id - INNER JOIN clinical_sample ON s.internal_id = clinical_sample.internal_id -WHERE match(clinical_sample.attr_value, '^[\d\.]+$'); - -CREATE MATERIALIZED VIEW sample_clinical_attribute_numeric_mv - TO sample_clinical_attribute_numeric AS -SELECT concat(cs.cancer_study_identifier, '_', s.stable_id) as sample_unique_id, - concat(cs.cancer_study_identifier, '_', p.stable_id) as patient_unique_id, - clinical_sample.attr_id as attribute_name, - cast(clinical_sample.attr_value as float) as attribute_value, - cs.cancer_study_identifier as cancer_study_identifier -FROM cancer_study cs - INNER JOIN patient p on cs.cancer_study_id = p.cancer_study_id - INNER JOIN sample s on p.internal_id = s.patient_id - INNER JOIN clinical_sample ON s.internal_id = clinical_sample.internal_id -WHERE match(clinical_sample.attr_value, '^[\d\.]+$'); - -CREATE TABLE sample_clinical_attribute_categorical -( - sample_unique_id VARCHAR(45), - patient_unique_id VARCHAR(45), - attribute_name VARCHAR(45), - attribute_value VARCHAR(45), - cancer_study_identifier VARCHAR(45) -) - ENGINE = MergeTree() - ORDER BY (sample_unique_id, patient_unique_id, attribute_name, cancer_study_identifier); - -INSERT INTO sample_clinical_attribute_categorical -SELECT concat(cs.cancer_study_identifier, '_', s.stable_id) as sample_unique_id, - concat(cs.cancer_study_identifier, '_', p.stable_id) as patient_unique_id, - cl.attr_id as attribute_name, - cl.attr_value as attribute_value, - cs.cancer_study_identifier as cancer_study_identifier -FROM cancer_study cs - INNER JOIN patient p on cs.cancer_study_id = p.cancer_study_id - INNER JOIN sample s on p.internal_id = s.patient_id - INNER JOIN clinical_sample cl on s.internal_id = cl.internal_id -WHERE NOT match(cl.attr_value, '^[\d\.]+$'); - -CREATE MATERIALIZED VIEW sample_clinical_attribute_categorical_mv - TO sample_clinical_attribute_categorical AS -SELECT concat(cs.cancer_study_identifier, '_', s.stable_id) as sample_unique_id, - concat(cs.cancer_study_identifier, '_', p.stable_id) as patient_unique_id, - cl.attr_id as attribute_name, - cl.attr_value as attribute_value, - cs.cancer_study_identifier as cancer_study_identifier -FROM cancer_study cs - INNER JOIN patient p on cs.cancer_study_id = p.cancer_study_id - INNER JOIN sample s on p.internal_id = s.patient_id - INNER JOIN clinical_sample cl on s.internal_id = cl.internal_id -WHERE NOT match(cl.attr_value, '^[\d\.]+$'); - -CREATE TABLE patient_clinical_attribute_numeric -( - patient_unique_id VARCHAR(45), - attribute_name VARCHAR(45), - attribute_value FLOAT, - cancer_study_identifier VARCHAR(45) -) - ENGINE = MergeTree() - ORDER BY (patient_unique_id, attribute_name, cancer_study_identifier); - -INSERT INTO patient_clinical_attribute_numeric -SELECT concat(cs.cancer_study_identifier, '_', p.stable_id) as patient_unique_id, - cp.attr_id as attribute_name, - cast(cp.attr_value as float) as attribute_value, - cs.cancer_study_identifier as cancer_study_identifier -FROM cancer_study cs - INNER JOIN patient p on cs.cancer_study_id = p.cancer_study_id - INNER JOIN clinical_patient cp on p.internal_id = cp.internal_id -WHERE match(cp.attr_value, '^[\d\.]+$'); - -CREATE MATERIALIZED VIEW patient_clinical_attribute_numeric_mv - TO patient_clinical_attribute_numeric AS -SELECT concat(cs.cancer_study_identifier, '_', p.stable_id) as patient_unique_id, - cp.attr_id as attribute_name, - cast(cp.attr_value as float) as attribute_value, - cs.cancer_study_identifier as cancer_study_identifier -FROM cancer_study cs - INNER JOIN patient p on cs.cancer_study_id = p.cancer_study_id - INNER JOIN clinical_patient cp on p.internal_id = cp.internal_id -WHERE match(cp.attr_value, '^[\d\.]+$'); - -CREATE TABLE patient_clinical_attribute_categorical -( - patient_unique_id VARCHAR(45), - attribute_name VARCHAR(45), - attribute_value VARCHAR(45), - cancer_study_identifier VARCHAR(45) -) - ENGINE = MergeTree() - ORDER BY (patient_unique_id, attribute_name, cancer_study_identifier); - -INSERT INTO patient_clinical_attribute_categorical -SELECT concat(cs.cancer_study_identifier, '_', p.stable_id) as patient_unique_id, - cp.attr_id as attribute_name, - cp.attr_value as attribute_value, - cs.cancer_study_identifier as cancer_study_identifier -FROM cancer_study cs - INNER JOIN patient p on cs.cancer_study_id = p.cancer_study_id - INNER JOIN clinical_patient cp on p.internal_id = cp.internal_id -WHERE NOT match(cp.attr_value, '^[\d\.]+$'); - ---patient_clinical_attribute_categorical_mv -DROP VIEW IF EXISTS patient_clinical_attribute_categorical_mv; -CREATE MATERIALIZED VIEW patient_clinical_attribute_categorical_mv - ENGINE = MergeTree() - ORDER BY cancer_study_identifier - SETTINGS allow_nullable_key = 1 - POPULATE -AS -SELECT concat(cs.cancer_study_identifier, '_', p.stable_id) AS patient_unique_id, - cp.attr_id AS attribute_name, - cp.attr_value AS attribute_value, - cs.cancer_study_identifier AS cancer_study_identifier -FROM clinical_patient AS cp - INNER JOIN patient AS p ON cp.internal_id = p.internal_id - INNER JOIN cancer_study AS cs ON p.cancer_study_id = cs.cancer_study_id - INNER JOIN clinical_attribute_meta AS cam - ON (cp.attr_id = cam.attr_id) AND (cs.cancer_study_id = cam.cancer_study_id) -WHERE cam.datatype = 'STRING' - - ---patient_clinical_attribute_numeric_mv -DROP VIEW IF EXISTS patient_clinical_attribute_numeric_mv; -CREATE MATERIALIZED VIEW patient_clinical_attribute_numeric_mv - ENGINE = MergeTree() - ORDER BY cancer_study_identifier - SETTINGS allow_nullable_key = 1 - POPULATE -AS -SELECT concat(cs.cancer_study_identifier, '_', p.stable_id) AS patient_unique_id, - cp.attr_id AS attribute_name, - cp.attr_value AS attribute_value, - cs.cancer_study_identifier AS cancer_study_identifier -FROM sling_db_2024_05_23_original.clinical_patient AS cp - INNER JOIN sling_db_2024_05_23_original.patient AS p ON cp.internal_id = p.internal_id - INNER JOIN sling_db_2024_05_23_original.cancer_study AS cs ON p.cancer_study_id = cs.cancer_study_id - INNER JOIN sling_db_2024_05_23_original.clinical_attribute_meta AS cam - ON (cp.attr_id = cam.attr_id) AND (cs.cancer_study_id = cam.cancer_study_id) -WHERE cam.datatype = 'NUMBER' - --- sample_clinical_attribute_categorical_mv -DROP VIEW IF EXISTS sample_clinical_attribute_categorical_mv; -CREATE MATERIALIZED VIEW sample_clinical_attribute_categorical_mv - ENGINE = MergeTree() - ORDER BY cancer_study_identifier - SETTINGS allow_nullable_key = 1 - POPULATE -AS -SELECT s.sample_unique_id, - s.patient_unique_id, - csamp.attr_id AS attribute_name, - csamp.attr_value AS attribute_value, - s.cancer_study_identifier AS cancer_study_identifier -FROM sling_db_2024_05_23_original.clinical_sample AS csamp - INNER JOIN sling_db_2024_05_23_original.sample_mv AS s ON csamp.internal_id = s.internal_id - INNER JOIN sling_db_2024_05_23_original.cancer_study AS cs - ON s.cancer_study_identifier = cs.cancer_study_identifier - INNER JOIN sling_db_2024_05_23_original.clinical_attribute_meta AS cam - ON (csamp.attr_id = cam.attr_id) AND (cs.cancer_study_id = cam.cancer_study_id) -WHERE cam.datatype = 'STRING' - --- sample_clinical_attribute_numeric_mv -DROP VIEW IF EXISTS sample_clinical_attribute_numeric_mv; -CREATE MATERIALIZED VIEW sample_clinical_attribute_numeric_mv - ENGINE = MergeTree() - ORDER BY cancer_study_identifier - SETTINGS allow_nullable_key = 1 - POPULATE -AS -SELECT s.sample_unique_id, - s.patient_unique_id, - csamp.attr_id AS attribute_name, - csamp.attr_value AS attribute_value, - s.cancer_study_identifier AS cancer_study_identifier -FROM clinical_sample AS csamp - INNER JOIN sample_mv AS s ON csamp.internal_id = s.internal_id - INNER JOIN cancer_study AS cs - ON s.cancer_study_identifier = cs.cancer_study_identifier - INNER JOIN clinical_attribute_meta AS cam - ON (csamp.attr_id = cam.attr_id) AND (cs.cancer_study_id = cam.cancer_study_id) -WHERE cam.datatype = 'NUMBER' - - - - -- sample_columnstore CREATE TABLE IF NOT EXISTS sample_columnstore ( diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewAlterationFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewAlterationFilterMapper.xml index 28e537b309b..a8a8a27283a 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewAlterationFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewAlterationFilterMapper.xml @@ -7,7 +7,7 @@ NULL AND - lower(genomic_event_mutation.mutation_type) + lower(genomic_event_derived.mutation_type) NOT IN @@ -24,6 +24,20 @@ + + + + NULL + + cna_event.ALTERATION IN + + #{type} + + + + + @@ -31,15 +45,15 @@ OR - lower(genomic_event_mutation.mutation_status) LIKE '%germline%' + lower(genomic_event_derived.mutation_status) LIKE '%germline%' OR - lower(genomic_event_mutation.mutation_status) = 'somatic' + lower(genomic_event_derived.mutation_status) = 'somatic' OR - lower(genomic_event_mutation.mutation_status) != 'somatic' AND lower(genomic_event_mutation.mutation_status) NOT LIKE '%germline%' + lower(genomic_event_derived.mutation_status) != 'somatic' AND lower(genomic_event_derived.mutation_status) NOT LIKE '%germline%' diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index f85569a049c..a4e8ef679d8 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -53,19 +53,20 @@ SELECT sample_unique_id - FROM genomic_event_mutation + FROM genomic_event_derived genetic_profile_stable_id IN #{molecularProfileId} - AND hugo_gene_symbol IN ( - - #{geneFilterQuery.hugoGeneSymbol} + + + hugo_gene_symbol = #{geneFilterQuery.hugoGeneSymbol} + + cna_alteration = #{alteration.code} + - ) - diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index 2c204a3c64c..73376a25f6d 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -29,14 +29,11 @@ 1 as entrezGeneId, COUNT(DISTINCT sample_unique_id) as numberOfAlteredCases, COUNT(*) as totalCount - FROM genomic_event_mutation + FROM genomic_event_derived - sample_unique_id IN ( - - INTERSECT - - ) - + variant_type = 'mutation' AND + + @@ -44,6 +41,27 @@ ORDER BY totalCount DESC; + + + + SELECT + COUNT(DISTINCT sample_unique_id) + FROM sample_to_gene_panel stgp + + stgp.alteration_type = '${alterationType}' + AND + + + + + @@ -288,10 +314,7 @@ from sample_to_gene_panel alteration_type = '${alterationType}' AND - sample_unique_id IN ( ) - - AND patient_unique_id IN () - + ) @@ -306,4 +329,11 @@ + + + sample_unique_id IN ( ) + + AND patient_unique_id IN () + + diff --git a/src/test/java/org/cbioportal/persistence/helper/AlterationFilterHelperTest.java b/src/test/java/org/cbioportal/persistence/helper/AlterationFilterHelperTest.java index d0cd5f244bc..c2884acab53 100644 --- a/src/test/java/org/cbioportal/persistence/helper/AlterationFilterHelperTest.java +++ b/src/test/java/org/cbioportal/persistence/helper/AlterationFilterHelperTest.java @@ -161,7 +161,7 @@ public void shouldApply() { alterationFilter.setIncludeDriver(true); alterationFilter.setIncludeVUS(false); alterationFilter.setIncludeUnknownOncogenicity(false); - assertTrue(AlterationFilterHelper.build(alterationFilter).shouldApply()); + assertTrue(AlterationFilterHelper.build(alterationFilter).shouldApplyMutationAlterationFilter()); } } \ No newline at end of file From 505847b19802785b582376a8210e07c0d6d3a549 Mon Sep 17 00:00:00 2001 From: Charles Haynes <33608920+haynescd@users.noreply.github.com> Date: Mon, 24 Jun 2024 12:36:45 -0400 Subject: [PATCH 16/87] :sparkles: Add StructuralVariant-genes endpoint (#10854) * :sparkles: Add StructuralVariant-genes endpoint * Fix sonar issues * Update MatchingGenePanel request to return list * Create and use sample_derive * Update where sample_derived is stored to fix unit test --- .../persistence/StudyViewRepository.java | 6 ++- .../mybatisclickhouse/StudyViewMapper.java | 6 ++- .../StudyViewMyBatisRepository.java | 17 +++++- .../typehandler/GenePanelIdsTypeHandler.java | 39 -------------- .../service/AlterationCountService.java | 2 + .../service/StudyViewColumnarService.java | 1 + .../impl/AlterationCountServiceImpl.java | 16 ++++-- .../impl/StudyViewColumnarServiceImpl.java | 6 +++ .../StudyViewColumnStoreController.java | 16 ++++++ .../db-scripts/clickhouse/clickhouse.sql | 16 +++++- .../clickhouse/clickhouse_migration.sql | 42 ++++++++++----- .../db-scripts/clickhouse/derived_tables.sql | 17 +++--- .../StudyViewFilterMapper.xml | 12 ++--- .../mybatisclickhouse/StudyViewMapper.xml | 52 ++++++++++--------- 14 files changed, 146 insertions(+), 102 deletions(-) delete mode 100644 src/main/java/org/cbioportal/persistence/mybatisclickhouse/typehandler/GenePanelIdsTypeHandler.java diff --git a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java index 3ff72d01829..f866cf1442c 100644 --- a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java +++ b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java @@ -3,8 +3,8 @@ import org.cbioportal.model.AlterationCountByGene; import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCount; -import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.CopyNumberCountByGene; +import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.Sample; import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; import org.cbioportal.persistence.enums.ClinicalAttributeDataType; @@ -13,6 +13,7 @@ import java.util.List; import java.util.Map; +import java.util.Set; public interface StudyViewRepository { List getFilteredSamples(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); @@ -24,6 +25,7 @@ public interface StudyViewRepository { List getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); List getCnaGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + List getStructuralVariantGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); List getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List filteredAttributes); @@ -39,7 +41,7 @@ public interface StudyViewRepository { int getFilteredSamplesCount(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); - Map getMatchingGenePanelIds(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, String alterationType); + Map> getMatchingGenePanelIds(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, String alterationType); int getTotalProfiledCountsByAlterationType(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, String alterationType); } diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java index 8aa0d71321e..7a279943289 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java @@ -24,6 +24,9 @@ List getMutatedGenes(StudyViewFilter studyViewFilter, Cat List getCnaGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, AlterationFilterHelper alterationFilterHelper); + + List getStructuralVariantGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, + boolean applyPatientIdFilters, AlterationFilterHelper alterationFilterHelper); List getPatientClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, List attributeIds, List filteredAttributeValues); @@ -45,8 +48,7 @@ List getClinicalDataCounts(StudyViewFilter studyViewFilter, C int getFilteredSamplesCount(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); - @MapKey("hugoGeneSymbol") - Map getMatchingGenePanelIds(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, String alterationType); + List getMatchingGenePanelIds(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, String alterationType); int getTotalProfiledCountByAlterationType(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, String alterationType); } diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java index 309c26b087a..6dbc760d097 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java @@ -2,6 +2,7 @@ import org.cbioportal.model.AlterationCountByGene; import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCount; +import org.cbioportal.model.GenePanelToGene; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.Sample; @@ -16,6 +17,8 @@ import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; @Repository public class StudyViewMyBatisRepository implements StudyViewRepository { @@ -47,6 +50,13 @@ public List getCnaGenes(StudyViewFilter studyViewFilter, AlterationFilterHelper.build(studyViewFilter.getAlterationFilter())); } + @Override + public List getStructuralVariantGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + return mapper.getStructuralVariantGenes(studyViewFilter, categorizedClinicalDataCountFilter, + shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), + AlterationFilterHelper.build(studyViewFilter.getAlterationFilter())); + } + @Override public List getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List filteredAttributes) { return mapper.getClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), @@ -103,9 +113,12 @@ public int getFilteredSamplesCount(StudyViewFilter studyViewFilter, CategorizedC } @Override - public Map getMatchingGenePanelIds(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, String alterationType) { + public Map> getMatchingGenePanelIds(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, String alterationType) { return mapper.getMatchingGenePanelIds(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), alterationType); + shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), alterationType) + .stream() + .collect(Collectors.groupingBy(GenePanelToGene::getHugoGeneSymbol, + Collectors.mapping(GenePanelToGene::getGenePanelId, Collectors.toSet()))); } @Override diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/typehandler/GenePanelIdsTypeHandler.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/typehandler/GenePanelIdsTypeHandler.java deleted file mode 100644 index 397cdf01bd2..00000000000 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/typehandler/GenePanelIdsTypeHandler.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.cbioportal.persistence.mybatisclickhouse.typehandler; - -import org.apache.ibatis.type.BaseTypeHandler; -import org.apache.ibatis.type.JdbcType; - -import java.sql.CallableStatement; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.HashSet; -import java.util.Set; -import java.util.Arrays; - -public class GenePanelIdsTypeHandler extends BaseTypeHandler> { - - @Override - public void setNonNullParameter(PreparedStatement ps, int i, Set parameter, JdbcType jdbcType) throws SQLException { - // Convert Set to array for storage (if needed) - throw new UnsupportedOperationException("Storage of GenePanelIds not supported"); - } - - @Override - public Set getNullableResult(ResultSet rs, String columnName) throws SQLException { - String[] array = (String[]) rs.getArray(columnName).getArray(); - return new HashSet<>(Arrays.asList(array)); - } - - @Override - public Set getNullableResult(ResultSet rs, int columnIndex) throws SQLException { - String[] array = (String[]) rs.getArray(columnIndex).getArray(); - return new HashSet<>(Arrays.asList(array)); - } - - @Override - public Set getNullableResult(CallableStatement cs, int columnIndex) throws SQLException { - String[] array = (String[]) cs.getArray(columnIndex).getArray(); - return new HashSet<>(Arrays.asList(array)); - } -} diff --git a/src/main/java/org/cbioportal/service/AlterationCountService.java b/src/main/java/org/cbioportal/service/AlterationCountService.java index 0b927e591e1..2e02a4be518 100644 --- a/src/main/java/org/cbioportal/service/AlterationCountService.java +++ b/src/main/java/org/cbioportal/service/AlterationCountService.java @@ -80,4 +80,6 @@ Pair, Long> getPatientCnaGeneCounts(List getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); List getCnaGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + List getStructuralVariantGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + } diff --git a/src/main/java/org/cbioportal/service/StudyViewColumnarService.java b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java index a8966d8fc2a..91ed7b8c647 100644 --- a/src/main/java/org/cbioportal/service/StudyViewColumnarService.java +++ b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java @@ -16,6 +16,7 @@ public interface StudyViewColumnarService { List getMutatedGenes(StudyViewFilter interceptedStudyViewFilter); List getCnaGenes(StudyViewFilter interceptedStudyViewFilter); + List getStructuralVariantGenes(StudyViewFilter studyViewFilter); List getClinicalDataCounts(StudyViewFilter studyViewFilter, List filteredAttributes); diff --git a/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java b/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java index 7a57276013f..c1770e41e18 100644 --- a/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java @@ -265,7 +265,13 @@ public List getCnaGenes(StudyViewFilter studyViewFilter, var copyNumberCountByGenes = studyViewRepository.getCnaGenes(studyViewFilter, categorizedClinicalDataCountFilter); return populateAlterationCounts(copyNumberCountByGenes, studyViewFilter, categorizedClinicalDataCountFilter, AlterationType.COPY_NUMBER_ALTERATION); } - + + @Override + public List getStructuralVariantGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + var alterationCountByGenes = studyViewRepository.getStructuralVariantGenes(studyViewFilter, categorizedClinicalDataCountFilter); + return populateAlterationCounts(alterationCountByGenes, studyViewFilter, categorizedClinicalDataCountFilter, AlterationType.STRUCTURAL_VARIANT); + } + private < T extends AlterationCountByGene> List populateAlterationCounts(@NonNull List alterationCounts, @NonNull StudyViewFilter studyViewFilter, @NonNull CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, @@ -276,13 +282,13 @@ private < T extends AlterationCountByGene> List populateAlterationCounts(@Non alterationType.toString()); var profiledCountWithoutGenePanelData = studyViewRepository.getTotalProfiledCountsByAlterationType(studyViewFilter, categorizedClinicalDataCountFilter, alterationType.toString()); var matchingGenePanelIdsMap = studyViewRepository.getMatchingGenePanelIds(studyViewFilter, - categorizedClinicalDataCountFilter, AlterationType.MUTATION_EXTENDED.toString()); + categorizedClinicalDataCountFilter, alterationType.toString()); - updatedAlterationCounts + updatedAlterationCounts.parallelStream() .forEach(alterationCountByGene -> { String hugoGeneSymbol = alterationCountByGene.getHugoGeneSymbol(); - var matchingGenePanelIds = matchingGenePanelIdsMap.get(hugoGeneSymbol) != null ? - matchingGenePanelIdsMap.get(hugoGeneSymbol).getMatchingGenePanelIds() : null; + Set matchingGenePanelIds = matchingGenePanelIdsMap.get(hugoGeneSymbol) != null ? + matchingGenePanelIdsMap.get(hugoGeneSymbol) : Collections.emptySet(); int totalProfiledCount = getTotalProfiledCount(alterationCountByGene.getHugoGeneSymbol(), profiledCountsMap, profiledCountWithoutGenePanelData, matchingGenePanelIds); diff --git a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java index 42c59686090..83916d0c369 100644 --- a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java @@ -61,6 +61,12 @@ public List getCnaGenes(StudyViewFilter studyViewFilter) return alterationCountService.getCnaGenes(studyViewFilter, categorizedClinicalDataCountFilter); } + @Override + public List getStructuralVariantGenes(StudyViewFilter studyViewFilter) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); + return alterationCountService.getStructuralVariantGenes(studyViewFilter, categorizedClinicalDataCountFilter); + } + @Override public List getClinicalDataCounts(StudyViewFilter studyViewFilter, List filteredAttributes) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); diff --git a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java index cfba847c2c8..cf06ef4ae76 100644 --- a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java +++ b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java @@ -132,6 +132,22 @@ public ResponseEntity> fetchCnaGenes( ); } + @PostMapping(value = "/column-store/structuralvariant-genes/fetch", + consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + @Operation(description = "Fetch structural variant genes by study view filter") + @ApiResponse(responseCode = "200", description = "OK", + content = @Content(array = @ArraySchema(schema = @Schema(implementation = AlterationCountByGene.class)))) + public ResponseEntity> fetchStructuralVariantGenes( + @Parameter(required = true, description = "Study view filter") + @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter, + @Parameter(hidden = true) // prevent reference to this attribute in the swagger-ui interface. This attribute is needed for the @PreAuthorize tag above. + @RequestAttribute(required = false, value = "involvedCancerStudies") Collection involvedCancerStudies, + @Parameter(hidden = true) // prevent reference to this attribute in the swagger-ui interface. + @Valid @RequestAttribute(required = false, value = "interceptedStudyViewFilter") StudyViewFilter interceptedStudyViewFilter + ) { + return new ResponseEntity<>(studyViewColumnarService.getStructuralVariantGenes(interceptedStudyViewFilter), HttpStatus.OK); + } + @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") @PostMapping(value = "/column-store/clinical-data-counts/fetch", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) diff --git a/src/main/resources/db-scripts/clickhouse/clickhouse.sql b/src/main/resources/db-scripts/clickhouse/clickhouse.sql index a6c749d9e20..828c358d9f1 100644 --- a/src/main/resources/db-scripts/clickhouse/clickhouse.sql +++ b/src/main/resources/db-scripts/clickhouse/clickhouse.sql @@ -35,4 +35,18 @@ CREATE TABLE gene_panel_to_gene gene_panel_id LowCardinality(String), gene String ) ENGINE = MergeTree() -ORDER BY (gene_panel_id); \ No newline at end of file +ORDER BY (gene_panel_id); + +CREATE TABLE sample_derived +( + sample_unique_id String, + sample_unique_id_base64 String, + sample_stable_id String, + patient_unique_id String, + patient_unique_id_base64 String, + patient_stable_id String, + cancer_study_identifier LowCardinality(String), + internal_id Int +) + ENGINE = MergeTree + ORDER BY (cancer_study_identifier, sample_unique_id); \ No newline at end of file diff --git a/src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql b/src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql index 2a508ee1584..55c8e48d9b3 100644 --- a/src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql +++ b/src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql @@ -29,7 +29,7 @@ WHERE gene.entrez_gene_id > 0; INSERT INTO genomic_event_derived SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_unique_id, gene.hugo_gene_symbol AS hugo_gene_symbol, - gp.stable_id AS gene_panel_stable_id, + ifNull(gp.stable_id, 'WES') AS gene_panel_stable_id, cs.cancer_study_identifier AS cancer_study_identifier, g.stable_id AS genetic_profile_stable_id, 'mutation' AS variant_type, @@ -53,7 +53,7 @@ FROM mutation UNION ALL SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_unique_id, gene.hugo_gene_symbol AS hugo_gene_symbol, - gp.stable_id AS gene_panel_stable_id, + ifNull(gp.stable_id, 'WES') AS gene_panel_stable_id, cs.cancer_study_identifier AS cancer_study_identifier, g.stable_id AS genetic_profile_stable_id, 'cna' AS variant_type, @@ -68,7 +68,7 @@ SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_uniqu FROM cna_event ce INNER JOIN sample_cna_event sce ON ce.cna_event_id = sce.cna_event_id INNER JOIN sample_profile sp ON sce.sample_id = sp.sample_id AND sce.genetic_profile_id = sp.genetic_profile_id - INNER JOIN gene_panel gp ON sp.panel_id = gp.internal_id + LEFT JOIN gene_panel gp ON sp.panel_id = gp.internal_id INNER JOIN genetic_profile g ON sp.genetic_profile_id = g.genetic_profile_id INNER JOIN cancer_study cs ON g.cancer_study_id = cs.cancer_study_id INNER JOIN sample ON sce.sample_id = sample.internal_id @@ -76,8 +76,8 @@ FROM cna_event ce INNER JOIN reference_genome_gene rgg ON rgg.entrez_gene_id = ce.entrez_gene_id UNION ALL SELECT concat(cs.cancer_study_identifier, '_', s.stable_id) AS sample_unique_id, - gene2.hugo_gene_symbol AS hugo_gene_symbol, - gene_panel.stable_id AS gene_panel_stable_id, + gene.hugo_gene_symbol AS hugo_gene_symbol, + ifNull(gene_panel.stable_id, 'WES') AS gene_panel_stable_id, cs.cancer_study_identifier AS cancer_study_identifier, gp.stable_id AS genetic_profile_stable_id, 'structural_variant' AS variant_type, @@ -93,13 +93,13 @@ FROM structural_variant sv INNER JOIN genetic_profile gp ON sv.genetic_profile_id = gp.genetic_profile_id INNER JOIN sample s ON sv.sample_id = s.internal_id INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id - INNER JOIN gene gene2 ON sv.site2_entrez_gene_id = gene2.entrez_gene_id - INNER JOIN sample_profile ON s.internal_id = sample_profile.sample_id - INNER JOIN gene_panel ON sample_profile.panel_id = gene_panel.internal_id + INNER JOIN gene ON sv.site1_entrez_gene_id = gene.entrez_gene_id + INNER JOIN sample_profile ON s.internal_id = sample_profile.sample_id AND sample_profile.genetic_profile_id = sv.genetic_profile_id + LEFT JOIN gene_panel ON sample_profile.panel_id = gene_panel.internal_id UNION ALL SELECT concat(cs.cancer_study_identifier, '_', s.stable_id) AS sample_unique_id, - gene1.hugo_gene_symbol AS hugo_gene_symbol, - gene_panel.stable_id AS gene_panel_stable_id, + gene.hugo_gene_symbol AS hugo_gene_symbol, + ifNull(gene_panel.stable_id, 'WES') AS gene_panel_stable_id, cs.cancer_study_identifier AS cancer_study_identifier, gp.stable_id AS genetic_profile_stable_id, 'structural_variant' AS variant_type, @@ -115,6 +115,22 @@ FROM structural_variant sv INNER JOIN genetic_profile gp ON sv.genetic_profile_id = gp.genetic_profile_id INNER JOIN sample s ON sv.sample_id = s.internal_id INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id - INNER JOIN gene gene1 ON sv.site1_entrez_gene_id = gene1.entrez_gene_id - INNER JOIN sample_profile ON s.internal_id = sample_profile.sample_id - INNER JOIN gene_panel ON sample_profile.panel_id = gene_panel.internal_id; \ No newline at end of file + INNER JOIN gene ON sv.site2_entrez_gene_id = gene.entrez_gene_id + INNER JOIN sample_profile ON s.internal_id = sample_profile.sample_id AND sample_profile.genetic_profile_id = sv.genetic_profile_id + LEFT JOIN gene_panel ON sample_profile.panel_id = gene_panel.internal_id +WHERE + sv.site2_entrez_gene_id != sv.site1_entrez_gene_id + OR sv.site1_entrez_gene_id IS NULL; + +INSERT INTO sample_derived +SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_unique_id, + base64Encode(sample.stable_id) AS sample_unique_id_base64, + sample.stable_id AS sample_stable_id, + concat(cs.cancer_study_identifier, '_', p.stable_id) AS patient_unique_id, + p.stable_id AS patient_stable_id, + base64Encode(p.stable_id) AS patient_unique_id_base64, + cs.cancer_study_identifier AS cancer_study_identifier, + sample.internal_id AS internal_id +FROM sample + INNER JOIN patient AS p ON sample.patient_id = p.internal_id + INNER JOIN cancer_study AS cs ON p.cancer_study_id = cs.cancer_study_id \ No newline at end of file diff --git a/src/main/resources/db-scripts/clickhouse/derived_tables.sql b/src/main/resources/db-scripts/clickhouse/derived_tables.sql index 73a35cd4f69..0e982ed106f 100644 --- a/src/main/resources/db-scripts/clickhouse/derived_tables.sql +++ b/src/main/resources/db-scripts/clickhouse/derived_tables.sql @@ -20,12 +20,12 @@ SELECT sm.sample_unique_id AS sample_unique_id, csamp.attr_value AS attribute_value, cs.cancer_study_identifier AS cancer_study_identifier, 'sample' AS type -FROM sling_db_2024_05_23_original.sample_mv AS sm - INNER JOIN sling_db_2024_05_23_original.cancer_study AS cs +FROM sample_mv AS sm + INNER JOIN cancer_study AS cs ON sm.cancer_study_identifier = cs.cancer_study_identifier - FULL OUTER JOIN sling_db_2024_05_23_original.clinical_attribute_meta AS cam + FULL OUTER JOIN clinical_attribute_meta AS cam ON cs.cancer_study_id = cam.cancer_study_id - FULL OUTER JOIN sling_db_2024_05_23_original.clinical_sample AS csamp + FULL OUTER JOIN clinical_sample AS csamp ON (sm.internal_id = csamp.internal_id) AND (csamp.attr_id = cam.attr_id) WHERE cam.patient_attribute = 0; @@ -37,10 +37,11 @@ SELECT NULL AS sample_unique_id, clinpat.attr_value AS attribute_value, cs.cancer_study_identifier AS cancer_study_identifier, 'patient' AS type -FROM sling_db_2024_05_23_original.patient AS p - INNER JOIN sling_db_2024_05_23_original.cancer_study AS cs ON p.cancer_study_id = cs.cancer_study_id - FULL OUTER JOIN sling_db_2024_05_23_original.clinical_attribute_meta AS cam +FROM patient AS p + INNER JOIN cancer_study AS cs ON p.cancer_study_id = cs.cancer_study_id + FULL OUTER JOIN clinical_attribute_meta AS cam ON cs.cancer_study_id = cam.cancer_study_id - FULL OUTER JOIN sling_db_2024_05_23_original.clinical_patient AS clinpat + FULL OUTER JOIN clinical_patient AS clinpat ON (p.internal_id = clinpat.internal_id) AND (clinpat.attr_id = cam.attr_id) WHERE cam.patient_attribute = 1; + diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index a4e8ef679d8..58cbfe48b0d 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -5,9 +5,9 @@ - INTERSECT + INTERSECT SELECT sample_unique_id - FROM sample_mv + FROM sample_derived WHERE cancer_study_identifier IN #{studyId} @@ -19,13 +19,13 @@ INTERSECT SELECT * FROM ( - SELECT sample_mv.sample_unique_id + SELECT sample_derived.sample_unique_id FROM sample_profile JOIN genetic_profile gp ON sample_profile.genetic_profile_id = gp.genetic_profile_id JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id - JOIN sample_mv on sample_profile.sample_id = sample_mv.internal_id + JOIN sample_derived on sample_profile.sample_id = sample_derived.internal_id - sample_mv.cancer_study_identifier IN + sample_derived.cancer_study_identifier IN #{studyId} @@ -43,7 +43,7 @@ INTERSECT SELECT sample_unique_id - FROM sample_mv + FROM sample_derived WHERE sample_unique_id IN '${sampleIdentifier.studyId}_${sampleIdentifier.sampleId}' diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index 73376a25f6d..55b8b529857 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -11,7 +11,7 @@ cancer_study_identifier as cancerStudyIdentifier, sample_unique_id_base64 as uniqueSampleKey, patient_unique_id_base64 as uniquePatientKey - FROM sample_mv + FROM sample_derived sample_unique_id IN ( ) @@ -23,7 +23,7 @@ - SELECT hugo_gene_symbol as hugoGeneSymbol, 1 as entrezGeneId, @@ -37,8 +37,7 @@ - GROUP BY hugo_gene_symbol - ORDER BY totalCount DESC; + GROUP BY hugo_gene_symbol; @@ -58,8 +57,21 @@ - GROUP BY hugo_gene_symbol, alteration, cytoband - ORDER BY totalCount DESC; + GROUP BY hugo_gene_symbol, alteration, cytoband; + + + @@ -127,16 +139,16 @@ @@ -176,7 +188,7 @@ sample_unique_id IN ( INTERSECT - SELECT sample_unique_id from sample_mv WHERE sample_mv.patient_unique_id IN + SELECT sample_unique_id from sample_derived WHERE sample_derived.patient_unique_id IN () ) @@ -239,7 +251,7 @@ SELECT sample_unique_id - FROM sample_mv + FROM sample_derived patient_unique_id IN () @@ -247,7 +259,7 @@ SELECT patient_unique_id - FROM sample_mv + FROM sample_derived sample_unique_id IN () @@ -296,17 +308,17 @@ - SELECT gene as hugoGeneSymbol, - arrayFilter(x -> x != '', groupArray( distinct gene_panel_id)) as matchingGenePanelIds + gene_panel_id as genePanelId FROM gene_panel_to_gene gene_panel_id in ( @@ -318,17 +330,9 @@ ) - GROUP BY gene; + GROUP BY gene, gene_panel_id; - - - - - - - - sample_unique_id IN ( ) From 74b735d35f3ed7656c013ef672b73551beb495b1 Mon Sep 17 00:00:00 2001 From: alisman Date: Mon, 24 Jun 2024 13:46:14 -0400 Subject: [PATCH 17/87] Implement study view sample-lists-counts endpoint in Clickhouse (#10849) Co-authored-by: Bryan Lai --- .../persistence/StudyViewRepository.java | 4 ++++ .../mybatisclickhouse/StudyViewMapper.java | 6 ++++- .../StudyViewMyBatisRepository.java | 6 +++++ .../service/StudyViewColumnarService.java | 3 +++ .../impl/StudyViewColumnarServiceImpl.java | 9 ++++++++ .../web/columnar/ClinicalDataBinner.java | 2 ++ .../StudyViewColumnStoreController.java | 17 ++++++++++++++ .../StudyViewFilterMapper.xml | 23 ++++++++++++++++--- .../mybatisclickhouse/StudyViewMapper.xml | 15 ++++++++++++ 9 files changed, 81 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java index f866cf1442c..51ff94c7a17 100644 --- a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java +++ b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java @@ -1,6 +1,7 @@ package org.cbioportal.persistence; import org.cbioportal.model.AlterationCountByGene; +import org.cbioportal.model.CaseListDataCount; import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCount; import org.cbioportal.model.CopyNumberCountByGene; @@ -35,6 +36,9 @@ public interface StudyViewRepository { List getGenomicDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + + List getCaseListDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + List getClinicalDataAttributeNames(ClinicalAttributeDataSource clinicalAttributeDataSource, ClinicalAttributeDataType dataType); Map getTotalProfiledCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, String alterationType); diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java index 7a279943289..0c7e40d3524 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java @@ -1,11 +1,12 @@ package org.cbioportal.persistence.mybatisclickhouse; -import org.cbioportal.model.*; import org.apache.ibatis.annotations.MapKey; import org.cbioportal.model.AlterationCountByGene; +import org.cbioportal.model.CaseListDataCount; import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCount; import org.cbioportal.model.CopyNumberCountByGene; +import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.Sample; import org.cbioportal.persistence.helper.AlterationFilterHelper; import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; @@ -14,6 +15,7 @@ import java.util.List; import java.util.Map; + public interface StudyViewMapper { List getFilteredSamples(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); @@ -36,6 +38,8 @@ List getSampleClinicalDataCounts(StudyViewFilter studyViewFil List getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, List attributeIds, List filteredAttributeValues); + + List getCaseListDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); List getClinicalAttributeNames(String tableName); diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java index 6dbc760d097..01bd7aa6bb3 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java @@ -1,5 +1,6 @@ package org.cbioportal.persistence.mybatisclickhouse; import org.cbioportal.model.AlterationCountByGene; +import org.cbioportal.model.CaseListDataCount; import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCount; import org.cbioportal.model.GenePanelToGene; @@ -82,6 +83,11 @@ public List getPatientClinicalDataCounts(StudyViewFilter stud filteredAttributes, FILTERED_CLINICAL_ATTR_VALUES); } + @Override + public List getCaseListDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + return mapper.getCaseListDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter)); + } + @Override public List getClinicalDataAttributeNames(ClinicalAttributeDataSource clinicalAttributeDataSource, ClinicalAttributeDataType dataType) { String tableName = clinicalAttributeDataSource.getValue().toLowerCase() + "_clinical_attribute_" + dataType.getValue().toLowerCase() + "_mv"; diff --git a/src/main/java/org/cbioportal/service/StudyViewColumnarService.java b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java index 91ed7b8c647..0298b061377 100644 --- a/src/main/java/org/cbioportal/service/StudyViewColumnarService.java +++ b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java @@ -1,6 +1,7 @@ package org.cbioportal.service; import org.cbioportal.model.AlterationCountByGene; +import org.cbioportal.model.CaseListDataCount; import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCountItem; import org.cbioportal.model.GenomicDataCount; @@ -20,6 +21,8 @@ public interface StudyViewColumnarService { List getClinicalDataCounts(StudyViewFilter studyViewFilter, List filteredAttributes); + List getCaseListDataCounts(StudyViewFilter studyViewFilter); + List getPatientClinicalData(StudyViewFilter studyViewFilter, List attributeIds); List getSampleClinicalData(StudyViewFilter studyViewFilter, List attributeIds); diff --git a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java index 83916d0c369..6a48daf03ad 100644 --- a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java @@ -1,6 +1,7 @@ package org.cbioportal.service.impl; import org.cbioportal.model.AlterationCountByGene; +import org.cbioportal.model.CaseListDataCount; import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCount; import org.cbioportal.model.ClinicalDataCountItem; @@ -15,6 +16,7 @@ import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; import org.cbioportal.web.parameter.StudyViewFilter; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import java.util.HashMap; @@ -38,6 +40,7 @@ public StudyViewColumnarServiceImpl(StudyViewRepository studyViewRepository, Alt this.alterationCountService = alterationCountService; } + @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()") @Override public List getFilteredSamples(StudyViewFilter studyViewFilter) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); @@ -83,6 +86,12 @@ public List getClinicalDataCounts(StudyViewFilter studyVi }).collect(Collectors.toList()); } + @Override + public List getCaseListDataCounts(StudyViewFilter studyViewFilter) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); + return studyViewRepository.getCaseListDataCounts(studyViewFilter, categorizedClinicalDataCountFilter); + } + private CategorizedClinicalDataCountFilter extractClinicalDataCountFilters(final StudyViewFilter studyViewFilter) { if (clinicalAttributeNameMap.isEmpty()) { buildClinicalAttributeNameMap(); diff --git a/src/main/java/org/cbioportal/web/columnar/ClinicalDataBinner.java b/src/main/java/org/cbioportal/web/columnar/ClinicalDataBinner.java index 77562cd44d6..cc91a840a3c 100644 --- a/src/main/java/org/cbioportal/web/columnar/ClinicalDataBinner.java +++ b/src/main/java/org/cbioportal/web/columnar/ClinicalDataBinner.java @@ -6,6 +6,7 @@ import org.cbioportal.web.parameter.*; import org.cbioportal.web.util.DataBinner; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Component; import java.util.*; @@ -26,6 +27,7 @@ public ClinicalDataBinner( this.dataBinner = dataBinner; } + @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()") public List fetchClinicalDataBinCounts( DataBinMethod dataBinMethod, ClinicalDataBinCountFilter dataBinCountFilter, diff --git a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java index cf06ef4ae76..ccb193cb9af 100644 --- a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java +++ b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java @@ -9,6 +9,7 @@ import jakarta.validation.Valid; import org.cbioportal.model.AlterationCountByGene; import org.cbioportal.model.AlterationFilter; +import org.cbioportal.model.CaseListDataCount; import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataBin; import org.cbioportal.model.ClinicalDataCountItem; @@ -170,6 +171,22 @@ public ResponseEntity> fetchClinicalDataCounts( } + @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") + @RequestMapping(value = "/column-store/sample-lists-counts/fetch", method = RequestMethod.POST, + consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + @Operation(description = "Fetch case list sample counts by study view filter") + public List fetchCaseListCounts( + @Parameter(required = true, description = "Study view filter") + @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter, + @Parameter(hidden = true) // prevent reference to this attribute in the swagger-ui interface + @RequestAttribute(required = false, value = "involvedCancerStudies") Collection involvedCancerStudies, + @Parameter(hidden = true) // prevent reference to this attribute in the swagger-ui interface. this attribute is needed for the @PreAuthorize tag above. + @Valid @RequestAttribute(required = false, value = "interceptedStudyViewFilter") StudyViewFilter interceptedStudyViewFilter) { + + return studyViewColumnarService.getCaseListDataCounts(interceptedStudyViewFilter); + + } + @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") @RequestMapping(value = "/column-store/clinical-data-bin-counts/fetch", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index 58cbfe48b0d..29d52a9e7df 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -13,8 +13,26 @@ #{studyId} - - + + + INTERSECT + -- case list filtering allows both UNION (OR) and INTERSECTION (AND) LOGIC + -- caseLists is an array of arrays wherein the top level is INTERSECTION + -- AND THE INTERNAL ARRAYS ARE UNION (OR) + SELECT * FROM ( + + SELECT sample_unique_id + FROM sample_list_list sll + LEFT JOIN sample_mv s ON sll.sample_id=s.internal_id + LEFT JOIN sample_list sl on sll.list_id=sl.list_id + WHERE + + sl.stable_id LIKE '%_${list}' + + + ) + + INTERSECT SELECT * FROM ( @@ -34,7 +52,6 @@ gp.stable_id LIKE '%_${genomicProfileId}' - ) diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index 55b8b529857..9170b676872 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -151,6 +151,21 @@ GROUP BY genetic_profile.stable_id, genetic_profile.name, sample_derived.cancer_study_identifier; + + + SELECT From 110236b64b69c19447442ac08aab0f94a8effdfb Mon Sep 17 00:00:00 2001 From: alisman Date: Mon, 24 Jun 2024 14:34:28 -0400 Subject: [PATCH 18/87] Fix class import (#10856) --- .../persistence/mybatisclickhouse/StudyViewMapper.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java index 0c7e40d3524..3407f40c145 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java @@ -6,6 +6,7 @@ import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCount; import org.cbioportal.model.CopyNumberCountByGene; +import org.cbioportal.model.GenePanelToGene; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.Sample; import org.cbioportal.persistence.helper.AlterationFilterHelper; From a484e2ee5e6d719f5433c3016aa2c4a06d4d2e5e Mon Sep 17 00:00:00 2001 From: Onur Sumer Date: Mon, 24 Jun 2024 15:33:59 -0400 Subject: [PATCH 19/87] Move ClinicalCategoricalFilter to repository (#10847) * use clinical_data_derived instead of sample_clinical_attribute_numeric_mv and patient_clinical_attribute_numeric_mv * use clinical_attribute_meta instead of sample_clinical_attribute_numeric_mv and patient_clinical_attribute_numeric_mv * remove unused clinical data count methods and SQL * fix numericalClinicalDataCountFilter * Move CategoricalClinicalAttributeFilter to repository * remove unused columns * Add override to methods --------- Co-authored-by: haynescd --- .../persistence/StudyViewRepository.java | 37 +++--- .../mybatisclickhouse/StudyViewMapper.java | 3 +- .../StudyViewMyBatisRepository.java | 119 +++++++++++++----- .../service/AlterationCountService.java | 6 +- .../impl/AlterationCountServiceImpl.java | 26 ++-- .../impl/StudyViewColumnarServiceImpl.java | 78 ++---------- .../StudyViewFilterMapper.xml | 16 +-- .../mybatisclickhouse/StudyViewMapper.xml | 50 ++------ 8 files changed, 146 insertions(+), 189 deletions(-) diff --git a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java index 51ff94c7a17..98c1a17633e 100644 --- a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java +++ b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java @@ -1,15 +1,13 @@ package org.cbioportal.persistence; import org.cbioportal.model.AlterationCountByGene; +import org.cbioportal.model.ClinicalAttribute; import org.cbioportal.model.CaseListDataCount; import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCount; import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.Sample; -import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; -import org.cbioportal.persistence.enums.ClinicalAttributeDataType; -import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; import org.cbioportal.web.parameter.StudyViewFilter; import java.util.List; @@ -17,35 +15,30 @@ import java.util.Set; public interface StudyViewRepository { - List getFilteredSamples(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + List getFilteredSamples(StudyViewFilter studyViewFilter); - List getSampleClinicalData(StudyViewFilter studyViewFilter, List attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + List getSampleClinicalData(StudyViewFilter studyViewFilter, List attributeIds); - List getPatientClinicalData(StudyViewFilter studyViewFilter, List attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + List getPatientClinicalData(StudyViewFilter studyViewFilter, List attributeIds); - List getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + List getMutatedGenes(StudyViewFilter studyViewFilter); - List getCnaGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); - List getStructuralVariantGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + List getStructuralVariantGenes(StudyViewFilter studyViewFilter); + List getCnaGenes(StudyViewFilter studyViewFilter); - List getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List filteredAttributes); + List getClinicalDataCounts(StudyViewFilter studyViewFilter, List filteredAttributes); - List getSampleClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List filteredAttributes); + List getGenomicDataCounts(StudyViewFilter studyViewFilter); - List getPatientClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List filteredAttributes); - - List getGenomicDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); - - - List getCaseListDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + List getClinicalAttributes(); - List getClinicalDataAttributeNames(ClinicalAttributeDataSource clinicalAttributeDataSource, ClinicalAttributeDataType dataType); + List getCaseListDataCounts(StudyViewFilter studyViewFilter); - Map getTotalProfiledCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, String alterationType); + Map getTotalProfiledCounts(StudyViewFilter studyViewFilter, String alterationType); - int getFilteredSamplesCount(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + int getFilteredSamplesCount(StudyViewFilter studyViewFilter); - Map> getMatchingGenePanelIds(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, String alterationType); + Map> getMatchingGenePanelIds(StudyViewFilter studyViewFilter, String alterationType); - int getTotalProfiledCountsByAlterationType(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, String alterationType); + int getTotalProfiledCountsByAlterationType(StudyViewFilter studyViewFilter, String alterationType); } diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java index 3407f40c145..71d0e76a1ab 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java @@ -3,6 +3,7 @@ import org.apache.ibatis.annotations.MapKey; import org.cbioportal.model.AlterationCountByGene; import org.cbioportal.model.CaseListDataCount; +import org.cbioportal.model.ClinicalAttribute; import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCount; import org.cbioportal.model.CopyNumberCountByGene; @@ -42,7 +43,7 @@ List getClinicalDataCounts(StudyViewFilter studyViewFilter, C List getCaseListDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); - List getClinicalAttributeNames(String tableName); + List getClinicalAttributes(); List getSampleClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, List attributeIds); diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java index 01bd7aa6bb3..ebe94444794 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java @@ -1,5 +1,6 @@ package org.cbioportal.persistence.mybatisclickhouse; import org.cbioportal.model.AlterationCountByGene; +import org.cbioportal.model.ClinicalAttribute; import org.cbioportal.model.CaseListDataCount; import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCount; @@ -9,13 +10,13 @@ import org.cbioportal.model.Sample; import org.cbioportal.persistence.StudyViewRepository; import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; -import org.cbioportal.persistence.enums.ClinicalAttributeDataType; import org.cbioportal.persistence.helper.AlterationFilterHelper; import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; import org.cbioportal.web.parameter.StudyViewFilter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import java.util.Collections; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; @@ -24,6 +25,9 @@ @Repository public class StudyViewMyBatisRepository implements StudyViewRepository { + private Map> clinicalAttributesMap = new HashMap<>(); + + private static final List FILTERED_CLINICAL_ATTR_VALUES = Collections.emptyList(); private final StudyViewMapper mapper; @@ -32,94 +36,94 @@ public StudyViewMyBatisRepository(StudyViewMapper mapper) { this.mapper = mapper; } @Override - public List getFilteredSamples(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { - + public List getFilteredSamples(StudyViewFilter studyViewFilter) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getFilteredSamples(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter)); } @Override - public List getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + public List getMutatedGenes(StudyViewFilter studyViewFilter) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getMutatedGenes(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), AlterationFilterHelper.build(studyViewFilter.getAlterationFilter())); } @Override - public List getCnaGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + public List getCnaGenes(StudyViewFilter studyViewFilter) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getCnaGenes(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), AlterationFilterHelper.build(studyViewFilter.getAlterationFilter())); } @Override - public List getStructuralVariantGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + public List getStructuralVariantGenes(StudyViewFilter studyViewFilter) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getStructuralVariantGenes(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), AlterationFilterHelper.build(studyViewFilter.getAlterationFilter())); } @Override - public List getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List filteredAttributes) { + public List getClinicalDataCounts(StudyViewFilter studyViewFilter, List filteredAttributes) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), filteredAttributes, FILTERED_CLINICAL_ATTR_VALUES ); } @Override - public List getGenomicDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + public List getGenomicDataCounts(StudyViewFilter studyViewFilter) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getGenomicDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter)); } - - @Override - public List getSampleClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List filteredAttributes) { - return mapper.getSampleClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), - filteredAttributes, FILTERED_CLINICAL_ATTR_VALUES ); - } - - @Override - public List getPatientClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List filteredAttributes) { - return mapper.getPatientClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), - filteredAttributes, FILTERED_CLINICAL_ATTR_VALUES); + public List getClinicalAttributes() { + return mapper.getClinicalAttributes(); } @Override - public List getCaseListDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + public List getCaseListDataCounts(StudyViewFilter studyViewFilter) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getCaseListDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter)); } - @Override - public List getClinicalDataAttributeNames(ClinicalAttributeDataSource clinicalAttributeDataSource, ClinicalAttributeDataType dataType) { - String tableName = clinicalAttributeDataSource.getValue().toLowerCase() + "_clinical_attribute_" + dataType.getValue().toLowerCase() + "_mv"; - return mapper.getClinicalAttributeNames(tableName); - } private boolean shouldApplyPatientIdFilters(CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { return categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters().isEmpty() || categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters().isEmpty(); } - public List getSampleClinicalData(StudyViewFilter studyViewFilter, List attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + @Override + public List getSampleClinicalData(StudyViewFilter studyViewFilter, List attributeIds) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getSampleClinicalDataFromStudyViewFilter(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), attributeIds); } - public List getPatientClinicalData(StudyViewFilter studyViewFilter, List attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + @Override + public List getPatientClinicalData(StudyViewFilter studyViewFilter, List attributeIds) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), attributeIds); } - public Map getTotalProfiledCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, String alterationType) { + @Override + public Map getTotalProfiledCounts(StudyViewFilter studyViewFilter, String alterationType) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getTotalProfiledCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), alterationType); } @Override - public int getFilteredSamplesCount(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + public int getFilteredSamplesCount(StudyViewFilter studyViewFilter) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getFilteredSamplesCount(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter)); } @Override - public Map> getMatchingGenePanelIds(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, String alterationType) { + public Map> getMatchingGenePanelIds(StudyViewFilter studyViewFilter, String alterationType) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getMatchingGenePanelIds(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), alterationType) .stream() @@ -128,9 +132,62 @@ public Map> getMatchingGenePanelIds(StudyViewFilter studyVie } @Override - public int getTotalProfiledCountsByAlterationType(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, String alterationType) { + public int getTotalProfiledCountsByAlterationType(StudyViewFilter studyViewFilter, String alterationType) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getTotalProfiledCountByAlterationType(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), alterationType); } + private void buildClinicalAttributeNameMap() { + clinicalAttributesMap = this.getClinicalAttributes() + .stream() + .collect(Collectors.groupingBy(ca -> ca.getPatientAttribute() ? ClinicalAttributeDataSource.PATIENT : ClinicalAttributeDataSource.SAMPLE)); + } + + private CategorizedClinicalDataCountFilter extractClinicalDataCountFilters(final StudyViewFilter studyViewFilter) { + if (clinicalAttributesMap.isEmpty()) { + buildClinicalAttributeNameMap(); + } + + if (studyViewFilter.getClinicalDataFilters() == null) { + return CategorizedClinicalDataCountFilter.getBuilder().build(); + } + + List patientCategoricalAttributes = clinicalAttributesMap.get(ClinicalAttributeDataSource.PATIENT) + .stream().filter(ca -> ca.getDatatype().equals("STRING")) + .map(ClinicalAttribute::getAttrId) + .toList(); + + List patientNumericalAttributes = clinicalAttributesMap.get(ClinicalAttributeDataSource.PATIENT) + .stream().filter(ca -> ca.getDatatype().equals("NUMBER")) + .map(ClinicalAttribute::getAttrId) + .toList(); + + List sampleCategoricalAttributes = clinicalAttributesMap.get(ClinicalAttributeDataSource.SAMPLE) + .stream().filter(ca -> ca.getDatatype().equals("STRING")) + .map(ClinicalAttribute::getAttrId) + .toList(); + + List sampleNumericalAttributes = clinicalAttributesMap.get(ClinicalAttributeDataSource.SAMPLE) + .stream().filter(ca -> ca.getDatatype().equals("NUMBER")) + .map(ClinicalAttribute::getAttrId) + .toList(); + + return CategorizedClinicalDataCountFilter.getBuilder() + .setPatientCategoricalClinicalDataFilters(studyViewFilter.getClinicalDataFilters() + .stream().filter(clinicalDataFilter -> patientCategoricalAttributes.contains(clinicalDataFilter.getAttributeId())) + .collect(Collectors.toList())) + .setPatientNumericalClinicalDataFilters(studyViewFilter.getClinicalDataFilters().stream() + .filter(clinicalDataFilter -> patientNumericalAttributes.contains(clinicalDataFilter.getAttributeId())) + .collect(Collectors.toList())) + .setSampleCategoricalClinicalDataFilters(studyViewFilter.getClinicalDataFilters().stream() + .filter(clinicalDataFilter -> sampleCategoricalAttributes.contains(clinicalDataFilter.getAttributeId())) + .collect(Collectors.toList())) + .setSampleNumericalClinicalDataFilters(studyViewFilter.getClinicalDataFilters().stream() + .filter(clinicalDataFilter -> sampleNumericalAttributes.contains(clinicalDataFilter.getAttributeId())) + .collect(Collectors.toList())) + .build(); + } + + } \ No newline at end of file diff --git a/src/main/java/org/cbioportal/service/AlterationCountService.java b/src/main/java/org/cbioportal/service/AlterationCountService.java index 2e02a4be518..289806033ba 100644 --- a/src/main/java/org/cbioportal/service/AlterationCountService.java +++ b/src/main/java/org/cbioportal/service/AlterationCountService.java @@ -77,9 +77,9 @@ Pair, Long> getPatientCnaGeneCounts(List getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); - List getCnaGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + List getMutatedGenes(StudyViewFilter studyViewFilter); + List getCnaGenes(StudyViewFilter studyViewFilter); - List getStructuralVariantGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter); + List getStructuralVariantGenes(StudyViewFilter studyViewFilter); } diff --git a/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java b/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java index c1770e41e18..67079dc5b63 100644 --- a/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java @@ -16,7 +16,6 @@ import org.cbioportal.persistence.StudyViewRepository; import org.cbioportal.service.AlterationCountService; import org.cbioportal.service.util.AlterationEnrichmentUtil; -import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; import org.cbioportal.web.parameter.StudyViewFilter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.lang.NonNull; @@ -256,33 +255,30 @@ public Pair, Long> getPatientCnaGeneCounts(List getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { - var alterationCountByGenes = studyViewRepository.getMutatedGenes(studyViewFilter, categorizedClinicalDataCountFilter); - return populateAlterationCounts(alterationCountByGenes, studyViewFilter, categorizedClinicalDataCountFilter, AlterationType.MUTATION_EXTENDED); + public List getMutatedGenes(StudyViewFilter studyViewFilter) { + var alterationCountByGenes = studyViewRepository.getMutatedGenes(studyViewFilter); + return populateAlterationCounts(alterationCountByGenes, studyViewFilter, AlterationType.MUTATION_EXTENDED); } - public List getCnaGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { - var copyNumberCountByGenes = studyViewRepository.getCnaGenes(studyViewFilter, categorizedClinicalDataCountFilter); - return populateAlterationCounts(copyNumberCountByGenes, studyViewFilter, categorizedClinicalDataCountFilter, AlterationType.COPY_NUMBER_ALTERATION); + public List getCnaGenes(StudyViewFilter studyViewFilter) { + var copyNumberCountByGenes = studyViewRepository.getCnaGenes(studyViewFilter); + return populateAlterationCounts(copyNumberCountByGenes, studyViewFilter, AlterationType.COPY_NUMBER_ALTERATION); } @Override - public List getStructuralVariantGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { - var alterationCountByGenes = studyViewRepository.getStructuralVariantGenes(studyViewFilter, categorizedClinicalDataCountFilter); - return populateAlterationCounts(alterationCountByGenes, studyViewFilter, categorizedClinicalDataCountFilter, AlterationType.STRUCTURAL_VARIANT); + public List getStructuralVariantGenes(StudyViewFilter studyViewFilter) { + var alterationCountByGenes = studyViewRepository.getStructuralVariantGenes(studyViewFilter); + return populateAlterationCounts(alterationCountByGenes, studyViewFilter, AlterationType.STRUCTURAL_VARIANT); } private < T extends AlterationCountByGene> List populateAlterationCounts(@NonNull List alterationCounts, @NonNull StudyViewFilter studyViewFilter, - @NonNull CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, @NonNull AlterationType alterationType) { var updatedAlterationCounts = alterationCounts.stream().map(SerializationUtils::clone).toList(); var profiledCountsMap = studyViewRepository.getTotalProfiledCounts(studyViewFilter, - categorizedClinicalDataCountFilter, alterationType.toString()); - var profiledCountWithoutGenePanelData = studyViewRepository.getTotalProfiledCountsByAlterationType(studyViewFilter, categorizedClinicalDataCountFilter, alterationType.toString()); - var matchingGenePanelIdsMap = studyViewRepository.getMatchingGenePanelIds(studyViewFilter, - categorizedClinicalDataCountFilter, alterationType.toString()); + var profiledCountWithoutGenePanelData = studyViewRepository.getTotalProfiledCountsByAlterationType(studyViewFilter, alterationType.toString()); + var matchingGenePanelIdsMap = studyViewRepository.getMatchingGenePanelIds(studyViewFilter, alterationType.toString()); updatedAlterationCounts.parallelStream() .forEach(alterationCountByGene -> { diff --git a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java index 6a48daf03ad..5202b2589c6 100644 --- a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java @@ -9,26 +9,19 @@ import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.Sample; import org.cbioportal.persistence.StudyViewRepository; -import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; -import org.cbioportal.persistence.enums.ClinicalAttributeDataType; import org.cbioportal.service.AlterationCountService; import org.cbioportal.service.StudyViewColumnarService; -import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; import org.cbioportal.web.parameter.StudyViewFilter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.stream.Collectors; @Service public class StudyViewColumnarServiceImpl implements StudyViewColumnarService { - private final Map> clinicalAttributeNameMap = new HashMap<>(); - private final StudyViewRepository studyViewRepository; @@ -43,40 +36,31 @@ public StudyViewColumnarServiceImpl(StudyViewRepository studyViewRepository, Alt @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()") @Override public List getFilteredSamples(StudyViewFilter studyViewFilter) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return studyViewRepository.getFilteredSamples(studyViewFilter, categorizedClinicalDataCountFilter); + return studyViewRepository.getFilteredSamples(studyViewFilter); } @Override public List getMutatedGenes(StudyViewFilter studyViewFilter) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return alterationCountService.getMutatedGenes(studyViewFilter, categorizedClinicalDataCountFilter); + return alterationCountService.getMutatedGenes(studyViewFilter); } @Override public List getGenomicDataCounts(StudyViewFilter studyViewFilter) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return studyViewRepository.getGenomicDataCounts(studyViewFilter, categorizedClinicalDataCountFilter); + return studyViewRepository.getGenomicDataCounts(studyViewFilter); } public List getCnaGenes(StudyViewFilter studyViewFilter) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return alterationCountService.getCnaGenes(studyViewFilter, categorizedClinicalDataCountFilter); + return alterationCountService.getCnaGenes(studyViewFilter); } @Override public List getStructuralVariantGenes(StudyViewFilter studyViewFilter) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return alterationCountService.getStructuralVariantGenes(studyViewFilter, categorizedClinicalDataCountFilter); + return alterationCountService.getStructuralVariantGenes(studyViewFilter); } @Override public List getClinicalDataCounts(StudyViewFilter studyViewFilter, List filteredAttributes) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - - - - return studyViewRepository.getClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, filteredAttributes) + return studyViewRepository.getClinicalDataCounts(studyViewFilter, filteredAttributes) .stream().collect(Collectors.groupingBy(ClinicalDataCount::getAttributeId)) .entrySet().parallelStream().map(e -> { ClinicalDataCountItem item = new ClinicalDataCountItem(); @@ -88,60 +72,18 @@ public List getClinicalDataCounts(StudyViewFilter studyVi @Override public List getCaseListDataCounts(StudyViewFilter studyViewFilter) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return studyViewRepository.getCaseListDataCounts(studyViewFilter, categorizedClinicalDataCountFilter); - } - - private CategorizedClinicalDataCountFilter extractClinicalDataCountFilters(final StudyViewFilter studyViewFilter) { - if (clinicalAttributeNameMap.isEmpty()) { - buildClinicalAttributeNameMap(); - } - - if (studyViewFilter.getClinicalDataFilters() == null) { - return CategorizedClinicalDataCountFilter.getBuilder().build(); - } - - final String patientCategoricalKey = ClinicalAttributeDataSource.PATIENT.getValue() + ClinicalAttributeDataType.CATEGORICAL.getValue(); - final String patientNumericKey = ClinicalAttributeDataSource.PATIENT.getValue() + ClinicalAttributeDataType.NUMERIC.getValue(); - final String sampleCategoricalKey = ClinicalAttributeDataSource.SAMPLE.getValue() + ClinicalAttributeDataType.CATEGORICAL.getValue(); - final String sampleNumericKey = ClinicalAttributeDataSource.SAMPLE.getValue() + ClinicalAttributeDataType.NUMERIC.getValue(); - - return CategorizedClinicalDataCountFilter.getBuilder() - .setPatientCategoricalClinicalDataFilters(studyViewFilter.getClinicalDataFilters() - .stream().filter(clinicalDataFilter -> clinicalAttributeNameMap.get(patientCategoricalKey).contains(clinicalDataFilter.getAttributeId())) - .collect(Collectors.toList())) - .setPatientNumericalClinicalDataFilters(studyViewFilter.getClinicalDataFilters().stream() - .filter(clinicalDataFilter -> clinicalAttributeNameMap.get(patientNumericKey).contains(clinicalDataFilter.getAttributeId())) - .collect(Collectors.toList())) - .setSampleCategoricalClinicalDataFilters(studyViewFilter.getClinicalDataFilters().stream() - .filter(clinicalDataFilter -> clinicalAttributeNameMap.get(sampleCategoricalKey).contains(clinicalDataFilter.getAttributeId())) - .collect(Collectors.toList())) - .setSampleNumericalClinicalDataFilters(studyViewFilter.getClinicalDataFilters().stream() - .filter(clinicalDataFilter -> clinicalAttributeNameMap.get(sampleNumericKey).contains(clinicalDataFilter.getAttributeId())) - .collect(Collectors.toList())) - .build(); - } - - private void buildClinicalAttributeNameMap() { - List clinicalAttributeDataSources = List.of(ClinicalAttributeDataSource.values()); - for (ClinicalAttributeDataSource clinicalAttributeDataSource : clinicalAttributeDataSources) { - String categoricalKey = clinicalAttributeDataSource.getValue() + ClinicalAttributeDataType.CATEGORICAL; - String numericKey = clinicalAttributeDataSource.getValue() + ClinicalAttributeDataType.NUMERIC; - clinicalAttributeNameMap.put(categoricalKey, studyViewRepository.getClinicalDataAttributeNames(clinicalAttributeDataSource, ClinicalAttributeDataType.CATEGORICAL)); - clinicalAttributeNameMap.put(numericKey, studyViewRepository.getClinicalDataAttributeNames(clinicalAttributeDataSource, ClinicalAttributeDataType.NUMERIC)); - } + return studyViewRepository.getCaseListDataCounts(studyViewFilter); } + @Override public List getPatientClinicalData(StudyViewFilter studyViewFilter, List attributeIds) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return studyViewRepository.getPatientClinicalData(studyViewFilter, attributeIds, categorizedClinicalDataCountFilter); + return studyViewRepository.getPatientClinicalData(studyViewFilter, attributeIds); } @Override public List getSampleClinicalData(StudyViewFilter studyViewFilter, List attributeIds) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return studyViewRepository.getSampleClinicalData(studyViewFilter, attributeIds, categorizedClinicalDataCountFilter); + return studyViewRepository.getSampleClinicalData(studyViewFilter, attributeIds); } diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index 29d52a9e7df..7932a1841d5 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -91,7 +91,7 @@ - + @@ -115,7 +115,7 @@ - + @@ -135,22 +135,24 @@ SELECT ${unique_id} FROM ${table_name} - WHERE attribute_name = '${clinicalDataFilter.attributeId}' + WHERE attribute_name = '${clinicalDataFilter.attributeId}' AND + type='${type}' AND + (attribute_value = '' OR match(attribute_value, '^[\d\.]+$')) - AND attribute_value = -1000000 + AND attribute_value = '' - AND abs(minus(attribute_value, ${dataFilterValue.start})) < exp(-11) + AND abs(minus(cast(attribute_value as float), ${dataFilterValue.start})) < exp(-11) - AND attribute_value > ${dataFilterValue.start} + AND cast(attribute_value as float) > ${dataFilterValue.start} - AND attribute_value <= ${dataFilterValue.end} + AND cast(attribute_value as float) <= ${dataFilterValue.end} diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index 9170b676872..b7d785e4991 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -167,31 +167,7 @@ GROUP BY s.cancer_study_identifier, sl.stable_id, sl.name; - - SELECT - attribute_name as attributeId, - CASE WHEN attribute_value = 'NULL' THEN 'NA' ELSE attribute_value END AS value, - Count(*) as count - FROM ${table_name_prefix}_clinical_attribute_categorical_view - - patient_unique_id IN ( - - INTERSECT - - ) - AND UPPER(attribute_value) NOT IN - - #{filteredAttributeValue} - - AND attribute_name IN - - #{attributeId} - - - GROUP BY attribute_name, - attribute_value - - + SELECT attribute_name as attributeId, @@ -250,20 +226,6 @@ value - - - - - - SELECT sample_unique_id FROM sample_derived @@ -280,10 +242,14 @@ - SELECT - DISTINCT(attribute_name) - FROM ${tableName}; + attr_id as attrId, + datatype as dataType, + patient_attribute as patientAttribute, + cs.cancer_study_identifier cancerStudyIdentifier + FROM clinical_attribute_meta cam + JOIN cancer_study cs on cs.cancer_study_id = cam.cancer_study_id From 14b7105f041e4dbc8c54d9c5d296ce038021dfe0 Mon Sep 17 00:00:00 2001 From: Charles Haynes <33608920+haynescd@users.noreply.github.com> Date: Mon, 24 Jun 2024 16:59:08 -0400 Subject: [PATCH 20/87] Rfc80/fix patient level filtering for alteration counts endpoints (#10857) * Add patient_id column to genomic_event_derived * Update sql to convert list of patients to list of samples --- .../db-scripts/clickhouse/clickhouse.sql | 3 ++- .../clickhouse/clickhouse_migration.sql | 16 ++++++++++++---- .../mybatisclickhouse/StudyViewMapper.xml | 15 ++++++++++++--- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/main/resources/db-scripts/clickhouse/clickhouse.sql b/src/main/resources/db-scripts/clickhouse/clickhouse.sql index 828c358d9f1..4e9897566bd 100644 --- a/src/main/resources/db-scripts/clickhouse/clickhouse.sql +++ b/src/main/resources/db-scripts/clickhouse/clickhouse.sql @@ -17,7 +17,8 @@ CREATE TABLE IF NOT EXISTS genomic_event_derived driver_tiers_filter LowCardinality(String), cna_alteration Nullable(Int8), cna_cytoband String, - sv_event_info String + sv_event_info String, + patient_unique_id String ) ENGINE = MergeTree ORDER BY ( variant_type, hugo_gene_symbol, genetic_profile_stable_id, sample_unique_id); diff --git a/src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql b/src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql index 55c8e48d9b3..76223de462d 100644 --- a/src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql +++ b/src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql @@ -40,7 +40,8 @@ SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_uniqu 'NA' AS drivet_tiers_filter, NULL AS cna_alteration, '' AS cna_cytoband, - '' AS sv_event_info + '' AS sv_event_info, + concat(cs.cancer_study_identifier, '_', patient.stable_id) AS patient_unique_id FROM mutation INNER JOIN mutation_event AS me ON mutation.mutation_event_id = me.mutation_event_id INNER JOIN sample_profile sp @@ -49,6 +50,7 @@ FROM mutation LEFT JOIN genetic_profile g ON sp.genetic_profile_id = g.genetic_profile_id INNER JOIN cancer_study cs ON g.cancer_study_id = cs.cancer_study_id INNER JOIN sample ON mutation.sample_id = sample.internal_id + INNER JOIN patient on sample.patient_id = patient.internal_id LEFT JOIN gene ON mutation.entrez_gene_id = gene.entrez_gene_id UNION ALL SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_unique_id, @@ -64,7 +66,8 @@ SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_uniqu 'NA' AS drivet_tiers_filter, ce.alteration AS cna_alteration, rgg.cytoband AS cna_cytoband, - '' AS sv_event_info + '' AS sv_event_info, + concat(cs.cancer_study_identifier, '_', patient.stable_id) AS patient_unique_id FROM cna_event ce INNER JOIN sample_cna_event sce ON ce.cna_event_id = sce.cna_event_id INNER JOIN sample_profile sp ON sce.sample_id = sp.sample_id AND sce.genetic_profile_id = sp.genetic_profile_id @@ -72,6 +75,7 @@ FROM cna_event ce INNER JOIN genetic_profile g ON sp.genetic_profile_id = g.genetic_profile_id INNER JOIN cancer_study cs ON g.cancer_study_id = cs.cancer_study_id INNER JOIN sample ON sce.sample_id = sample.internal_id + INNER JOIN patient on sample.patient_id = patient.internal_id INNER JOIN gene ON ce.entrez_gene_id = gene.entrez_gene_id INNER JOIN reference_genome_gene rgg ON rgg.entrez_gene_id = ce.entrez_gene_id UNION ALL @@ -88,10 +92,12 @@ SELECT concat(cs.cancer_study_identifier, '_', s.stable_id) AS sample_unique_id, 'NA' AS drivet_tiers_filter, NULL AS cna_alteration, '' AS cna_cytoband, - event_info AS sv_event_info + event_info AS sv_event_info, + concat(cs.cancer_study_identifier, '_', patient.stable_id) AS patient_unique_id FROM structural_variant sv INNER JOIN genetic_profile gp ON sv.genetic_profile_id = gp.genetic_profile_id INNER JOIN sample s ON sv.sample_id = s.internal_id + INNER JOIN patient on s.patient_id = patient.internal_id INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id INNER JOIN gene ON sv.site1_entrez_gene_id = gene.entrez_gene_id INNER JOIN sample_profile ON s.internal_id = sample_profile.sample_id AND sample_profile.genetic_profile_id = sv.genetic_profile_id @@ -110,10 +116,12 @@ SELECT concat(cs.cancer_study_identifier, '_', s.stable_id) AS sample_unique_id, 'NA' AS drivet_tiers_filter, NULL AS cna_alteration, '' AS cna_cytoband, - event_info AS sv_event_info + event_info AS sv_event_info, + concat(cs.cancer_study_identifier, '_', patient.stable_id) AS patient_unique_id FROM structural_variant sv INNER JOIN genetic_profile gp ON sv.genetic_profile_id = gp.genetic_profile_id INNER JOIN sample s ON sv.sample_id = s.internal_id + INNER JOIN patient on s.patient_id = patient.internal_id INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id INNER JOIN gene ON sv.site2_entrez_gene_id = gene.entrez_gene_id INNER JOIN sample_profile ON s.internal_id = sample_profile.sample_id AND sample_profile.genetic_profile_id = sv.genetic_profile_id diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index b7d785e4991..078afabea47 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -281,7 +281,11 @@ stgp.alteration_type = '${alterationType}' AND - + sample_unique_id IN ( + + INTERSECT + + ) @@ -306,8 +310,13 @@ select distinct gene_panel_id from sample_to_gene_panel - alteration_type = '${alterationType}' AND - + alteration_type = '${alterationType}' + AND + sample_unique_id IN ( + + INTERSECT + + ) ) From 2b87a263cbd4781da87041be84b0c6d89a41efc2 Mon Sep 17 00:00:00 2001 From: Charles Haynes <33608920+haynescd@users.noreply.github.com> Date: Tue, 25 Jun 2024 09:59:52 -0400 Subject: [PATCH 21/87] :bug: Fix totalCount calculation when WES not available (#10858) --- .../service/impl/AlterationCountServiceImpl.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java b/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java index 67079dc5b63..29f94f0fd0f 100644 --- a/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java @@ -19,7 +19,6 @@ import org.cbioportal.web.parameter.StudyViewFilter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.lang.NonNull; -import org.springframework.lang.Nullable; import org.springframework.stereotype.Service; import java.util.ArrayList; @@ -286,7 +285,7 @@ private < T extends AlterationCountByGene> List populateAlterationCounts(@Non Set matchingGenePanelIds = matchingGenePanelIdsMap.get(hugoGeneSymbol) != null ? matchingGenePanelIdsMap.get(hugoGeneSymbol) : Collections.emptySet(); - int totalProfiledCount = getTotalProfiledCount(alterationCountByGene.getHugoGeneSymbol(), + int totalProfiledCount = getTotalProfiledCount(hugoGeneSymbol, profiledCountsMap, profiledCountWithoutGenePanelData, matchingGenePanelIds); alterationCountByGene.setNumberOfProfiledCases(totalProfiledCount); @@ -297,7 +296,7 @@ private < T extends AlterationCountByGene> List populateAlterationCounts(@Non } private int getTotalProfiledCount(@NonNull String hugoGeneSymbol, @NonNull Map profiledCountsMap, - int profiledCountWithoutGenePanelData, @Nullable Set matchingGenePanelIds) { + int profiledCountWithoutGenePanelData, @NonNull Set matchingGenePanelIds) { int totalProfiledCount = profiledCountWithoutGenePanelData; if (hasGenePanelData(matchingGenePanelIds) && profiledCountsMap.containsKey(hugoGeneSymbol)) { @@ -306,9 +305,9 @@ private int getTotalProfiledCount(@NonNull String hugoGeneSymbol, @NonNull Map matchingGenePanelIds) { - return matchingGenePanelIds != null && matchingGenePanelIds.contains(WHOLE_EXOME_SEQUENCING) - && matchingGenePanelIds.size() > 1; + private boolean hasGenePanelData(@NonNull Set matchingGenePanelIds) { + return matchingGenePanelIds.contains(WHOLE_EXOME_SEQUENCING) + && matchingGenePanelIds.size() > 1 || !matchingGenePanelIds.contains(WHOLE_EXOME_SEQUENCING) && !matchingGenePanelIds.isEmpty(); } private Pair, Long> getAlterationGeneCounts( From 79d36e73f1aeff6d0ab4697e77aa210752772ad6 Mon Sep 17 00:00:00 2001 From: Charles Haynes <33608920+haynescd@users.noreply.github.com> Date: Wed, 26 Jun 2024 15:15:36 -0400 Subject: [PATCH 22/87] Consolidate SQL files used to create CH Tables (#10867) --- pom.xml | 4 - .../db-scripts/clickhouse/clickhouse.sql | 251 ++++++++++++++++-- .../clickhouse/clickhouse_migration.sql | 144 ---------- .../db-scripts/clickhouse/derived_tables.sql | 47 ---- .../clickhouse/materialized_views.sql | 63 ----- .../resources/db-scripts/clickhouse/views.sql | 27 -- .../mybatisclickhouse/StudyViewMapper.xml | 10 +- .../AbstractTestcontainers.java | 8 +- 8 files changed, 234 insertions(+), 320 deletions(-) delete mode 100644 src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql delete mode 100644 src/main/resources/db-scripts/clickhouse/derived_tables.sql delete mode 100644 src/main/resources/db-scripts/clickhouse/views.sql diff --git a/pom.xml b/pom.xml index a1ff655502c..33883b323d0 100644 --- a/pom.xml +++ b/pom.xml @@ -448,8 +448,6 @@ cgds.sql migration.sql clickhouse/clickhouse.sql - clickhouse/clickhouse_views.sql - clickhouse/clickhouse_migration.sql clickhouse/materialized_views.sql @@ -460,8 +458,6 @@ false clickhouse/clickhouse.sql - clickhouse/views.sql - clickhouse/clickhouse_migration.sql clickhouse/materialized_views.sql diff --git a/src/main/resources/db-scripts/clickhouse/clickhouse.sql b/src/main/resources/db-scripts/clickhouse/clickhouse.sql index 4e9897566bd..fcbe2fe1d01 100644 --- a/src/main/resources/db-scripts/clickhouse/clickhouse.sql +++ b/src/main/resources/db-scripts/clickhouse/clickhouse.sql @@ -1,28 +1,11 @@ +DROP TABLE IF EXISTS sample_to_gene_panel_derived; +DROP TABLE IF EXISTS gene_panel_to_gene_derived; +DROP TABLE IF EXISTS sample_derived; DROP TABLE IF EXISTS genomic_event_derived; -DROP TABLE IF EXISTS sample_to_gene_panel; -DROP TABLE IF EXISTS gene_panel_to_gene; +DROP TABLE IF EXISTS clinical_data_derived; -CREATE TABLE IF NOT EXISTS genomic_event_derived -( - sample_unique_id String, - hugo_gene_symbol String, - gene_panel_stable_id LowCardinality(String), - cancer_study_identifier LowCardinality(String), - genetic_profile_stable_id LowCardinality(String), - variant_type LowCardinality(String), - mutation_variant String, - mutation_type LowCardinality(String), - mutation_status LowCardinality(String), - driver_filter LowCardinality(String), - driver_tiers_filter LowCardinality(String), - cna_alteration Nullable(Int8), - cna_cytoband String, - sv_event_info String, - patient_unique_id String -) ENGINE = MergeTree -ORDER BY ( variant_type, hugo_gene_symbol, genetic_profile_stable_id, sample_unique_id); -CREATE TABLE sample_to_gene_panel +CREATE TABLE sample_to_gene_panel_derived ( sample_unique_id String, alteration_type LowCardinality(String), @@ -31,13 +14,40 @@ CREATE TABLE sample_to_gene_panel ) ENGINE = MergeTree() ORDER BY (gene_panel_id, alteration_type, sample_unique_id); -CREATE TABLE gene_panel_to_gene +INSERT INTO sample_to_gene_panel_derived +SELECT + concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_unique_id, + genetic_alteration_type AS alteration_type, + -- If a mutation is found in a gene that is not in a gene panel we assume Whole Exome Sequencing WES + ifnull(gene_panel.stable_id, 'WES') AS gene_panel_id, + cs.cancer_study_identifier AS cancer_study_identifier +FROM sample_profile sp + INNER JOIN genetic_profile gp ON sample_profile.genetic_profile_id = gp.genetic_profile_id + LEFT JOIN gene_panel ON sp.panel_id = gene_panel.internal_id + INNER JOIN sample ON sp.sample_id = sample.internal_id + INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id; + +CREATE TABLE gene_panel_to_gene_derived ( gene_panel_id LowCardinality(String), gene String ) ENGINE = MergeTree() ORDER BY (gene_panel_id); +INSERT INTO gene_panel_to_gene_derived +SELECT + gp.stable_id AS gene_panel_id, + g.hugo_gene_symbol AS gene +FROM gene_panel gp + INNER JOIN gene_panel_list gpl ON gp.internal_id = gpl.internal_id + INNER JOIN gene g ON g.entrez_gene_id = gpl.gene_id +UNION ALL +SELECT + 'WES' AS gene_panel_id, + gene.hugo_gene_symbol AS gene +FROM gene +WHERE gene.entrez_gene_id > 0; + CREATE TABLE sample_derived ( sample_unique_id String, @@ -50,4 +60,197 @@ CREATE TABLE sample_derived internal_id Int ) ENGINE = MergeTree - ORDER BY (cancer_study_identifier, sample_unique_id); \ No newline at end of file + ORDER BY (cancer_study_identifier, sample_unique_id); + +INSERT INTO sample_derived +SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_unique_id, + base64Encode(sample.stable_id) AS sample_unique_id_base64, + sample.stable_id AS sample_stable_id, + concat(cs.cancer_study_identifier, '_', p.stable_id) AS patient_unique_id, + p.stable_id AS patient_stable_id, + base64Encode(p.stable_id) AS patient_unique_id_base64, + cs.cancer_study_identifier AS cancer_study_identifier, + sample.internal_id AS internal_id +FROM sample + INNER JOIN patient AS p ON sample.patient_id = p.internal_id + INNER JOIN cancer_study AS cs ON p.cancer_study_id = cs.cancer_study_id; + + +CREATE TABLE IF NOT EXISTS genomic_event_derived +( + sample_unique_id String, + hugo_gene_symbol String, + gene_panel_stable_id LowCardinality(String), + cancer_study_identifier LowCardinality(String), + genetic_profile_stable_id LowCardinality(String), + variant_type LowCardinality(String), + mutation_variant String, + mutation_type LowCardinality(String), + mutation_status LowCardinality(String), + driver_filter LowCardinality(String), + driver_tiers_filter LowCardinality(String), + cna_alteration Nullable(Int8), + cna_cytoband String, + sv_event_info String, + patient_unique_id String +) ENGINE = MergeTree + ORDER BY ( variant_type, hugo_gene_symbol, genetic_profile_stable_id, sample_unique_id); + +INSERT INTO genomic_event_derived +-- Insert Mutations +SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_unique_id, + gene.hugo_gene_symbol AS hugo_gene_symbol, + ifNull(gp.stable_id, 'WES') AS gene_panel_stable_id, + cs.cancer_study_identifier AS cancer_study_identifier, + g.stable_id AS genetic_profile_stable_id, + 'mutation' AS variant_type, + me.protein_change AS mutation_variant, + me.mutation_type AS mutation_type, + mutation.mutation_status AS mutation_status, + 'NA' AS driver_filter, + 'NA' AS drivet_tiers_filter, + NULL AS cna_alteration, + '' AS cna_cytoband, + '' AS sv_event_info, + concat(cs.cancer_study_identifier, '_', patient.stable_id) AS patient_unique_id +FROM mutation + INNER JOIN mutation_event AS me ON mutation.mutation_event_id = me.mutation_event_id + INNER JOIN sample_profile sp + ON mutation.sample_id = sp.sample_id AND mutation.genetic_profile_id = sp.genetic_profile_id + LEFT JOIN gene_panel gp ON sp.panel_id = gp.internal_id + LEFT JOIN genetic_profile g ON sp.genetic_profile_id = g.genetic_profile_id + INNER JOIN cancer_study cs ON g.cancer_study_id = cs.cancer_study_id + INNER JOIN sample ON mutation.sample_id = sample.internal_id + INNER JOIN patient on sample.patient_id = patient.internal_id + LEFT JOIN gene ON mutation.entrez_gene_id = gene.entrez_gene_id +UNION ALL +-- Insert CNA Genes +SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_unique_id, + gene.hugo_gene_symbol AS hugo_gene_symbol, + ifNull(gp.stable_id, 'WES') AS gene_panel_stable_id, + cs.cancer_study_identifier AS cancer_study_identifier, + g.stable_id AS genetic_profile_stable_id, + 'cna' AS variant_type, + 'NA' AS mutation_variant, + 'NA' AS mutation_type, + 'NA' AS mutation_status, + 'NA' AS driver_filter, + 'NA' AS drivet_tiers_filter, + ce.alteration AS cna_alteration, + rgg.cytoband AS cna_cytoband, + '' AS sv_event_info, + concat(cs.cancer_study_identifier, '_', patient.stable_id) AS patient_unique_id +FROM cna_event ce + INNER JOIN sample_cna_event sce ON ce.cna_event_id = sce.cna_event_id + INNER JOIN sample_profile sp ON sce.sample_id = sp.sample_id AND sce.genetic_profile_id = sp.genetic_profile_id + LEFT JOIN gene_panel gp ON sp.panel_id = gp.internal_id + INNER JOIN genetic_profile g ON sp.genetic_profile_id = g.genetic_profile_id + INNER JOIN cancer_study cs ON g.cancer_study_id = cs.cancer_study_id + INNER JOIN sample ON sce.sample_id = sample.internal_id + INNER JOIN patient on sample.patient_id = patient.internal_id + INNER JOIN gene ON ce.entrez_gene_id = gene.entrez_gene_id + INNER JOIN reference_genome_gene rgg ON rgg.entrez_gene_id = ce.entrez_gene_id +UNION ALL +-- Insert Structural Variants Site1 +SELECT concat(cs.cancer_study_identifier, '_', s.stable_id) AS sample_unique_id, + gene.hugo_gene_symbol AS hugo_gene_symbol, + ifNull(gene_panel.stable_id, 'WES') AS gene_panel_stable_id, + cs.cancer_study_identifier AS cancer_study_identifier, + gp.stable_id AS genetic_profile_stable_id, + 'structural_variant' AS variant_type, + 'NA' AS mutation_variant, + 'NA' AS mutation_type, + 'NA' AS mutation_status, + 'NA' AS driver_filter, + 'NA' AS drivet_tiers_filter, + NULL AS cna_alteration, + '' AS cna_cytoband, + event_info AS sv_event_info, + concat(cs.cancer_study_identifier, '_', patient.stable_id) AS patient_unique_id +FROM structural_variant sv + INNER JOIN genetic_profile gp ON sv.genetic_profile_id = gp.genetic_profile_id + INNER JOIN sample s ON sv.sample_id = s.internal_id + INNER JOIN patient on s.patient_id = patient.internal_id + INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id + INNER JOIN gene ON sv.site1_entrez_gene_id = gene.entrez_gene_id + INNER JOIN sample_profile ON s.internal_id = sample_profile.sample_id AND sample_profile.genetic_profile_id = sv.genetic_profile_id + LEFT JOIN gene_panel ON sample_profile.panel_id = gene_panel.internal_id +UNION ALL +-- Insert Structural Variants Site2 +SELECT concat(cs.cancer_study_identifier, '_', s.stable_id) AS sample_unique_id, + gene.hugo_gene_symbol AS hugo_gene_symbol, + ifNull(gene_panel.stable_id, 'WES') AS gene_panel_stable_id, + cs.cancer_study_identifier AS cancer_study_identifier, + gp.stable_id AS genetic_profile_stable_id, + 'structural_variant' AS variant_type, + 'NA' AS mutation_variant, + 'NA' AS mutation_type, + 'NA' AS mutation_status, + 'NA' AS driver_filter, + 'NA' AS drivet_tiers_filter, + NULL AS cna_alteration, + '' AS cna_cytoband, + event_info AS sv_event_info, + concat(cs.cancer_study_identifier, '_', patient.stable_id) AS patient_unique_id +FROM structural_variant sv + INNER JOIN genetic_profile gp ON sv.genetic_profile_id = gp.genetic_profile_id + INNER JOIN sample s ON sv.sample_id = s.internal_id + INNER JOIN patient on s.patient_id = patient.internal_id + INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id + INNER JOIN gene ON sv.site2_entrez_gene_id = gene.entrez_gene_id + INNER JOIN sample_profile ON s.internal_id = sample_profile.sample_id AND sample_profile.genetic_profile_id = sv.genetic_profile_id + LEFT JOIN gene_panel ON sample_profile.panel_id = gene_panel.internal_id +WHERE + sv.site2_entrez_gene_id != sv.site1_entrez_gene_id + OR sv.site1_entrez_gene_id IS NULL; + +CREATE TABLE IF NOT EXISTS clinical_data_derived +( + sample_unique_id String, + patient_unique_id String, + attribute_name LowCardinality(String), + attribute_value String, + cancer_study_identifier LowCardinality(String), + type LowCardinality(String) +) + ENGINE=MergeTree + ORDER BY (type, attribute_name, sample_unique_id); + +-- Insert sample attribute data +INSERT INTO TABLE clinical_data_derived +SELECT sm.sample_unique_id AS sample_unique_id, + sm.patient_unique_id AS patient_unique_id, + cam.attr_id AS attribute_name, + ifNull(csamp.attr_value, '') AS attribute_value, + cs.cancer_study_identifier AS cancer_study_identifier, + 'sample' AS type +FROM sample_derived AS sm + INNER JOIN cancer_study AS cs + ON sm.cancer_study_identifier = cs.cancer_study_identifier + FULL OUTER JOIN clinical_attribute_meta AS cam + ON cs.cancer_study_id = cam.cancer_study_id + FULL OUTER JOIN clinical_sample AS csamp + ON (sm.internal_id = csamp.internal_id) AND (csamp.attr_id = cam.attr_id) +WHERE cam.patient_attribute = 0; + +-- INSERT patient attribute data +INSERT INTO TABLE clinical_data_derived +SELECT '' AS sample_unique_id, + concat(cs.cancer_study_identifier, '_', p.stable_id) AS patient_unique_id, + cam.attr_id AS attribute_name, + ifNull(clinpat.attr_value, '') AS attribute_value, + cs.cancer_study_identifier AS cancer_study_identifier, + 'patient' AS type +FROM patient AS p + INNER JOIN cancer_study AS cs ON p.cancer_study_id = cs.cancer_study_id + FULL OUTER JOIN clinical_attribute_meta AS cam + ON cs.cancer_study_id = cam.cancer_study_id + FULL OUTER JOIN clinical_patient AS clinpat + ON (p.internal_id = clinpat.internal_id) AND (clinpat.attr_id = cam.attr_id) +WHERE cam.patient_attribute = 1; + +OPTIMIZE TABLE sample_to_gene_panel_derived; +OPTIMIZE TABLE gene_panel_to_gene_derived; +OPTIMIZE TABLE sample_derived; +OPTIMIZE TABLE genomic_event_derived; +OPTIMIZE TABLE clinical_data_derived; diff --git a/src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql b/src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql deleted file mode 100644 index 76223de462d..00000000000 --- a/src/main/resources/db-scripts/clickhouse/clickhouse_migration.sql +++ /dev/null @@ -1,144 +0,0 @@ - -INSERT INTO sample_to_gene_panel -SELECT - concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_unique_id, - genetic_alteration_type AS alteration_type, - -- If a mutation is found in a gene that is not in a gene panel we assume Whole Exome Sequencing WES - ifnull(gene_panel.stable_id, 'WES') AS gene_panel_id, - cs.cancer_study_identifier AS cancer_study_identifier -FROM sample_profile sp - INNER JOIN genetic_profile gp ON sample_profile.genetic_profile_id = gp.genetic_profile_id - LEFT JOIN gene_panel ON sp.panel_id = gene_panel.internal_id - INNER JOIN sample ON sp.sample_id = sample.internal_id - INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id; - -INSERT INTO gene_panel_to_gene -SELECT - gp.stable_id AS gene_panel_id, - g.hugo_gene_symbol AS gene -FROM gene_panel gp - INNER JOIN gene_panel_list gpl ON gp.internal_id = gpl.internal_id - INNER JOIN gene g ON g.entrez_gene_id = gpl.gene_id -UNION ALL -SELECT - 'WES' AS gene_panel_id, - gene.hugo_gene_symbol AS gene -FROM gene -WHERE gene.entrez_gene_id > 0; - -INSERT INTO genomic_event_derived -SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_unique_id, - gene.hugo_gene_symbol AS hugo_gene_symbol, - ifNull(gp.stable_id, 'WES') AS gene_panel_stable_id, - cs.cancer_study_identifier AS cancer_study_identifier, - g.stable_id AS genetic_profile_stable_id, - 'mutation' AS variant_type, - me.protein_change AS mutation_variant, - me.mutation_type AS mutation_type, - mutation.mutation_status AS mutation_status, - 'NA' AS driver_filter, - 'NA' AS drivet_tiers_filter, - NULL AS cna_alteration, - '' AS cna_cytoband, - '' AS sv_event_info, - concat(cs.cancer_study_identifier, '_', patient.stable_id) AS patient_unique_id -FROM mutation - INNER JOIN mutation_event AS me ON mutation.mutation_event_id = me.mutation_event_id - INNER JOIN sample_profile sp - ON mutation.sample_id = sp.sample_id AND mutation.genetic_profile_id = sp.genetic_profile_id - LEFT JOIN gene_panel gp ON sp.panel_id = gp.internal_id - LEFT JOIN genetic_profile g ON sp.genetic_profile_id = g.genetic_profile_id - INNER JOIN cancer_study cs ON g.cancer_study_id = cs.cancer_study_id - INNER JOIN sample ON mutation.sample_id = sample.internal_id - INNER JOIN patient on sample.patient_id = patient.internal_id - LEFT JOIN gene ON mutation.entrez_gene_id = gene.entrez_gene_id -UNION ALL -SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_unique_id, - gene.hugo_gene_symbol AS hugo_gene_symbol, - ifNull(gp.stable_id, 'WES') AS gene_panel_stable_id, - cs.cancer_study_identifier AS cancer_study_identifier, - g.stable_id AS genetic_profile_stable_id, - 'cna' AS variant_type, - 'NA' AS mutation_variant, - 'NA' AS mutation_type, - 'NA' AS mutation_status, - 'NA' AS driver_filter, - 'NA' AS drivet_tiers_filter, - ce.alteration AS cna_alteration, - rgg.cytoband AS cna_cytoband, - '' AS sv_event_info, - concat(cs.cancer_study_identifier, '_', patient.stable_id) AS patient_unique_id -FROM cna_event ce - INNER JOIN sample_cna_event sce ON ce.cna_event_id = sce.cna_event_id - INNER JOIN sample_profile sp ON sce.sample_id = sp.sample_id AND sce.genetic_profile_id = sp.genetic_profile_id - LEFT JOIN gene_panel gp ON sp.panel_id = gp.internal_id - INNER JOIN genetic_profile g ON sp.genetic_profile_id = g.genetic_profile_id - INNER JOIN cancer_study cs ON g.cancer_study_id = cs.cancer_study_id - INNER JOIN sample ON sce.sample_id = sample.internal_id - INNER JOIN patient on sample.patient_id = patient.internal_id - INNER JOIN gene ON ce.entrez_gene_id = gene.entrez_gene_id - INNER JOIN reference_genome_gene rgg ON rgg.entrez_gene_id = ce.entrez_gene_id -UNION ALL -SELECT concat(cs.cancer_study_identifier, '_', s.stable_id) AS sample_unique_id, - gene.hugo_gene_symbol AS hugo_gene_symbol, - ifNull(gene_panel.stable_id, 'WES') AS gene_panel_stable_id, - cs.cancer_study_identifier AS cancer_study_identifier, - gp.stable_id AS genetic_profile_stable_id, - 'structural_variant' AS variant_type, - 'NA' AS mutation_variant, - 'NA' AS mutation_type, - 'NA' AS mutation_status, - 'NA' AS driver_filter, - 'NA' AS drivet_tiers_filter, - NULL AS cna_alteration, - '' AS cna_cytoband, - event_info AS sv_event_info, - concat(cs.cancer_study_identifier, '_', patient.stable_id) AS patient_unique_id -FROM structural_variant sv - INNER JOIN genetic_profile gp ON sv.genetic_profile_id = gp.genetic_profile_id - INNER JOIN sample s ON sv.sample_id = s.internal_id - INNER JOIN patient on s.patient_id = patient.internal_id - INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id - INNER JOIN gene ON sv.site1_entrez_gene_id = gene.entrez_gene_id - INNER JOIN sample_profile ON s.internal_id = sample_profile.sample_id AND sample_profile.genetic_profile_id = sv.genetic_profile_id - LEFT JOIN gene_panel ON sample_profile.panel_id = gene_panel.internal_id -UNION ALL -SELECT concat(cs.cancer_study_identifier, '_', s.stable_id) AS sample_unique_id, - gene.hugo_gene_symbol AS hugo_gene_symbol, - ifNull(gene_panel.stable_id, 'WES') AS gene_panel_stable_id, - cs.cancer_study_identifier AS cancer_study_identifier, - gp.stable_id AS genetic_profile_stable_id, - 'structural_variant' AS variant_type, - 'NA' AS mutation_variant, - 'NA' AS mutation_type, - 'NA' AS mutation_status, - 'NA' AS driver_filter, - 'NA' AS drivet_tiers_filter, - NULL AS cna_alteration, - '' AS cna_cytoband, - event_info AS sv_event_info, - concat(cs.cancer_study_identifier, '_', patient.stable_id) AS patient_unique_id -FROM structural_variant sv - INNER JOIN genetic_profile gp ON sv.genetic_profile_id = gp.genetic_profile_id - INNER JOIN sample s ON sv.sample_id = s.internal_id - INNER JOIN patient on s.patient_id = patient.internal_id - INNER JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id - INNER JOIN gene ON sv.site2_entrez_gene_id = gene.entrez_gene_id - INNER JOIN sample_profile ON s.internal_id = sample_profile.sample_id AND sample_profile.genetic_profile_id = sv.genetic_profile_id - LEFT JOIN gene_panel ON sample_profile.panel_id = gene_panel.internal_id -WHERE - sv.site2_entrez_gene_id != sv.site1_entrez_gene_id - OR sv.site1_entrez_gene_id IS NULL; - -INSERT INTO sample_derived -SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_unique_id, - base64Encode(sample.stable_id) AS sample_unique_id_base64, - sample.stable_id AS sample_stable_id, - concat(cs.cancer_study_identifier, '_', p.stable_id) AS patient_unique_id, - p.stable_id AS patient_stable_id, - base64Encode(p.stable_id) AS patient_unique_id_base64, - cs.cancer_study_identifier AS cancer_study_identifier, - sample.internal_id AS internal_id -FROM sample - INNER JOIN patient AS p ON sample.patient_id = p.internal_id - INNER JOIN cancer_study AS cs ON p.cancer_study_id = cs.cancer_study_id \ No newline at end of file diff --git a/src/main/resources/db-scripts/clickhouse/derived_tables.sql b/src/main/resources/db-scripts/clickhouse/derived_tables.sql deleted file mode 100644 index 0e982ed106f..00000000000 --- a/src/main/resources/db-scripts/clickhouse/derived_tables.sql +++ /dev/null @@ -1,47 +0,0 @@ --- clinical_data_derived -DROP TABLE IF EXISTS clinical_data_derived; -CREATE TABLE IF NOT EXISTS clinical_data_derived -( - sample_unique_id String, - patient_unique_id String, - attribute_name String, - attribute_value String, - cancer_study_identifier String, - type String -) - ENGINE=MergeTree - ORDER BY sample_unique_id; - --- Insert sample attribute data -INSERT INTO TABLE clinical_data_derived -SELECT sm.sample_unique_id AS sample_unique_id, - sm.patient_unique_id AS patient_unique_id, - cam.attr_id AS attribute_name, - csamp.attr_value AS attribute_value, - cs.cancer_study_identifier AS cancer_study_identifier, - 'sample' AS type -FROM sample_mv AS sm - INNER JOIN cancer_study AS cs - ON sm.cancer_study_identifier = cs.cancer_study_identifier - FULL OUTER JOIN clinical_attribute_meta AS cam - ON cs.cancer_study_id = cam.cancer_study_id - FULL OUTER JOIN clinical_sample AS csamp - ON (sm.internal_id = csamp.internal_id) AND (csamp.attr_id = cam.attr_id) -WHERE cam.patient_attribute = 0; - --- INSERT patient attribute data -INSERT INTO TABLE clinical_data_derived -SELECT NULL AS sample_unique_id, - concat(cs.cancer_study_identifier, '_', p.stable_id) AS patient_unique_id, - cam.attr_id AS attribute_name, - clinpat.attr_value AS attribute_value, - cs.cancer_study_identifier AS cancer_study_identifier, - 'patient' AS type -FROM patient AS p - INNER JOIN cancer_study AS cs ON p.cancer_study_id = cs.cancer_study_id - FULL OUTER JOIN clinical_attribute_meta AS cam - ON cs.cancer_study_id = cam.cancer_study_id - FULL OUTER JOIN clinical_patient AS clinpat - ON (p.internal_id = clinpat.internal_id) AND (clinpat.attr_id = cam.attr_id) -WHERE cam.patient_attribute = 1; - diff --git a/src/main/resources/db-scripts/clickhouse/materialized_views.sql b/src/main/resources/db-scripts/clickhouse/materialized_views.sql index 8595d6edb4d..0bde005094b 100644 --- a/src/main/resources/db-scripts/clickhouse/materialized_views.sql +++ b/src/main/resources/db-scripts/clickhouse/materialized_views.sql @@ -1,46 +1,6 @@ -DROP TABLE IF EXISTS sample_columnstore; DROP TABLE IF EXISTS sample_list_columnstore; -DROP VIEW IF EXISTS sample_columnstore_mv; DROP VIEW IF EXISTS sample_list_columnstore_mv; --- sample_columnstore -CREATE TABLE IF NOT EXISTS sample_columnstore -( - sample_unique_id VARCHAR(45), - sample_unique_id_base64 VARCHAR(45), - sample_stable_id VARCHAR(45), - patient_unique_id VARCHAR(45), - patient_unique_id_base64 VARCHAR(45), - patient_stable_id VARCHAR(45), - cancer_study_identifier VARCHAR(45) -) - ENGINE = MergeTree - ORDER BY (sample_unique_id, patient_unique_id, cancer_study_identifier); - -INSERT INTO sample_columnstore -SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) as sample_unique_id, - base64Encode(sample.stable_id) as sample_unique_id_base64, - sample.stable_id as sample_stable_id, - concat(cs.cancer_study_identifier, '_', p.stable_id) as patient_unique_id, - p.stable_id as patient_stable_id, - base64Encode(p.stable_id) as patient_unique_id_base64, - cs.cancer_study_identifier as cancer_study_identifier -FROM sample - INNER JOIN patient p on sample.patient_id = p.internal_id - INNER JOIN cancer_study cs on p.cancer_study_id = cs.cancer_study_id; - -CREATE MATERIALIZED VIEW sample_columnstore_mv TO sample_columnstore AS -SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) as sample_unique_id, - sample.stable_id as sample_stable_id, - base64Encode(sample.stable_id) as sample_unique_id_base64, - concat(cs.cancer_study_identifier, '_', p.stable_id) as patient_unique_id, - p.stable_id as patient_stable_id, - base64Encode(p.stable_id) as patient_unique_id_base64, - cs.cancer_study_identifier as cancer_study_identifier -FROM sample - INNER JOIN patient p on sample.patient_id = p.internal_id - INNER JOIN cancer_study cs on p.cancer_study_id = cs.cancer_study_id; - CREATE TABLE IF NOT EXISTS sample_list_columnstore ( sample_unique_id VARCHAR(45), @@ -70,26 +30,3 @@ FROM sample_list as sl INNER JOIN sample_list_list AS sll on sll.list_id = sl.list_id INNER JOIN sample AS s on s.internal_id = sll.sample_id INNER JOIN cancer_study cs on sl.cancer_study_id = cs.cancer_study_id; - - - --- SAMPLE_MV -DROP VIEW IF EXISTS sample_mv; -CREATE MATERIALIZED VIEW sample_mv - ENGINE = AggregatingMergeTree() - ORDER BY internal_id - SETTINGS allow_nullable_key = 1 - POPULATE -AS - -SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_unique_id, - base64Encode(sample.stable_id) AS sample_unique_id_base64, - sample.stable_id AS sample_stable_id, - concat(cs.cancer_study_identifier, '_', p.stable_id) AS patient_unique_id, - p.stable_id AS patient_stable_id, - base64Encode(p.stable_id) AS patient_unique_id_base64, - cs.cancer_study_identifier AS cancer_study_identifier, - sample.internal_id AS internal_id -FROM sample - INNER JOIN patient AS p ON sample.patient_id = p.internal_id - INNER JOIN cancer_study AS cs ON p.cancer_study_id = cs.cancer_study_id; diff --git a/src/main/resources/db-scripts/clickhouse/views.sql b/src/main/resources/db-scripts/clickhouse/views.sql deleted file mode 100644 index 27845d1052b..00000000000 --- a/src/main/resources/db-scripts/clickhouse/views.sql +++ /dev/null @@ -1,27 +0,0 @@ -DROP VIEW IF EXISTS sample_view; -DROP VIEW IF EXISTS sample_list_view; - - -CREATE VIEW sample_view - AS -SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) as sample_unique_id, - base64Encode(sample.stable_id) as sample_unique_id_base64, - sample.stable_id as sample_stable_id, - concat(cs.cancer_study_identifier, '_', p.stable_id) as patient_unique_id, - p.stable_id as patient_stable_id, - base64Encode(p.stable_id) as patient_unique_id_base64, - cs.cancer_study_identifier as cancer_study_identifier -FROM sample - INNER JOIN patient p on sample.patient_id = p.internal_id - INNER JOIN cancer_study cs on p.cancer_study_id = cs.cancer_study_id; - -CREATE VIEW sample_list_view - AS -SELECT concat(cs.cancer_study_identifier, '_', s.stable_id) as sample_unique_id, - sl.stable_id as sample_list_stable_id, - sl.name as name, - cs.cancer_study_identifier as cancer_study_identifier -FROM sample_list as sl - INNER JOIN sample_list_list AS sll on sll.list_id = sl.list_id - INNER JOIN sample AS s on s.internal_id = sll.sample_id - INNER JOIN cancer_study cs on sl.cancer_study_id = cs.cancer_study_id; \ No newline at end of file diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index 078afabea47..78926fff053 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -257,8 +257,8 @@ SELECT gene as hugoGeneSymbol, COUNT(*) as numberOfProfiledCases - FROM sample_to_gene_panel stgp - INNER JOIN gene_panel_to_gene gptg on stgp.gene_panel_id = gptg.gene_panel_id + FROM sample_to_gene_panel_derived stgp + INNER JOIN gene_panel_to_gene_derived gptg on stgp.gene_panel_id = gptg.gene_panel_id stgp.alteration_type = '${alterationType}' AND @@ -277,7 +277,7 @@ - - - + - + - - + SELECT attribute_name as attributeId, - if(attribute_value='', 'NA', attribute_value) AS value, + + + + , count(value) as count FROM clinical_data_derived @@ -199,10 +196,13 @@ value - + SELECT attribute_name as attributeId, - if(attribute_value='', 'NA', attribute_value) AS value, + + + + , count(value) as count FROM clinical_data_derived @@ -331,4 +331,23 @@ AND patient_unique_id IN () + + + + ${attribute_value}='' + OR upperUTF8(${attribute_value})='NA' + OR upperUTF8(${attribute_value})='NAN' + OR upperUTF8(${attribute_value})='N/A' + + + + if( + + + , + 'NA', + ${attribute_value} + ) + AS ${as_value} + From 6df137f734f86090db9796ae8c3ece7457dd47c9 Mon Sep 17 00:00:00 2001 From: alisman Date: Thu, 18 Jul 2024 11:54:08 -0400 Subject: [PATCH 27/87] Fix patient_derived table population (patient stable id was getting base64) (#10898) --- src/main/resources/db-scripts/clickhouse/clickhouse.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/db-scripts/clickhouse/clickhouse.sql b/src/main/resources/db-scripts/clickhouse/clickhouse.sql index fcbe2fe1d01..83c517f15c7 100644 --- a/src/main/resources/db-scripts/clickhouse/clickhouse.sql +++ b/src/main/resources/db-scripts/clickhouse/clickhouse.sql @@ -67,8 +67,8 @@ SELECT concat(cs.cancer_study_identifier, '_', sample.stable_id) AS sample_uniqu base64Encode(sample.stable_id) AS sample_unique_id_base64, sample.stable_id AS sample_stable_id, concat(cs.cancer_study_identifier, '_', p.stable_id) AS patient_unique_id, - p.stable_id AS patient_stable_id, base64Encode(p.stable_id) AS patient_unique_id_base64, + p.stable_id AS patient_stable_id, cs.cancer_study_identifier AS cancer_study_identifier, sample.internal_id AS internal_id FROM sample From 3455f97967abf741bc4faa87652b3139c6c9647a Mon Sep 17 00:00:00 2001 From: alisman Date: Thu, 18 Jul 2024 11:56:21 -0400 Subject: [PATCH 28/87] Always load frontend over https (localdev mode) (#10901) --- src/main/resources/templates/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 34cb24cc2f3..3b828ef82bd 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -32,7 +32,7 @@ window.netlify = localStorage.netlify; if (window.localdev || window.localdist) { - window.frontendConfig.frontendUrl = "//localhost:3000/" + window.frontendConfig.frontendUrl = "https://localhost:3000/" localStorage.setItem("e2etest", "true"); } else if (window.netlify) { window.frontendConfig.frontendUrl = ['//',localStorage.netlify,'.netlify.app','/'].join(''); From 77bf77fa5725d11dc15c857265e6012fb8e76497 Mon Sep 17 00:00:00 2001 From: Charles Haynes <33608920+haynescd@users.noreply.github.com> Date: Fri, 19 Jul 2024 11:21:48 -0400 Subject: [PATCH 29/87] Rfc80/clinical event timeline endpoint (#10899) * Add Clinical Events Timeline counts endpoint * Add comments for StudyViewFilter --- .../persistence/StudyViewRepository.java | 3 + .../mybatisclickhouse/StudyViewMapper.java | 3 + .../StudyViewMyBatisRepository.java | 41 ++-- .../service/StudyViewColumnarService.java | 3 + .../impl/StudyViewColumnarServiceImpl.java | 8 +- .../StudyViewColumnStoreController.java | 27 ++- .../db-scripts/clickhouse/clickhouse.sql | 29 +++ .../StudyViewFilterMapper.xml | 18 ++ .../mybatisclickhouse/StudyViewMapper.xml | 183 +++++++++++------- .../StudyViewMapperTest.java | 38 +++- src/test/resources/clickhouse_cgds.sql | 6 +- src/test/resources/clickhouse_data.sql | 2 +- 12 files changed, 271 insertions(+), 90 deletions(-) diff --git a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java index 696d8a4bdd5..1c93f3ef57d 100644 --- a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java +++ b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java @@ -5,6 +5,7 @@ import org.cbioportal.model.CaseListDataCount; import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCount; +import org.cbioportal.model.ClinicalEventTypeCount; import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.Sample; @@ -44,4 +45,6 @@ public interface StudyViewRepository { Map> getMatchingGenePanelIds(StudyViewFilter studyViewFilter, String alterationType); int getTotalProfiledCountsByAlterationType(StudyViewFilter studyViewFilter, String alterationType); + + List getClinicalEventTypeCounts(StudyViewFilter studyViewFilter); } diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java index a739590e5be..0e762a1d07a 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java @@ -6,6 +6,7 @@ import org.cbioportal.model.ClinicalAttribute; import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCount; +import org.cbioportal.model.ClinicalEventTypeCount; import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.GenePanelToGene; import org.cbioportal.model.GenomicDataCount; @@ -51,4 +52,6 @@ List getClinicalDataCounts(StudyViewFilter studyViewFilter, C List getMatchingGenePanelIds(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, String alterationType); int getTotalProfiledCountByAlterationType(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, String alterationType); + + List getClinicalEventTypeCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); } diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java index 0df436bff4f..a0709db0e78 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java @@ -4,6 +4,7 @@ import org.cbioportal.model.CaseListDataCount; import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCount; +import org.cbioportal.model.ClinicalEventTypeCount; import org.cbioportal.model.GenePanelToGene; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.CopyNumberCountByGene; @@ -39,14 +40,14 @@ public StudyViewMyBatisRepository(StudyViewMapper mapper) { @Override public List getFilteredSamples(StudyViewFilter studyViewFilter) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getFilteredSamples(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter)); + return mapper.getFilteredSamples(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter)); } @Override public List getMutatedGenes(StudyViewFilter studyViewFilter) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getMutatedGenes(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), + shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), AlterationFilterHelper.build(studyViewFilter.getAlterationFilter())); } @@ -54,7 +55,7 @@ public List getMutatedGenes(StudyViewFilter studyViewFilt public List getCnaGenes(StudyViewFilter studyViewFilter) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getCnaGenes(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), + shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), AlterationFilterHelper.build(studyViewFilter.getAlterationFilter())); } @@ -62,21 +63,23 @@ public List getCnaGenes(StudyViewFilter studyViewFilter) public List getStructuralVariantGenes(StudyViewFilter studyViewFilter) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getStructuralVariantGenes(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), + shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), AlterationFilterHelper.build(studyViewFilter.getAlterationFilter())); } @Override public List getClinicalDataCounts(StudyViewFilter studyViewFilter, List filteredAttributes) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), + return mapper.getClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, + shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), filteredAttributes, FILTERED_CLINICAL_ATTR_VALUES ); } @Override public List getGenomicDataCounts(StudyViewFilter studyViewFilter) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getGenomicDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter)); + return mapper.getGenomicDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, + shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter)); } @Override @@ -106,46 +109,47 @@ public Map getClinicalAttributeDatatypeMap() { @Override public List getCaseListDataCounts(StudyViewFilter studyViewFilter) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getCaseListDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter)); + return mapper.getCaseListDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter)); } - private boolean shouldApplyPatientIdFilters(CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { - return categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters().isEmpty() + private boolean shouldApplyPatientIdFilters(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { + return studyViewFilter.getClinicalEventFilters() != null && !studyViewFilter.getClinicalEventFilters().isEmpty() + || categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters().isEmpty() || categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters().isEmpty(); } @Override public List getSampleClinicalData(StudyViewFilter studyViewFilter, List attributeIds) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getSampleClinicalDataFromStudyViewFilter(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), attributeIds); + return mapper.getSampleClinicalDataFromStudyViewFilter(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), attributeIds); } @Override public List getPatientClinicalData(StudyViewFilter studyViewFilter, List attributeIds) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), attributeIds); + return mapper.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), attributeIds); } @Override public Map getTotalProfiledCounts(StudyViewFilter studyViewFilter, String alterationType) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getTotalProfiledCounts(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), alterationType); + shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), alterationType); } @Override public int getFilteredSamplesCount(StudyViewFilter studyViewFilter) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getFilteredSamplesCount(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter)); + shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter)); } @Override public Map> getMatchingGenePanelIds(StudyViewFilter studyViewFilter, String alterationType) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getMatchingGenePanelIds(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), alterationType) + shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), alterationType) .stream() .collect(Collectors.groupingBy(GenePanelToGene::getHugoGeneSymbol, Collectors.mapping(GenePanelToGene::getGenePanelId, Collectors.toSet()))); @@ -155,7 +159,14 @@ public Map> getMatchingGenePanelIds(StudyViewFilter studyVie public int getTotalProfiledCountsByAlterationType(StudyViewFilter studyViewFilter, String alterationType) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getTotalProfiledCountByAlterationType(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), alterationType); + shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), alterationType); + } + + @Override + public List getClinicalEventTypeCounts(StudyViewFilter studyViewFilter) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); + return mapper.getClinicalEventTypeCounts(studyViewFilter, categorizedClinicalDataCountFilter, + shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter)); } private void buildClinicalAttributeNameMap() { diff --git a/src/main/java/org/cbioportal/service/StudyViewColumnarService.java b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java index 7018f0e3e26..8ae5ea20608 100644 --- a/src/main/java/org/cbioportal/service/StudyViewColumnarService.java +++ b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java @@ -4,6 +4,7 @@ import org.cbioportal.model.CaseListDataCount; import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCountItem; +import org.cbioportal.model.ClinicalEventTypeCount; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.Sample; @@ -32,5 +33,7 @@ public interface StudyViewColumnarService { List getSampleClinicalData(StudyViewFilter studyViewFilter, List attributeIds); List getGenomicDataCounts(StudyViewFilter studyViewFilter); + + List getClinicalEventTypeCounts(StudyViewFilter studyViewFilter); } diff --git a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java index e1759dc47b7..b73ca064803 100644 --- a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java @@ -5,6 +5,7 @@ import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCount; import org.cbioportal.model.ClinicalDataCountItem; +import org.cbioportal.model.ClinicalEventTypeCount; import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.Sample; @@ -50,7 +51,12 @@ public List getMutatedGenes(StudyViewFilter studyViewFilt public List getGenomicDataCounts(StudyViewFilter studyViewFilter) { return studyViewRepository.getGenomicDataCounts(studyViewFilter); } - + + @Override + public List getClinicalEventTypeCounts(StudyViewFilter studyViewFilter) { + return studyViewRepository.getClinicalEventTypeCounts(studyViewFilter); + } + public List getCnaGenes(StudyViewFilter studyViewFilter) { return alterationCountService.getCnaGenes(studyViewFilter); } diff --git a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java index 6393b061164..3ec1ccf90a6 100644 --- a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java +++ b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java @@ -13,9 +13,10 @@ import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataBin; import org.cbioportal.model.ClinicalDataCountItem; +import org.cbioportal.model.ClinicalEventTypeCount; import org.cbioportal.model.ClinicalViolinPlotData; -import org.cbioportal.model.DensityPlotData; import org.cbioportal.model.CopyNumberCountByGene; +import org.cbioportal.model.DensityPlotData; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.Sample; import org.cbioportal.service.ClinicalDataDensityPlotService; @@ -325,4 +326,28 @@ public ResponseEntity fetchClinicalDataViolinPlots( return new ResponseEntity<>(result, HttpStatus.OK); } + + @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") + @PostMapping(value = "/column-store/clinical-event-type-counts/fetch", consumes = MediaType.APPLICATION_JSON_VALUE, + produces = MediaType.APPLICATION_JSON_VALUE) + @Operation(description = "Get Counts of Clinical Event Types by Study View Filter") + @ApiResponse(responseCode = "200", description = "OK", + content = @Content(array = @ArraySchema(schema = @Schema(implementation = ClinicalEventTypeCount.class)))) + public ResponseEntity> getClinicalEventTypeCounts( + @Parameter(required = true, description = "Study view filter") + @Valid + @RequestBody(required = false) + StudyViewFilter studyViewFilter, + + @Parameter(hidden = true) // prevent reference to this attribute in the swagger-ui interface + @RequestAttribute(required = false, value = "involvedCancerStudies") + Collection involvedCancerStudies, + + @Parameter(hidden = true) // prevent reference to this attribute in the swagger-ui interface. this attribute is needed for the @PreAuthorize tag above. + @Valid + @RequestAttribute(required = false, value = "interceptedStudyViewFilter") + StudyViewFilter interceptedStudyViewFilter + ) { + return new ResponseEntity<>(studyViewColumnarService.getClinicalEventTypeCounts(interceptedStudyViewFilter), HttpStatus.OK); + } } diff --git a/src/main/resources/db-scripts/clickhouse/clickhouse.sql b/src/main/resources/db-scripts/clickhouse/clickhouse.sql index 83c517f15c7..5cad1670464 100644 --- a/src/main/resources/db-scripts/clickhouse/clickhouse.sql +++ b/src/main/resources/db-scripts/clickhouse/clickhouse.sql @@ -3,6 +3,7 @@ DROP TABLE IF EXISTS gene_panel_to_gene_derived; DROP TABLE IF EXISTS sample_derived; DROP TABLE IF EXISTS genomic_event_derived; DROP TABLE IF EXISTS clinical_data_derived; +DROP TABLE IF EXISTS clinical_event_derived; CREATE TABLE sample_to_gene_panel_derived @@ -249,8 +250,36 @@ FROM patient AS p ON (p.internal_id = clinpat.internal_id) AND (clinpat.attr_id = cam.attr_id) WHERE cam.patient_attribute = 1; +CREATE TABLE clinical_event_derived +( + patient_unique_id String, + key String, + value String, + start_date Int32, + stop_date Int32 DEFAULT 0, + event_type LowCardinality(String), + cancer_study_identifier LowCardinality(String) +) +ENGINE = MergeTree + ORDER BY (event_type, patient_unique_id, cancer_study_identifier); + +INSERT INTO clinical_event_derived +SELECT + concat(cs.cancer_study_identifier, '_', p.stable_id) AS patient_unique_id, + ced.key AS key, + ced.value AS value, + ce.start_date AS start_date, + ifNull(ce.stop_date, 0) AS stop_date, + ce.event_type AS event_type, + cs.cancer_study_identifier +FROM clinical_event ce + LEFT JOIN clinical_event_data ced ON ce.clinical_event_id = ced.clinical_event_id + INNER JOIN patient p ON ce.patient_id = p.internal_id + INNER JOIN cancer_study cs ON p.cancer_study_id = cs.cancer_study_id; + OPTIMIZE TABLE sample_to_gene_panel_derived; OPTIMIZE TABLE gene_panel_to_gene_derived; OPTIMIZE TABLE sample_derived; OPTIMIZE TABLE genomic_event_derived; OPTIMIZE TABLE clinical_data_derived; +OPTIMIZE TABLE clinical_event_derived; \ No newline at end of file diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index ca63efa765b..44d3cd5523c 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -109,6 +109,20 @@ + + + SELECT patient_unique_id + FROM clinical_event_derived + + + event_type = '${dataFilterValue.value}' + + + + + @@ -129,6 +143,10 @@ + + + + diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index 040ccedfc90..576c5b7378b 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -13,13 +13,10 @@ patient_unique_id_base64 as uniquePatientKey FROM sample_derived - sample_unique_id IN ( ) - - - AND patient_unique_id IN () - + + + - ORDER BY sample_stable_id ASC; @@ -32,7 +29,9 @@ FROM genomic_event_derived variant_type = 'mutation' AND - + + + @@ -52,7 +51,9 @@ FROM genomic_event_derived variant_type = 'cna' AND - + + + @@ -69,7 +70,9 @@ FROM genomic_event_derived variant_type = 'structural_variant' AND - + + + GROUP BY hugo_gene_symbol; @@ -83,12 +86,9 @@ cancer_study_identifier as studyId FROM clinical_data_derived - sample_unique_id IN ( - - - INTERSECT - - ) + + + AND attribute_name IN @@ -107,12 +107,9 @@ cancer_study_identifier as studyId FROM clinical_data_derived - patient_unique_id IN ( - - - INTERSECT - - ) + + + AND attribute_name IN @@ -141,7 +138,9 @@ LEFT JOIN sample_derived ON sample_profile.sample_id=sample_derived.internal_id LEFT JOIN genetic_profile on sample_profile.genetic_profile_id = genetic_profile.genetic_profile_id - sample_unique_id IN ( ) + + + GROUP BY genetic_profile.stable_id, genetic_profile.name, sample_derived.cancer_study_identifier; @@ -157,7 +156,9 @@ LEFT JOIN sample_derived s ON sll.sample_id=s.internal_id LEFT JOIN sample_list sl on sll.list_id=sl.list_id - sample_unique_id IN ( ) + + + GROUP BY s.cancer_study_identifier, sl.stable_id, sl.name; @@ -174,13 +175,9 @@ FROM clinical_data_derived type='sample' AND - sample_unique_id IN ( - - INTERSECT - SELECT sample_unique_id from sample_derived WHERE sample_derived.patient_unique_id IN - () - - ) + + + AND UPPER(value) NOT IN @@ -207,11 +204,9 @@ FROM clinical_data_derived type='patient' AND - patient_unique_id IN ( - - INTERSECT - - ) + + + AND UPPER(value) NOT IN @@ -227,22 +222,6 @@ value - - SELECT sample_unique_id - FROM sample_derived - - patient_unique_id IN () - - - - - SELECT patient_unique_id - FROM sample_derived - - sample_unique_id IN () - - - @@ -282,11 +259,9 @@ stgp.alteration_type = '${alterationType}' AND - sample_unique_id IN ( - - INTERSECT - - ) + + + @@ -296,7 +271,9 @@ COUNT(*) FROM sample_derived - + + + @@ -313,24 +290,94 @@ alteration_type = '${alterationType}' AND - sample_unique_id IN ( - - INTERSECT - - ) + + + ) GROUP BY gene, gene_panel_id; + + + + + + + + + + + sample_unique_id IN ( ) + + AND patient_unique_id IN () + + + + + + + + patient_unique_id in ( + SELECT patient_unique_id + FROM sample_derived + + sample_unique_id IN () + + + + INTERSECT + + + ) + + + + sample_unique_id IN ( ) - AND patient_unique_id IN () + INTERSECT + + + + SELECT sample_unique_id + FROM sample_derived + + patient_unique_id IN () + + diff --git a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java index dfde0006df9..f8019f72e54 100644 --- a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java +++ b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java @@ -5,6 +5,8 @@ import org.cbioportal.persistence.helper.AlterationFilterHelper; import org.cbioportal.persistence.mybatisclickhouse.config.MyBatisConfig; import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; +import org.cbioportal.web.parameter.DataFilter; +import org.cbioportal.web.parameter.DataFilterValue; import org.cbioportal.web.parameter.StudyViewFilter; import org.junit.Test; import org.junit.runner.RunWith; @@ -22,6 +24,8 @@ import java.util.Objects; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; @RunWith(SpringRunner.class) @Import(MyBatisConfig.class) @@ -112,7 +116,39 @@ public void getTotalProfiledCountsByGene() { var akt2TotalProfiledCounts = totalProfiledCountsMap.get("akt2"); assertEquals(4, akt2TotalProfiledCounts.getNumberOfProfiledCases().intValue()); - } + + @Test + public void getClinicalEventTypeCounts() { + StudyViewFilter studyViewFilter = new StudyViewFilter(); + studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB)); + + var clinicalEventTypeCounts = studyViewMapper.getClinicalEventTypeCounts(studyViewFilter, + CategorizedClinicalDataCountFilter.getBuilder().build(), false); + + assertEquals(4, clinicalEventTypeCounts.size()); + + var clinicalEventTypeCountOptional = clinicalEventTypeCounts.stream().filter(ce -> ce.getEventType().equals("treatment")) + .findFirst(); + + assertTrue(clinicalEventTypeCountOptional.isPresent()); + assertEquals(1, clinicalEventTypeCountOptional.get().getCount().intValue()); + + DataFilter dataFilter = new DataFilter(); + DataFilterValue dataFilterValue = new DataFilterValue(); + dataFilterValue.setValue("treatment"); + dataFilter.setValues(List.of(dataFilterValue)); + studyViewFilter.setClinicalEventFilters(List.of(dataFilter)); + + clinicalEventTypeCounts = studyViewMapper.getClinicalEventTypeCounts(studyViewFilter, + CategorizedClinicalDataCountFilter.getBuilder().build(), true); + + assertEquals(2, clinicalEventTypeCounts.size()); + + clinicalEventTypeCountOptional = clinicalEventTypeCounts.stream().filter(ce -> ce.getEventType().equals("status")) + .findFirst(); + + assertFalse(clinicalEventTypeCountOptional.isPresent()); + } } \ No newline at end of file diff --git a/src/test/resources/clickhouse_cgds.sql b/src/test/resources/clickhouse_cgds.sql index b5a3f2ed8f4..0b7945d4cfa 100644 --- a/src/test/resources/clickhouse_cgds.sql +++ b/src/test/resources/clickhouse_cgds.sql @@ -543,10 +543,10 @@ CREATE TABLE cosmic_mutation CREATE TABLE clinical_event ( clinical_event_id Int32, - patient_id Nullable(Int32), + patient_id Int, event_type String, - start_date Nullable(DateTime), - stop_date Nullable(DateTime) + start_date Int32 default 0, + stop_date Int32 default 0 ) ENGINE = MergeTree() ORDER BY clinical_event_id; -- -------------------------------------------------------- diff --git a/src/test/resources/clickhouse_data.sql b/src/test/resources/clickhouse_data.sql index bbc0fb76143..16193741624 100644 --- a/src/test/resources/clickhouse_data.sql +++ b/src/test/resources/clickhouse_data.sql @@ -454,7 +454,7 @@ insert into gistic_to_gene (gistic_roi_id,entrez_gene_id) values (1,208); insert into gistic_to_gene (gistic_roi_id,entrez_gene_id) values (2,207); insert into gistic_to_gene (gistic_roi_id,entrez_gene_id) values (3,208); -insert into clinical_event (clinical_event_id,patient_id,start_date,stop_date,event_type) values (1,1,123,null,'status'); +insert into clinical_event (clinical_event_id,patient_id,start_date,stop_date,event_type) values (1,1,123,0,'status'); insert into clinical_event (clinical_event_id,patient_id,start_date,stop_date,event_type) values (2,1,233,345,'specimen'); insert into clinical_event (clinical_event_id,patient_id,start_date,stop_date,event_type) values (3,2,213,445,'treatment'); insert into clinical_event (clinical_event_id,patient_id,start_date,stop_date,event_type) values (4,2,211,441,'seqencing'); From 18a5ee78fac3c8fa86ee2c16894b9cdedc6e291c Mon Sep 17 00:00:00 2001 From: Charles Haynes <33608920+haynescd@users.noreply.github.com> Date: Mon, 29 Jul 2024 12:21:30 -0400 Subject: [PATCH 30/87] Fix alteration count services (#10911) * Fix alteration count services * Only add genes that are protein coding to gene_panel_to_gene table for WES * fix test * fix sonar issues * Add documentation for filtering out WES --- .../persistence/StudyViewRepository.java | 4 ++- .../mybatisclickhouse/StudyViewMapper.java | 5 ++-- .../StudyViewMyBatisRepository.java | 15 ++++++++-- .../impl/AlterationCountServiceImpl.java | 29 +++++++------------ .../db-scripts/clickhouse/clickhouse.sql | 2 +- .../mybatisclickhouse/StudyViewMapper.xml | 28 ++++++++++++++---- .../StudyViewMapperTest.java | 5 ++-- 7 files changed, 56 insertions(+), 32 deletions(-) diff --git a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java index 1c93f3ef57d..cc2b2629a58 100644 --- a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java +++ b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java @@ -38,7 +38,7 @@ public interface StudyViewRepository { List getCaseListDataCounts(StudyViewFilter studyViewFilter); - Map getTotalProfiledCounts(StudyViewFilter studyViewFilter, String alterationType); + Map getTotalProfiledCounts(StudyViewFilter studyViewFilter, String alterationType); int getFilteredSamplesCount(StudyViewFilter studyViewFilter); @@ -46,5 +46,7 @@ public interface StudyViewRepository { int getTotalProfiledCountsByAlterationType(StudyViewFilter studyViewFilter, String alterationType); + int getSampleProfileCountWithoutPanelData(StudyViewFilter studyViewFilter, String alterationType); + List getClinicalEventTypeCounts(StudyViewFilter studyViewFilter); } diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java index 0e762a1d07a..a249333641e 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java @@ -44,14 +44,15 @@ List getClinicalDataCounts(StudyViewFilter studyViewFilter, C List getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, List attributeIds); - @MapKey("hugoGeneSymbol") - Map getTotalProfiledCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, String alterationType); + List getTotalProfiledCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, String alterationType); int getFilteredSamplesCount(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); List getMatchingGenePanelIds(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, String alterationType); int getTotalProfiledCountByAlterationType(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, String alterationType); + + int getSampleProfileCountWithoutPanelData(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, String alterationType); List getClinicalEventTypeCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); } diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java index a0709db0e78..1690ba82a8b 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java @@ -132,10 +132,13 @@ public List getPatientClinicalData(StudyViewFilter studyViewFilter } @Override - public Map getTotalProfiledCounts(StudyViewFilter studyViewFilter, String alterationType) { + public Map getTotalProfiledCounts(StudyViewFilter studyViewFilter, String alterationType) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); return mapper.getTotalProfiledCounts(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), alterationType); + shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), alterationType) + .stream() + .collect(Collectors.groupingBy(AlterationCountByGene::getHugoGeneSymbol, + Collectors.mapping(AlterationCountByGene::getNumberOfProfiledCases, Collectors.summingInt(Integer::intValue)))); } @Override @@ -162,6 +165,14 @@ public int getTotalProfiledCountsByAlterationType(StudyViewFilter studyViewFilte shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), alterationType); } + @Override + public int getSampleProfileCountWithoutPanelData(StudyViewFilter studyViewFilter, String alterationType) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); + return mapper.getSampleProfileCountWithoutPanelData(studyViewFilter, categorizedClinicalDataCountFilter, + shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), alterationType); + } + + @Override public List getClinicalEventTypeCounts(StudyViewFilter studyViewFilter) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); diff --git a/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java b/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java index 29f94f0fd0f..a8aa0dbe723 100644 --- a/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java @@ -273,37 +273,28 @@ public List getStructuralVariantGenes(StudyViewFilter stu private < T extends AlterationCountByGene> List populateAlterationCounts(@NonNull List alterationCounts, @NonNull StudyViewFilter studyViewFilter, @NonNull AlterationType alterationType) { - var updatedAlterationCounts = alterationCounts.stream().map(SerializationUtils::clone).toList(); - var profiledCountsMap = studyViewRepository.getTotalProfiledCounts(studyViewFilter, - alterationType.toString()); - var profiledCountWithoutGenePanelData = studyViewRepository.getTotalProfiledCountsByAlterationType(studyViewFilter, alterationType.toString()); - var matchingGenePanelIdsMap = studyViewRepository.getMatchingGenePanelIds(studyViewFilter, alterationType.toString()); + final int profiledCountWithoutGenePanelData = studyViewRepository.getTotalProfiledCountsByAlterationType(studyViewFilter, alterationType.toString()); + var profiledCountsMap = studyViewRepository.getTotalProfiledCounts(studyViewFilter, alterationType.toString()); + final var matchingGenePanelIdsMap = studyViewRepository.getMatchingGenePanelIds(studyViewFilter, alterationType.toString()); + final int sampleProfileCountWithoutGenePanelData = studyViewRepository.getSampleProfileCountWithoutPanelData(studyViewFilter, alterationType.toString()); - updatedAlterationCounts.parallelStream() + alterationCounts.parallelStream() .forEach(alterationCountByGene -> { String hugoGeneSymbol = alterationCountByGene.getHugoGeneSymbol(); Set matchingGenePanelIds = matchingGenePanelIdsMap.get(hugoGeneSymbol) != null ? matchingGenePanelIdsMap.get(hugoGeneSymbol) : Collections.emptySet(); - - int totalProfiledCount = getTotalProfiledCount(hugoGeneSymbol, - profiledCountsMap, profiledCountWithoutGenePanelData, matchingGenePanelIds); + + int totalProfiledCount = hasGenePanelData(matchingGenePanelIds) + ? profiledCountsMap.getOrDefault(hugoGeneSymbol, 0) + sampleProfileCountWithoutGenePanelData + : profiledCountWithoutGenePanelData; alterationCountByGene.setNumberOfProfiledCases(totalProfiledCount); alterationCountByGene.setMatchingGenePanelIds(matchingGenePanelIds); }); - return updatedAlterationCounts; + return alterationCounts; } - private int getTotalProfiledCount(@NonNull String hugoGeneSymbol, @NonNull Map profiledCountsMap, - int profiledCountWithoutGenePanelData, @NonNull Set matchingGenePanelIds) { - int totalProfiledCount = profiledCountWithoutGenePanelData; - - if (hasGenePanelData(matchingGenePanelIds) && profiledCountsMap.containsKey(hugoGeneSymbol)) { - totalProfiledCount = profiledCountsMap.get(hugoGeneSymbol).getNumberOfProfiledCases(); - } - return totalProfiledCount; - } private boolean hasGenePanelData(@NonNull Set matchingGenePanelIds) { return matchingGenePanelIds.contains(WHOLE_EXOME_SEQUENCING) diff --git a/src/main/resources/db-scripts/clickhouse/clickhouse.sql b/src/main/resources/db-scripts/clickhouse/clickhouse.sql index 5cad1670464..3c4b42cbc1f 100644 --- a/src/main/resources/db-scripts/clickhouse/clickhouse.sql +++ b/src/main/resources/db-scripts/clickhouse/clickhouse.sql @@ -47,7 +47,7 @@ SELECT 'WES' AS gene_panel_id, gene.hugo_gene_symbol AS gene FROM gene -WHERE gene.entrez_gene_id > 0; +WHERE gene.entrez_gene_id > 0 AND gene.type = 'protein-coding'; CREATE TABLE sample_derived ( diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index 576c5b7378b..e4e226be8c2 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -232,15 +232,22 @@ JOIN cancer_study cs on cs.cancer_study_id = cam.cancer_study_id - - + SELECT gene as hugoGeneSymbol, COUNT(*) as numberOfProfiledCases FROM sample_to_gene_panel_derived stgp INNER JOIN gene_panel_to_gene_derived gptg on stgp.gene_panel_id = gptg.gene_panel_id - stgp.alteration_type = '${alterationType}' + stgp.alteration_type = '${alterationType}' + AND stgp.gene_panel_id != 'WES' AND @@ -248,7 +255,18 @@ GROUP BY gptg.gene; - + + diff --git a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java index f8019f72e54..0a6279ae937 100644 --- a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java +++ b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java @@ -114,8 +114,9 @@ public void getTotalProfiledCountsByGene() { assertEquals(3, totalProfiledCountsMap.size()); - var akt2TotalProfiledCounts = totalProfiledCountsMap.get("akt2"); - assertEquals(4, akt2TotalProfiledCounts.getNumberOfProfiledCases().intValue()); + var akt2TotalProfiledCounts = totalProfiledCountsMap.stream().filter(c -> c.getHugoGeneSymbol().equals("akt2")).findFirst(); + assertTrue(akt2TotalProfiledCounts.isPresent()); + assertEquals(4, akt2TotalProfiledCounts.get().getNumberOfProfiledCases().intValue()); } @Test From 8746a34ae30069d07b98f106ecf9a3f257895393 Mon Sep 17 00:00:00 2001 From: Charles Haynes <33608920+haynescd@users.noreply.github.com> Date: Mon, 29 Jul 2024 12:30:22 -0400 Subject: [PATCH 31/87] Rfc80/treatments patients endpoint (#10903) * Create new endpoint treatment/patient-counts/fetch * Create StudyViewFilterHelper class * :arrow_up: Upgrade CH client Version * Fix Merge Conflict issue * Update Treatment event name * Update to handle patient treatment filtering * Fix sonar issues * Fix sonar comments 2 --- pom.xml | 2 +- .../cbioportal/model/PatientTreatment.java | 7 ++ .../model/PatientTreatmentReport.java | 11 +++ .../persistence/StudyViewRepository.java | 6 ++ .../helper/StudyViewFilterHelper.java | 78 +++++++++++++++++++ .../mybatisclickhouse/StudyViewMapper.java | 5 ++ .../StudyViewMyBatisRepository.java | 30 ++++++- .../service/StudyViewColumnarService.java | 3 +- .../impl/StudyViewColumnarServiceImpl.java | 6 ++ .../StudyViewColumnStoreController.java | 32 ++++++++ ...volvedCancerStudyExtractorInterceptor.java | 4 +- .../StudyViewFilterMapper.xml | 22 +++++- .../mybatisclickhouse/StudyViewMapper.xml | 59 ++++++++++++-- .../StudyViewMapperTest.java | 43 +++++++++- src/test/resources/clickhouse_data.sql | 4 +- 15 files changed, 295 insertions(+), 17 deletions(-) create mode 100644 src/main/java/org/cbioportal/model/PatientTreatment.java create mode 100644 src/main/java/org/cbioportal/model/PatientTreatmentReport.java create mode 100644 src/main/java/org/cbioportal/persistence/helper/StudyViewFilterHelper.java diff --git a/pom.xml b/pom.xml index 33883b323d0..66d86c5536e 100644 --- a/pom.xml +++ b/pom.xml @@ -361,7 +361,7 @@ com.clickhouse clickhouse-jdbc - 0.5.0 + 0.6.2 all diff --git a/src/main/java/org/cbioportal/model/PatientTreatment.java b/src/main/java/org/cbioportal/model/PatientTreatment.java new file mode 100644 index 00000000000..c838d23777e --- /dev/null +++ b/src/main/java/org/cbioportal/model/PatientTreatment.java @@ -0,0 +1,7 @@ +package org.cbioportal.model; + +import java.io.Serializable; + +public record PatientTreatment (String treatment, int count) implements Serializable { + +} diff --git a/src/main/java/org/cbioportal/model/PatientTreatmentReport.java b/src/main/java/org/cbioportal/model/PatientTreatmentReport.java new file mode 100644 index 00000000000..d09a2276f06 --- /dev/null +++ b/src/main/java/org/cbioportal/model/PatientTreatmentReport.java @@ -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 patientTreatments) implements Serializable { + public PatientTreatmentReport(int totalPatients, int totalSamples) { + this(totalPatients, totalSamples, Collections.emptyList()); + } +} diff --git a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java index cc2b2629a58..59deedce6d4 100644 --- a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java +++ b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java @@ -8,6 +8,8 @@ import org.cbioportal.model.ClinicalEventTypeCount; import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.GenomicDataCount; +import org.cbioportal.model.PatientTreatment; +import org.cbioportal.model.PatientTreatmentReport; import org.cbioportal.model.Sample; import org.cbioportal.web.parameter.ClinicalDataType; import org.cbioportal.web.parameter.StudyViewFilter; @@ -49,4 +51,8 @@ public interface StudyViewRepository { int getSampleProfileCountWithoutPanelData(StudyViewFilter studyViewFilter, String alterationType); List getClinicalEventTypeCounts(StudyViewFilter studyViewFilter); + + List getPatientTreatments(StudyViewFilter studyViewFilter); + + PatientTreatmentReport getPatientTreatmentReport(StudyViewFilter studyViewFilter); } diff --git a/src/main/java/org/cbioportal/persistence/helper/StudyViewFilterHelper.java b/src/main/java/org/cbioportal/persistence/helper/StudyViewFilterHelper.java new file mode 100644 index 00000000000..5d63ac03b90 --- /dev/null +++ b/src/main/java/org/cbioportal/persistence/helper/StudyViewFilterHelper.java @@ -0,0 +1,78 @@ +package org.cbioportal.persistence.helper; + +import org.cbioportal.model.ClinicalAttribute; +import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; +import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; +import org.cbioportal.web.parameter.StudyViewFilter; +import org.springframework.lang.NonNull; +import org.springframework.lang.Nullable; + +import java.util.EnumMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +public class StudyViewFilterHelper { + public static StudyViewFilterHelper build(@Nullable StudyViewFilter studyViewFilter, @Nullable EnumMap> clinicalAttributesMap) { + if (Objects.isNull(studyViewFilter)) { + studyViewFilter = new StudyViewFilter(); + } + if (Objects.isNull(clinicalAttributesMap)) { + clinicalAttributesMap = new EnumMap<>(ClinicalAttributeDataSource.class); + } + return new StudyViewFilterHelper(studyViewFilter, clinicalAttributesMap); + } + + private final StudyViewFilter studyViewFilter; + private final CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter; + + + private StudyViewFilterHelper(@NonNull StudyViewFilter studyViewFilter, @NonNull Map> clinicalAttributesMap ) { + this.studyViewFilter = studyViewFilter; + this.categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter, clinicalAttributesMap); + } + + private CategorizedClinicalDataCountFilter extractClinicalDataCountFilters(final StudyViewFilter studyViewFilter, Map> clinicalAttributesMap) { + + if (studyViewFilter.getClinicalDataFilters() == null || clinicalAttributesMap.isEmpty()) { + return CategorizedClinicalDataCountFilter.getBuilder().build(); + } + + List patientCategoricalAttributes = clinicalAttributesMap.get(ClinicalAttributeDataSource.PATIENT) + .stream().filter(ca -> ca.getDatatype().equals("STRING")) + .map(ClinicalAttribute::getAttrId) + .toList(); + + List patientNumericalAttributes = clinicalAttributesMap.get(ClinicalAttributeDataSource.PATIENT) + .stream().filter(ca -> ca.getDatatype().equals("NUMBER")) + .map(ClinicalAttribute::getAttrId) + .toList(); + + List sampleCategoricalAttributes = clinicalAttributesMap.get(ClinicalAttributeDataSource.SAMPLE) + .stream().filter(ca -> ca.getDatatype().equals("STRING")) + .map(ClinicalAttribute::getAttrId) + .toList(); + + List sampleNumericalAttributes = clinicalAttributesMap.get(ClinicalAttributeDataSource.SAMPLE) + .stream().filter(ca -> ca.getDatatype().equals("NUMBER")) + .map(ClinicalAttribute::getAttrId) + .toList(); + + return CategorizedClinicalDataCountFilter.getBuilder() + .setPatientCategoricalClinicalDataFilters(studyViewFilter.getClinicalDataFilters() + .stream().filter(clinicalDataFilter -> patientCategoricalAttributes.contains(clinicalDataFilter.getAttributeId())) + .toList()) + .setPatientNumericalClinicalDataFilters(studyViewFilter.getClinicalDataFilters().stream() + .filter(clinicalDataFilter -> patientNumericalAttributes.contains(clinicalDataFilter.getAttributeId())) + .toList()) + .setSampleCategoricalClinicalDataFilters(studyViewFilter.getClinicalDataFilters().stream() + .filter(clinicalDataFilter -> sampleCategoricalAttributes.contains(clinicalDataFilter.getAttributeId())) + .toList()) + .setSampleNumericalClinicalDataFilters(studyViewFilter.getClinicalDataFilters().stream() + .filter(clinicalDataFilter -> sampleNumericalAttributes.contains(clinicalDataFilter.getAttributeId())) + .toList()) + .build(); + } + + +} diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java index a249333641e..bd9d4b602c3 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java @@ -10,6 +10,8 @@ import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.GenePanelToGene; import org.cbioportal.model.GenomicDataCount; +import org.cbioportal.model.PatientTreatment; +import org.cbioportal.model.PatientTreatmentReport; import org.cbioportal.model.Sample; import org.cbioportal.persistence.helper.AlterationFilterHelper; import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; @@ -55,4 +57,7 @@ List getClinicalDataCounts(StudyViewFilter studyViewFilter, C int getSampleProfileCountWithoutPanelData(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, String alterationType); List getClinicalEventTypeCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); + + List getPatientTreatments(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); + PatientTreatmentReport getPatientTreatmentCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); } diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java index 1690ba82a8b..7da568dabf2 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java @@ -8,6 +8,8 @@ import org.cbioportal.model.GenePanelToGene; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.CopyNumberCountByGene; +import org.cbioportal.model.PatientTreatment; +import org.cbioportal.model.PatientTreatmentReport; import org.cbioportal.model.Sample; import org.cbioportal.persistence.StudyViewRepository; import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; @@ -114,8 +116,9 @@ public List getCaseListDataCounts(StudyViewFilter studyViewFi private boolean shouldApplyPatientIdFilters(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { - return studyViewFilter.getClinicalEventFilters() != null && !studyViewFilter.getClinicalEventFilters().isEmpty() - || categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters().isEmpty() + return studyViewFilter.getClinicalEventFilters() != null && !studyViewFilter.getClinicalEventFilters().isEmpty() + || studyViewFilter.getPatientTreatmentFilters() != null && studyViewFilter.getPatientTreatmentFilters().getFilters()!= null && !studyViewFilter.getPatientTreatmentFilters().getFilters().isEmpty() + || categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters().isEmpty() || categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters().isEmpty(); } @@ -180,12 +183,35 @@ public List getClinicalEventTypeCounts(StudyViewFilter s shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter)); } + @Override + public List getPatientTreatments(StudyViewFilter studyViewFilter) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); + return mapper.getPatientTreatments(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(studyViewFilter, categorizedClinicalDataCountFilter)); + } + + @Override + public PatientTreatmentReport getPatientTreatmentReport(StudyViewFilter studyViewFilter) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); + var patientTreatmentCounts = mapper.getPatientTreatmentCounts(studyViewFilter, categorizedClinicalDataCountFilter, + shouldApplyPatientIdFilters(studyViewFilter, categorizedClinicalDataCountFilter)); + var patientTreatments = mapper.getPatientTreatments(studyViewFilter, categorizedClinicalDataCountFilter, + shouldApplyPatientIdFilters(studyViewFilter, categorizedClinicalDataCountFilter)); + return new PatientTreatmentReport(patientTreatmentCounts.totalPatients(), patientTreatmentCounts.totalSamples(), patientTreatments); + } + private void buildClinicalAttributeNameMap() { clinicalAttributesMap = this.getClinicalAttributes() .stream() .collect(Collectors.groupingBy(ca -> ca.getPatientAttribute() ? ClinicalAttributeDataSource.PATIENT : ClinicalAttributeDataSource.SAMPLE)); } + private Map> getClinicalAttributeNameMap() { + if (clinicalAttributesMap.isEmpty()) { + buildClinicalAttributeNameMap(); + } + return clinicalAttributesMap; + } + private CategorizedClinicalDataCountFilter extractClinicalDataCountFilters(final StudyViewFilter studyViewFilter) { if (clinicalAttributesMap.isEmpty()) { buildClinicalAttributeNameMap(); diff --git a/src/main/java/org/cbioportal/service/StudyViewColumnarService.java b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java index 8ae5ea20608..f332b586361 100644 --- a/src/main/java/org/cbioportal/service/StudyViewColumnarService.java +++ b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java @@ -7,6 +7,7 @@ import org.cbioportal.model.ClinicalEventTypeCount; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.CopyNumberCountByGene; +import org.cbioportal.model.PatientTreatmentReport; import org.cbioportal.model.Sample; import org.cbioportal.web.parameter.ClinicalDataType; import org.cbioportal.web.parameter.StudyViewFilter; @@ -35,5 +36,5 @@ public interface StudyViewColumnarService { List getGenomicDataCounts(StudyViewFilter studyViewFilter); List getClinicalEventTypeCounts(StudyViewFilter studyViewFilter); - + PatientTreatmentReport getPatientTreatmentReport(StudyViewFilter studyViewFilter); } diff --git a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java index b73ca064803..31dc8f01ac0 100644 --- a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java @@ -8,6 +8,7 @@ import org.cbioportal.model.ClinicalEventTypeCount; import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.GenomicDataCount; +import org.cbioportal.model.PatientTreatmentReport; import org.cbioportal.model.Sample; import org.cbioportal.persistence.StudyViewRepository; import org.cbioportal.service.AlterationCountService; @@ -57,6 +58,11 @@ public List getClinicalEventTypeCounts(StudyViewFilter s return studyViewRepository.getClinicalEventTypeCounts(studyViewFilter); } + @Override + public PatientTreatmentReport getPatientTreatmentReport(StudyViewFilter studyViewFilter) { + return studyViewRepository.getPatientTreatmentReport(studyViewFilter); + } + public List getCnaGenes(StudyViewFilter studyViewFilter) { return alterationCountService.getCnaGenes(studyViewFilter); } diff --git a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java index 3ec1ccf90a6..e8b3a6181a3 100644 --- a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java +++ b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java @@ -13,11 +13,14 @@ import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataBin; import org.cbioportal.model.ClinicalDataCountItem; +import org.cbioportal.model.ClinicalEventKeyCode; import org.cbioportal.model.ClinicalEventTypeCount; import org.cbioportal.model.ClinicalViolinPlotData; import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.DensityPlotData; import org.cbioportal.model.GenomicDataCount; +import org.cbioportal.model.PatientTreatmentReport; +import org.cbioportal.model.PatientTreatmentRow; import org.cbioportal.model.Sample; import org.cbioportal.service.ClinicalDataDensityPlotService; import org.cbioportal.service.StudyViewColumnarService; @@ -350,4 +353,33 @@ public ResponseEntity> getClinicalEventTypeCounts( ) { return new ResponseEntity<>(studyViewColumnarService.getClinicalEventTypeCounts(interceptedStudyViewFilter), HttpStatus.OK); } + + @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") + @PostMapping(value = "/column-store/treatments/patient-counts/fetch", produces = MediaType.APPLICATION_JSON_VALUE) + @Operation(description = "Get all patient level treatments") + @ApiResponse(responseCode = "200", description = "OK", + content = @Content(array = @ArraySchema(schema = @Schema(implementation = PatientTreatmentRow.class)))) + public ResponseEntity getPatientTreatmentCounts( + @Parameter(required = false ) + @RequestParam(name = "tier", required = false, defaultValue = "Agent") + ClinicalEventKeyCode tier, + + @Parameter(required = true, description = "Study view filter") + @Valid + @RequestBody(required = false) + StudyViewFilter studyViewFilter, + + @Parameter(hidden = true) // prevent reference to this attribute in the swagger-ui interface + @RequestAttribute(required = false, value = "involvedCancerStudies") + Collection involvedCancerStudies, + + @Parameter(hidden = true) // prevent reference to this attribute in the swagger-ui interface. this attribute is needed for the @PreAuthorize tag above. + @Valid + @RequestAttribute(required = false, value = "interceptedStudyViewFilter") + StudyViewFilter interceptedStudyViewFilter + ) { + return new ResponseEntity<>(studyViewColumnarService.getPatientTreatmentReport(interceptedStudyViewFilter), + HttpStatus.OK); + } + } diff --git a/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.java b/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.java index 32b90daf01c..82c95a09517 100644 --- a/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.java +++ b/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.java @@ -132,6 +132,7 @@ public class InvolvedCancerStudyExtractorInterceptor implements HandlerIntercept public static final String GENERIC_ASSAY_CATEGORICAL_ENRICHMENT_FETCH_PATH = "/generic-assay-categorical-enrichments/fetch"; public static final String GENERIC_ASSAY_BINARY_ENRICHMENT_FETCH_PATH = "/generic-assay-binary-enrichments/fetch"; public static final String CLINICAL_EVENT_TYPE_COUNT_FETCH_PATH = "/clinical-event-type-counts/fetch"; + public static final String TREATMENTS_PATIENT_COUNT_FETCH_PATH = "/treatments/patient-counts/fetch"; @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { if (!request.getMethod().equals("POST")) { @@ -176,7 +177,8 @@ public class InvolvedCancerStudyExtractorInterceptor implements HandlerIntercept } else if (Arrays.asList(STUDY_VIEW_CLINICAL_DATA_DENSITY_PATH, STUDY_VIEW_CLINICAL_DATA_VIOLIN_PATH, STUDY_VIEW_CNA_GENES, STUDY_VIEW_FILTERED_SAMPLES, STUDY_VIEW_MUTATED_GENES, STUDY_VIEW_STRUCTURAL_VARIANT_GENES, STUDY_VIEW_STRUCTURAL_VARIANT_COUNTS, STUDY_VIEW_SAMPLE_COUNTS, STUDY_VIEW_SAMPLE_LIST_COUNTS_PATH, STUDY_VIEW_CLINICAL_TABLE_DATA_FETCH_PATH, - TREATMENTS_PATIENT_PATH, TREATMENTS_SAMPLE_PATH, STUDY_VIEW_PROFILE_SAMPLE_COUNTS_PATH, CLINICAL_EVENT_TYPE_COUNT_FETCH_PATH + TREATMENTS_PATIENT_PATH, TREATMENTS_SAMPLE_PATH, STUDY_VIEW_PROFILE_SAMPLE_COUNTS_PATH, CLINICAL_EVENT_TYPE_COUNT_FETCH_PATH, + TREATMENTS_PATIENT_COUNT_FETCH_PATH ).contains(requestPathInfo)) { return extractAttributesFromStudyViewFilter(request); } else if (requestPathInfo.equals(CLINICAL_DATA_ENRICHMENT_FETCH_PATH)) { diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index 44d3cd5523c..2c2a7cd1dc4 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -122,6 +122,22 @@ + + + + SELECT patient_unique_id + FROM clinical_event_derived + + + event_type = 'Treatment' + AND key = 'AGENT' + AND value = '${patientTreatmentFilter.treatment}' + + + + @@ -144,9 +160,13 @@ - + + + + + diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index e4e226be8c2..fcfce0e9439 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -17,6 +17,7 @@ + ORDER BY sample_stable_id ASC; @@ -329,6 +330,56 @@ GROUP BY event_type; + + + + + + + + + + + + + + + + patient_unique_id in ( SELECT patient_unique_id @@ -377,10 +425,7 @@ ) - - + sample_unique_id IN ( ) diff --git a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java index 0a6279ae937..0045bb65ea4 100644 --- a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java +++ b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java @@ -8,6 +8,9 @@ import org.cbioportal.web.parameter.DataFilter; import org.cbioportal.web.parameter.DataFilterValue; import org.cbioportal.web.parameter.StudyViewFilter; +import org.cbioportal.web.parameter.filter.AndedPatientTreatmentFilters; +import org.cbioportal.web.parameter.filter.OredPatientTreatmentFilters; +import org.cbioportal.web.parameter.filter.PatientTreatmentFilter; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -129,7 +132,7 @@ public void getClinicalEventTypeCounts() { assertEquals(4, clinicalEventTypeCounts.size()); - var clinicalEventTypeCountOptional = clinicalEventTypeCounts.stream().filter(ce -> ce.getEventType().equals("treatment")) + var clinicalEventTypeCountOptional = clinicalEventTypeCounts.stream().filter(ce -> ce.getEventType().equals("Treatment")) .findFirst(); assertTrue(clinicalEventTypeCountOptional.isPresent()); @@ -137,7 +140,7 @@ public void getClinicalEventTypeCounts() { DataFilter dataFilter = new DataFilter(); DataFilterValue dataFilterValue = new DataFilterValue(); - dataFilterValue.setValue("treatment"); + dataFilterValue.setValue("Treatment"); dataFilter.setValues(List.of(dataFilterValue)); studyViewFilter.setClinicalEventFilters(List.of(dataFilter)); @@ -151,5 +154,41 @@ public void getClinicalEventTypeCounts() { assertFalse(clinicalEventTypeCountOptional.isPresent()); } + + @Test + public void getPatientTreatmentReportCounts() { + StudyViewFilter studyViewFilter = new StudyViewFilter(); + studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB)); + + + var patientTreatmentCounts = studyViewMapper.getPatientTreatmentCounts(studyViewFilter, + CategorizedClinicalDataCountFilter.getBuilder().build(), false ); + + var patientTreatments = studyViewMapper.getPatientTreatments(studyViewFilter, + CategorizedClinicalDataCountFilter.getBuilder().build(), false ); + + assertEquals(1, patientTreatmentCounts.totalPatients()); + assertEquals("madeupanib", patientTreatments.get(0).treatment()); + + PatientTreatmentFilter filter = new PatientTreatmentFilter(); + filter.setTreatment("madeupanib"); + + OredPatientTreatmentFilters oredPatientTreatmentFilters = new OredPatientTreatmentFilters(); + oredPatientTreatmentFilters.setFilters(List.of(filter)); + + AndedPatientTreatmentFilters andedPatientTreatmentFilters = new AndedPatientTreatmentFilters(); + andedPatientTreatmentFilters.setFilters(List.of(oredPatientTreatmentFilters)); + studyViewFilter.setPatientTreatmentFilters(andedPatientTreatmentFilters); + + patientTreatmentCounts = studyViewMapper.getPatientTreatmentCounts(studyViewFilter, + CategorizedClinicalDataCountFilter.getBuilder().build(), true ); + + patientTreatments = studyViewMapper.getPatientTreatments(studyViewFilter, + CategorizedClinicalDataCountFilter.getBuilder().build(), true ); + + assertEquals(1, patientTreatmentCounts.totalPatients()); + assertEquals("madeupanib", patientTreatments.get(0).treatment()); + + } } \ No newline at end of file diff --git a/src/test/resources/clickhouse_data.sql b/src/test/resources/clickhouse_data.sql index 16193741624..810e1b742ad 100644 --- a/src/test/resources/clickhouse_data.sql +++ b/src/test/resources/clickhouse_data.sql @@ -456,7 +456,7 @@ insert into gistic_to_gene (gistic_roi_id,entrez_gene_id) values (3,208); insert into clinical_event (clinical_event_id,patient_id,start_date,stop_date,event_type) values (1,1,123,0,'status'); insert into clinical_event (clinical_event_id,patient_id,start_date,stop_date,event_type) values (2,1,233,345,'specimen'); -insert into clinical_event (clinical_event_id,patient_id,start_date,stop_date,event_type) values (3,2,213,445,'treatment'); +insert into clinical_event (clinical_event_id,patient_id,start_date,stop_date,event_type) values (3,2,213,445,'Treatment'); insert into clinical_event (clinical_event_id,patient_id,start_date,stop_date,event_type) values (4,2,211,441,'seqencing'); insert into clinical_event_data (clinical_event_id,key,value) values (1,'status','radiographic_progression'); @@ -464,7 +464,7 @@ insert into clinical_event_data (clinical_event_id,key,value) values (1,'sample_ insert into clinical_event_data (clinical_event_id,key,value) values (2,'surgery','oa ii initial'); insert into clinical_event_data (clinical_event_id,key,value) values (2,'sample_id','tcga-a1-a0sb-01'); insert into clinical_event_data (clinical_event_id,key,value) values (3,'event_type_detailed','aa iii recurrence1'); -insert into clinical_event_data (clinical_event_id,key,value) values (3,'agent','madeupanib'); +insert into clinical_event_data (clinical_event_id,key,value) values (3,'AGENT','madeupanib'); insert into clinical_event_data (clinical_event_id,key,value) values (3,'agent_target','directly to forehead, elbow'); insert into clinical_event_data (clinical_event_id,key,value) values (3,'sample_id','tcga-a1-a0sd-01'); insert into clinical_event_data (clinical_event_id,key,value) values (4,'sample_id','tcga-a1-a0sd-01'); From e935c418a0667522a2a0eb701c52a4ae6d9982ac Mon Sep 17 00:00:00 2001 From: alisman Date: Thu, 1 Aug 2024 21:01:52 -0400 Subject: [PATCH 32/87] Hide replacement clickhouse endpoints from swagger (except new treatment) (#10919) --- .../StudyViewColumnStoreController.java | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java index e8b3a6181a3..03a877060bc 100644 --- a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java +++ b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java @@ -1,5 +1,6 @@ package org.cbioportal.web.columnar; +import io.swagger.v3.oas.annotations.Hidden; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.ArraySchema; @@ -79,7 +80,7 @@ public StudyViewColumnStoreController(StudyViewColumnarService studyViewColumnar } - + @Hidden @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") @PostMapping(value = "/column-store/filtered-samples/fetch", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @@ -94,6 +95,7 @@ public ResponseEntity> fetchFilteredSamples( ); } + @Hidden @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") @PostMapping(value = "/column-store/mutated-genes/fetch", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @@ -109,6 +111,7 @@ public ResponseEntity> fetchMutatedGenes( ); } + @Hidden @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") @RequestMapping(value = "/column-store/molecular-profile-sample-counts/fetch", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @@ -128,7 +131,8 @@ public ResponseEntity> fetchMolecularProfileSampleCounts( studyViewColumnarService.getGenomicDataCounts(interceptedStudyViewFilter) , HttpStatus.OK); } - + + @Hidden @PostMapping(value = "/column-store/cna-genes/fetch", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> fetchCnaGenes( @@ -142,6 +146,7 @@ public ResponseEntity> fetchCnaGenes( ); } + @Hidden @PostMapping(value = "/column-store/structuralvariant-genes/fetch", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @Operation(description = "Fetch structural variant genes by study view filter") @@ -158,6 +163,7 @@ public ResponseEntity> fetchStructuralVariantGenes( return new ResponseEntity<>(studyViewColumnarService.getStructuralVariantGenes(interceptedStudyViewFilter), HttpStatus.OK); } + @Hidden @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") @PostMapping(value = "/column-store/clinical-data-counts/fetch", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @@ -180,6 +186,7 @@ public ResponseEntity> fetchClinicalDataCounts( } + @Hidden @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") @RequestMapping(value = "/column-store/sample-lists-counts/fetch", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @@ -196,6 +203,7 @@ public List fetchCaseListCounts( } + @Hidden @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") @RequestMapping(value = "/column-store/clinical-data-bin-counts/fetch", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @@ -213,6 +221,7 @@ public ResponseEntity> fetchClinicalDataBinCounts( return new ResponseEntity<>(clinicalDataBins, HttpStatus.OK); } + @Hidden @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") @PostMapping(value = "/column-store/clinical-data-density-plot/fetch", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @@ -270,6 +279,7 @@ public ResponseEntity fetchClinicalDataDensityPlot( return new ResponseEntity<>(result, HttpStatus.OK); } + @Hidden @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") @PostMapping(value = "/column-store/clinical-data-violin-plots/fetch", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @@ -330,6 +340,7 @@ public ResponseEntity fetchClinicalDataViolinPlots( return new ResponseEntity<>(result, HttpStatus.OK); } + @Hidden @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") @PostMapping(value = "/column-store/clinical-event-type-counts/fetch", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @@ -353,13 +364,13 @@ public ResponseEntity> getClinicalEventTypeCounts( ) { return new ResponseEntity<>(studyViewColumnarService.getClinicalEventTypeCounts(interceptedStudyViewFilter), HttpStatus.OK); } - + @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") @PostMapping(value = "/column-store/treatments/patient-counts/fetch", produces = MediaType.APPLICATION_JSON_VALUE) @Operation(description = "Get all patient level treatments") @ApiResponse(responseCode = "200", description = "OK", - content = @Content(array = @ArraySchema(schema = @Schema(implementation = PatientTreatmentRow.class)))) - public ResponseEntity getPatientTreatmentCounts( + content = @Content(schema = @Schema(implementation = PatientTreatmentReport.class))) + public ResponseEntity fetchPatientTreatmentCounts( @Parameter(required = false ) @RequestParam(name = "tier", required = false, defaultValue = "Agent") ClinicalEventKeyCode tier, From bf71f1b047515e64f8055392fa8639672b973b0c Mon Sep 17 00:00:00 2001 From: Charles Haynes <33608920+haynescd@users.noreply.github.com> Date: Mon, 5 Aug 2024 15:48:13 -0400 Subject: [PATCH 33/87] Rfc80/sample treatment endpoint (#10927) * Add Sample Count Report Endpoint * Push counting logic to sql * Remove unused methods * Update PatientTreatments to pass int from db for totalPatientTreatmentCount * Fix tests * Add unit test for sample Treatments * Remove unused import * Fix indentation --- .../org/cbioportal/model/SampleTreatment.java | 4 + .../model/SampleTreatmentReport.java | 6 ++ .../persistence/StudyViewRepository.java | 8 +- .../model/SampleAcquisitionEventRecord.java | 4 + .../persistence/model/TreatmentRecord.java | 4 + .../mybatisclickhouse/StudyViewMapper.java | 8 +- .../StudyViewMyBatisRepository.java | 23 +++-- .../service/StudyViewColumnarService.java | 2 + .../impl/StudyViewColumnarServiceImpl.java | 15 ++- .../TreatmentCountReportService.java | 10 ++ .../TreatmentCountReportServiceImpl.java | 34 +++++++ .../StudyViewColumnStoreController.java | 28 ++++++ ...volvedCancerStudyExtractorInterceptor.java | 3 +- .../StudyViewFilterMapper.xml | 50 +++++++++- .../mybatisclickhouse/StudyViewMapper.xml | 95 +++++++++++++++++-- .../StudyViewMapperTest.java | 53 ++++++++++- src/test/resources/clickhouse_data.sql | 12 +-- 17 files changed, 322 insertions(+), 37 deletions(-) create mode 100644 src/main/java/org/cbioportal/model/SampleTreatment.java create mode 100644 src/main/java/org/cbioportal/model/SampleTreatmentReport.java create mode 100644 src/main/java/org/cbioportal/persistence/model/SampleAcquisitionEventRecord.java create mode 100644 src/main/java/org/cbioportal/persistence/model/TreatmentRecord.java create mode 100644 src/main/java/org/cbioportal/service/treatment/TreatmentCountReportService.java create mode 100644 src/main/java/org/cbioportal/service/treatment/TreatmentCountReportServiceImpl.java diff --git a/src/main/java/org/cbioportal/model/SampleTreatment.java b/src/main/java/org/cbioportal/model/SampleTreatment.java new file mode 100644 index 00000000000..edf9ef7541a --- /dev/null +++ b/src/main/java/org/cbioportal/model/SampleTreatment.java @@ -0,0 +1,4 @@ +package org.cbioportal.model; + +public record SampleTreatment(String treatment, int preSampleCount, int postSampleCount) { +} diff --git a/src/main/java/org/cbioportal/model/SampleTreatmentReport.java b/src/main/java/org/cbioportal/model/SampleTreatmentReport.java new file mode 100644 index 00000000000..bc4bbcc479f --- /dev/null +++ b/src/main/java/org/cbioportal/model/SampleTreatmentReport.java @@ -0,0 +1,6 @@ +package org.cbioportal.model; + +import java.util.Collection; + +public record SampleTreatmentReport(int totalSampleCount, Collection treatments) { +} diff --git a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java index 59deedce6d4..95dc1b6936d 100644 --- a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java +++ b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java @@ -9,8 +9,8 @@ import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.PatientTreatment; -import org.cbioportal.model.PatientTreatmentReport; import org.cbioportal.model.Sample; +import org.cbioportal.model.SampleTreatment; import org.cbioportal.web.parameter.ClinicalDataType; import org.cbioportal.web.parameter.StudyViewFilter; @@ -53,6 +53,10 @@ public interface StudyViewRepository { List getClinicalEventTypeCounts(StudyViewFilter studyViewFilter); List getPatientTreatments(StudyViewFilter studyViewFilter); + + int getTotalPatientTreatmentCount(StudyViewFilter studyViewFilter); - PatientTreatmentReport getPatientTreatmentReport(StudyViewFilter studyViewFilter); + List getSampleTreatments(StudyViewFilter studyViewFilter); + + int getTotalSampleTreatmentCount(StudyViewFilter studyViewFilter); } diff --git a/src/main/java/org/cbioportal/persistence/model/SampleAcquisitionEventRecord.java b/src/main/java/org/cbioportal/persistence/model/SampleAcquisitionEventRecord.java new file mode 100644 index 00000000000..b02c24c7100 --- /dev/null +++ b/src/main/java/org/cbioportal/persistence/model/SampleAcquisitionEventRecord.java @@ -0,0 +1,4 @@ +package org.cbioportal.persistence.model; + +public record SampleAcquisitionEventRecord(String sampleId, String patientUniqueId, String cancerStudyId, int timeTaken) { +} diff --git a/src/main/java/org/cbioportal/persistence/model/TreatmentRecord.java b/src/main/java/org/cbioportal/persistence/model/TreatmentRecord.java new file mode 100644 index 00000000000..aeeac35723b --- /dev/null +++ b/src/main/java/org/cbioportal/persistence/model/TreatmentRecord.java @@ -0,0 +1,4 @@ +package org.cbioportal.persistence.model; + +public record TreatmentRecord(String patientUniqueId, String treatment, int startTime, int stopTime) { +} diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java index bd9d4b602c3..4721b93809e 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java @@ -1,6 +1,5 @@ package org.cbioportal.persistence.mybatisclickhouse; -import org.apache.ibatis.annotations.MapKey; import org.cbioportal.model.AlterationCountByGene; import org.cbioportal.model.CaseListDataCount; import org.cbioportal.model.ClinicalAttribute; @@ -11,14 +10,13 @@ import org.cbioportal.model.GenePanelToGene; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.PatientTreatment; -import org.cbioportal.model.PatientTreatmentReport; import org.cbioportal.model.Sample; +import org.cbioportal.model.SampleTreatment; import org.cbioportal.persistence.helper.AlterationFilterHelper; import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; import org.cbioportal.web.parameter.StudyViewFilter; import java.util.List; -import java.util.Map; public interface StudyViewMapper { @@ -59,5 +57,7 @@ List getClinicalDataCounts(StudyViewFilter studyViewFilter, C List getClinicalEventTypeCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); List getPatientTreatments(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); - PatientTreatmentReport getPatientTreatmentCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); + int getPatientTreatmentCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); + List getSampleTreatmentCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); + int getTotalSampleTreatmentCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); } diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java index 7da568dabf2..3e7bced4540 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java @@ -9,8 +9,8 @@ import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.PatientTreatment; -import org.cbioportal.model.PatientTreatmentReport; import org.cbioportal.model.Sample; +import org.cbioportal.model.SampleTreatment; import org.cbioportal.persistence.StudyViewRepository; import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; import org.cbioportal.persistence.helper.AlterationFilterHelper; @@ -190,13 +190,24 @@ public List getPatientTreatments(StudyViewFilter studyViewFilt } @Override - public PatientTreatmentReport getPatientTreatmentReport(StudyViewFilter studyViewFilter) { + public int getTotalPatientTreatmentCount(StudyViewFilter studyViewFilter) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - var patientTreatmentCounts = mapper.getPatientTreatmentCounts(studyViewFilter, categorizedClinicalDataCountFilter, + return mapper.getPatientTreatmentCounts(studyViewFilter, categorizedClinicalDataCountFilter, + shouldApplyPatientIdFilters(studyViewFilter, categorizedClinicalDataCountFilter)); + } + + @Override + public List getSampleTreatments(StudyViewFilter studyViewFilter) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); + return mapper.getSampleTreatmentCounts(studyViewFilter, categorizedClinicalDataCountFilter, + shouldApplyPatientIdFilters(studyViewFilter, categorizedClinicalDataCountFilter)); + } + + @Override + public int getTotalSampleTreatmentCount(StudyViewFilter studyViewFilter) { + CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); + return mapper.getTotalSampleTreatmentCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(studyViewFilter, categorizedClinicalDataCountFilter)); - var patientTreatments = mapper.getPatientTreatments(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(studyViewFilter, categorizedClinicalDataCountFilter)); - return new PatientTreatmentReport(patientTreatmentCounts.totalPatients(), patientTreatmentCounts.totalSamples(), patientTreatments); } private void buildClinicalAttributeNameMap() { diff --git a/src/main/java/org/cbioportal/service/StudyViewColumnarService.java b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java index f332b586361..7a28b7faabc 100644 --- a/src/main/java/org/cbioportal/service/StudyViewColumnarService.java +++ b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java @@ -9,6 +9,7 @@ import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.PatientTreatmentReport; import org.cbioportal.model.Sample; +import org.cbioportal.model.SampleTreatmentReport; import org.cbioportal.web.parameter.ClinicalDataType; import org.cbioportal.web.parameter.StudyViewFilter; @@ -37,4 +38,5 @@ public interface StudyViewColumnarService { List getClinicalEventTypeCounts(StudyViewFilter studyViewFilter); PatientTreatmentReport getPatientTreatmentReport(StudyViewFilter studyViewFilter); + SampleTreatmentReport getSampleTreatmentReport(StudyViewFilter studyViewFilter); } diff --git a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java index 31dc8f01ac0..94142c39b4f 100644 --- a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java @@ -10,9 +10,11 @@ import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.PatientTreatmentReport; import org.cbioportal.model.Sample; +import org.cbioportal.model.SampleTreatmentReport; import org.cbioportal.persistence.StudyViewRepository; import org.cbioportal.service.AlterationCountService; import org.cbioportal.service.StudyViewColumnarService; +import org.cbioportal.service.treatment.TreatmentCountReportService; import org.cbioportal.web.parameter.ClinicalDataType; import org.cbioportal.web.parameter.StudyViewFilter; import org.springframework.beans.factory.annotation.Autowired; @@ -30,11 +32,15 @@ public class StudyViewColumnarServiceImpl implements StudyViewColumnarService { private final StudyViewRepository studyViewRepository; private final AlterationCountService alterationCountService; + private final TreatmentCountReportService treatmentCountReportService; @Autowired - public StudyViewColumnarServiceImpl(StudyViewRepository studyViewRepository, AlterationCountService alterationCountService) { + public StudyViewColumnarServiceImpl(StudyViewRepository studyViewRepository, + AlterationCountService alterationCountService, + TreatmentCountReportService treatmentCountReportService) { this.studyViewRepository = studyViewRepository; this.alterationCountService = alterationCountService; + this.treatmentCountReportService = treatmentCountReportService; } @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()") @@ -60,7 +66,12 @@ public List getClinicalEventTypeCounts(StudyViewFilter s @Override public PatientTreatmentReport getPatientTreatmentReport(StudyViewFilter studyViewFilter) { - return studyViewRepository.getPatientTreatmentReport(studyViewFilter); + return treatmentCountReportService.getPatientTreatmentReport(studyViewFilter); + } + + @Override + public SampleTreatmentReport getSampleTreatmentReport(StudyViewFilter studyViewFilter) { + return treatmentCountReportService.getSampleTreatmentReport(studyViewFilter); } public List getCnaGenes(StudyViewFilter studyViewFilter) { diff --git a/src/main/java/org/cbioportal/service/treatment/TreatmentCountReportService.java b/src/main/java/org/cbioportal/service/treatment/TreatmentCountReportService.java new file mode 100644 index 00000000000..5c275fefc26 --- /dev/null +++ b/src/main/java/org/cbioportal/service/treatment/TreatmentCountReportService.java @@ -0,0 +1,10 @@ +package org.cbioportal.service.treatment; + +import org.cbioportal.model.PatientTreatmentReport; +import org.cbioportal.model.SampleTreatmentReport; +import org.cbioportal.web.parameter.StudyViewFilter; + +public interface TreatmentCountReportService { + PatientTreatmentReport getPatientTreatmentReport(StudyViewFilter studyViewFilter); + SampleTreatmentReport getSampleTreatmentReport(StudyViewFilter studyViewFilter); +} diff --git a/src/main/java/org/cbioportal/service/treatment/TreatmentCountReportServiceImpl.java b/src/main/java/org/cbioportal/service/treatment/TreatmentCountReportServiceImpl.java new file mode 100644 index 00000000000..7906f49f694 --- /dev/null +++ b/src/main/java/org/cbioportal/service/treatment/TreatmentCountReportServiceImpl.java @@ -0,0 +1,34 @@ +package org.cbioportal.service.treatment; + +import org.cbioportal.model.PatientTreatmentReport; +import org.cbioportal.model.SampleTreatmentReport; +import org.cbioportal.persistence.StudyViewRepository; +import org.cbioportal.web.parameter.StudyViewFilter; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class TreatmentCountReportServiceImpl implements TreatmentCountReportService { + + private final StudyViewRepository studyViewRepository; + + @Autowired + public TreatmentCountReportServiceImpl(StudyViewRepository studyViewRepository) { + this.studyViewRepository = studyViewRepository; + } + + @Override + public PatientTreatmentReport getPatientTreatmentReport(StudyViewFilter studyViewFilter) { + var patientTreatments = studyViewRepository.getPatientTreatments(studyViewFilter); + var totalPatientTreatmentCount = studyViewRepository.getTotalPatientTreatmentCount(studyViewFilter); + return new PatientTreatmentReport(totalPatientTreatmentCount, 0, patientTreatments); + } + + @Override + public SampleTreatmentReport getSampleTreatmentReport(StudyViewFilter studyViewFilter) { + var sampleTreatments = studyViewRepository.getSampleTreatments(studyViewFilter); + var totalSampleTreatmentCount = studyViewRepository.getTotalSampleTreatmentCount(studyViewFilter); + return new SampleTreatmentReport(totalSampleTreatmentCount, sampleTreatments); + } + +} diff --git a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java index 03a877060bc..3fb6d372e7a 100644 --- a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java +++ b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java @@ -23,6 +23,7 @@ import org.cbioportal.model.PatientTreatmentReport; import org.cbioportal.model.PatientTreatmentRow; import org.cbioportal.model.Sample; +import org.cbioportal.model.SampleTreatmentReport; import org.cbioportal.service.ClinicalDataDensityPlotService; import org.cbioportal.service.StudyViewColumnarService; import org.cbioportal.service.ViolinPlotService; @@ -393,4 +394,31 @@ public ResponseEntity fetchPatientTreatmentCounts( HttpStatus.OK); } + @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") + @PostMapping(value = "/column-store/treatments/sample-counts/fetch", produces = MediaType.APPLICATION_JSON_VALUE) + @ApiResponse(responseCode = "200", description = "OK", + content = @Content(array = @ArraySchema(schema = @Schema(implementation = PatientTreatmentRow.class)))) + public ResponseEntity getSampleTreatmentCounts( + @Parameter(required = false ) + @RequestParam(name = "tier", required = false, defaultValue = "Agent") + ClinicalEventKeyCode tier, + + @Parameter(required = true, description = "Study view filter") + @Valid + @RequestBody(required = false) + StudyViewFilter studyViewFilter, + + @Parameter(hidden = true) // prevent reference to this attribute in the swagger-ui interface + @RequestAttribute(required = false, value = "involvedCancerStudies") + Collection involvedCancerStudies, + + @Parameter(hidden = true) // prevent reference to this attribute in the swagger-ui interface. this attribute is needed for the @PreAuthorize tag above. + @Valid + @RequestAttribute(required = false, value = "interceptedStudyViewFilter") + StudyViewFilter interceptedStudyViewFilter + ) { + return new ResponseEntity<>(studyViewColumnarService.getSampleTreatmentReport(interceptedStudyViewFilter), + HttpStatus.OK); + } + } diff --git a/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.java b/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.java index 82c95a09517..e94ee950cd8 100644 --- a/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.java +++ b/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.java @@ -133,6 +133,7 @@ public class InvolvedCancerStudyExtractorInterceptor implements HandlerIntercept public static final String GENERIC_ASSAY_BINARY_ENRICHMENT_FETCH_PATH = "/generic-assay-binary-enrichments/fetch"; public static final String CLINICAL_EVENT_TYPE_COUNT_FETCH_PATH = "/clinical-event-type-counts/fetch"; public static final String TREATMENTS_PATIENT_COUNT_FETCH_PATH = "/treatments/patient-counts/fetch"; + public static final String TREATMENTS_SAMPLE_COUNT_FETCH_PATH = "/treatments/sample-counts/fetch"; @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) { if (!request.getMethod().equals("POST")) { @@ -178,7 +179,7 @@ public class InvolvedCancerStudyExtractorInterceptor implements HandlerIntercept STUDY_VIEW_FILTERED_SAMPLES, STUDY_VIEW_MUTATED_GENES, STUDY_VIEW_STRUCTURAL_VARIANT_GENES, STUDY_VIEW_STRUCTURAL_VARIANT_COUNTS, STUDY_VIEW_SAMPLE_COUNTS, STUDY_VIEW_SAMPLE_LIST_COUNTS_PATH, STUDY_VIEW_CLINICAL_TABLE_DATA_FETCH_PATH, TREATMENTS_PATIENT_PATH, TREATMENTS_SAMPLE_PATH, STUDY_VIEW_PROFILE_SAMPLE_COUNTS_PATH, CLINICAL_EVENT_TYPE_COUNT_FETCH_PATH, - TREATMENTS_PATIENT_COUNT_FETCH_PATH + TREATMENTS_PATIENT_COUNT_FETCH_PATH, TREATMENTS_SAMPLE_COUNT_FETCH_PATH ).contains(requestPathInfo)) { return extractAttributesFromStudyViewFilter(request); } else if (requestPathInfo.equals(CLINICAL_DATA_ENRICHMENT_FETCH_PATH)) { diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index 2c2a7cd1dc4..872a6462b01 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -106,9 +106,57 @@ + + + + - + + + + SELECT concat(ced.cancer_study_identifier, '_', ced.sample_id) AS sample_unique_id + FROM ( + + SELECT + ced.value AS sample_id, + ced.patient_unique_id AS patient_unique_id, + min(ced.start_date) AS time_taken, + ced.cancer_study_identifier AS cancer_study_identifier + FROM clinical_event_derived ced + + key = 'SAMPLE_ID' + AND (event_type LIKE 'Sample Acquisition' OR event_type LIKE 'SPECIMEN') + + GROUP BY patient_unique_id, ced.value, cancer_study_identifier + ) ced + INNER JOIN ( + + SELECT + patient_unique_id, + value AS treatment, + argMin(start_date, start_date) AS treatment_time_taken + FROM clinical_event_derived + WHERE event_type = 'Treatment' + AND key = 'AGENT' + GROUP BY patient_unique_id, value + ) ced_inner ON ced_inner.patient_unique_id = ced.patient_unique_id + + + ced_inner.treatment = '${sampleTreatmentFilter.treatment}' + + + AND ced.time_taken <= ced_inner.treatment_time_taken + + + AND ced.time_taken > ced_inner.treatment_time_taken + + + + + GROUP BY patient_unique_id, ced.sample_id, ced.time_taken, ced.cancer_study_identifier, ced_inner.treatment, ced_inner.treatment_time_taken + + diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index fcfce0e9439..0c02d63fadc 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -331,16 +331,9 @@ GROUP BY event_type; - - - - - - - SELECT - count(DISTINCT patient_unique_id) AS totalPatients, - count(DISTINCT sample_unique_id) AS totalSamples + count(DISTINCT patient_unique_id) AS totalPatients FROM sample_derived patient_unique_id IN ( @@ -379,7 +372,89 @@ GROUP BY value; - + + + + + + + + + + + + + - + --we need to derive the alteration type from the stable_id by removing cancer study id + --this should probaby be refactored at some point but we need to maintain api interface + SELECT replaceOne(genetic_profile.stable_id, + concat(sample_derived.cancer_study_identifier,'_'), '') AS value, + genetic_profile.name AS label, + count(sample_profile.genetic_profile_id) AS count + FROM sample_profile LEFT JOIN sample_derived ON sample_profile.sample_id=sample_derived.internal_id LEFT JOIN genetic_profile on sample_profile.genetic_profile_id = genetic_profile.genetic_profile_id - + - GROUP BY genetic_profile.stable_id, genetic_profile.name, sample_derived.cancer_study_identifier; + GROUP BY genetic_profile.stable_id, genetic_profile.name, sample_derived.cancer_study_identifier - SELECT hugo_gene_symbol as hugoGeneSymbol, - 1 as entrezGeneId, + entrez_gene_id as entrezGeneId, COUNT(DISTINCT sample_unique_id) as numberOfAlteredCases, COUNT(*) as totalCount FROM genomic_event_derived @@ -37,14 +37,14 @@ - GROUP BY hugo_gene_symbol; + GROUP BY entrez_gene_id, hugo_gene_symbol; + + WITH cna_query as ( + SELECT + hugo_gene_symbol as hugoGeneSymbol, + #{profileType} as profileType, + multiIf(alteration_value = 2, 'Amplified', alteration_value = 1, 'Gained', alteration_value = 0, 'Diploid', alteration_value = -1, + 'Heterozygously deleted', alteration_value = -2, 'Homozygously deleted', 'NA') as label, + toString(alteration_value) as value, + cast(count(*) as INTEGER) as count + FROM genetic_alteration_cna_derived + + profile_type = #{profileType} + AND sample_unique_id IN () + + hugo_gene_symbol = #{genomicDataFilter.hugoGeneSymbol} + + + GROUP BY + hugo_gene_symbol, + alteration_value + ), + cna_sum AS ( + SELECT + hugoGeneSymbol, + sum(count) as cna_count + FROM cna_query + GROUP BY hugoGeneSymbol + ) + SELECT * FROM cna_query + UNION ALL + SELECT + hugoGeneSymbol, + #{profileType}, + 'NA' as label, + 'NA' as value, + cast(((SELECT * FROM ()) - cna_count) as INTEGER) as count + FROM cna_sum + + + + + + + + + + + + + + + + + + + + + SELECT patient_unique_id + FROM sample_derived + + sample_unique_id IN () + + + - SELECT - COUNT(*) - FROM sample_derived - - - - - + From b03b6154d67ae220fa82011f081c538456ab1d8a Mon Sep 17 00:00:00 2001 From: alisman Date: Mon, 19 Aug 2024 12:23:20 -0400 Subject: [PATCH 38/87] Add tests for case list sample counts endpoint (#10935) * Add tests for case list sample counts endpoint and fix merge of lists across studies --- .../persistence/StudyViewRepository.java | 2 +- .../mybatisclickhouse/StudyViewMapper.java | 2 +- .../StudyViewMyBatisRepository.java | 6 +- .../impl/StudyViewColumnarServiceImpl.java | 32 ++++- .../mybatisclickhouse/StudyViewMapper.xml | 2 +- .../StudyViewCaseListSamplesCountsTest.java | 124 ++++++++++++++++++ 6 files changed, 161 insertions(+), 7 deletions(-) create mode 100644 src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewCaseListSamplesCountsTest.java diff --git a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java index d82210b1a35..3bc481bb4bf 100644 --- a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java +++ b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java @@ -40,7 +40,7 @@ public interface StudyViewRepository { Map getClinicalAttributeDatatypeMap(); - List getCaseListDataCounts(StudyViewFilter studyViewFilter); + List getCaseListDataCountsPerStudy(StudyViewFilter studyViewFilter); Map getTotalProfiledCounts(StudyViewFilter studyViewFilter, String alterationType); diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java index 0417ee2dc45..a3b27e8eeba 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java @@ -39,7 +39,7 @@ List getStructuralVariantGenes(StudyViewFilter studyViewF List getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, List attributeIds, List filteredAttributeValues); - List getCaseListDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); + List getCaseListDataCountsPerStudy(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); List getClinicalAttributes(); diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java index cb0fd5a89c4..76230381c41 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java @@ -134,11 +134,11 @@ public Map getClinicalAttributeDatatypeMap() { return attributeDatatypeMap; } - + @Override - public List getCaseListDataCounts(StudyViewFilter studyViewFilter) { + public List getCaseListDataCountsPerStudy(StudyViewFilter studyViewFilter) { CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getCaseListDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter)); + return mapper.getCaseListDataCountsPerStudy(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter)); } diff --git a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java index 8756a6ac792..cb29bc62431 100644 --- a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java @@ -105,7 +105,10 @@ public List getClinicalDataCounts(StudyViewFilter studyVi @Override public List getCaseListDataCounts(StudyViewFilter studyViewFilter) { - return studyViewRepository.getCaseListDataCounts(studyViewFilter); + // the study view merges case lists by type across studies + // type is determined by the suffix of case list name (after study name) + var caseListDataCountsPerStudy = studyViewRepository.getCaseListDataCountsPerStudy(studyViewFilter); + return mergeCaseListCounts(caseListDataCountsPerStudy); } @@ -146,4 +149,31 @@ public List getMutationTypeCountsByGeneSpecific(StudyViewF return studyViewRepository.getMutationCountsByType(studyViewFilter, genomicDataFilters); } + + + public static List mergeCaseListCounts(List counts) { + Map> countsPerListType = counts.stream() + .collect((Collectors.groupingBy(CaseListDataCount::getValue))); + + // different cancer studies combined into one cohort will have separate case lists + // of a given type (e.g. rppa). We need to merge the counts for these + // different lists based on the type and choose a label + // this code just picks the first label, which assumes that the labels will match for a give type + List mergedCounts = new ArrayList<>(); + for (Map.Entry> entry : countsPerListType.entrySet()) { + var dc = new CaseListDataCount(); + dc.setValue(entry.getKey()); + // here just snatch the label of the first profile + dc.setLabel(entry.getValue().get(0).getLabel()); + Integer sum = entry.getValue().stream() + .map(x -> x.getCount()) + .collect(Collectors.summingInt(Integer::intValue)); + dc.setCount(sum); + mergedCounts.add(dc); + } + return mergedCounts; + } + + + } diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index 1ee906409e8..36008ede532 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -148,7 +148,7 @@ - SELECT name AS label, REPLACE(stable_id, CONCAT(cancer_study_identifier, '_'), '') AS value, diff --git a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewCaseListSamplesCountsTest.java b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewCaseListSamplesCountsTest.java new file mode 100644 index 00000000000..cb7af6bef7a --- /dev/null +++ b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewCaseListSamplesCountsTest.java @@ -0,0 +1,124 @@ +package org.cbioportal.persistence.mybatisclickhouse; + +import org.cbioportal.persistence.mybatisclickhouse.config.MyBatisConfig; + +import org.cbioportal.service.impl.StudyViewColumnarServiceImpl; +import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; +import org.cbioportal.web.parameter.StudyViewFilter; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; +import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; +import org.springframework.context.annotation.Import; +import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringRunner; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import static org.junit.Assert.assertEquals; + +@RunWith(SpringRunner.class) +@Import(MyBatisConfig.class) +@DataJpaTest +@DirtiesContext +@AutoConfigureTestDatabase(replace= AutoConfigureTestDatabase.Replace.NONE) +@ContextConfiguration(initializers = AbstractTestcontainers.Initializer.class) +public class StudyViewCaseListSamplesCountsTest extends AbstractTestcontainers { + + private static final String STUDY_TCGA_PUB = "study_tcga_pub"; + private static final String STUDY_ACC_TCGA = "acc_tcga"; + + @Autowired + private StudyViewMapper studyViewMapper; + + @Test + public void getMolecularProfileCounts() { + StudyViewFilter studyViewFilter = new StudyViewFilter(); + studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB)); + + var caseList = new ArrayList(Arrays.asList("pub_cna")); + var caseListGroups = new ArrayList(Arrays.asList(caseList)); + + studyViewFilter.setCaseLists(caseListGroups); + + var sampleListCounts = studyViewMapper.getCaseListDataCountsPerStudy(studyViewFilter, + CategorizedClinicalDataCountFilter.getBuilder().build(), false ); + + var size = sampleListCounts.stream().filter(gc->gc.getValue().equals("mrna")) + .findFirst().get().getCount().intValue(); + assertEquals(7, size); + + } + + @Test + public void getMolecularProfileCountsMultipleListsOr() { + StudyViewFilter studyViewFilter = new StudyViewFilter(); + studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB)); + + var caseList = new ArrayList(Arrays.asList("mrna","pub_cna")); + var caseListGroups = new ArrayList(Arrays.asList(caseList)); + + studyViewFilter.setCaseLists(caseListGroups); + + var sampleListCounts = studyViewMapper.getCaseListDataCountsPerStudy(studyViewFilter, + CategorizedClinicalDataCountFilter.getBuilder().build(), false ); + + var size = sampleListCounts.stream().filter(gc->gc.getValue().equals("mrna")) + .findFirst().get().getCount().intValue(); + assertEquals(8, size); + + } + + @Test + public void getMolecularProfileCountsMultipleListsAnd() { + StudyViewFilter studyViewFilter = new StudyViewFilter(); + studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB)); + + var caseList1 = new ArrayList(Arrays.asList("mrna")); + var caseList2 = new ArrayList(Arrays.asList("pub_cna")); + var caseListGroups = new ArrayList(Arrays.asList(caseList1, caseList2)); + + studyViewFilter.setCaseLists(caseListGroups); + + var sampleListCounts = studyViewMapper.getCaseListDataCountsPerStudy(studyViewFilter, + CategorizedClinicalDataCountFilter.getBuilder().build(), false ); + + var size = sampleListCounts.stream().filter(gc->gc.getValue().equals("mrna")) + .findFirst().get().getCount().intValue(); + assertEquals(7, size); + + } + + @Test + public void getMolecularProfileCountsAcrossStudies() { + StudyViewFilter studyViewFilter = new StudyViewFilter(); + studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB, STUDY_ACC_TCGA)); + + var caseList1 = new ArrayList(Arrays.asList("all")); + var caseListGroups = new ArrayList(Arrays.asList(caseList1)); + + studyViewFilter.setCaseLists(caseListGroups); + + var unMergedCounts = studyViewMapper.getCaseListDataCountsPerStudy(studyViewFilter, + CategorizedClinicalDataCountFilter.getBuilder().build(), false ); + + var caseListCountsMerged = StudyViewColumnarServiceImpl.mergeCaseListCounts( + unMergedCounts + ); + + var sizeUnmerged = unMergedCounts.stream().filter(gc->gc.getValue().equals("all")) + .findFirst().get().getCount().intValue(); + assertEquals(14, sizeUnmerged); + + // now we've combined the "all" from the two studies + var sizeMerged = caseListCountsMerged.stream().filter(gc->gc.getValue().equals("all")) + .findFirst().get().getCount().intValue(); + assertEquals(15, sizeMerged); + + } + +} \ No newline at end of file From 776fbae002f79db8fa22e4663f3cf3e1264eb0af Mon Sep 17 00:00:00 2001 From: Onur Sumer Date: Tue, 20 Aug 2024 12:00:08 -0400 Subject: [PATCH 39/87] add unit tests for clinical data counts sql (#10933) --- .../StudyViewMapperClinicalDataCountTest.java | 243 ++++++++++++++++++ .../StudyViewMapperTest.java | 2 - src/test/resources/clickhouse_data.sql | 98 ++++++- 3 files changed, 340 insertions(+), 3 deletions(-) create mode 100644 src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java diff --git a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java new file mode 100644 index 00000000000..17847278f9c --- /dev/null +++ b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java @@ -0,0 +1,243 @@ +package org.cbioportal.persistence.mybatisclickhouse; + +import org.cbioportal.model.ClinicalDataCount; +import org.cbioportal.persistence.mybatisclickhouse.config.MyBatisConfig; +import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; +import org.cbioportal.web.parameter.ClinicalDataFilter; +import org.cbioportal.web.parameter.DataFilterValue; +import org.cbioportal.web.parameter.StudyViewFilter; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; +import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; +import org.springframework.context.annotation.Import; +import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringRunner; + +import java.math.BigDecimal; +import java.util.Collections; +import java.util.List; + +import static org.junit.Assert.assertEquals; + +@RunWith(SpringRunner.class) +@Import(MyBatisConfig.class) +@DataJpaTest +@DirtiesContext +@AutoConfigureTestDatabase(replace= AutoConfigureTestDatabase.Replace.NONE) +@ContextConfiguration(initializers = AbstractTestcontainers.Initializer.class) +public class StudyViewMapperClinicalDataCountTest extends AbstractTestcontainers { + private static final String STUDY_ACC_TCGA = "acc_tcga"; + private static final String STUDY_GENIE_PUB = "study_genie_pub"; + + @Autowired + private StudyViewMapper studyViewMapper; + + @Test + public void getMutationCounts() { + StudyViewFilter studyViewFilter = new StudyViewFilter(); + studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); + + var mutationsCounts = studyViewMapper.getClinicalDataCounts( + studyViewFilter, + CategorizedClinicalDataCountFilter.getBuilder().build(), + false, + List.of("mutation_count"), + Collections.emptyList() + ); + + assertEquals(6, mutationsCounts.size()); + assertEquals(1, findClinicaDataCount(mutationsCounts, "11")); + assertEquals(1, findClinicaDataCount(mutationsCounts, "6")); + assertEquals(2, findClinicaDataCount(mutationsCounts, "4")); + assertEquals(4, findClinicaDataCount(mutationsCounts, "2")); + assertEquals(2, findClinicaDataCount(mutationsCounts, "1")); + // 1 empty string + 1 'NAN' + 11 samples with no data + assertEquals(13, findClinicaDataCount(mutationsCounts, "NA")); + } + + @Test + public void getCenterCounts() { + StudyViewFilter studyViewFilter = new StudyViewFilter(); + studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); + + var categoricalClinicalDataCounts = studyViewMapper.getClinicalDataCounts( + studyViewFilter, + CategorizedClinicalDataCountFilter.getBuilder().build(), + false, + List.of("center"), + Collections.emptyList() + ); + + assertEquals(7, categoricalClinicalDataCounts.size()); + assertEquals(3, findClinicaDataCount(categoricalClinicalDataCounts, "msk")); + assertEquals(2, findClinicaDataCount(categoricalClinicalDataCounts, "dfci")); + assertEquals(2, findClinicaDataCount(categoricalClinicalDataCounts, "chop")); + assertEquals(1, findClinicaDataCount(categoricalClinicalDataCounts, "mda")); + assertEquals(1, findClinicaDataCount(categoricalClinicalDataCounts, "ohsu")); + assertEquals(1, findClinicaDataCount(categoricalClinicalDataCounts, "ucsf")); + // 1 empty string + 1 'NA' + 11 samples with no data + assertEquals(13, findClinicaDataCount(categoricalClinicalDataCounts, "NA")); + } + + @Test + public void getMutationAndCenterCounts() { + StudyViewFilter studyViewFilter = new StudyViewFilter(); + studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); + + var combinedClinicalDataCounts = studyViewMapper.getClinicalDataCounts( + studyViewFilter, + CategorizedClinicalDataCountFilter.getBuilder().build(), + false, + List.of("mutation_count", "center"), + Collections.emptyList() + ); + + assertEquals(13, combinedClinicalDataCounts.size()); + } + + @Test + public void getAgeCounts() { + StudyViewFilter studyViewFilter = new StudyViewFilter(); + studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); + + var ageCounts = studyViewMapper.getClinicalDataCounts( + studyViewFilter, + CategorizedClinicalDataCountFilter.getBuilder().build(), + false, + List.of("age"), + Collections.emptyList() + ); + + assertAgeCounts(ageCounts); + + // 1 empty string + 1 'NAN' + 1 'N/A' + 1 patient without data + assertEquals(4, findClinicaDataCount(ageCounts, "NA")); + } + + @Test + public void getAgeCountsForMultipleStudies() { + StudyViewFilter studyViewFilter = new StudyViewFilter(); + studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB, STUDY_ACC_TCGA)); + + var ageCounts = studyViewMapper.getClinicalDataCounts( + studyViewFilter, + CategorizedClinicalDataCountFilter.getBuilder().build(), + false, + List.of("age"), + Collections.emptyList() + ); + + // everything should be exactly the same as single study (STUDY_GENIE_PUB) filter + // except NA counts + assertAgeCounts(ageCounts); + + // TODO this fails because of a known issue + // (https://github.com/cBioPortal/rfc80-team/issues/39) + // 1 empty string + 1 'NAN' + 1 'N/A' + 1 GENIE_PUB patient without data + 4 ACC_TCGA data without data + // assertEquals(8, findClinicaDataCount(ageCounts, "NA")); + } + + private void assertAgeCounts(List ageCounts) { + assertEquals(14, ageCounts.size()); + + assertEquals(3, findClinicaDataCount(ageCounts, "<18")); + assertEquals(1, findClinicaDataCount(ageCounts, "18")); + assertEquals(1, findClinicaDataCount(ageCounts, "22")); + assertEquals(2, findClinicaDataCount(ageCounts, "42")); + assertEquals(1, findClinicaDataCount(ageCounts, "66")); + assertEquals(1, findClinicaDataCount(ageCounts, "66")); + assertEquals(1, findClinicaDataCount(ageCounts, "68")); + assertEquals(1, findClinicaDataCount(ageCounts, "77")); + assertEquals(1, findClinicaDataCount(ageCounts, "78")); + assertEquals(1, findClinicaDataCount(ageCounts, "79")); + assertEquals(2, findClinicaDataCount(ageCounts, "80")); + assertEquals(2, findClinicaDataCount(ageCounts, "82")); + assertEquals(1, findClinicaDataCount(ageCounts, "89")); + assertEquals(2, findClinicaDataCount(ageCounts, ">89")); + } + + @Test + public void getMutationCountsFilteredByAge() { + StudyViewFilter studyViewFilter = new StudyViewFilter(); + studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); + + // filter patients with age between 20 and 70 + // (there are 5 patients within this range, which are 307..311) + ClinicalDataFilter filter = buildClinicalDataFilter("age", 20, 70); + studyViewFilter.setClinicalDataFilters(List.of(filter)); + + var mutationCountsFiltered = studyViewMapper.getClinicalDataCounts( + studyViewFilter, + CategorizedClinicalDataCountFilter + .getBuilder() + .setPatientNumericalClinicalDataFilters(List.of(filter)) + .build(), + true, + List.of("mutation_count"), + Collections.emptyList() + ); + + assertEquals(3, mutationCountsFiltered.size()); + assertEquals(2, findClinicaDataCount(mutationCountsFiltered, "2")); + assertEquals(2, findClinicaDataCount(mutationCountsFiltered, "1")); + assertEquals(1, findClinicaDataCount(mutationCountsFiltered, "NA")); + } + + @Test + public void getMutationCountsFilteredByAgeWithSpecialValues() { + StudyViewFilter studyViewFilter = new StudyViewFilter(); + studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); + + // filter patients with age less than 20 + // (there are 4 patients within this range, which are 301,302,303, and 306) + ClinicalDataFilter filter = buildClinicalDataFilter("age", null, 20); + studyViewFilter.setClinicalDataFilters(List.of(filter)); + + var mutationCountsFiltered = studyViewMapper.getClinicalDataCounts( + studyViewFilter, + CategorizedClinicalDataCountFilter + .getBuilder() + .setPatientNumericalClinicalDataFilters(List.of(filter)) + .build(), + true, + List.of("mutation_count"), + Collections.emptyList() + ); + + // TODO commented out tests below are failing due to a known issue + // (https://github.com/cBioPortal/rfc80-team/issues/32) + // assertEquals(4, mutationCountsFiltered.size()); + // assertEquals(1, findClinicaDataCount(mutationCountsFiltered, "11")); // patient 301 + // assertEquals(1, findClinicaDataCount(mutationCountsFiltered, "6")); // patient 302 + // assertEquals(1, findClinicaDataCount(mutationCountsFiltered, "4")); // patient 303 + assertEquals(1, findClinicaDataCount(mutationCountsFiltered, "2")); // patient 306 + + // no patients/samples with NA + assertEquals(0, findClinicaDataCount(mutationCountsFiltered, "NA")); + } + + private ClinicalDataFilter buildClinicalDataFilter(String attributeId, Integer start, Integer end) { + DataFilterValue value = new DataFilterValue(); + if (start != null) { + value.setStart(BigDecimal.valueOf(start)); + } + if (end != null) { + value.setEnd(BigDecimal.valueOf(end)); + } + + ClinicalDataFilter filter = new ClinicalDataFilter(); + filter.setAttributeId(attributeId); + filter.setValues(List.of(value)); + + return filter; + } + + private int findClinicaDataCount(List counts, String attrValue) { + var count = counts.stream().filter(c -> c.getValue().equals(attrValue)).findAny().orElse(null); + + return count == null ? 0 : count.getCount(); + } +} diff --git a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java index d12e87042dc..fd42e6a80bc 100644 --- a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java +++ b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java @@ -25,7 +25,6 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringRunner; -import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; @@ -236,5 +235,4 @@ public void getSampleTreatmentCounts() { assertEquals(0, sampleTreatmentCounts.size()); } - } \ No newline at end of file diff --git a/src/test/resources/clickhouse_data.sql b/src/test/resources/clickhouse_data.sql index 0b47aedeb0a..51d74dbf92c 100644 --- a/src/test/resources/clickhouse_data.sql +++ b/src/test/resources/clickhouse_data.sql @@ -6,6 +6,7 @@ insert into `reference_genome` values (2, 'human', 'hg38', 'grch38', null, 'http insert into cancer_study (cancer_study_id,cancer_study_identifier,type_of_cancer_id,name,description,public,pmid,citation,groups,status,import_date,reference_genome_id) values(1,'study_tcga_pub','brca','breast invasive carcinoma (tcga, nature 2012)','the cancer genome atlas (tcga) breast invasive carcinoma project. 825 cases.
nature 2012. raw data via the tcga data portal.',1,'23000897,26451490','tcga, nature 2012, ...','su2c-pi3k;public;gdac',0,'2011-12-18 13:17:17+00:00',1); insert into cancer_study (cancer_study_id,cancer_study_identifier,type_of_cancer_id,name,description,public,pmid,citation,groups,status,import_date,reference_genome_id) values(2,'acc_tcga','acc','adrenocortical carcinoma (tcga, provisional)','tcga adrenocortical carcinoma; raw data at the nci.',1,'23000897','tcga, nature 2012','su2c-pi3k;public;gdac',0,'2013-10-12 11:11:15+00:00',1); +insert into cancer_study (cancer_study_id,cancer_study_identifier,type_of_cancer_id,name,description,public,pmid,citation,groups,status,import_date,reference_genome_id) values(3,'study_genie_pub','mixed','GENIE Cohort public','GENIE public','1','','','GENIEPUB;GENIE',0,'2024-04-03 20:12:24.000000',1); insert into cancer_study_tags (cancer_study_id,tags) values(1,'{"analyst": {"name": "jack", "email": "jack@something.com"}, "load id": 35}'); insert into cancer_study_tags (cancer_study_id,tags) values(2,'{"load id": 36}'); @@ -102,6 +103,30 @@ insert into patient (internal_id,stable_id,cancer_study_id) values (15,'tcga-a1- insert into patient (internal_id,stable_id,cancer_study_id) values (16,'tcga-a1-b0sp',2); insert into patient (internal_id,stable_id,cancer_study_id) values (17,'tcga-a1-b0sq',2); insert into patient (internal_id,stable_id,cancer_study_id) values (18,'tcga-a1-a0sb',2); +insert into patient (internal_id,stable_id,cancer_study_id) values (301,'GENIE-TEST-301',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (302,'GENIE-TEST-302',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (303,'GENIE-TEST-303',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (304,'GENIE-TEST-304',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (305,'GENIE-TEST-305',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (306,'GENIE-TEST-306',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (307,'GENIE-TEST-307',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (308,'GENIE-TEST-308',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (309,'GENIE-TEST-309',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (310,'GENIE-TEST-310',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (311,'GENIE-TEST-311',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (312,'GENIE-TEST-312',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (313,'GENIE-TEST-313',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (314,'GENIE-TEST-314',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (315,'GENIE-TEST-315',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (316,'GENIE-TEST-316',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (317,'GENIE-TEST-317',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (318,'GENIE-TEST-318',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (319,'GENIE-TEST-319',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (320,'GENIE-TEST-320',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (321,'GENIE-TEST-321',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (322,'GENIE-TEST-322',3); +insert into patient (internal_id,stable_id,cancer_study_id) values (323,'GENIE-TEST-323',3); + insert into genetic_profile_samples (genetic_profile_id,ordered_sample_list) values(10,'1,2,3,4,5,6,7,8,9,10,11,'); insert into sample (internal_id,stable_id,sample_type,patient_id) values (1,'tcga-a1-a0sb-01','primary solid tumor',1); @@ -123,6 +148,29 @@ insert into sample (internal_id,stable_id,sample_type,patient_id) values (16,'tc insert into sample (internal_id,stable_id,sample_type,patient_id) values (17,'tcga-a1-b0sq-01','primary solid tumor',17); insert into sample (internal_id,stable_id,sample_type,patient_id) values (18,'tcga-a1-a0sb-02','primary solid tumor',1); insert into sample (internal_id,stable_id,sample_type,patient_id) values (19,'tcga-a1-a0sb-01','primary solid tumor',18); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (301,'GENIE-TEST-301-01','primary solid tumor',301); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (302,'GENIE-TEST-302-01','primary solid tumor',302); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (303,'GENIE-TEST-303-01','primary solid tumor',303); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (304,'GENIE-TEST-304-01','primary solid tumor',304); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (305,'GENIE-TEST-305-01','primary solid tumor',305); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (306,'GENIE-TEST-306-01','primary solid tumor',306); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (307,'GENIE-TEST-307-01','primary solid tumor',307); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (308,'GENIE-TEST-308-01','primary solid tumor',308); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (309,'GENIE-TEST-309-01','primary solid tumor',309); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (310,'GENIE-TEST-310-01','primary solid tumor',310); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (311,'GENIE-TEST-311-01','primary solid tumor',311); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (312,'GENIE-TEST-312-01','primary solid tumor',312); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (313,'GENIE-TEST-313-01','primary solid tumor',313); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (314,'GENIE-TEST-314-01','primary solid tumor',314); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (315,'GENIE-TEST-315-01','primary solid tumor',315); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (316,'GENIE-TEST-316-01','primary solid tumor',316); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (317,'GENIE-TEST-317-01','primary solid tumor',317); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (318,'GENIE-TEST-318-01','primary solid tumor',318); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (319,'GENIE-TEST-319-01','primary solid tumor',319); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (320,'GENIE-TEST-320-01','primary solid tumor',320); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (321,'GENIE-TEST-321-01','primary solid tumor',321); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (322,'GENIE-TEST-322-01','primary solid tumor',322); +insert into sample (internal_id,stable_id,sample_type,patient_id) values (323,'GENIE-TEST-323-01','primary solid tumor',323); insert into mutation_event (mutation_event_id,entrez_gene_id,chr,start_position,end_position,reference_allele,tumor_seq_allele,protein_change,mutation_type,ncbi_build,strand,variant_type,db_snp_rs,db_snp_val_status,refseq_mrna_id,codon_change,uniprot_accession,protein_pos_start,protein_pos_end,canonical_transcript,keyword) values (2038,672,'17',41244748,41244748,'g','a','q934*','nonsense_mutation','37','+','snp','rs80357223','unknown','nm_007294','c.(2800-2802)cag>tag','p38398',934,934,1,'brca1 truncating'); @@ -336,6 +384,40 @@ insert into clinical_patient (internal_id,attr_id,attr_value) values (15,'dfs_st insert into clinical_patient (internal_id,attr_id,attr_value) values (15,'os_months','12.3'); insert into clinical_patient (internal_id,attr_id,attr_value) values (15,'os_status','0:living'); insert into clinical_patient (internal_id,attr_id,attr_value) values (18,'retrospective_collection','no'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (301,'center','msk'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (302,'center','msk'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (303,'center','msk'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (304,'center','dfci'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (305,'center','dfci'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (306,'center','chop'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (307,'center','chop'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (308,'center','mda'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (309,'center','ohsu'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (310,'center','ucsf'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (311,'center','NA'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (312,'center',''); +insert into clinical_patient (internal_id,attr_id,attr_value) values (301,'age','<18'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (302,'age','<18'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (303,'age','<18'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (304,'age','>89'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (305,'age','>89'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (306,'age','18'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (307,'age','22'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (308,'age','42'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (309,'age','42'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (310,'age','66'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (311,'age','68'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (312,'age','77'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (313,'age','78'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (314,'age','79'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (315,'age','80'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (316,'age','80'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (317,'age','82'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (318,'age','82'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (319,'age','89'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (320,'age','N/A'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (321,'age',''); +insert into clinical_patient (internal_id,attr_id,attr_value) values (322,'age','NAN'); insert into clinical_sample (internal_id,attr_id,attr_value) values (1,'other_sample_id','5c631ce8-f96a-4c35-a459-556fc4ab21e1'); insert into clinical_sample (internal_id,attr_id,attr_value) values (1,'days_to_collection','276'); @@ -348,7 +430,18 @@ insert into clinical_sample (internal_id,attr_id,attr_value) values (2,'sample_t insert into clinical_sample (internal_id,attr_id,attr_value) values (15,'other_sample_id','91e7f41c-17b3-4724-96ef-d3c207b964e1'); insert into clinical_sample (internal_id,attr_id,attr_value) values (15,'days_to_collection','111'); insert into clinical_sample (internal_id,attr_id,attr_value) values (19,'days_to_collection','111'); - +insert into clinical_sample (internal_id,attr_id,attr_value) values (301,'mutation_count','11'); +insert into clinical_sample (internal_id,attr_id,attr_value) values (302,'mutation_count','6'); +insert into clinical_sample (internal_id,attr_id,attr_value) values (303,'mutation_count','4'); +insert into clinical_sample (internal_id,attr_id,attr_value) values (304,'mutation_count','4'); +insert into clinical_sample (internal_id,attr_id,attr_value) values (305,'mutation_count','2'); +insert into clinical_sample (internal_id,attr_id,attr_value) values (306,'mutation_count','2'); +insert into clinical_sample (internal_id,attr_id,attr_value) values (307,'mutation_count','2'); +insert into clinical_sample (internal_id,attr_id,attr_value) values (308,'mutation_count','2'); +insert into clinical_sample (internal_id,attr_id,attr_value) values (309,'mutation_count','1'); +insert into clinical_sample (internal_id,attr_id,attr_value) values (310,'mutation_count','1'); +insert into clinical_sample (internal_id,attr_id,attr_value) values (311,'mutation_count','NAN'); +insert into clinical_sample (internal_id,attr_id,attr_value) values (312,'mutation_count',''); insert into clinical_attribute_meta (attr_id,display_name,description,datatype,patient_attribute,priority,cancer_study_id) values ('retrospective_collection','tissue retrospective collection indicator','text indicator for the time frame of tissue procurement,indicating that the tissue was obtained and stored prior to the initiation of the project.','string',1,'1',1); insert into clinical_attribute_meta (attr_id,display_name,description,datatype,patient_attribute,priority,cancer_study_id) values ('prospective_collection','tissue prospective collection indicator','text indicator for the time frame of tissue procurement,indicating that the tissue was procured in parallel to the project.','string',1,'1',1); @@ -378,6 +471,9 @@ insert into clinical_attribute_meta (attr_id,display_name,description,datatype,p insert into clinical_attribute_meta (attr_id,display_name,description,datatype,patient_attribute,priority,cancer_study_id) values ('oct_embedded','oct embedded','oct embedded','string',0,'1',2); insert into clinical_attribute_meta (attr_id,display_name,description,datatype,patient_attribute,priority,cancer_study_id) values ('pathology_report_file_name','pathology report file name','pathology report file name','string',0,'1',2); insert into clinical_attribute_meta (attr_id,display_name,description,datatype,patient_attribute,priority,cancer_study_id) values ('sample_type','sample type','the type of sample (i.e.,normal,primary,met,recurrence).','string',0,'1',2); +insert into clinical_attribute_meta (attr_id,display_name,description,datatype,patient_attribute,priority,cancer_study_id) values ('mutation_count','mutaiton count','mutation count','number',0,'30',3); +insert into clinical_attribute_meta (attr_id,display_name,description,datatype,patient_attribute,priority,cancer_study_id) values ('age','age at metastatic diagnosis (years)','age at metastatic diagnosis (years)','number',1,'3',3); +insert into clinical_attribute_meta (attr_id,display_name,description,datatype,patient_attribute,priority,cancer_study_id) values ('center','center','center of sequencing','string',1,'1',3); -- add genes, genetic entities and structural variants for structural_variant insert into genetic_entity (id,entity_type) values(21,'gene'); From 05de8ff6b0484f2f3a245744ad0263d2dacdde5d Mon Sep 17 00:00:00 2001 From: Bryan Lai <56288120+gblaih@users.noreply.github.com> Date: Wed, 21 Aug 2024 13:13:09 -0400 Subject: [PATCH 40/87] Implement custom-data-bin-counts endpoint (#10827) * Implement custom-data-bin-counts associated filter * Create StudyViewFilterContext and Helper --------- Co-authored-by: Bryan Lai Co-authored-by: Charles Haynes --- .../model/StudyViewFilterContext.java | 11 + .../persistence/StudyViewRepository.java | 50 ++-- .../helper/StudyViewFilterHelper.java | 42 +++- .../mybatisclickhouse/StudyViewMapper.java | 52 ++--- .../StudyViewMyBatisRepository.java | 196 +++++----------- .../service/AlterationCountService.java | 8 +- .../impl/AlterationCountServiceImpl.java | 31 ++- .../impl/StudyViewColumnarServiceImpl.java | 48 ++-- .../TreatmentCountReportService.java | 8 +- .../TreatmentCountReportServiceImpl.java | 14 +- .../StudyViewColumnStoreController.java | 34 ++- .../columnar/util/CustomDataFilterUtil.java | 219 ++++++++++++++++++ .../columnar/util/NewStudyViewFilterUtil.java | 6 + .../web/parameter/CustomSampleIdentifier.java | 25 ++ .../ClinicalDataIntervalFilterApplier.java | 7 +- .../cbioportal/web/util/DataBinHelper.java | 83 +++---- .../org/cbioportal/web/util/DataBinner.java | 38 ++- .../web/util/DiscreteDataBinner.java | 6 +- .../org/cbioportal/web/util/IdPopulator.java | 2 - .../cbioportal/web/util/LinearDataBinner.java | 10 +- .../web/util/LogScaleDataBinner.java | 5 +- .../web/util/ScientificSmallDataBinner.java | 10 +- .../web/util/StudyViewFilterUtil.java | 40 +--- .../StudyViewFilterMapper.xml | 111 ++++++--- .../mybatisclickhouse/StudyViewMapper.xml | 10 +- .../MolecularProfileCountTest.java | 13 +- .../StudyViewCaseListSamplesCountsTest.java | 13 +- .../StudyViewMapperClinicalDataCountTest.java | 57 +++-- .../StudyViewMapperTest.java | 201 ++++++++-------- .../web/util/ClinicalDataBinUtilTest.java | 5 +- .../cbioportal/web/util/DataBinnerTest.java | 4 - 31 files changed, 788 insertions(+), 571 deletions(-) create mode 100644 src/main/java/org/cbioportal/model/StudyViewFilterContext.java create mode 100644 src/main/java/org/cbioportal/web/columnar/util/CustomDataFilterUtil.java create mode 100644 src/main/java/org/cbioportal/web/parameter/CustomSampleIdentifier.java diff --git a/src/main/java/org/cbioportal/model/StudyViewFilterContext.java b/src/main/java/org/cbioportal/model/StudyViewFilterContext.java new file mode 100644 index 00000000000..71ad071ae15 --- /dev/null +++ b/src/main/java/org/cbioportal/model/StudyViewFilterContext.java @@ -0,0 +1,11 @@ +package org.cbioportal.model; + +import org.cbioportal.web.parameter.CustomSampleIdentifier; +import org.cbioportal.web.parameter.StudyViewFilter; + +import java.util.List; + +public record StudyViewFilterContext( StudyViewFilter studyViewFilter, + List customDataFilterSamples) { + +} diff --git a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java index 3bc481bb4bf..b5c7748ffe9 100644 --- a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java +++ b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java @@ -12,59 +12,59 @@ import org.cbioportal.model.PatientTreatment; import org.cbioportal.model.Sample; import org.cbioportal.model.SampleTreatment; +import org.cbioportal.model.StudyViewFilterContext; import org.cbioportal.web.parameter.ClinicalDataType; import org.cbioportal.web.parameter.GenomicDataFilter; -import org.cbioportal.web.parameter.StudyViewFilter; import java.util.List; import java.util.Map; import java.util.Set; public interface StudyViewRepository { - List getFilteredSamples(StudyViewFilter studyViewFilter); - - List getSampleClinicalData(StudyViewFilter studyViewFilter, List attributeIds); + List getFilteredSamples(StudyViewFilterContext studyViewFilterContext); + + List getSampleClinicalData(StudyViewFilterContext studyViewFilterContext, List attributeIds); - List getPatientClinicalData(StudyViewFilter studyViewFilter, List attributeIds); + List getPatientClinicalData(StudyViewFilterContext studyViewFilterContext, List attributeIds); - List getMutatedGenes(StudyViewFilter studyViewFilter); + List getMutatedGenes(StudyViewFilterContext studyViewFilterContext); - List getStructuralVariantGenes(StudyViewFilter studyViewFilter); - List getCnaGenes(StudyViewFilter studyViewFilter); + List getStructuralVariantGenes(StudyViewFilterContext studyViewFilterContext); + List getCnaGenes(StudyViewFilterContext studyViewFilterContext); - List getClinicalDataCounts(StudyViewFilter studyViewFilter, List filteredAttributes); + List getClinicalDataCounts(StudyViewFilterContext studyViewFilterContext, List filteredAttributes); - List getMolecularProfileSampleCounts(StudyViewFilter studyViewFilter); + List getMolecularProfileSampleCounts(StudyViewFilterContext studyViewFilterContext); List getClinicalAttributes(); - + Map getClinicalAttributeDatatypeMap(); - List getCaseListDataCountsPerStudy(StudyViewFilter studyViewFilter); + List getCaseListDataCountsPerStudy(StudyViewFilterContext studyViewFilterContext); - Map getTotalProfiledCounts(StudyViewFilter studyViewFilter, String alterationType); + Map getTotalProfiledCounts(StudyViewFilterContext studyViewFilterContext, String alterationType); - int getFilteredSamplesCount(StudyViewFilter studyViewFilter); + int getFilteredSamplesCount(StudyViewFilterContext studyViewFilterContext); - Map> getMatchingGenePanelIds(StudyViewFilter studyViewFilter, String alterationType); + Map> getMatchingGenePanelIds(StudyViewFilterContext studyViewFilterContext, String alterationType); - int getTotalProfiledCountsByAlterationType(StudyViewFilter studyViewFilter, String alterationType); + int getTotalProfiledCountsByAlterationType(StudyViewFilterContext studyViewFilterContext, String alterationType); - int getSampleProfileCountWithoutPanelData(StudyViewFilter studyViewFilter, String alterationType); + int getSampleProfileCountWithoutPanelData(StudyViewFilterContext studyViewFilterContext, String alterationType); - List getClinicalEventTypeCounts(StudyViewFilter studyViewFilter); + List getClinicalEventTypeCounts(StudyViewFilterContext studyViewFilterContext); - List getPatientTreatments(StudyViewFilter studyViewFilter); + List getPatientTreatments(StudyViewFilterContext studyViewFilterContext); - int getTotalPatientTreatmentCount(StudyViewFilter studyViewFilter); + int getTotalPatientTreatmentCount(StudyViewFilterContext studyViewFilterContext); - List getSampleTreatments(StudyViewFilter studyViewFilter); + List getSampleTreatments(StudyViewFilterContext studyViewFilterContext); - int getTotalSampleTreatmentCount(StudyViewFilter studyViewFilter); + int getTotalSampleTreatmentCount(StudyViewFilterContext studyViewFilterContext); - List getCNACounts(StudyViewFilter studyViewFilter, List genomicDataFilters); + List getCNACounts(StudyViewFilterContext studyViewFilterContext, List genomicDataFilters); - Map getMutationCounts(StudyViewFilter studyViewFilter, GenomicDataFilter genomicDataFilter); + Map getMutationCounts(StudyViewFilterContext studyViewFilterContext, GenomicDataFilter genomicDataFilter); - List getMutationCountsByType(StudyViewFilter studyViewFilter, List genomicDataFilters); + List getMutationCountsByType(StudyViewFilterContext studyViewFilterContext, List genomicDataFilters); } diff --git a/src/main/java/org/cbioportal/persistence/helper/StudyViewFilterHelper.java b/src/main/java/org/cbioportal/persistence/helper/StudyViewFilterHelper.java index 5d63ac03b90..14c77b47f04 100644 --- a/src/main/java/org/cbioportal/persistence/helper/StudyViewFilterHelper.java +++ b/src/main/java/org/cbioportal/persistence/helper/StudyViewFilterHelper.java @@ -3,35 +3,59 @@ import org.cbioportal.model.ClinicalAttribute; import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; +import org.cbioportal.web.parameter.CustomSampleIdentifier; import org.cbioportal.web.parameter.StudyViewFilter; import org.springframework.lang.NonNull; import org.springframework.lang.Nullable; +import java.util.ArrayList; import java.util.EnumMap; import java.util.List; import java.util.Map; import java.util.Objects; -public class StudyViewFilterHelper { - public static StudyViewFilterHelper build(@Nullable StudyViewFilter studyViewFilter, @Nullable EnumMap> clinicalAttributesMap) { +public final class StudyViewFilterHelper { + public static StudyViewFilterHelper build(@Nullable StudyViewFilter studyViewFilter, + @Nullable Map> clinicalAttributesMap, + @Nullable List customDataSamples) { if (Objects.isNull(studyViewFilter)) { studyViewFilter = new StudyViewFilter(); } if (Objects.isNull(clinicalAttributesMap)) { clinicalAttributesMap = new EnumMap<>(ClinicalAttributeDataSource.class); } - return new StudyViewFilterHelper(studyViewFilter, clinicalAttributesMap); + if (Objects.isNull(customDataSamples)) { + customDataSamples = new ArrayList<>(); + } + return new StudyViewFilterHelper(studyViewFilter, clinicalAttributesMap, customDataSamples); } private final StudyViewFilter studyViewFilter; private final CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter; + private final List customDataSamples; + private final boolean applyPatientIdFilters; - private StudyViewFilterHelper(@NonNull StudyViewFilter studyViewFilter, @NonNull Map> clinicalAttributesMap ) { + private StudyViewFilterHelper(@NonNull StudyViewFilter studyViewFilter, @NonNull Map> clinicalAttributesMap, + @NonNull List customDataSamples) { this.studyViewFilter = studyViewFilter; this.categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter, clinicalAttributesMap); + this.customDataSamples = customDataSamples; + this.applyPatientIdFilters = shouldApplyPatientIdFilters(); } - + + public StudyViewFilter studyViewFilter() { + return studyViewFilter; + } + + public CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter() { + return categorizedClinicalDataCountFilter; + } + + public List customDataSamples() { + return this.customDataSamples; + } + private CategorizedClinicalDataCountFilter extractClinicalDataCountFilters(final StudyViewFilter studyViewFilter, Map> clinicalAttributesMap) { if (studyViewFilter.getClinicalDataFilters() == null || clinicalAttributesMap.isEmpty()) { @@ -73,6 +97,12 @@ private CategorizedClinicalDataCountFilter extractClinicalDataCountFilters(final .toList()) .build(); } - + + public boolean shouldApplyPatientIdFilters() { + return studyViewFilter.getClinicalEventFilters() != null && !studyViewFilter.getClinicalEventFilters().isEmpty() + || studyViewFilter.getPatientTreatmentFilters() != null && studyViewFilter.getPatientTreatmentFilters().getFilters()!= null && !studyViewFilter.getPatientTreatmentFilters().getFilters().isEmpty() + || categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters().isEmpty() + || categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters().isEmpty(); + } } diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java index a3b27e8eeba..6dabd46d0df 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java @@ -1,5 +1,6 @@ package org.cbioportal.persistence.mybatisclickhouse; +import org.apache.ibatis.annotations.Param; import org.cbioportal.model.AlterationCountByGene; import org.cbioportal.model.CaseListDataCount; import org.cbioportal.model.ClinicalAttribute; @@ -14,59 +15,54 @@ import org.cbioportal.model.Sample; import org.cbioportal.model.SampleTreatment; import org.cbioportal.persistence.helper.AlterationFilterHelper; -import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; +import org.cbioportal.persistence.helper.StudyViewFilterHelper; import org.cbioportal.web.parameter.GenomicDataFilter; -import org.cbioportal.web.parameter.StudyViewFilter; import java.util.List; import java.util.Map; public interface StudyViewMapper { - List getFilteredSamples(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); + List getFilteredSamples(@Param("studyViewFilterHelper") StudyViewFilterHelper studyViewFilterHelper); - List getMolecularProfileSampleCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); + List getMolecularProfileSampleCounts(@Param("studyViewFilterHelper") StudyViewFilterHelper studyViewFilterHelper); - List getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, - boolean applyPatientIdFilters, AlterationFilterHelper alterationFilterHelper); + List getMutatedGenes(StudyViewFilterHelper studyViewFilterHelper, AlterationFilterHelper alterationFilterHelper); - List getCnaGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, - boolean applyPatientIdFilters, AlterationFilterHelper alterationFilterHelper); + List getCnaGenes(StudyViewFilterHelper studyViewFilterHelper, AlterationFilterHelper alterationFilterHelper); - List getStructuralVariantGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, - boolean applyPatientIdFilters, AlterationFilterHelper alterationFilterHelper); + List getStructuralVariantGenes(StudyViewFilterHelper studyViewFilterHelper, AlterationFilterHelper alterationFilterHelper); - List getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, - boolean applyPatientIdFilters, List attributeIds, List filteredAttributeValues); + List getClinicalDataCounts(StudyViewFilterHelper studyViewFilterHelper, List attributeIds, List filteredAttributeValues); - List getCaseListDataCountsPerStudy(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); + List getCaseListDataCountsPerStudy(@Param("studyViewFilterHelper") StudyViewFilterHelper studyViewFilterHelper); List getClinicalAttributes(); - List getSampleClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, List attributeIds); + List getSampleClinicalDataFromStudyViewFilter(StudyViewFilterHelper studyViewFilterHelper, List attributeIds); - List getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, List attributeIds); + List getPatientClinicalDataFromStudyViewFilter(StudyViewFilterHelper studyViewFilterHelper, List attributeIds); - List getTotalProfiledCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, String alterationType); + List getTotalProfiledCounts(StudyViewFilterHelper studyViewFilterHelper, String alterationType); - int getFilteredSamplesCount(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); + int getFilteredSamplesCount(@Param("studyViewFilterHelper") StudyViewFilterHelper studyViewFilterHelper); - List getMatchingGenePanelIds(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, String alterationType); + List getMatchingGenePanelIds(StudyViewFilterHelper studyViewFilterHelper, String alterationType); - int getTotalProfiledCountByAlterationType(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, String alterationType); + int getTotalProfiledCountByAlterationType(StudyViewFilterHelper studyViewFilterHelper, String alterationType); - int getSampleProfileCountWithoutPanelData(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, String alterationType); + int getSampleProfileCountWithoutPanelData(StudyViewFilterHelper studyViewFilterHelper, String alterationType); - List getClinicalEventTypeCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); + List getClinicalEventTypeCounts(@Param("studyViewFilterHelper") StudyViewFilterHelper studyViewFilterHelper); - List getPatientTreatments(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); - int getPatientTreatmentCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); - List getSampleTreatmentCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); - int getTotalSampleTreatmentCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters); + List getPatientTreatments(@Param("studyViewFilterHelper") StudyViewFilterHelper studyViewFilterHelper); + int getPatientTreatmentCounts(@Param("studyViewFilterHelper") StudyViewFilterHelper studyViewFilterHelper); + List getSampleTreatmentCounts(@Param("studyViewFilterHelper") StudyViewFilterHelper studyViewFilterHelper); + int getTotalSampleTreatmentCounts(@Param("studyViewFilterHelper") StudyViewFilterHelper studyViewFilterHelper); - List getCNACounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List genomicDataFilters); + List getCNACounts(StudyViewFilterHelper studyViewFilterHelper, List genomicDataFilters); - Map getMutationCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, GenomicDataFilter genomicDataFilter); + Map getMutationCounts(StudyViewFilterHelper studyViewFilterHelper, GenomicDataFilter genomicDataFilter); - List getMutationCountsByType(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List genomicDataFilters); + List getMutationCountsByType(StudyViewFilterHelper studyViewFilterHelper, List genomicDataFilters); } diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java index 76230381c41..5bf385f366e 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java @@ -12,13 +12,13 @@ import org.cbioportal.model.PatientTreatment; import org.cbioportal.model.Sample; import org.cbioportal.model.SampleTreatment; +import org.cbioportal.model.StudyViewFilterContext; import org.cbioportal.persistence.StudyViewRepository; import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; import org.cbioportal.persistence.helper.AlterationFilterHelper; -import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; +import org.cbioportal.persistence.helper.StudyViewFilterHelper; import org.cbioportal.web.parameter.ClinicalDataType; import org.cbioportal.web.parameter.GenomicDataFilter; -import org.cbioportal.web.parameter.StudyViewFilter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; @@ -43,50 +43,39 @@ public class StudyViewMyBatisRepository implements StudyViewRepository { public StudyViewMyBatisRepository(StudyViewMapper mapper) { this.mapper = mapper; } + @Override - public List getFilteredSamples(StudyViewFilter studyViewFilter) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getFilteredSamples(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter)); + public List getFilteredSamples(StudyViewFilterContext studyViewFilterContext) { + return mapper.getFilteredSamples(createStudyViewFilterHelper(studyViewFilterContext)); } @Override - public List getMutatedGenes(StudyViewFilter studyViewFilter) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getMutatedGenes(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), - AlterationFilterHelper.build(studyViewFilter.getAlterationFilter())); + public List getMutatedGenes(StudyViewFilterContext studyViewFilterContext) { + return mapper.getMutatedGenes(createStudyViewFilterHelper(studyViewFilterContext), + AlterationFilterHelper.build(studyViewFilterContext.studyViewFilter().getAlterationFilter())); } @Override - public List getCnaGenes(StudyViewFilter studyViewFilter) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getCnaGenes(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), - AlterationFilterHelper.build(studyViewFilter.getAlterationFilter())); + public List getCnaGenes(StudyViewFilterContext studyViewFilterContext) { + return mapper.getCnaGenes(createStudyViewFilterHelper(studyViewFilterContext), + AlterationFilterHelper.build(studyViewFilterContext.studyViewFilter().getAlterationFilter())); } @Override - public List getStructuralVariantGenes(StudyViewFilter studyViewFilter) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getStructuralVariantGenes(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), - AlterationFilterHelper.build(studyViewFilter.getAlterationFilter())); + public List getStructuralVariantGenes(StudyViewFilterContext studyViewFilterContext) { + return mapper.getStructuralVariantGenes(createStudyViewFilterHelper(studyViewFilterContext), + AlterationFilterHelper.build(studyViewFilterContext.studyViewFilter().getAlterationFilter())); } @Override - public List getClinicalDataCounts(StudyViewFilter studyViewFilter, List filteredAttributes) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), - filteredAttributes, FILTERED_CLINICAL_ATTR_VALUES ); + public List getClinicalDataCounts(StudyViewFilterContext studyViewFilterContext, List filteredAttributes) { + return mapper.getClinicalDataCounts(createStudyViewFilterHelper(studyViewFilterContext), + filteredAttributes, FILTERED_CLINICAL_ATTR_VALUES); } @Override - public List getMolecularProfileSampleCounts(StudyViewFilter studyViewFilter) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - var sampleCounts = mapper.getMolecularProfileSampleCounts(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter)); - + public List getMolecularProfileSampleCounts(StudyViewFilterContext studyViewFilterContext) { + var sampleCounts = mapper.getMolecularProfileSampleCounts(createStudyViewFilterHelper(studyViewFilterContext)); Map> countsPerType = sampleCounts.stream() .collect((Collectors.groupingBy(GenomicDataCount::getValue))); @@ -111,6 +100,10 @@ public List getMolecularProfileSampleCounts(StudyViewFilter st } + public StudyViewFilterHelper createStudyViewFilterHelper(StudyViewFilterContext studyViewFilterContext) { + return StudyViewFilterHelper.build(studyViewFilterContext.studyViewFilter(), getClinicalAttributeNameMap(), studyViewFilterContext.customDataFilterSamples()); + } + @Override public List getClinicalAttributes() { return mapper.getClinicalAttributes(); @@ -136,105 +129,75 @@ public Map getClinicalAttributeDatatypeMap() { } @Override - public List getCaseListDataCountsPerStudy(StudyViewFilter studyViewFilter) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getCaseListDataCountsPerStudy(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter)); - } - - - private boolean shouldApplyPatientIdFilters(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) { - return studyViewFilter.getClinicalEventFilters() != null && !studyViewFilter.getClinicalEventFilters().isEmpty() - || studyViewFilter.getPatientTreatmentFilters() != null && studyViewFilter.getPatientTreatmentFilters().getFilters()!= null && !studyViewFilter.getPatientTreatmentFilters().getFilters().isEmpty() - || categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters().isEmpty() - || categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters().isEmpty(); + public List getCaseListDataCountsPerStudy(StudyViewFilterContext studyViewFilterContext) { + return mapper.getCaseListDataCountsPerStudy(createStudyViewFilterHelper(studyViewFilterContext)); } @Override - public List getSampleClinicalData(StudyViewFilter studyViewFilter, List attributeIds) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getSampleClinicalDataFromStudyViewFilter(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), attributeIds); + public List getSampleClinicalData(StudyViewFilterContext studyViewFilterContext, List attributeIds) { + return mapper.getSampleClinicalDataFromStudyViewFilter(createStudyViewFilterHelper(studyViewFilterContext), attributeIds); } @Override - public List getPatientClinicalData(StudyViewFilter studyViewFilter, List attributeIds) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), attributeIds); + public List getPatientClinicalData(StudyViewFilterContext studyViewFilterContext, List attributeIds) { + return mapper.getPatientClinicalDataFromStudyViewFilter(createStudyViewFilterHelper(studyViewFilterContext), attributeIds); } @Override - public Map getTotalProfiledCounts(StudyViewFilter studyViewFilter, String alterationType) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getTotalProfiledCounts(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), alterationType) + public Map getTotalProfiledCounts(StudyViewFilterContext studyViewFilterContext, String alterationType) { + return mapper.getTotalProfiledCounts(createStudyViewFilterHelper(studyViewFilterContext), alterationType) .stream() .collect(Collectors.groupingBy(AlterationCountByGene::getHugoGeneSymbol, Collectors.mapping(AlterationCountByGene::getNumberOfProfiledCases, Collectors.summingInt(Integer::intValue)))); } @Override - public int getFilteredSamplesCount(StudyViewFilter studyViewFilter) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getFilteredSamplesCount(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter)); + public int getFilteredSamplesCount(StudyViewFilterContext studyViewFilterContext) { + return mapper.getFilteredSamplesCount(createStudyViewFilterHelper(studyViewFilterContext)); } @Override - public Map> getMatchingGenePanelIds(StudyViewFilter studyViewFilter, String alterationType) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getMatchingGenePanelIds(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), alterationType) + public Map> getMatchingGenePanelIds(StudyViewFilterContext studyViewFilterContext, String alterationType) { + return mapper.getMatchingGenePanelIds(createStudyViewFilterHelper(studyViewFilterContext), alterationType) .stream() .collect(Collectors.groupingBy(GenePanelToGene::getHugoGeneSymbol, Collectors.mapping(GenePanelToGene::getGenePanelId, Collectors.toSet()))); } @Override - public int getTotalProfiledCountsByAlterationType(StudyViewFilter studyViewFilter, String alterationType) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getTotalProfiledCountByAlterationType(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), alterationType); + public int getTotalProfiledCountsByAlterationType(StudyViewFilterContext studyViewFilterContext, String alterationType) { + return mapper.getTotalProfiledCountByAlterationType(createStudyViewFilterHelper(studyViewFilterContext), alterationType); } @Override - public int getSampleProfileCountWithoutPanelData(StudyViewFilter studyViewFilter, String alterationType) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getSampleProfileCountWithoutPanelData(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter), alterationType); + public int getSampleProfileCountWithoutPanelData(StudyViewFilterContext studyViewFilterContext, String alterationType) { + return mapper.getSampleProfileCountWithoutPanelData(createStudyViewFilterHelper(studyViewFilterContext), alterationType); } @Override - public List getClinicalEventTypeCounts(StudyViewFilter studyViewFilter) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getClinicalEventTypeCounts(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(studyViewFilter,categorizedClinicalDataCountFilter)); + public List getClinicalEventTypeCounts(StudyViewFilterContext studyViewFilterContext) { + return mapper.getClinicalEventTypeCounts(createStudyViewFilterHelper(studyViewFilterContext)); } @Override - public List getPatientTreatments(StudyViewFilter studyViewFilter) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getPatientTreatments(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(studyViewFilter, categorizedClinicalDataCountFilter)); + public List getPatientTreatments(StudyViewFilterContext studyViewFilterContext) { + return mapper.getPatientTreatments(createStudyViewFilterHelper(studyViewFilterContext)); } @Override - public int getTotalPatientTreatmentCount(StudyViewFilter studyViewFilter) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getPatientTreatmentCounts(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(studyViewFilter, categorizedClinicalDataCountFilter)); + public int getTotalPatientTreatmentCount(StudyViewFilterContext studyViewFilterContext) { + return mapper.getPatientTreatmentCounts(createStudyViewFilterHelper(studyViewFilterContext)); } @Override - public List getSampleTreatments(StudyViewFilter studyViewFilter) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getSampleTreatmentCounts(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(studyViewFilter, categorizedClinicalDataCountFilter)); + public List getSampleTreatments(StudyViewFilterContext studyViewFilterContext) { + return mapper.getSampleTreatmentCounts(createStudyViewFilterHelper(studyViewFilterContext)); } @Override - public int getTotalSampleTreatmentCount(StudyViewFilter studyViewFilter) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getTotalSampleTreatmentCounts(studyViewFilter, categorizedClinicalDataCountFilter, - shouldApplyPatientIdFilters(studyViewFilter, categorizedClinicalDataCountFilter)); + public int getTotalSampleTreatmentCount(StudyViewFilterContext studyViewFilterContext) { + return mapper.getTotalSampleTreatmentCounts(createStudyViewFilterHelper(studyViewFilterContext)); } private void buildClinicalAttributeNameMap() { @@ -250,65 +213,20 @@ private Map> getClinicalAtt return clinicalAttributesMap; } - private CategorizedClinicalDataCountFilter extractClinicalDataCountFilters(final StudyViewFilter studyViewFilter) { - if (clinicalAttributesMap.isEmpty()) { - buildClinicalAttributeNameMap(); - } - - if (studyViewFilter.getClinicalDataFilters() == null) { - return CategorizedClinicalDataCountFilter.getBuilder().build(); - } - - List patientCategoricalAttributes = clinicalAttributesMap.get(ClinicalAttributeDataSource.PATIENT) - .stream().filter(ca -> ca.getDatatype().equals("STRING")) - .map(ClinicalAttribute::getAttrId) - .toList(); + @Override + public List getCNACounts(StudyViewFilterContext studyViewFilterContext, List genomicDataFilters) { - List patientNumericalAttributes = clinicalAttributesMap.get(ClinicalAttributeDataSource.PATIENT) - .stream().filter(ca -> ca.getDatatype().equals("NUMBER")) - .map(ClinicalAttribute::getAttrId) - .toList(); + return mapper.getCNACounts(createStudyViewFilterHelper(studyViewFilterContext), genomicDataFilters); + } - List sampleCategoricalAttributes = clinicalAttributesMap.get(ClinicalAttributeDataSource.SAMPLE) - .stream().filter(ca -> ca.getDatatype().equals("STRING")) - .map(ClinicalAttribute::getAttrId) - .toList(); + public Map getMutationCounts(StudyViewFilterContext studyViewFilterContext, GenomicDataFilter genomicDataFilter) { - List sampleNumericalAttributes = clinicalAttributesMap.get(ClinicalAttributeDataSource.SAMPLE) - .stream().filter(ca -> ca.getDatatype().equals("NUMBER")) - .map(ClinicalAttribute::getAttrId) - .toList(); - - return CategorizedClinicalDataCountFilter.getBuilder() - .setPatientCategoricalClinicalDataFilters(studyViewFilter.getClinicalDataFilters() - .stream().filter(clinicalDataFilter -> patientCategoricalAttributes.contains(clinicalDataFilter.getAttributeId())) - .collect(Collectors.toList())) - .setPatientNumericalClinicalDataFilters(studyViewFilter.getClinicalDataFilters().stream() - .filter(clinicalDataFilter -> patientNumericalAttributes.contains(clinicalDataFilter.getAttributeId())) - .collect(Collectors.toList())) - .setSampleCategoricalClinicalDataFilters(studyViewFilter.getClinicalDataFilters().stream() - .filter(clinicalDataFilter -> sampleCategoricalAttributes.contains(clinicalDataFilter.getAttributeId())) - .collect(Collectors.toList())) - .setSampleNumericalClinicalDataFilters(studyViewFilter.getClinicalDataFilters().stream() - .filter(clinicalDataFilter -> sampleNumericalAttributes.contains(clinicalDataFilter.getAttributeId())) - .collect(Collectors.toList())) - .build(); + return mapper.getMutationCounts(createStudyViewFilterHelper(studyViewFilterContext), genomicDataFilter); } - @Override - public List getCNACounts(StudyViewFilter studyViewFilter, List genomicDataFilters) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getCNACounts(studyViewFilter, categorizedClinicalDataCountFilter, genomicDataFilters); - } + public List getMutationCountsByType(StudyViewFilterContext studyViewFilterContext, List genomicDataFilters) { - public Map getMutationCounts(StudyViewFilter studyViewFilter, GenomicDataFilter genomicDataFilter) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getMutationCounts(studyViewFilter, categorizedClinicalDataCountFilter, genomicDataFilter); - } - - public List getMutationCountsByType(StudyViewFilter studyViewFilter, List genomicDataFilters) { - CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter); - return mapper.getMutationCountsByType(studyViewFilter, categorizedClinicalDataCountFilter, genomicDataFilters); + return mapper.getMutationCountsByType(createStudyViewFilterHelper(studyViewFilterContext), genomicDataFilters); } } \ No newline at end of file diff --git a/src/main/java/org/cbioportal/service/AlterationCountService.java b/src/main/java/org/cbioportal/service/AlterationCountService.java index 289806033ba..e86420a7509 100644 --- a/src/main/java/org/cbioportal/service/AlterationCountService.java +++ b/src/main/java/org/cbioportal/service/AlterationCountService.java @@ -4,6 +4,8 @@ import org.cbioportal.model.*; import org.cbioportal.model.util.Select; import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; +import org.cbioportal.web.parameter.CustomSampleIdentifier; +import org.cbioportal.web.parameter.SampleIdentifier; import org.cbioportal.web.parameter.StudyViewFilter; import java.util.List; @@ -77,9 +79,9 @@ Pair, Long> getPatientCnaGeneCounts(List getMutatedGenes(StudyViewFilter studyViewFilter); - List getCnaGenes(StudyViewFilter studyViewFilter); + List getMutatedGenes(StudyViewFilterContext studyViewFilterContext); + List getCnaGenes(StudyViewFilterContext studyViewFilterContext); - List getStructuralVariantGenes(StudyViewFilter studyViewFilter); + List getStructuralVariantGenes(StudyViewFilterContext studyViewFilterContext); } diff --git a/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java b/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java index a8aa0dbe723..2188951be6e 100644 --- a/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.java @@ -1,6 +1,5 @@ package org.cbioportal.service.impl; -import org.apache.commons.lang3.SerializationUtils; import org.apache.commons.math3.util.Pair; import org.cbioportal.model.AlterationCountBase; import org.cbioportal.model.AlterationCountByGene; @@ -10,13 +9,13 @@ import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.MolecularProfile; import org.cbioportal.model.MolecularProfileCaseIdentifier; +import org.cbioportal.model.StudyViewFilterContext; import org.cbioportal.model.util.Select; import org.cbioportal.persistence.AlterationRepository; import org.cbioportal.persistence.MolecularProfileRepository; import org.cbioportal.persistence.StudyViewRepository; import org.cbioportal.service.AlterationCountService; import org.cbioportal.service.util.AlterationEnrichmentUtil; -import org.cbioportal.web.parameter.StudyViewFilter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.lang.NonNull; import org.springframework.stereotype.Service; @@ -254,29 +253,29 @@ public Pair, Long> getPatientCnaGeneCounts(List getMutatedGenes(StudyViewFilter studyViewFilter) { - var alterationCountByGenes = studyViewRepository.getMutatedGenes(studyViewFilter); - return populateAlterationCounts(alterationCountByGenes, studyViewFilter, AlterationType.MUTATION_EXTENDED); + public List getMutatedGenes(StudyViewFilterContext studyViewFilterContext) { + var alterationCountByGenes = studyViewRepository.getMutatedGenes(studyViewFilterContext); + return populateAlterationCounts(alterationCountByGenes, studyViewFilterContext, AlterationType.MUTATION_EXTENDED); } - public List getCnaGenes(StudyViewFilter studyViewFilter) { - var copyNumberCountByGenes = studyViewRepository.getCnaGenes(studyViewFilter); - return populateAlterationCounts(copyNumberCountByGenes, studyViewFilter, AlterationType.COPY_NUMBER_ALTERATION); + public List getCnaGenes(StudyViewFilterContext studyViewFilterContext) { + var copyNumberCountByGenes = studyViewRepository.getCnaGenes(studyViewFilterContext); + return populateAlterationCounts(copyNumberCountByGenes, studyViewFilterContext, AlterationType.COPY_NUMBER_ALTERATION); } @Override - public List getStructuralVariantGenes(StudyViewFilter studyViewFilter) { - var alterationCountByGenes = studyViewRepository.getStructuralVariantGenes(studyViewFilter); - return populateAlterationCounts(alterationCountByGenes, studyViewFilter, AlterationType.STRUCTURAL_VARIANT); + public List getStructuralVariantGenes(StudyViewFilterContext studyViewFilterContext) { + var alterationCountByGenes = studyViewRepository.getStructuralVariantGenes(studyViewFilterContext); + return populateAlterationCounts(alterationCountByGenes, studyViewFilterContext, AlterationType.STRUCTURAL_VARIANT); } private < T extends AlterationCountByGene> List populateAlterationCounts(@NonNull List alterationCounts, - @NonNull StudyViewFilter studyViewFilter, + @NonNull StudyViewFilterContext studyViewFilterContext, @NonNull AlterationType alterationType) { - final int profiledCountWithoutGenePanelData = studyViewRepository.getTotalProfiledCountsByAlterationType(studyViewFilter, alterationType.toString()); - var profiledCountsMap = studyViewRepository.getTotalProfiledCounts(studyViewFilter, alterationType.toString()); - final var matchingGenePanelIdsMap = studyViewRepository.getMatchingGenePanelIds(studyViewFilter, alterationType.toString()); - final int sampleProfileCountWithoutGenePanelData = studyViewRepository.getSampleProfileCountWithoutPanelData(studyViewFilter, alterationType.toString()); + final int profiledCountWithoutGenePanelData = studyViewRepository.getTotalProfiledCountsByAlterationType(studyViewFilterContext, alterationType.toString()); + var profiledCountsMap = studyViewRepository.getTotalProfiledCounts(studyViewFilterContext, alterationType.toString()); + final var matchingGenePanelIdsMap = studyViewRepository.getMatchingGenePanelIds(studyViewFilterContext, alterationType.toString()); + final int sampleProfileCountWithoutGenePanelData = studyViewRepository.getSampleProfileCountWithoutPanelData(studyViewFilterContext, alterationType.toString()); alterationCounts.parallelStream() .forEach(alterationCountByGene -> { diff --git a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java index cb29bc62431..c3ebffa4a4f 100644 --- a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java @@ -12,78 +12,82 @@ import org.cbioportal.model.GenomicDataCountItem; import org.cbioportal.model.Sample; import org.cbioportal.model.SampleTreatmentReport; +import org.cbioportal.model.StudyViewFilterContext; import org.cbioportal.persistence.StudyViewRepository; import org.cbioportal.service.AlterationCountService; import org.cbioportal.service.StudyViewColumnarService; import org.cbioportal.service.treatment.TreatmentCountReportService; import org.cbioportal.web.parameter.ClinicalDataType; +import org.cbioportal.web.parameter.CustomSampleIdentifier; import org.cbioportal.web.parameter.GenomicDataFilter; import org.cbioportal.web.parameter.StudyViewFilter; +import org.cbioportal.web.columnar.util.CustomDataFilterUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; -import java.util.Map; import java.util.stream.Collectors; +import java.util.Map; @Service public class StudyViewColumnarServiceImpl implements StudyViewColumnarService { private final StudyViewRepository studyViewRepository; + private final CustomDataFilterUtil customDataFilterUtil; private final AlterationCountService alterationCountService; private final TreatmentCountReportService treatmentCountReportService; @Autowired - public StudyViewColumnarServiceImpl(StudyViewRepository studyViewRepository, - AlterationCountService alterationCountService, - TreatmentCountReportService treatmentCountReportService) { + public StudyViewColumnarServiceImpl(StudyViewRepository studyViewRepository, AlterationCountService alterationCountService, TreatmentCountReportService treatmentCountReportService, CustomDataFilterUtil customDataFilterUtil) { this.studyViewRepository = studyViewRepository; this.alterationCountService = alterationCountService; this.treatmentCountReportService = treatmentCountReportService; + this.customDataFilterUtil = customDataFilterUtil; } @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()") @Override public List getFilteredSamples(StudyViewFilter studyViewFilter) { - return studyViewRepository.getFilteredSamples(studyViewFilter); + + return studyViewRepository.getFilteredSamples(createContext(studyViewFilter)); } @Override public List getMutatedGenes(StudyViewFilter studyViewFilter) { - return alterationCountService.getMutatedGenes(studyViewFilter); + return alterationCountService.getMutatedGenes(createContext(studyViewFilter)); } @Override public List getMolecularProfileSampleCounts(StudyViewFilter studyViewFilter) { - return studyViewRepository.getMolecularProfileSampleCounts(studyViewFilter); + return studyViewRepository.getMolecularProfileSampleCounts(createContext(studyViewFilter)); } @Override public List getClinicalEventTypeCounts(StudyViewFilter studyViewFilter) { - return studyViewRepository.getClinicalEventTypeCounts(studyViewFilter); + return studyViewRepository.getClinicalEventTypeCounts(createContext(studyViewFilter)); } @Override public PatientTreatmentReport getPatientTreatmentReport(StudyViewFilter studyViewFilter) { - return treatmentCountReportService.getPatientTreatmentReport(studyViewFilter); + return treatmentCountReportService.getPatientTreatmentReport(createContext(studyViewFilter)); } @Override public SampleTreatmentReport getSampleTreatmentReport(StudyViewFilter studyViewFilter) { - return treatmentCountReportService.getSampleTreatmentReport(studyViewFilter); + return treatmentCountReportService.getSampleTreatmentReport(createContext(studyViewFilter)); } public List getCnaGenes(StudyViewFilter studyViewFilter) { - return alterationCountService.getCnaGenes(studyViewFilter); + return alterationCountService.getCnaGenes(createContext(studyViewFilter)); } @Override public List getStructuralVariantGenes(StudyViewFilter studyViewFilter) { - return alterationCountService.getStructuralVariantGenes(studyViewFilter); + return alterationCountService.getStructuralVariantGenes(createContext(studyViewFilter)); } @Override @@ -93,7 +97,7 @@ public Map getClinicalAttributeDatatypeMap() { @Override public List getClinicalDataCounts(StudyViewFilter studyViewFilter, List filteredAttributes) { - return studyViewRepository.getClinicalDataCounts(studyViewFilter, filteredAttributes) + return studyViewRepository.getClinicalDataCounts(createContext(studyViewFilter), filteredAttributes) .stream().collect(Collectors.groupingBy(ClinicalDataCount::getAttributeId)) .entrySet().parallelStream().map(e -> { ClinicalDataCountItem item = new ClinicalDataCountItem(); @@ -107,31 +111,30 @@ public List getClinicalDataCounts(StudyViewFilter studyVi public List getCaseListDataCounts(StudyViewFilter studyViewFilter) { // the study view merges case lists by type across studies // type is determined by the suffix of case list name (after study name) - var caseListDataCountsPerStudy = studyViewRepository.getCaseListDataCountsPerStudy(studyViewFilter); + var caseListDataCountsPerStudy = studyViewRepository.getCaseListDataCountsPerStudy(createContext(studyViewFilter)); return mergeCaseListCounts(caseListDataCountsPerStudy); } - @Override public List getPatientClinicalData(StudyViewFilter studyViewFilter, List attributeIds) { - return studyViewRepository.getPatientClinicalData(studyViewFilter, attributeIds); + return studyViewRepository.getPatientClinicalData(createContext(studyViewFilter), attributeIds); } @Override public List getSampleClinicalData(StudyViewFilter studyViewFilter, List attributeIds) { - return studyViewRepository.getSampleClinicalData(studyViewFilter, attributeIds); + return studyViewRepository.getSampleClinicalData(createContext(studyViewFilter), attributeIds); } @Override public List getCNACountsByGeneSpecific(StudyViewFilter studyViewFilter, List genomicDataFilters) { - return studyViewRepository.getCNACounts(studyViewFilter, genomicDataFilters); + return studyViewRepository.getCNACounts(createContext(studyViewFilter), genomicDataFilters); } @Override public List getMutationCountsByGeneSpecific(StudyViewFilter studyViewFilter, List genomicDataFilters) { List genomicDataCountItemList = new ArrayList<>(); for (GenomicDataFilter genomicDataFilter : genomicDataFilters) { - Map counts = studyViewRepository.getMutationCounts(studyViewFilter, genomicDataFilter); + Map counts = studyViewRepository.getMutationCounts(createContext(studyViewFilter), genomicDataFilter); List genomicDataCountList = new ArrayList<>(); if (counts.getOrDefault("mutatedCount", 0) > 0) genomicDataCountList.add(new GenomicDataCount("Mutated", "MUTATED", counts.get("mutatedCount"), counts.get("mutatedCount"))); @@ -146,7 +149,12 @@ public List getMutationCountsByGeneSpecific(StudyViewFilte @Override public List getMutationTypeCountsByGeneSpecific(StudyViewFilter studyViewFilter, List genomicDataFilters) { - return studyViewRepository.getMutationCountsByType(studyViewFilter, genomicDataFilters); + return studyViewRepository.getMutationCountsByType(createContext(studyViewFilter), genomicDataFilters); + } + + private StudyViewFilterContext createContext(StudyViewFilter studyViewFilter) { + List customSampleIdentifiers = customDataFilterUtil.extractCustomDataSamples(studyViewFilter); + return new StudyViewFilterContext(studyViewFilter, customSampleIdentifiers); } diff --git a/src/main/java/org/cbioportal/service/treatment/TreatmentCountReportService.java b/src/main/java/org/cbioportal/service/treatment/TreatmentCountReportService.java index 5c275fefc26..66305eb5fe8 100644 --- a/src/main/java/org/cbioportal/service/treatment/TreatmentCountReportService.java +++ b/src/main/java/org/cbioportal/service/treatment/TreatmentCountReportService.java @@ -2,9 +2,13 @@ import org.cbioportal.model.PatientTreatmentReport; import org.cbioportal.model.SampleTreatmentReport; +import org.cbioportal.model.StudyViewFilterContext; +import org.cbioportal.web.parameter.CustomSampleIdentifier; import org.cbioportal.web.parameter.StudyViewFilter; +import java.util.List; + public interface TreatmentCountReportService { - PatientTreatmentReport getPatientTreatmentReport(StudyViewFilter studyViewFilter); - SampleTreatmentReport getSampleTreatmentReport(StudyViewFilter studyViewFilter); + PatientTreatmentReport getPatientTreatmentReport(StudyViewFilterContext studyViewFilterContext); + SampleTreatmentReport getSampleTreatmentReport(StudyViewFilterContext studyViewFilterContext); } diff --git a/src/main/java/org/cbioportal/service/treatment/TreatmentCountReportServiceImpl.java b/src/main/java/org/cbioportal/service/treatment/TreatmentCountReportServiceImpl.java index 8af2139a814..c4fcbcf641c 100644 --- a/src/main/java/org/cbioportal/service/treatment/TreatmentCountReportServiceImpl.java +++ b/src/main/java/org/cbioportal/service/treatment/TreatmentCountReportServiceImpl.java @@ -3,9 +3,9 @@ import org.cbioportal.model.PatientTreatmentReport; import org.cbioportal.model.SampleTreatmentReport; import org.cbioportal.model.SampleTreatmentRow; +import org.cbioportal.model.StudyViewFilterContext; import org.cbioportal.model.TemporalRelation; import org.cbioportal.persistence.StudyViewRepository; -import org.cbioportal.web.parameter.StudyViewFilter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -23,22 +23,22 @@ public TreatmentCountReportServiceImpl(StudyViewRepository studyViewRepository) } @Override - public PatientTreatmentReport getPatientTreatmentReport(StudyViewFilter studyViewFilter) { - var patientTreatments = studyViewRepository.getPatientTreatments(studyViewFilter); - var totalPatientTreatmentCount = studyViewRepository.getTotalPatientTreatmentCount(studyViewFilter); + public PatientTreatmentReport getPatientTreatmentReport(StudyViewFilterContext studyViewFilterContext) { + var patientTreatments = studyViewRepository.getPatientTreatments(studyViewFilterContext); + var totalPatientTreatmentCount = studyViewRepository.getTotalPatientTreatmentCount(studyViewFilterContext); return new PatientTreatmentReport(totalPatientTreatmentCount, 0, patientTreatments); } @Override - public SampleTreatmentReport getSampleTreatmentReport(StudyViewFilter studyViewFilter) { - var sampleTreatments = studyViewRepository.getSampleTreatments(studyViewFilter) + public SampleTreatmentReport getSampleTreatmentReport(StudyViewFilterContext studyViewFilterContext) { + var sampleTreatments = studyViewRepository.getSampleTreatments(studyViewFilterContext) .stream() .flatMap(sampleTreatment -> Stream.of(new SampleTreatmentRow(TemporalRelation.Pre, sampleTreatment.treatment(), sampleTreatment.preSampleCount(), Set.of()), new SampleTreatmentRow(TemporalRelation.Post, sampleTreatment.treatment(), sampleTreatment.postSampleCount(), Set.of() )) ) .toList(); - var totalSampleTreatmentCount = studyViewRepository.getTotalSampleTreatmentCount(studyViewFilter); + var totalSampleTreatmentCount = studyViewRepository.getTotalSampleTreatmentCount(studyViewFilterContext); return new SampleTreatmentReport(totalSampleTreatmentCount, sampleTreatments); } diff --git a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java index a787cdf4f36..ffeff0ad7b3 100644 --- a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java +++ b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java @@ -491,5 +491,37 @@ public ResponseEntity fetchSampleTreatmentCounts( return new ResponseEntity<>(studyViewColumnarService.getSampleTreatmentReport(interceptedStudyViewFilter), HttpStatus.OK); } - + +// @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") +// @RequestMapping(value = "/column-store/custom-data-bin-counts/fetch", method = RequestMethod.POST, +// consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) +// @Operation(description = "Fetch custom data bin counts by study view filter") +// @ApiResponse(responseCode = "200", description = "OK", +// content = @Content(array = @ArraySchema(schema = @Schema(implementation = ClinicalDataBin.class)))) +// public ResponseEntity> fetchCustomDataBinCounts( +// @Parameter(description = "Method for data binning") +// @RequestParam(defaultValue = "DYNAMIC") DataBinMethod dataBinMethod, +// @Parameter(required = true, description = "Clinical data bin count filter") +// @Valid @RequestBody(required = false) ClinicalDataBinCountFilter clinicalDataBinCountFilter, +// @Parameter(hidden = true) // prevent reference to this attribute in the swagger-ui interface +// @RequestAttribute(required = false, value = "involvedCancerStudies") Collection involvedCancerStudies, +// @Parameter(hidden = true) // prevent reference to this attribute in the swagger-ui interface. this attribute is needed for the @PreAuthorize tag above. +// @Valid @RequestAttribute(required = false, value = "interceptedClinicalDataBinCountFilter") ClinicalDataBinCountFilter interceptedClinicalDataBinCountFilter +// ) { +// // TODO code shared with ClinicalDataController.fetchCustomDataCounts +// List attributes = interceptedClinicalDataBinCountFilter.getAttributes(); +// StudyViewFilter studyViewFilter = interceptedClinicalDataBinCountFilter.getStudyViewFilter(); +// if (attributes.size() == 1) { +// NewStudyViewFilterUtil.removeSelfCustomDataFromFilter(attributes.get(0).getAttributeId(), studyViewFilter); +// } +// List filteredSampleIdentifiers = studyViewFilterApplier.apply(studyViewFilter); +// +// if (filteredSampleIdentifiers.isEmpty()) { +// return new ResponseEntity<>(new ArrayList<>(), HttpStatus.OK); +// } +// +// final List clinicalDataBins = clinicalDataBinUtil.fetchCustomDataBinCounts(dataBinMethod, interceptedClinicalDataBinCountFilter, false); +// +// return new ResponseEntity<>(clinicalDataBins, HttpStatus.OK); +// } } diff --git a/src/main/java/org/cbioportal/web/columnar/util/CustomDataFilterUtil.java b/src/main/java/org/cbioportal/web/columnar/util/CustomDataFilterUtil.java new file mode 100644 index 00000000000..44b4007ac43 --- /dev/null +++ b/src/main/java/org/cbioportal/web/columnar/util/CustomDataFilterUtil.java @@ -0,0 +1,219 @@ +package org.cbioportal.web.columnar.util; + +import com.google.common.collect.Range; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.collections4.map.MultiKeyMap; +import org.cbioportal.service.CustomDataService; +import org.cbioportal.service.util.CustomDataSession; +import org.cbioportal.web.parameter.*; +import org.cbioportal.web.util.CustomDatatype; +import org.cbioportal.web.util.DataBinHelper; +import org.cbioportal.web.util.StudyViewFilterUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import java.util.stream.Collectors; + +@Component +public class CustomDataFilterUtil { + private final StudyViewFilterUtil studyViewFilterUtil; + private final CustomDataService customDataService; + + @Autowired + public CustomDataFilterUtil(StudyViewFilterUtil studyViewFilterUtil, CustomDataService customDataService) { + this.studyViewFilterUtil = studyViewFilterUtil; + this.customDataService = customDataService; + } + + public List extractCustomDataSamples(final StudyViewFilter studyViewFilter) { + if (studyViewFilter == null) { + return null; + } + + List customSampleIdentifiers = new ArrayList<>(); + + if (CollectionUtils.isEmpty(studyViewFilter.getCustomDataFilters())) { + return null; + } + + final List attributeIds = studyViewFilter.getCustomDataFilters().stream() + .map(ClinicalDataFilter::getAttributeId) + .collect(Collectors.toList()); + + final Map customDataSessions = customDataService.getCustomDataSessions(attributeIds); + + Map customDataSessionById = customDataSessions + .values() + .stream() + .collect(Collectors.toMap( + CustomDataSession::getId, + Function.identity() + )); + + MultiKeyMap customDataByStudySampleSession = new MultiKeyMap<>(); + + customDataSessionById.values().forEach(customDataSession -> customDataSession + .getData() + .getData() + .forEach(datum -> { + String value = datum.getValue().toUpperCase(); + if (value.equals("NAN") || value.equals("N/A")) { + value = "NA"; + } + CustomSampleIdentifier customSampleIdentifier = new CustomSampleIdentifier(); + customSampleIdentifier.setStudyId(datum.getStudyId()); + customSampleIdentifier.setSampleId(datum.getSampleId()); + customSampleIdentifier.setAttributeId(customDataSession.getId()); + customSampleIdentifiers.add(customSampleIdentifier); + customDataByStudySampleSession.put(datum.getStudyId(), datum.getSampleId(), customDataSession.getId(), value); + }) + ); + + List equalityFilters = new ArrayList<>(); + List intervalFilters = new ArrayList<>(); + + studyViewFilter.getCustomDataFilters().forEach(filter -> { + String attributeId = filter.getAttributeId(); + if (!customDataSessionById.containsKey(attributeId)) { + return; + } + if (customDataSessionById + .get(attributeId) + .getData() + .getDatatype() + .equals(CustomDatatype.STRING.name()) + ) { + equalityFilters.add(filter); + } else { + intervalFilters.add(filter); + } + }); + + List filtered = new ArrayList<>(); + customSampleIdentifiers.forEach(customSampleIdentifier -> { + int equalityFilterCount = studyViewFilterUtil.getFilteredCountByDataEquality(equalityFilters, customDataByStudySampleSession, + customSampleIdentifier.getSampleId(), customSampleIdentifier.getStudyId(), false); + int intervalFilterCount = getFilteredCountByDataInterval(intervalFilters, customDataByStudySampleSession, + customSampleIdentifier.getSampleId(), customSampleIdentifier.getStudyId()); + if (equalityFilterCount == equalityFilters.size() + && intervalFilterCount == intervalFilters.size() + ) { + filtered.add(customSampleIdentifier); + } + else { + customSampleIdentifier.setIsFilteredOut(true); + filtered.add(customSampleIdentifier); + } + }); + + return filtered; + } + + private Integer getFilteredCountByDataInterval(List attributes, MultiKeyMap clinicalDataMap, + String entityId, String studyId) { + int count = 0; + + for (ClinicalDataFilter filter : attributes) { + if (clinicalDataMap.containsKey(studyId, entityId, filter.getAttributeId())) { + String attrValue = (String) clinicalDataMap.get(studyId, entityId, filter.getAttributeId()); + Range rangeValue = calculateRangeValueForAttr(attrValue); + + // find range filters + List> ranges = filter.getValues().stream() + .map(this::calculateRangeValueForFilter) + .filter(Objects::nonNull) + .collect(Collectors.toList()); + + // find special value filters + List specialValues = filter.getValues().stream() + .filter(f -> f.getValue() != null) + .map(f -> f.getValue().toUpperCase()) + .collect(Collectors.toList()); + + if (rangeValue != null) { + if (ranges.stream().anyMatch(r -> r.encloses(rangeValue))) { + count++; + } + } + else if (specialValues.contains(attrValue.toUpperCase())) { + count++; + } + } else if (containsNA(filter)) { + count++; + } + } + + return count; + } + + private Range calculateRangeValueForAttr(String attrValue) { + if (attrValue == null) { + return null; + } + + BigDecimal min = null; + BigDecimal max = null; + + String value = attrValue.trim(); + + String lte = "<="; + String lt = "<"; + String gte = ">="; + String gt = ">"; + + boolean startInclusive = true; + boolean endInclusive = true; + + try { + if (value.startsWith(lte)) { + max = new BigDecimal(value.substring(lte.length())); + } + else if (value.startsWith(lt)) { + max = new BigDecimal(value.substring(lt.length())); + endInclusive = false; + } + else if (value.startsWith(gte)) { + min = new BigDecimal(value.substring(gte.length())); + } + else if (value.startsWith(gt)) { + min = new BigDecimal(value.substring(gt.length())); + startInclusive = false; + } + else { + min = max = new BigDecimal(attrValue); + } + } catch (Exception e) { + // invalid range -- TODO: also support ranges like 20-30? + return null; + } + + return DataBinHelper.calcRange(min, startInclusive, max, endInclusive); + } + + private Range calculateRangeValueForFilter(DataFilterValue filterValue) { + BigDecimal start = filterValue.getStart(); + BigDecimal end = filterValue.getEnd(); + + // default: (start, end] + boolean startInclusive = false; + boolean endInclusive = true; + + // special case: end == start (both inclusive) + if (end != null && end.equals(start)) { + startInclusive = true; + } + + return DataBinHelper.calcRange(start, startInclusive, end, endInclusive); + } + + private Boolean containsNA(ClinicalDataFilter filter) { + return filter.getValues().stream().anyMatch( + r -> r.getValue() != null && r.getValue().toUpperCase().equals("NA")); + } +} diff --git a/src/main/java/org/cbioportal/web/columnar/util/NewStudyViewFilterUtil.java b/src/main/java/org/cbioportal/web/columnar/util/NewStudyViewFilterUtil.java index 2b56b33852c..305a7ce5bae 100644 --- a/src/main/java/org/cbioportal/web/columnar/util/NewStudyViewFilterUtil.java +++ b/src/main/java/org/cbioportal/web/columnar/util/NewStudyViewFilterUtil.java @@ -10,4 +10,10 @@ public static void removeSelfFromFilter(String attributeId, StudyViewFilter stud studyViewFilter.getClinicalDataFilters().removeIf(f -> f.getAttributeId().equals(attributeId)); } } + + public static void removeSelfCustomDataFromFilter(String attributeId, StudyViewFilter studyViewFilter) { + if (studyViewFilter != null && studyViewFilter.getCustomDataFilters() != null) { + studyViewFilter.getCustomDataFilters().removeIf(f -> f.getAttributeId().equals(attributeId)); + } + } } diff --git a/src/main/java/org/cbioportal/web/parameter/CustomSampleIdentifier.java b/src/main/java/org/cbioportal/web/parameter/CustomSampleIdentifier.java new file mode 100644 index 00000000000..53fbe707f1a --- /dev/null +++ b/src/main/java/org/cbioportal/web/parameter/CustomSampleIdentifier.java @@ -0,0 +1,25 @@ +package org.cbioportal.web.parameter; + +import java.io.Serializable; + +public class CustomSampleIdentifier extends SampleIdentifier implements Serializable { + + private boolean isFilteredOut = false; + private String attributeId; + + public boolean getIsFilteredOut() { + return isFilteredOut; + } + + public void setIsFilteredOut(boolean isFilteredOut) { + this.isFilteredOut = isFilteredOut; + } + + public String getAttributeId() { + return attributeId; + } + + public void setAttributeId(String attributeId) { + this.attributeId = attributeId; + } +} diff --git a/src/main/java/org/cbioportal/web/util/ClinicalDataIntervalFilterApplier.java b/src/main/java/org/cbioportal/web/util/ClinicalDataIntervalFilterApplier.java index 0484f024bc7..66d310a2511 100644 --- a/src/main/java/org/cbioportal/web/util/ClinicalDataIntervalFilterApplier.java +++ b/src/main/java/org/cbioportal/web/util/ClinicalDataIntervalFilterApplier.java @@ -18,9 +18,6 @@ @Component public class ClinicalDataIntervalFilterApplier extends ClinicalDataFilterApplier { - @Autowired - private DataBinHelper dataBinHelper; - @Autowired public ClinicalDataIntervalFilterApplier(PatientService patientService, ClinicalDataService clinicalDataService, @@ -110,7 +107,7 @@ else if (value.startsWith(gt)) { return null; } - return dataBinHelper.calcRange(min, startInclusive, max, endInclusive); + return DataBinHelper.calcRange(min, startInclusive, max, endInclusive); } private Range calculateRangeValueForFilter(DataFilterValue filterValue) { @@ -126,7 +123,7 @@ private Range calculateRangeValueForFilter(DataFilterValue filterVal startInclusive = true; } - return dataBinHelper.calcRange(start, startInclusive, end, endInclusive); + return DataBinHelper.calcRange(start, startInclusive, end, endInclusive); } private Boolean containsNA(ClinicalDataFilter filter) { diff --git a/src/main/java/org/cbioportal/web/util/DataBinHelper.java b/src/main/java/org/cbioportal/web/util/DataBinHelper.java index 6e50f437f5d..9138aef2572 100644 --- a/src/main/java/org/cbioportal/web/util/DataBinHelper.java +++ b/src/main/java/org/cbioportal/web/util/DataBinHelper.java @@ -1,18 +1,21 @@ package org.cbioportal.web.util; import org.cbioportal.model.DataBin; -import org.springframework.stereotype.Component; import com.google.common.collect.Range; import java.math.BigDecimal; import java.math.RoundingMode; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.ListIterator; +import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; import org.springframework.util.Assert; -@Component public class DataBinHelper { - public DataBin calcUpperOutlierBin(List gteValues, List gtValues) { + public static DataBin calcUpperOutlierBin(List gteValues, List gtValues) { BigDecimal gteMin = gteValues.size() > 0 ? Collections.min(gteValues) : null; BigDecimal gtMin = gtValues.size() > 0 ? Collections.min(gtValues) : null; BigDecimal min; @@ -39,7 +42,7 @@ public DataBin calcUpperOutlierBin(List gteValues, List return dataBin; } - public DataBin calcLowerOutlierBin(List lteValues, List ltValues) { + public static DataBin calcLowerOutlierBin(List lteValues, List ltValues) { BigDecimal lteMax = lteValues.size() > 0 ? Collections.max(lteValues) : null; BigDecimal ltMax = ltValues.size() > 0 ? Collections.max(ltValues) : null; BigDecimal max; @@ -65,7 +68,7 @@ public DataBin calcLowerOutlierBin(List lteValues, List return dataBin; } - public List calcQuartileBoundaries(List sortedValues) { + public static List calcQuartileBoundaries(List sortedValues) { // Edge case: some of Q1, Q2, and Q3 are the same value. // Solution: reduce bins to represent unique values only. // Note: cannot use stream.distinct() because BigDecimal does @@ -87,7 +90,7 @@ public List calcQuartileBoundaries(List sortedValues) { return boundaries; } - public Range calcBoxRange(List sortedValues) { + public static Range calcBoxRange(List sortedValues) { if (sortedValues == null || sortedValues.size() == 0) { return null; } @@ -139,7 +142,7 @@ public Range calcBoxRange(List sortedValues) { return Range.closed(minValue, maxValue); } - public Range calcInterquartileRangeApproximation(List sortedValues) { + public static Range calcInterquartileRangeApproximation(List sortedValues) { Range iqr = null; if (sortedValues.size() > 0) { @@ -150,7 +153,7 @@ public Range calcInterquartileRangeApproximation(List so // if iqr == 0 AND max == q3 then recursively try finding a non-zero iqr approximation. if (q1.compareTo(q3) == 0 && max.compareTo(q3) == 0) { // filter out max and try again - iqr = this.calcInterquartileRangeApproximation( + iqr = calcInterquartileRangeApproximation( sortedValues.stream().filter(d -> d.compareTo(max) < 0).collect(Collectors.toList())); } @@ -163,7 +166,7 @@ public Range calcInterquartileRangeApproximation(List so return iqr; } - public BigDecimal calcQ1(List sortedValues) { + public static BigDecimal calcQ1(List sortedValues) { if (sortedValues == null || sortedValues.isEmpty()) { return null; } @@ -172,12 +175,12 @@ public BigDecimal calcQ1(List sortedValues) { return calcMedian(sortedValues, 0, stopIndex); } - public BigDecimal calcMedian(List sortedValues) { + public static BigDecimal calcMedian(List sortedValues) { return (sortedValues == null || sortedValues.isEmpty()) ? null : calcMedian(sortedValues, 0, sortedValues.size() - 1); } - public BigDecimal calcQ3(List sortedValues) { + public static BigDecimal calcQ3(List sortedValues) { if (sortedValues == null || sortedValues.isEmpty()) { return null; } @@ -189,7 +192,7 @@ public BigDecimal calcQ3(List sortedValues) { return calcMedian(sortedValues, startIndex, sortedValues.size() - 1); } - private BigDecimal calcMedian(List sortedValues, int start, int stop) { + private static BigDecimal calcMedian(List sortedValues, int start, int stop) { if (sortedValues == null || sortedValues.isEmpty()) { return null; } @@ -204,24 +207,24 @@ private BigDecimal calcMedian(List sortedValues, int start, int stop } } - public BigDecimal valueCloseToQ1(List sortedValues) { + public static BigDecimal valueCloseToQ1(List sortedValues) { return (sortedValues == null || sortedValues.isEmpty()) ? null : sortedValues.get((int) (sortedValues.size() * 0.25)); } - public BigDecimal valueCloseToQ3(List sortedValues) { + public static BigDecimal valueCloseToQ3(List sortedValues) { return (sortedValues == null || sortedValues.isEmpty()) ? null : sortedValues.get((int) (sortedValues.size() * 0.75)); } - public List filterIntervals(List intervals, BigDecimal lowerOutlier, BigDecimal upperOutlier) { + public static List filterIntervals(List intervals, BigDecimal lowerOutlier, BigDecimal upperOutlier) { // remove values that fall outside the lower and upper outlier limits return intervals.stream() .filter(d -> (lowerOutlier == null || d.compareTo(lowerOutlier) > 0 ) && (upperOutlier == null || d.compareTo(upperOutlier) < 0)) .collect(Collectors.toList()); } - public List initDataBins(List values, + public static List initDataBins(List values, List intervals, BigDecimal lowerOutlier, BigDecimal upperOutlier) { @@ -229,7 +232,7 @@ public List initDataBins(List values, filterIntervals(intervals, lowerOutlier, upperOutlier)); } - public List initDataBins(List values, + public static List initDataBins(List values, List intervals) { List dataBins = initDataBins(intervals); @@ -238,7 +241,7 @@ public List initDataBins(List values, return dataBins; } - public List initDataBins(List intervalValues) { + public static List initDataBins(List intervalValues) { List dataBins = new ArrayList<>(); for (int i = 0; i < intervalValues.size() - 1; i++) { @@ -254,7 +257,7 @@ public List initDataBins(List intervalValues) { return dataBins; } - public List trim(List dataBins) { + public static List trim(List dataBins) { List toRemove = new ArrayList<>(); // find out leading empty bins @@ -285,8 +288,8 @@ public List trim(List dataBins) { return trimmed; } - public void calcCounts(List dataBins, List values) { - Map, DataBin> rangeMap = dataBins.stream().collect(Collectors.toMap(this::calcRange, b -> b)); + public static void calcCounts(List dataBins, List values) { + Map, DataBin> rangeMap = dataBins.stream().collect(Collectors.toMap(DataBinHelper::calcRange, b -> b)); // TODO complexity here is O(n x m), find a better way to do this for (Range range : rangeMap.keySet()) { @@ -300,7 +303,7 @@ public void calcCounts(List dataBins, List values) { } } - public Range calcRange(DataBin dataBin) { + public static Range calcRange(DataBin dataBin) { boolean startInclusive = ">=".equals(dataBin.getSpecialValue()); boolean endInclusive = !"<".equals(dataBin.getSpecialValue()); @@ -312,7 +315,7 @@ public Range calcRange(DataBin dataBin) { return calcRange(dataBin.getStart(), startInclusive, dataBin.getEnd(), endInclusive); } - public Range calcRange(String operator, BigDecimal value) { + public static Range calcRange(String operator, BigDecimal value) { boolean startInclusive = ">=".equals(operator); BigDecimal start = operator.contains(">") ? value : null; boolean endInclusive = !"<".equals(operator); @@ -321,19 +324,19 @@ public Range calcRange(String operator, BigDecimal value) { return calcRange(start, startInclusive, end, endInclusive); } - public boolean isNA(String value) { + public static boolean isNA(String value) { return value.equalsIgnoreCase("NA") || value.equalsIgnoreCase("NAN") || value.equalsIgnoreCase("N/A"); } - public boolean isSmallData(List sortedValues) { + public static boolean isSmallData(List sortedValues) { BigDecimal median = sortedValues.get((int) Math.ceil((sortedValues.size() * (1.0 / 2.0)))); return median.compareTo(new BigDecimal("0.001")) < 0 && median.compareTo(new BigDecimal("-0.001")) > 0 && median.compareTo(new BigDecimal("0")) != 0; } - public String extractOperator(String value) { + public static String extractOperator(String value) { int length = 0; if (value.trim().startsWith(">=") || value.trim().startsWith("<=")) { @@ -345,11 +348,11 @@ public String extractOperator(String value) { return value.trim().substring(0, length); } - public Integer calcExponent(BigDecimal value) { + public static Integer calcExponent(BigDecimal value) { return value.precision() - value.scale() - 1; } - public String stripOperator(String value) { + public static String stripOperator(String value) { int length = 0; if (value.trim().startsWith(">=") || value.trim().startsWith("<=")) { @@ -361,11 +364,11 @@ public String stripOperator(String value) { return value.trim().substring(length); } - public boolean isAgeAttribute(String attributeId) { + public static boolean isAgeAttribute(String attributeId) { return attributeId != null && attributeId.matches("(^AGE$)|(^AGE_.*)|(.*_AGE_.*)|(.*_AGE&)"); } - public Range calcRange(BigDecimal start, boolean startInclusive, BigDecimal end, boolean endInclusive) { + public static Range calcRange(BigDecimal start, boolean startInclusive, BigDecimal end, boolean endInclusive) { // check for invalid filter (no start or end provided) if (start == null && end == null) { return null; @@ -396,19 +399,19 @@ public Range calcRange(BigDecimal start, boolean startInclusive, Big } } - public Set findDistinctValues(DataBin numericalBin, List numericalValues) { + public static Set findDistinctValues(DataBin numericalBin, List numericalValues) { Range range = calcRange(numericalBin); return numericalValues.stream().filter(range::contains).collect(Collectors.toSet()); } - public Set> findDistinctSpecialRanges(DataBin numericalBin, List> rangeValues) { + public static Set> findDistinctSpecialRanges(DataBin numericalBin, List> rangeValues) { Range range = calcRange(numericalBin); return rangeValues.stream().filter(range::encloses).collect(Collectors.toSet()); } - public List convertToDistinctBins( + public static List convertToDistinctBins( List dataBins, List numericalValues, List> rangeValues @@ -416,11 +419,11 @@ public List convertToDistinctBins( List distinctBins = new ArrayList<>(); for (DataBin bin: dataBins) { - Set distinctValues = this.findDistinctValues(bin, numericalValues); - Set> distinctRanges = this.findDistinctSpecialRanges(bin, rangeValues); + Set distinctValues = findDistinctValues(bin, numericalValues); + Set> distinctRanges = findDistinctSpecialRanges(bin, rangeValues); // if the bin contains only one distinct value and no range value then create a distinct bin - if (distinctRanges.size() == 0 && distinctValues.size() == 1 && this.areAllIntegers(distinctValues)) { + if (distinctRanges.size() == 0 && distinctValues.size() == 1 && areAllIntegers(distinctValues)) { BigDecimal distinctValue = distinctValues.iterator().next(); DataBin distinctBin = new DataBin(); @@ -446,7 +449,7 @@ public List convertToDistinctBins( } } - public Boolean areAllDistinctExceptOutliers(List dataBins) { + public static Boolean areAllDistinctExceptOutliers(List dataBins) { return dataBins .stream() .filter(b -> b.getStart() != null && b.getEnd() != null) @@ -455,7 +458,7 @@ public Boolean areAllDistinctExceptOutliers(List dataBins) { .orElse(false); } - public Boolean areAllIntegers(Set uniqueValues) { + public static Boolean areAllIntegers(Set uniqueValues) { return uniqueValues .stream() .map(value -> value.stripTrailingZeros().scale() <= 0) @@ -463,7 +466,7 @@ public Boolean areAllIntegers(Set uniqueValues) { .orElse(false); } - public List generateBins(List sortedNumericalValues, BigDecimal binSize, BigDecimal anchorValue) { + public static List generateBins(List sortedNumericalValues, BigDecimal binSize, BigDecimal anchorValue) { Assert.notNull(sortedNumericalValues, "sortedNumerical values is null!"); Assert.notNull(binSize, "binSize values is null!"); diff --git a/src/main/java/org/cbioportal/web/util/DataBinner.java b/src/main/java/org/cbioportal/web/util/DataBinner.java index 2807f6c1211..85e21f2e69c 100644 --- a/src/main/java/org/cbioportal/web/util/DataBinner.java +++ b/src/main/java/org/cbioportal/web/util/DataBinner.java @@ -20,8 +20,6 @@ public class DataBinner { private static final Integer DEFAULT_DISTINCT_VALUE_THRESHOLD = 10; - @Autowired - private DataBinHelper dataBinHelper; @Autowired private DiscreteDataBinner discreteDataBinner; @Autowired @@ -111,7 +109,7 @@ public List recalcBinCount( dataBin.setCount(0); // calculate range - Range range = dataBinHelper.calcRange(dataBin); + Range range = DataBinHelper.calcRange(dataBin); if (range != null) { for (BigDecimal value : numericalValues) { @@ -209,7 +207,7 @@ public List calculateDataBins( boolean numericalOnly = false; Range range = dataBinFilter.getStart() == null && dataBinFilter.getEnd() == null ? - Range.all() : dataBinHelper.calcRange(dataBinFilter.getStart(), true, dataBinFilter.getEnd(), true); + Range.all() : DataBinHelper.calcRange(dataBinFilter.getStart(), true, dataBinFilter.getEnd(), true); if (range.hasUpperBound()) { clinicalData = filterSmallerThanUpperBound(clinicalData, range.upperEndpoint()); @@ -248,11 +246,11 @@ public List calculateDataBins( } // remove leading and trailing empty bins before adding non numerical ones - dataBins = dataBinHelper.trim(dataBins); + dataBins = DataBinHelper.trim(dataBins); // in some cases every numerical bin actually contains only a single discrete value // convert interval bins to distinct (single value) bins in these cases - dataBins = dataBinHelper.convertToDistinctBins( + dataBins = DataBinHelper.convertToDistinctBins( dataBins, filterNumericalValues(clinicalData), filterSpecialRanges(clinicalData) ); @@ -274,11 +272,11 @@ public List> filterSpecialRanges(List clinicalData) .map(Binnable::getAttrValue) .filter(s -> (s.contains(">") || s.contains("<")) && // ignore any invalid values such as >10PY, <20%, etc. - NumberUtils.isCreatable(dataBinHelper.stripOperator(s))) - .map(v -> dataBinHelper.calcRange( + NumberUtils.isCreatable(DataBinHelper.stripOperator(s))) + .map(v -> DataBinHelper.calcRange( // only use "<" or ">" to make sure that we only generate open ranges - dataBinHelper.extractOperator(v).substring(0, 1), - new BigDecimal(dataBinHelper.stripOperator(v)))) + DataBinHelper.extractOperator(v).substring(0, 1), + new BigDecimal(DataBinHelper.stripOperator(v)))) .collect(Collectors.toList()); } @@ -290,7 +288,7 @@ public List filterNonNumericalValues(List clinicalData) { // filter out numerical values and 'NA's return clinicalData.stream() .map(Binnable::getAttrValue) - .filter(s -> !NumberUtils.isCreatable(dataBinHelper.stripOperator(s)) && !dataBinHelper.isNA(s)) + .filter(s -> !NumberUtils.isCreatable(DataBinHelper.stripOperator(s)) && !DataBinHelper.isNA(s)) .collect(Collectors.toList()); } @@ -375,7 +373,7 @@ public Collection calcNumericalDataBins( List sortedNumericalValues = new ArrayList<>(numericalValues); Collections.sort(sortedNumericalValues); - Range boxRange = dataBinHelper.calcBoxRange(sortedNumericalValues); + Range boxRange = DataBinHelper.calcBoxRange(sortedNumericalValues); // remove initial outliers List withoutOutliers = sortedNumericalValues.stream().filter(isNotOutlier).collect(Collectors.toList()); @@ -396,12 +394,12 @@ public Collection calcNumericalDataBins( customBins = this.adjustCustomBins(customBins, lowerOutlierBin, upperOutlierBin); dataBins = linearDataBinner.calculateDataBins(customBins, numericalValues); } else if (DataBinFilter.BinMethod.GENERATE == binMethod && binsGeneratorConfig != null) { - List bins = this.dataBinHelper.generateBins(sortedNumericalValues, binsGeneratorConfig.getBinSize(), binsGeneratorConfig.getAnchorValue()); + List bins = DataBinHelper.generateBins(sortedNumericalValues, binsGeneratorConfig.getBinSize(), binsGeneratorConfig.getAnchorValue()); dataBins = linearDataBinner.calculateDataBins(bins, numericalValues); } else if (DataBinFilter.BinMethod.MEDIAN == binMethod) { // NOOP - handled later } else if (DataBinFilter.BinMethod.QUARTILE == binMethod) { - List boundaries = this.dataBinHelper.calcQuartileBoundaries(sortedNumericalValues); + List boundaries = DataBinHelper.calcQuartileBoundaries(sortedNumericalValues); dataBins = linearDataBinner.calculateDataBins(boundaries, numericalValues); } else if (boxRange.upperEndpoint().subtract(boxRange.lowerEndpoint()).compareTo(new BigDecimal(1000)) == 1 && (disableLogScale == null || !disableLogScale)) { @@ -410,7 +408,7 @@ public Collection calcNumericalDataBins( withoutOutliers, lowerOutlierBin.getEnd(), upperOutlierBin.getStart()); - } else if (dataBinHelper.isSmallData(sortedNumericalValues)) { + } else if (DataBinHelper.isSmallData(sortedNumericalValues)) { dataBins = scientificSmallDataBinner.calculateDataBins( sortedNumericalValues, withoutOutliers, @@ -422,7 +420,7 @@ public Collection calcNumericalDataBins( boxRange = Range.closed(dataBins.get(0).getStart(), dataBins.get(dataBins.size() - 1).getEnd()); } } else { - Boolean areAllIntegers = this.dataBinHelper.areAllIntegers(uniqueValues); + Boolean areAllIntegers = DataBinHelper.areAllIntegers(uniqueValues); if (areAllIntegers) { boxRange = Range.closed( @@ -448,7 +446,7 @@ public Collection calcNumericalDataBins( // In edge cases all quartile values can be identical (all // values are in the outlier bins). || (DataBinFilter.BinMethod.QUARTILE == binMethod && dataBins.size() == 0)) { - BigDecimal median = this.dataBinHelper.calcMedian(sortedNumericalValues); + BigDecimal median = DataBinHelper.calcMedian(sortedNumericalValues); lowerOutlierBin.setEnd(median); upperOutlierBin.setStart(median); // Covers the situation where there is a single custom boundary (i.e. there are only outlier bins). @@ -546,7 +544,7 @@ public List filterBiggerThanLowerBound(List clinicalData, Bi } public DataBin calcUpperOutlierBin(List clinicalData) { - DataBin dataBin = dataBinHelper.calcUpperOutlierBin( + DataBin dataBin = DataBinHelper.calcUpperOutlierBin( doubleValuesForSpecialOutliers(clinicalData, ">="), doubleValuesForSpecialOutliers(clinicalData, ">")); @@ -557,7 +555,7 @@ public DataBin calcUpperOutlierBin(List clinicalData) { } public DataBin calcLowerOutlierBin(List clinicalData) { - DataBin dataBin = dataBinHelper.calcLowerOutlierBin( + DataBin dataBin = DataBinHelper.calcLowerOutlierBin( doubleValuesForSpecialOutliers(clinicalData, "<="), doubleValuesForSpecialOutliers(clinicalData, "<")); @@ -690,7 +688,7 @@ public Long countNAs(List clinicalData, ClinicalDataType clinicalDataT public Long countNAs(List clinicalData) { return clinicalData == null ? 0 : clinicalData.stream() - .filter(c -> dataBinHelper.isNA(c.getAttrValue())) + .filter(c -> DataBinHelper.isNA(c.getAttrValue())) .count(); } diff --git a/src/main/java/org/cbioportal/web/util/DiscreteDataBinner.java b/src/main/java/org/cbioportal/web/util/DiscreteDataBinner.java index bff1eaf390b..d6eaf334f82 100644 --- a/src/main/java/org/cbioportal/web/util/DiscreteDataBinner.java +++ b/src/main/java/org/cbioportal/web/util/DiscreteDataBinner.java @@ -1,7 +1,6 @@ package org.cbioportal.web.util; import org.cbioportal.model.DataBin; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.math.BigDecimal; @@ -12,14 +11,11 @@ @Component public class DiscreteDataBinner { - @Autowired - private DataBinHelper dataBinHelper; - public List calculateDataBins(List values, Set uniqueValues) { List dataBins = initDataBins(uniqueValues); - dataBinHelper.calcCounts(dataBins, values); + DataBinHelper.calcCounts(dataBins, values); return dataBins; } diff --git a/src/main/java/org/cbioportal/web/util/IdPopulator.java b/src/main/java/org/cbioportal/web/util/IdPopulator.java index bfda0b01e95..e7c02227bdf 100644 --- a/src/main/java/org/cbioportal/web/util/IdPopulator.java +++ b/src/main/java/org/cbioportal/web/util/IdPopulator.java @@ -1,14 +1,12 @@ package org.cbioportal.web.util; import org.cbioportal.model.ClinicalAttribute; -import org.cbioportal.service.AttributeByStudyService; import org.cbioportal.service.PatientService; import org.cbioportal.service.util.ClinicalAttributeUtil; import org.cbioportal.web.parameter.SampleIdentifier; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import java.util.ArrayList; import java.util.List; @Component diff --git a/src/main/java/org/cbioportal/web/util/LinearDataBinner.java b/src/main/java/org/cbioportal/web/util/LinearDataBinner.java index eb9a0abf281..34bea85d9e4 100644 --- a/src/main/java/org/cbioportal/web/util/LinearDataBinner.java +++ b/src/main/java/org/cbioportal/web/util/LinearDataBinner.java @@ -2,7 +2,6 @@ import com.google.common.collect.Range; import org.cbioportal.model.DataBin; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.math.BigDecimal; @@ -34,9 +33,6 @@ public class LinearDataBinner { public static final Integer DEFAULT_INTERVAL_COUNT = 20; - @Autowired - private DataBinHelper dataBinHelper; - public List calculateDataBins(boolean areAllIntegers, Range boxRange, List values, @@ -50,7 +46,7 @@ public List calculateDataBins(boolean areAllIntegers, // special case for "AGE" attributes if (attributeId.isPresent() && - dataBinHelper.isAgeAttribute(attributeId.get()) && + DataBinHelper.isAgeAttribute(attributeId.get()) && min.doubleValue() < 18 && boxRange.upperEndpoint().subtract(boxRange.lowerEndpoint()).divide(BigDecimal.valueOf(2)).compareTo(BigDecimal.valueOf(18)) == 1 && dataBins.get(0).getEnd().compareTo(BigDecimal.valueOf(18)) == 1) { @@ -58,7 +54,7 @@ public List calculateDataBins(boolean areAllIntegers, dataBins.get(0).setStart(BigDecimal.valueOf(18)); } - dataBinHelper.calcCounts(dataBins, values); + DataBinHelper.calcCounts(dataBins, values); return dataBins; } @@ -66,7 +62,7 @@ public List calculateDataBins(boolean areAllIntegers, public List calculateDataBins(List customBins, List values) { List dataBins = initDataBins(customBins); - dataBinHelper.calcCounts(dataBins, values); + DataBinHelper.calcCounts(dataBins, values); return dataBins; } diff --git a/src/main/java/org/cbioportal/web/util/LogScaleDataBinner.java b/src/main/java/org/cbioportal/web/util/LogScaleDataBinner.java index 1f6b34d30cf..febeb34ebb8 100644 --- a/src/main/java/org/cbioportal/web/util/LogScaleDataBinner.java +++ b/src/main/java/org/cbioportal/web/util/LogScaleDataBinner.java @@ -2,7 +2,6 @@ import com.google.common.collect.Range; import org.cbioportal.model.DataBin; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.math.BigDecimal; @@ -11,8 +10,6 @@ @Component public class LogScaleDataBinner { - @Autowired - private DataBinHelper dataBinHelper; public List calculateDataBins(Range boxRange, List values, @@ -57,7 +54,7 @@ public List calculateDataBins(Range boxRange, } } - return dataBinHelper.initDataBins(values, intervals); + return DataBinHelper.initDataBins(values, intervals); } public BigDecimal calcIntervalValue(BigDecimal exponent) { diff --git a/src/main/java/org/cbioportal/web/util/ScientificSmallDataBinner.java b/src/main/java/org/cbioportal/web/util/ScientificSmallDataBinner.java index 276ab1bb2ba..f3766164ef8 100644 --- a/src/main/java/org/cbioportal/web/util/ScientificSmallDataBinner.java +++ b/src/main/java/org/cbioportal/web/util/ScientificSmallDataBinner.java @@ -2,7 +2,6 @@ import com.google.common.collect.Range; import org.cbioportal.model.DataBin; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.math.BigDecimal; @@ -14,22 +13,19 @@ @Component public class ScientificSmallDataBinner { - @Autowired - private DataBinHelper dataBinHelper; - public List calculateDataBins(List sortedNumericalValues, List valuesWithoutOutliers, BigDecimal lowerOutlier, BigDecimal upperOutlier) { List exponents = sortedNumericalValues .stream() - .map(d -> BigDecimal.valueOf(dataBinHelper.calcExponent(d))) + .map(d -> BigDecimal.valueOf(DataBinHelper.calcExponent(d))) .filter(d -> d.compareTo(new BigDecimal("0")) != 0) .collect(Collectors.toList()); Collections.sort(exponents); - Range exponentBoxRange = dataBinHelper.calcBoxRange(exponents); + Range exponentBoxRange = DataBinHelper.calcBoxRange(exponents); List intervals = new ArrayList<>(); @@ -72,6 +68,6 @@ public List calculateDataBins(List sortedNumericalValues, } } - return dataBinHelper.initDataBins(valuesWithoutOutliers, intervals, lowerOutlier, upperOutlier); + return DataBinHelper.initDataBins(valuesWithoutOutliers, intervals, lowerOutlier, upperOutlier); } } diff --git a/src/main/java/org/cbioportal/web/util/StudyViewFilterUtil.java b/src/main/java/org/cbioportal/web/util/StudyViewFilterUtil.java index c93b2bdab24..931432cbd12 100644 --- a/src/main/java/org/cbioportal/web/util/StudyViewFilterUtil.java +++ b/src/main/java/org/cbioportal/web/util/StudyViewFilterUtil.java @@ -7,7 +7,6 @@ import org.cbioportal.model.ClinicalDataCount; import org.cbioportal.model.ClinicalDataCountItem; import org.cbioportal.model.Gene; -import org.cbioportal.model.GeneFilterQuery; import org.cbioportal.model.Patient; import org.cbioportal.model.SampleList; import org.cbioportal.model.StructuralVariantFilterQuery; @@ -15,7 +14,6 @@ import org.cbioportal.service.GeneService; import org.cbioportal.service.util.CustomDataSession; import org.cbioportal.service.util.CustomDataValue; -import org.cbioportal.service.util.MolecularProfileUtil; import org.cbioportal.web.parameter.ClinicalDataFilter; import org.cbioportal.web.parameter.DataBinFilter; import org.cbioportal.web.parameter.DataFilter; @@ -43,11 +41,17 @@ @Component public class StudyViewFilterUtil { - @Autowired - private MolecularProfileUtil molecularProfileUtil; + private final GeneService geneService; + @Autowired - private GeneService geneService; + public StudyViewFilterUtil(GeneService geneService) { + this.geneService = geneService; + } + + public StudyViewFilterUtil() { + geneService = null; + } public void extractStudyAndSampleIds( List sampleIdentifiers, @@ -302,24 +306,7 @@ public List filterClinicalData( return combinedResult; } - public List cleanQueryGeneIds(List geneQueries) { - List hugoGeneSymbols = geneQueries - .stream() - .map(GeneFilterQuery::getHugoGeneSymbol) - .collect(Collectors.toList()); - - Map symbolToEntrezGeneId = getStringIntegerMap(hugoGeneSymbols); - - geneQueries.removeIf( - q -> !symbolToEntrezGeneId.containsKey(q.getHugoGeneSymbol()) - ); - - geneQueries.stream().forEach( - q -> q.setEntrezGeneId(symbolToEntrezGeneId.get(q.getHugoGeneSymbol())) - ); - return geneQueries; - } private Map getStringIntegerMap(List hugoGeneSymbols) { Map symbolToEntrezGeneId = geneService @@ -364,15 +351,6 @@ public List resolveEntrezGeneIds(List getHugoToEntrezQueryMap(List hugoGeneSymbols) { - Map symbolToEntrezGeneId = geneService - .fetchGenes(new ArrayList<>(hugoGeneSymbols), - GeneIdType.HUGO_GENE_SYMBOL.name(), Projection.SUMMARY.name()) - .stream() - .collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId)); - return symbolToEntrezGeneId; - } - private List filterClinicalDataByStudyAndSampleAndAttribute( List clinicalData, Map sampleToStudyId, diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index bafd4f511ef..a41f4c75c44 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -4,23 +4,23 @@ - + INTERSECT SELECT sample_unique_id FROM sample_derived WHERE cancer_study_identifier IN - + #{studyId} - - + + INTERSECT -- case list filtering allows both UNION (OR) and INTERSECTION (AND) LOGIC -- caseLists is an array of arrays wherein the top level is INTERSECTION -- AND THE INTERNAL ARRAYS ARE UNION (OR) SELECT * FROM ( - + SELECT sample_unique_id FROM sample_list_list sll LEFT JOIN sample_derived s ON sll.sample_id=s.internal_id @@ -33,10 +33,10 @@ ) - + INTERSECT SELECT * FROM ( - + SELECT sample_derived.sample_unique_id FROM sample_profile JOIN genetic_profile gp ON sample_profile.genetic_profile_id = gp.genetic_profile_id @@ -44,7 +44,7 @@ JOIN sample_derived on sample_profile.sample_id = sample_derived.internal_id sample_derived.cancer_study_identifier IN - + #{studyId} AND @@ -57,17 +57,56 @@ - + INTERSECT SELECT sample_unique_id FROM sample_derived WHERE sample_unique_id IN - + '${sampleIdentifier.studyId}_${sampleIdentifier.sampleId}' - - + + INTERSECT + SELECT sample_unique_id + FROM sample_derived + WHERE + + + + AND + ( + + + + sample_unique_id IN ( + '', + + + '${sampleIdentifier.studyId}_${sampleIdentifier.sampleId}' + + + ) + + + + + OR + sample_unique_id NOT IN ( + + + '${sampleIdentifier.studyId}_${sampleIdentifier.sampleId}' + + + ) + + + ) + + + + + SELECT sample_unique_id FROM genomic_event_derived @@ -87,8 +126,8 @@ - - + + @@ -96,8 +135,8 @@ - - + + @@ -105,13 +144,13 @@ - - + + - - + + @@ -119,15 +158,15 @@ - + - + - + SELECT concat(ced.cancer_study_identifier, '_', ced.sample_id) AS sample_unique_id FROM ( @@ -171,7 +210,7 @@ - SELECT patient_unique_id FROM clinical_event_derived @@ -185,7 +224,7 @@ - SELECT patient_unique_id FROM clinical_event_derived @@ -202,8 +241,8 @@ - - + + @@ -211,8 +250,8 @@ - - + + @@ -221,11 +260,11 @@ - + - + @@ -283,7 +322,7 @@ SELECT sample_unique_id FROM sample_derived WHERE cancer_study_identifier IN - + #{studyId} ), @@ -292,7 +331,7 @@ FROM sample_to_gene_panel_derived sgp JOIN gene_panel_to_gene_derived gpg ON sgp.gene_panel_id = gpg.gene_panel_id WHERE cancer_study_identifier IN - + #{studyId} AND gpg.gene = #{mutationDataFilter.hugoGeneSymbol} @@ -301,7 +340,7 @@ SELECT DISTINCT sample_unique_id FROM genomic_event_derived WHERE cancer_study_identifier IN - + #{studyId} AND hugo_gene_symbol = #{mutationDataFilter.hugoGeneSymbol} @@ -355,7 +394,7 @@ WHERE profile_type = #{genomicDataFilter.profileType} AND hugo_gene_symbol = #{genomicDataFilter.hugoGeneSymbol} AND cancer_study_identifier IN - + #{studyId} ) @@ -364,7 +403,7 @@ FROM sample_derived sd LEFT JOIN cna_query ON sd.sample_unique_id = cna_query.sample_unique_id WHERE cancer_study_identifier IN - + #{studyId} diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index 36008ede532..238c679e08b 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -486,7 +486,7 @@ AND (event_type LIKE 'Sample Acquisition' OR event_type LIKE 'SPECIMEN') AND concat(ced.cancer_study_identifier, '_', ced.value) IN ( ) - + AND patient_unique_id IN () AND @@ -552,7 +552,7 @@ INNER JOIN treatments ON treatments.patient_unique_id = ced.patient_unique_id concat(ced.cancer_study_identifier, '_', ced.sample_id) IN ( ) - + AND patient_unique_id IN () @@ -582,7 +582,7 @@ sample_unique_id IN ( ) - + AND patient_unique_id IN () @@ -597,7 +597,7 @@ sample_unique_id IN () - + INTERSECT @@ -606,7 +606,7 @@ sample_unique_id IN ( - + INTERSECT ) diff --git a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/MolecularProfileCountTest.java b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/MolecularProfileCountTest.java index 0b428a4b8b7..b7a25d3ec0e 100644 --- a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/MolecularProfileCountTest.java +++ b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/MolecularProfileCountTest.java @@ -1,5 +1,6 @@ package org.cbioportal.persistence.mybatisclickhouse; +import org.cbioportal.persistence.helper.StudyViewFilterHelper; import org.cbioportal.persistence.mybatisclickhouse.config.MyBatisConfig; import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; @@ -44,8 +45,7 @@ public void getMolecularProfileCounts() { studyViewFilter.setGenomicProfiles(profileGroups); - var molecularProfileCounts = studyViewMapper.getMolecularProfileSampleCounts(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false ); + var molecularProfileCounts = studyViewMapper.getMolecularProfileSampleCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); var size = molecularProfileCounts.stream().filter(gc->gc.getValue().equals("mutations")) .findFirst().get().getCount().intValue(); @@ -63,8 +63,7 @@ public void getMolecularProfileCountsMultipleStudies() { studyViewFilter.setGenomicProfiles(profileGroups); - var molecularProfileCounts = studyViewMapper.getMolecularProfileSampleCounts(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false ); + var molecularProfileCounts = studyViewMapper.getMolecularProfileSampleCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); var size = molecularProfileCounts.stream().filter(gc->gc.getValue().equals("mutations")) .findFirst().get().getCount().intValue(); @@ -82,8 +81,7 @@ public void getMolecularProfileCountsMultipleProfilesUnion() { studyViewFilter.setGenomicProfiles(profileGroups); - var molecularProfileCounts = studyViewMapper.getMolecularProfileSampleCounts(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false ); + var molecularProfileCounts = studyViewMapper.getMolecularProfileSampleCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); var sizeMutations = molecularProfileCounts.stream().filter(gc->gc.getValue().equals("mutations")) .findFirst().get().getCount().intValue(); @@ -106,8 +104,7 @@ public void getMolecularProfileCountsMultipleProfilesIntersect() { studyViewFilter.setGenomicProfiles(profileGroups); - var molecularProfileCounts = studyViewMapper.getMolecularProfileSampleCounts(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false ); + var molecularProfileCounts = studyViewMapper.getMolecularProfileSampleCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); var sizeMutations = molecularProfileCounts.stream().filter(gc->gc.getValue().equals("mutations")) .findFirst().get().getCount().intValue(); diff --git a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewCaseListSamplesCountsTest.java b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewCaseListSamplesCountsTest.java index cb7af6bef7a..929650750bb 100644 --- a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewCaseListSamplesCountsTest.java +++ b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewCaseListSamplesCountsTest.java @@ -1,5 +1,6 @@ package org.cbioportal.persistence.mybatisclickhouse; +import org.cbioportal.persistence.helper.StudyViewFilterHelper; import org.cbioportal.persistence.mybatisclickhouse.config.MyBatisConfig; import org.cbioportal.service.impl.StudyViewColumnarServiceImpl; @@ -45,8 +46,7 @@ public void getMolecularProfileCounts() { studyViewFilter.setCaseLists(caseListGroups); - var sampleListCounts = studyViewMapper.getCaseListDataCountsPerStudy(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false ); + var sampleListCounts = studyViewMapper.getCaseListDataCountsPerStudy(StudyViewFilterHelper.build(studyViewFilter, null, null) ); var size = sampleListCounts.stream().filter(gc->gc.getValue().equals("mrna")) .findFirst().get().getCount().intValue(); @@ -64,8 +64,7 @@ public void getMolecularProfileCountsMultipleListsOr() { studyViewFilter.setCaseLists(caseListGroups); - var sampleListCounts = studyViewMapper.getCaseListDataCountsPerStudy(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false ); + var sampleListCounts = studyViewMapper.getCaseListDataCountsPerStudy(StudyViewFilterHelper.build(studyViewFilter, null, null) ); var size = sampleListCounts.stream().filter(gc->gc.getValue().equals("mrna")) .findFirst().get().getCount().intValue(); @@ -84,8 +83,7 @@ public void getMolecularProfileCountsMultipleListsAnd() { studyViewFilter.setCaseLists(caseListGroups); - var sampleListCounts = studyViewMapper.getCaseListDataCountsPerStudy(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false ); + var sampleListCounts = studyViewMapper.getCaseListDataCountsPerStudy(StudyViewFilterHelper.build(studyViewFilter, null, null) ); var size = sampleListCounts.stream().filter(gc->gc.getValue().equals("mrna")) .findFirst().get().getCount().intValue(); @@ -103,8 +101,7 @@ public void getMolecularProfileCountsAcrossStudies() { studyViewFilter.setCaseLists(caseListGroups); - var unMergedCounts = studyViewMapper.getCaseListDataCountsPerStudy(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false ); + var unMergedCounts = studyViewMapper.getCaseListDataCountsPerStudy(StudyViewFilterHelper.build(studyViewFilter, null, null) ); var caseListCountsMerged = StudyViewColumnarServiceImpl.mergeCaseListCounts( unMergedCounts diff --git a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java index 17847278f9c..ff335d7e5de 100644 --- a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java +++ b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java @@ -1,6 +1,9 @@ package org.cbioportal.persistence.mybatisclickhouse; +import org.cbioportal.model.ClinicalAttribute; import org.cbioportal.model.ClinicalDataCount; +import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; +import org.cbioportal.persistence.helper.StudyViewFilterHelper; import org.cbioportal.persistence.mybatisclickhouse.config.MyBatisConfig; import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; import org.cbioportal.web.parameter.ClinicalDataFilter; @@ -18,7 +21,9 @@ import java.math.BigDecimal; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import static org.junit.Assert.assertEquals; @@ -40,10 +45,7 @@ public void getMutationCounts() { StudyViewFilter studyViewFilter = new StudyViewFilter(); studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); - var mutationsCounts = studyViewMapper.getClinicalDataCounts( - studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), - false, + var mutationsCounts = studyViewMapper.getClinicalDataCounts(StudyViewFilterHelper.build(studyViewFilter, null, null), List.of("mutation_count"), Collections.emptyList() ); @@ -63,10 +65,7 @@ public void getCenterCounts() { StudyViewFilter studyViewFilter = new StudyViewFilter(); studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); - var categoricalClinicalDataCounts = studyViewMapper.getClinicalDataCounts( - studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), - false, + var categoricalClinicalDataCounts = studyViewMapper.getClinicalDataCounts(StudyViewFilterHelper.build(studyViewFilter, null, null), List.of("center"), Collections.emptyList() ); @@ -88,9 +87,7 @@ public void getMutationAndCenterCounts() { studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); var combinedClinicalDataCounts = studyViewMapper.getClinicalDataCounts( - studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), - false, + StudyViewFilterHelper.build(studyViewFilter, null, null), List.of("mutation_count", "center"), Collections.emptyList() ); @@ -104,9 +101,7 @@ public void getAgeCounts() { studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); var ageCounts = studyViewMapper.getClinicalDataCounts( - studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), - false, + StudyViewFilterHelper.build(studyViewFilter, null, null), List.of("age"), Collections.emptyList() ); @@ -123,9 +118,7 @@ public void getAgeCountsForMultipleStudies() { studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB, STUDY_ACC_TCGA)); var ageCounts = studyViewMapper.getClinicalDataCounts( - studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), - false, + StudyViewFilterHelper.build(studyViewFilter, null, null), List.of("age"), Collections.emptyList() ); @@ -168,14 +161,16 @@ public void getMutationCountsFilteredByAge() { // (there are 5 patients within this range, which are 307..311) ClinicalDataFilter filter = buildClinicalDataFilter("age", 20, 70); studyViewFilter.setClinicalDataFilters(List.of(filter)); - + + Map> clinicalAttributeDataSourceListMap = new HashMap<>(); + var clinicalAttr = new ClinicalAttribute(); + clinicalAttr.setAttrId("age"); + clinicalAttr.setPatientAttribute(true); + clinicalAttr.setDatatype("NUMBER"); + clinicalAttributeDataSourceListMap.put(ClinicalAttributeDataSource.PATIENT, List.of(clinicalAttr)); + clinicalAttributeDataSourceListMap.put(ClinicalAttributeDataSource.SAMPLE, List.of()); var mutationCountsFiltered = studyViewMapper.getClinicalDataCounts( - studyViewFilter, - CategorizedClinicalDataCountFilter - .getBuilder() - .setPatientNumericalClinicalDataFilters(List.of(filter)) - .build(), - true, + StudyViewFilterHelper.build(studyViewFilter, clinicalAttributeDataSourceListMap, null), List.of("mutation_count"), Collections.emptyList() ); @@ -196,13 +191,15 @@ public void getMutationCountsFilteredByAgeWithSpecialValues() { ClinicalDataFilter filter = buildClinicalDataFilter("age", null, 20); studyViewFilter.setClinicalDataFilters(List.of(filter)); + Map> clinicalAttributeDataSourceListMap = new HashMap<>(); + var clinicalAttr = new ClinicalAttribute(); + clinicalAttr.setAttrId("age"); + clinicalAttr.setPatientAttribute(true); + clinicalAttr.setDatatype("NUMBER"); + clinicalAttributeDataSourceListMap.put(ClinicalAttributeDataSource.PATIENT, List.of(clinicalAttr)); + clinicalAttributeDataSourceListMap.put(ClinicalAttributeDataSource.SAMPLE, List.of()); var mutationCountsFiltered = studyViewMapper.getClinicalDataCounts( - studyViewFilter, - CategorizedClinicalDataCountFilter - .getBuilder() - .setPatientNumericalClinicalDataFilters(List.of(filter)) - .build(), - true, + StudyViewFilterHelper.build(studyViewFilter, clinicalAttributeDataSourceListMap, null), List.of("mutation_count"), Collections.emptyList() ); diff --git a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java index fd42e6a80bc..b0c54597f3f 100644 --- a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java +++ b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java @@ -4,8 +4,8 @@ import org.cbioportal.model.MutationEventType; import org.cbioportal.model.TemporalRelation; import org.cbioportal.persistence.helper.AlterationFilterHelper; +import org.cbioportal.persistence.helper.StudyViewFilterHelper; import org.cbioportal.persistence.mybatisclickhouse.config.MyBatisConfig; -import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; import org.cbioportal.web.parameter.DataFilter; import org.cbioportal.web.parameter.DataFilterValue; import org.cbioportal.web.parameter.StudyViewFilter; @@ -39,21 +39,21 @@ @Import(MyBatisConfig.class) @DataJpaTest @DirtiesContext -@AutoConfigureTestDatabase(replace= AutoConfigureTestDatabase.Replace.NONE) +@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE) @ContextConfiguration(initializers = AbstractTestcontainers.Initializer.class) public class StudyViewMapperTest extends AbstractTestcontainers { - + private static final String STUDY_TCGA_PUB = "study_tcga_pub"; private static final String STUDY_ACC_TCGA = "acc_tcga"; - + @Autowired private StudyViewMapper studyViewMapper; - + @Test public void getFilteredSamples() { StudyViewFilter studyViewFilter = new StudyViewFilter(); studyViewFilter.setStudyIds(Arrays.asList(STUDY_TCGA_PUB, STUDY_ACC_TCGA)); - var filteredSamples = studyViewMapper.getFilteredSamples(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build(), false); + var filteredSamples = studyViewMapper.getFilteredSamples(StudyViewFilterHelper.build(studyViewFilter, null, null)); assertEquals(19, filteredSamples.size()); } @@ -61,16 +61,15 @@ public void getFilteredSamples() { public void getMutatedGenes() { StudyViewFilter studyViewFilter = new StudyViewFilter(); studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB)); - var alterationCountByGenes = studyViewMapper.getMutatedGenes(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false, + var alterationCountByGenes = studyViewMapper.getMutatedGenes(StudyViewFilterHelper.build(studyViewFilter, null, null), AlterationFilterHelper.build(studyViewFilter.getAlterationFilter())); assertEquals(3, alterationCountByGenes.size()); - + var testBrca1AlterationCount = alterationCountByGenes.stream().filter(a -> Objects.equals(a.getHugoGeneSymbol(), "brca1")).findFirst(); - assert(testBrca1AlterationCount.isPresent()); + assert (testBrca1AlterationCount.isPresent()); assertEquals(Integer.valueOf(5), testBrca1AlterationCount.get().getTotalCount()); - } - + } + @Test public void getMutatedGenesWithAlterationFilter() { StudyViewFilter studyViewFilter = new StudyViewFilter(); @@ -82,20 +81,18 @@ public void getMutatedGenesWithAlterationFilter() { mutationEventTypeFilterMap.put(MutationEventType.nonsense_mutation, Boolean.TRUE); mutationEventTypeFilterMap.put(MutationEventType.other, Boolean.FALSE); alterationFilter.setMutationEventTypes(mutationEventTypeFilterMap); - - var alterationCountByGenes = studyViewMapper.getMutatedGenes(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false, + + var alterationCountByGenes = studyViewMapper.getMutatedGenes(StudyViewFilterHelper.build(studyViewFilter, null, null), AlterationFilterHelper.build(alterationFilter)); - assertEquals(2, alterationCountByGenes.size()); - + assertEquals(2, alterationCountByGenes.size()); + AlterationFilter onlyMutationStatusFilter = new AlterationFilter(); onlyMutationStatusFilter.setMutationEventTypes(new HashMap<>()); onlyMutationStatusFilter.setIncludeGermline(false); onlyMutationStatusFilter.setIncludeSomatic(false); onlyMutationStatusFilter.setIncludeUnknownStatus(true); - - var alterationCountByGenes1 = studyViewMapper.getMutatedGenes(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false, + + var alterationCountByGenes1 = studyViewMapper.getMutatedGenes(StudyViewFilterHelper.build(studyViewFilter, null, null), AlterationFilterHelper.build(onlyMutationStatusFilter)); assertEquals(1, alterationCountByGenes1.size()); @@ -106,108 +103,98 @@ public void getMutatedGenesWithAlterationFilter() { mutationTypeAndStatusFilter.setIncludeSomatic(false); mutationTypeAndStatusFilter.setIncludeUnknownStatus(true); - var alterationCountByGenes2 = studyViewMapper.getMutatedGenes(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false, + var alterationCountByGenes2 = studyViewMapper.getMutatedGenes(StudyViewFilterHelper.build(studyViewFilter, null, null), AlterationFilterHelper.build(onlyMutationStatusFilter)); - assertEquals(1, alterationCountByGenes2.size()); + assertEquals(1, alterationCountByGenes2.size()); } - - @Test - public void getTotalProfiledCountsByGene() { - StudyViewFilter studyViewFilter = new StudyViewFilter(); - studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB)); - - var totalProfiledCountsMap = studyViewMapper.getTotalProfiledCounts(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false, - "MUTATION_EXTENDED"); - - assertEquals(3, totalProfiledCountsMap.size()); - - var akt2TotalProfiledCounts = totalProfiledCountsMap.stream().filter(c -> c.getHugoGeneSymbol().equals("akt2")).findFirst(); - assertTrue(akt2TotalProfiledCounts.isPresent()); - assertEquals(4, akt2TotalProfiledCounts.get().getNumberOfProfiledCases().intValue()); - } - - @Test + + @Test + public void getTotalProfiledCountsByGene() { + StudyViewFilter studyViewFilter = new StudyViewFilter(); + studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB)); + + var totalProfiledCountsMap = studyViewMapper.getTotalProfiledCounts(StudyViewFilterHelper.build(studyViewFilter, null, null), + "MUTATION_EXTENDED"); + + assertEquals(3, totalProfiledCountsMap.size()); + + var akt2TotalProfiledCounts = totalProfiledCountsMap.stream().filter(c -> c.getHugoGeneSymbol().equals("akt2")).findFirst(); + assertTrue(akt2TotalProfiledCounts.isPresent()); + assertEquals(4, akt2TotalProfiledCounts.get().getNumberOfProfiledCases().intValue()); + } + + @Test public void getClinicalEventTypeCounts() { - StudyViewFilter studyViewFilter = new StudyViewFilter(); - studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB)); - - var clinicalEventTypeCounts = studyViewMapper.getClinicalEventTypeCounts(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false); - - assertEquals(4, clinicalEventTypeCounts.size()); - - var clinicalEventTypeCountOptional = clinicalEventTypeCounts.stream().filter(ce -> ce.getEventType().equals("Treatment")) - .findFirst(); - - assertTrue(clinicalEventTypeCountOptional.isPresent()); - assertEquals(1, clinicalEventTypeCountOptional.get().getCount().intValue()); - - DataFilter dataFilter = new DataFilter(); - DataFilterValue dataFilterValue = new DataFilterValue(); - dataFilterValue.setValue("Treatment"); - dataFilter.setValues(List.of(dataFilterValue)); - studyViewFilter.setClinicalEventFilters(List.of(dataFilter)); - - clinicalEventTypeCounts = studyViewMapper.getClinicalEventTypeCounts(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), true); - - assertEquals(3, clinicalEventTypeCounts.size()); - - clinicalEventTypeCountOptional = clinicalEventTypeCounts.stream().filter(ce -> ce.getEventType().equals("status")) - .findFirst(); - - assertFalse(clinicalEventTypeCountOptional.isPresent()); - } - - @Test + StudyViewFilter studyViewFilter = new StudyViewFilter(); + studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB)); + + var clinicalEventTypeCounts = studyViewMapper.getClinicalEventTypeCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); + + assertEquals(4, clinicalEventTypeCounts.size()); + + var clinicalEventTypeCountOptional = clinicalEventTypeCounts.stream().filter(ce -> ce.getEventType().equals("Treatment")) + .findFirst(); + + assertTrue(clinicalEventTypeCountOptional.isPresent()); + assertEquals(1, clinicalEventTypeCountOptional.get().getCount().intValue()); + + DataFilter dataFilter = new DataFilter(); + DataFilterValue dataFilterValue = new DataFilterValue(); + dataFilterValue.setValue("Treatment"); + dataFilter.setValues(List.of(dataFilterValue)); + studyViewFilter.setClinicalEventFilters(List.of(dataFilter)); + + clinicalEventTypeCounts = studyViewMapper.getClinicalEventTypeCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); + + assertEquals(3, clinicalEventTypeCounts.size()); + + clinicalEventTypeCountOptional = clinicalEventTypeCounts.stream().filter(ce -> ce.getEventType().equals("status")) + .findFirst(); + + assertFalse(clinicalEventTypeCountOptional.isPresent()); + } + + @Test public void getPatientTreatmentReportCounts() { - StudyViewFilter studyViewFilter = new StudyViewFilter(); - studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB)); - - - var patientTreatmentCounts = studyViewMapper.getPatientTreatmentCounts(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false ); - - var patientTreatments = studyViewMapper.getPatientTreatments(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false ); - - assertEquals(1, patientTreatmentCounts); - assertEquals("madeupanib", patientTreatments.getFirst().treatment()); + StudyViewFilter studyViewFilter = new StudyViewFilter(); + studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB)); + - PatientTreatmentFilter filter = new PatientTreatmentFilter(); - filter.setTreatment("madeupanib"); + var patientTreatmentCounts = studyViewMapper.getPatientTreatmentCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); - OredPatientTreatmentFilters oredPatientTreatmentFilters = new OredPatientTreatmentFilters(); - oredPatientTreatmentFilters.setFilters(List.of(filter)); + var patientTreatments = studyViewMapper.getPatientTreatments(StudyViewFilterHelper.build(studyViewFilter, null, null)); - AndedPatientTreatmentFilters andedPatientTreatmentFilters = new AndedPatientTreatmentFilters(); - andedPatientTreatmentFilters.setFilters(List.of(oredPatientTreatmentFilters)); - studyViewFilter.setPatientTreatmentFilters(andedPatientTreatmentFilters); + assertEquals(1, patientTreatmentCounts); + assertEquals("madeupanib", patientTreatments.getFirst().treatment()); - patientTreatmentCounts = studyViewMapper.getPatientTreatmentCounts(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), true ); + PatientTreatmentFilter filter = new PatientTreatmentFilter(); + filter.setTreatment("madeupanib"); + + OredPatientTreatmentFilters oredPatientTreatmentFilters = new OredPatientTreatmentFilters(); + oredPatientTreatmentFilters.setFilters(List.of(filter)); + + AndedPatientTreatmentFilters andedPatientTreatmentFilters = new AndedPatientTreatmentFilters(); + andedPatientTreatmentFilters.setFilters(List.of(oredPatientTreatmentFilters)); + studyViewFilter.setPatientTreatmentFilters(andedPatientTreatmentFilters); - patientTreatments = studyViewMapper.getPatientTreatments(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), true ); + patientTreatmentCounts = studyViewMapper.getPatientTreatmentCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); - assertEquals(1, patientTreatmentCounts); - assertEquals("madeupanib", patientTreatments.getFirst().treatment()); + patientTreatments = studyViewMapper.getPatientTreatments(StudyViewFilterHelper.build(studyViewFilter, null, null)); - } + assertEquals(1, patientTreatmentCounts); + assertEquals("madeupanib", patientTreatments.getFirst().treatment()); + + } @Test - public void getSampleTreatmentCounts() { + public void getSampleTreatmentCounts() { StudyViewFilter studyViewFilter = new StudyViewFilter(); studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB)); - var totalSampleTreatmentCount = studyViewMapper.getTotalSampleTreatmentCounts(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false ); + var totalSampleTreatmentCount = studyViewMapper.getTotalSampleTreatmentCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); - var sampleTreatmentCounts = studyViewMapper.getSampleTreatmentCounts(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false ); + var sampleTreatmentCounts = studyViewMapper.getSampleTreatmentCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); assertEquals(1, totalSampleTreatmentCount); assertEquals("madeupanib", sampleTreatmentCounts.getFirst().treatment()); @@ -225,11 +212,9 @@ public void getSampleTreatmentCounts() { andedSampleTreatmentFilters.setFilters(List.of(oredSampleTreatmentFilters)); studyViewFilter.setSampleTreatmentFilters(andedSampleTreatmentFilters); - totalSampleTreatmentCount = studyViewMapper.getTotalSampleTreatmentCounts(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false ); + totalSampleTreatmentCount = studyViewMapper.getTotalSampleTreatmentCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); - sampleTreatmentCounts = studyViewMapper.getSampleTreatmentCounts(studyViewFilter, - CategorizedClinicalDataCountFilter.getBuilder().build(), false ); + sampleTreatmentCounts = studyViewMapper.getSampleTreatmentCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); assertEquals(0, totalSampleTreatmentCount); assertEquals(0, sampleTreatmentCounts.size()); diff --git a/src/test/java/org/cbioportal/web/util/ClinicalDataBinUtilTest.java b/src/test/java/org/cbioportal/web/util/ClinicalDataBinUtilTest.java index 83383756a04..b25def51f5b 100644 --- a/src/test/java/org/cbioportal/web/util/ClinicalDataBinUtilTest.java +++ b/src/test/java/org/cbioportal/web/util/ClinicalDataBinUtilTest.java @@ -12,13 +12,9 @@ import org.cbioportal.service.PatientService; import org.cbioportal.service.impl.CustomDataServiceImpl; import org.cbioportal.service.util.ClinicalAttributeUtil; -import org.cbioportal.service.util.CustomAttributeWithData; -import org.cbioportal.service.util.CustomDataSession; -import org.cbioportal.service.util.CustomDataValue; import org.cbioportal.service.util.SessionServiceRequestHandler; import org.cbioportal.web.parameter.*; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -74,6 +70,7 @@ public class ClinicalDataBinUtilTest { @Spy @InjectMocks private DataBinner dataBinner; + @Spy @InjectMocks private DiscreteDataBinner discreteDataBinner; diff --git a/src/test/java/org/cbioportal/web/util/DataBinnerTest.java b/src/test/java/org/cbioportal/web/util/DataBinnerTest.java index b6fe1f81688..5ed86de169b 100644 --- a/src/test/java/org/cbioportal/web/util/DataBinnerTest.java +++ b/src/test/java/org/cbioportal/web/util/DataBinnerTest.java @@ -31,11 +31,7 @@ import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.mockito.InjectMocks; -import org.mockito.MockitoAnnotations; -import org.mockito.Spy; import org.mockito.internal.matchers.apachecommons.ReflectionEquals; -import org.mockito.junit.MockitoJUnitRunner; @RunWith(SpringJUnit4ClassRunner.class) @SpringBootTest From 1872db18c2dc84d1b83e9d7bfc5971c4a794d0a2 Mon Sep 17 00:00:00 2001 From: Onur Sumer Date: Fri, 23 Aug 2024 15:28:59 -0400 Subject: [PATCH 41/87] normalize clinical data (#10943) --- .../StudyViewFilterMapper.xml | 8 +++- .../mybatisclickhouse/StudyViewMapper.xml | 39 ++++++++++++------- .../StudyViewMapperClinicalDataCountTest.java | 27 ++++++++++++- src/test/resources/clickhouse_data.sql | 13 +++++++ 4 files changed, 70 insertions(+), 17 deletions(-) diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index a41f4c75c44..4893f84608e 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -301,8 +301,8 @@ - + SELECT ${unique_id} FROM ${table_name} @@ -310,7 +310,11 @@ type='${type}' - AND attribute_value = '${dataFilterValue.value}' + AND ( + + + + ) = '${dataFilterValue.value}' diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index 238c679e08b..d560addfa16 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -168,10 +168,9 @@ SELECT attribute_name as attributeId, - + - - , + as value, count(value) as count FROM clinical_data_derived @@ -197,10 +196,9 @@ SELECT attribute_name as attributeId, - + - - , + as value, count(value) as count FROM clinical_data_derived @@ -627,15 +625,30 @@ OR upperUTF8(${attribute_value})='NAN' OR upperUTF8(${attribute_value})='N/A' + + + + upperUTF8(${attribute_value})='TRUE' + + + upperUTF8(${attribute_value})='FALSE' + - - if( - + + multiIf( + - , - 'NA', - ${attribute_value} + , + 'NA', + + + , + 'True', + + + , + 'False', + ${attribute_value} ) - AS ${as_value} diff --git a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java index ff335d7e5de..3ab8d2dccce 100644 --- a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java +++ b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java @@ -45,7 +45,8 @@ public void getMutationCounts() { StudyViewFilter studyViewFilter = new StudyViewFilter(); studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); - var mutationsCounts = studyViewMapper.getClinicalDataCounts(StudyViewFilterHelper.build(studyViewFilter, null, null), + var mutationsCounts = studyViewMapper.getClinicalDataCounts( + StudyViewFilterHelper.build(studyViewFilter, null, null), List.of("mutation_count"), Collections.emptyList() ); @@ -65,7 +66,8 @@ public void getCenterCounts() { StudyViewFilter studyViewFilter = new StudyViewFilter(); studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); - var categoricalClinicalDataCounts = studyViewMapper.getClinicalDataCounts(StudyViewFilterHelper.build(studyViewFilter, null, null), + var categoricalClinicalDataCounts = studyViewMapper.getClinicalDataCounts( + StudyViewFilterHelper.build(studyViewFilter, null, null), List.of("center"), Collections.emptyList() ); @@ -81,6 +83,27 @@ public void getCenterCounts() { assertEquals(13, findClinicaDataCount(categoricalClinicalDataCounts, "NA")); } + @Test + public void getDeadCounts() { + StudyViewFilter studyViewFilter = new StudyViewFilter(); + studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); + + var categoricalClinicalDataCounts = studyViewMapper.getClinicalDataCounts( + StudyViewFilterHelper.build(studyViewFilter, null, null), + List.of("dead"), + Collections.emptyList() + ); + + assertEquals(6, categoricalClinicalDataCounts.size()); + assertEquals(3, findClinicaDataCount(categoricalClinicalDataCounts, "True")); + assertEquals(4, findClinicaDataCount(categoricalClinicalDataCounts, "False")); + assertEquals(1, findClinicaDataCount(categoricalClinicalDataCounts, "Not Released")); + assertEquals(1, findClinicaDataCount(categoricalClinicalDataCounts, "Not Collected")); + assertEquals(1, findClinicaDataCount(categoricalClinicalDataCounts, "Unknown")); + // 1 empty string + 1 'N/A' + 11 samples with no data + assertEquals(13, findClinicaDataCount(categoricalClinicalDataCounts, "NA")); + } + @Test public void getMutationAndCenterCounts() { StudyViewFilter studyViewFilter = new StudyViewFilter(); diff --git a/src/test/resources/clickhouse_data.sql b/src/test/resources/clickhouse_data.sql index 51d74dbf92c..5dd3d7ab135 100644 --- a/src/test/resources/clickhouse_data.sql +++ b/src/test/resources/clickhouse_data.sql @@ -396,6 +396,18 @@ insert into clinical_patient (internal_id,attr_id,attr_value) values (309,'cente insert into clinical_patient (internal_id,attr_id,attr_value) values (310,'center','ucsf'); insert into clinical_patient (internal_id,attr_id,attr_value) values (311,'center','NA'); insert into clinical_patient (internal_id,attr_id,attr_value) values (312,'center',''); +insert into clinical_patient (internal_id,attr_id,attr_value) values (301,'dead','True'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (302,'dead','false'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (303,'dead','TRUE'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (304,'dead','False'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (305,'dead','FALSE'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (306,'dead','true'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (307,'dead','Not Released'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (308,'dead','Not Collected'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (309,'dead','FALSE'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (310,'dead','Unknown'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (311,'dead','N/A'); +insert into clinical_patient (internal_id,attr_id,attr_value) values (312,'dead',''); insert into clinical_patient (internal_id,attr_id,attr_value) values (301,'age','<18'); insert into clinical_patient (internal_id,attr_id,attr_value) values (302,'age','<18'); insert into clinical_patient (internal_id,attr_id,attr_value) values (303,'age','<18'); @@ -474,6 +486,7 @@ insert into clinical_attribute_meta (attr_id,display_name,description,datatype,p insert into clinical_attribute_meta (attr_id,display_name,description,datatype,patient_attribute,priority,cancer_study_id) values ('mutation_count','mutaiton count','mutation count','number',0,'30',3); insert into clinical_attribute_meta (attr_id,display_name,description,datatype,patient_attribute,priority,cancer_study_id) values ('age','age at metastatic diagnosis (years)','age at metastatic diagnosis (years)','number',1,'3',3); insert into clinical_attribute_meta (attr_id,display_name,description,datatype,patient_attribute,priority,cancer_study_id) values ('center','center','center of sequencing','string',1,'1',3); +insert into clinical_attribute_meta (attr_id,display_name,description,datatype,patient_attribute,priority,cancer_study_id) values ('dead','vital status','is this patient known to be deceased','string',1,'1',3); -- add genes, genetic entities and structural variants for structural_variant insert into genetic_entity (id,entity_type) values(21,'gene'); From f456bd5c0bbfd1e066fb5d8839ee8159ab6caba1 Mon Sep 17 00:00:00 2001 From: Onur Sumer Date: Tue, 27 Aug 2024 15:20:59 -0400 Subject: [PATCH 42/87] improve numerical clinical data filter (#10951) --- .../StudyViewFilterMapper.xml | 31 ++++++++++--- .../mybatisclickhouse/StudyViewMapper.xml | 23 ++++++++++ .../StudyViewMapperClinicalDataCountTest.java | 45 +++++++++++++++---- 3 files changed, 86 insertions(+), 13 deletions(-) diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index 4893f84608e..c0b2909cd53 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -283,18 +283,39 @@
- - AND match(attribute_value, '^[\d\.]+$') + + AND match(attribute_value, '^>?=?[-+]?[0-9]*[.,]?[0-9]+$') + + + AND match(attribute_value, '^<?=?[-+]?[0-9]*[.,]?[0-9]+$') + + + AND match(attribute_value, '^[-+]?[0-9]*[.,]?[0-9]+$') + + - AND abs(minus(cast(attribute_value as float), ${dataFilterValue.start})) < exp(-11) + AND abs( + minus( + + + , + ${dataFilterValue.start} + ) + ) < exp(-11) - AND cast(attribute_value as float) > ${dataFilterValue.start} + AND + + + > ${dataFilterValue.start} - AND cast(attribute_value as float) <= ${dataFilterValue.end} + AND + + + <= ${dataFilterValue.end} diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index d560addfa16..e94d466f6f0 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -618,6 +618,29 @@
+ + + multiIf( + (startsWith(${attribute_value}, '<=') OR startsWith(${attribute_value}, '>=')), + cast(substr(${attribute_value}, 3) as float), + startsWith(${attribute_value}, '<'), + cast(substr(${attribute_value}, 2) as float) - exp(-10), + startsWith(${attribute_value}, '>'), + cast(substr(${attribute_value}, 2) as float) + exp(-10), + cast(${attribute_value} as float) + ) + + ${attribute_value}='' diff --git a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java index 3ab8d2dccce..90bc9b864d8 100644 --- a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java +++ b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java @@ -205,12 +205,12 @@ public void getMutationCountsFilteredByAge() { } @Test - public void getMutationCountsFilteredByAgeWithSpecialValues() { + public void getMutationCountsFilteredByAgeWithOpenStartValues() { StudyViewFilter studyViewFilter = new StudyViewFilter(); studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); // filter patients with age less than 20 - // (there are 4 patients within this range, which are 301,302,303, and 306) + // (there are 4 patients within this range, which are 301, 302, 303, and 306) ClinicalDataFilter filter = buildClinicalDataFilter("age", null, 20); studyViewFilter.setClinicalDataFilters(List.of(filter)); @@ -227,17 +227,46 @@ public void getMutationCountsFilteredByAgeWithSpecialValues() { Collections.emptyList() ); - // TODO commented out tests below are failing due to a known issue - // (https://github.com/cBioPortal/rfc80-team/issues/32) - // assertEquals(4, mutationCountsFiltered.size()); - // assertEquals(1, findClinicaDataCount(mutationCountsFiltered, "11")); // patient 301 - // assertEquals(1, findClinicaDataCount(mutationCountsFiltered, "6")); // patient 302 - // assertEquals(1, findClinicaDataCount(mutationCountsFiltered, "4")); // patient 303 + assertEquals(4, mutationCountsFiltered.size()); + assertEquals(1, findClinicaDataCount(mutationCountsFiltered, "11")); // patient 301 + assertEquals(1, findClinicaDataCount(mutationCountsFiltered, "6")); // patient 302 + assertEquals(1, findClinicaDataCount(mutationCountsFiltered, "4")); // patient 303 assertEquals(1, findClinicaDataCount(mutationCountsFiltered, "2")); // patient 306 // no patients/samples with NA assertEquals(0, findClinicaDataCount(mutationCountsFiltered, "NA")); } + + @Test + public void getMutationCountsFilteredByAgeWithOpenEndValues() { + StudyViewFilter studyViewFilter = new StudyViewFilter(); + studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); + + // filter patients with age greater than 80 + // (there are 4 patients within this range, which are 317, 318, 319, 304, and 305) + ClinicalDataFilter filter = buildClinicalDataFilter("age", 80, null); + studyViewFilter.setClinicalDataFilters(List.of(filter)); + + Map> clinicalAttributeDataSourceListMap = new HashMap<>(); + var clinicalAttr = new ClinicalAttribute(); + clinicalAttr.setAttrId("age"); + clinicalAttr.setPatientAttribute(true); + clinicalAttr.setDatatype("NUMBER"); + clinicalAttributeDataSourceListMap.put(ClinicalAttributeDataSource.PATIENT, List.of(clinicalAttr)); + clinicalAttributeDataSourceListMap.put(ClinicalAttributeDataSource.SAMPLE, List.of()); + var mutationCountsFiltered = studyViewMapper.getClinicalDataCounts( + StudyViewFilterHelper.build(studyViewFilter, clinicalAttributeDataSourceListMap, null), + List.of("mutation_count"), + Collections.emptyList() + ); + + assertEquals(3, mutationCountsFiltered.size()); + assertEquals(1, findClinicaDataCount(mutationCountsFiltered, "4")); // patient 304 + assertEquals(1, findClinicaDataCount(mutationCountsFiltered, "2")); // patient 305 + + // patients/samples with NA data: 317, 318, and 319 + assertEquals(3, findClinicaDataCount(mutationCountsFiltered, "NA")); + } private ClinicalDataFilter buildClinicalDataFilter(String attributeId, Integer start, Integer end) { DataFilterValue value = new DataFilterValue(); From b36bffb5618a29825eb0635bf03f211a219e85de Mon Sep 17 00:00:00 2001 From: Charles Haynes <33608920+haynescd@users.noreply.github.com> Date: Tue, 27 Aug 2024 16:51:28 -0400 Subject: [PATCH 43/87] =?UTF-8?q?Update=20Treatment=20Endpoint=20to=20hand?= =?UTF-8?q?le=20event=5Ftype=20TREATMENT,=20previously=20=E2=80=A6=20(#109?= =?UTF-8?q?59)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update Treatment Endpoint to handle event_type TREATMENT, previously only searched on Treatment * Handle all variations of Treatment --- .../mybatisclickhouse/StudyViewFilterMapper.xml | 4 ++-- .../persistence/mybatisclickhouse/StudyViewMapper.xml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index c0b2909cd53..f2ce040188e 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -189,7 +189,7 @@ value AS treatment, argMin(start_date, start_date) AS treatment_time_taken FROM clinical_event_derived - WHERE event_type = 'Treatment' + WHERE lower(event_type) = 'treatment' AND key = 'AGENT' GROUP BY patient_unique_id, value ) ced_inner ON ced_inner.patient_unique_id = ced.patient_unique_id @@ -231,7 +231,7 @@ - event_type = 'Treatment' + lower(event_type) = 'treatment' AND key = 'AGENT' AND value = '${patientTreatmentFilter.treatment}' diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index e94d466f6f0..5af781dfeb0 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -442,7 +442,7 @@ patient_unique_id FROM clinical_event_derived - event_type = 'Treatment' + lower(event_type) = 'treatment' AND key = 'AGENT' AND @@ -465,7 +465,7 @@ count(DISTINCT patient_unique_id) AS count FROM clinical_event_derived - event_type = 'Treatment' + lower(event_type) = 'treatment' AND key = 'AGENT' AND @@ -493,7 +493,7 @@ patient_unique_id FROM clinical_event_derived - event_type = 'Treatment' + lower(event_type) = 'treatment' AND key = 'AGENT' AND @@ -537,7 +537,7 @@ argMin(start_date, start_date) AS treatment_time_taken FROM clinical_event_derived - event_type = 'Treatment' + lower(event_type) = 'treatment' AND key = 'AGENT' GROUP BY patient_unique_id, value From ac3cb9f7f56ff9c9e8df4566364120c66197a4fc Mon Sep 17 00:00:00 2001 From: Charles Haynes <33608920+haynescd@users.noreply.github.com> Date: Thu, 5 Sep 2024 16:48:21 -0400 Subject: [PATCH 44/87] Remove need to filter via Patient-IDs, All filters utilize sample-ids (#10974) --- .../helper/StudyViewFilterHelper.java | 84 ++------ .../StudyViewMyBatisRepository.java | 2 +- .../StudyViewFilterMapper.xml | 185 ++++++++++-------- .../mybatisclickhouse/StudyViewMapper.xml | 120 +++++------- .../MolecularProfileCountTest.java | 9 +- .../StudyViewCaseListSamplesCountsTest.java | 9 +- .../StudyViewMapperClinicalDataCountTest.java | 44 +---- .../StudyViewMapperTest.java | 32 +-- 8 files changed, 195 insertions(+), 290 deletions(-) diff --git a/src/main/java/org/cbioportal/persistence/helper/StudyViewFilterHelper.java b/src/main/java/org/cbioportal/persistence/helper/StudyViewFilterHelper.java index 14c77b47f04..a5d16a6de94 100644 --- a/src/main/java/org/cbioportal/persistence/helper/StudyViewFilterHelper.java +++ b/src/main/java/org/cbioportal/persistence/helper/StudyViewFilterHelper.java @@ -1,108 +1,48 @@ package org.cbioportal.persistence.helper; -import org.cbioportal.model.ClinicalAttribute; -import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; -import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; +import org.cbioportal.web.parameter.ClinicalDataFilter; import org.cbioportal.web.parameter.CustomSampleIdentifier; import org.cbioportal.web.parameter.StudyViewFilter; import org.springframework.lang.NonNull; import org.springframework.lang.Nullable; import java.util.ArrayList; -import java.util.EnumMap; import java.util.List; -import java.util.Map; import java.util.Objects; public final class StudyViewFilterHelper { public static StudyViewFilterHelper build(@Nullable StudyViewFilter studyViewFilter, - @Nullable Map> clinicalAttributesMap, - @Nullable List customDataSamples) { + @Nullable List customDataSamples) { if (Objects.isNull(studyViewFilter)) { studyViewFilter = new StudyViewFilter(); } - if (Objects.isNull(clinicalAttributesMap)) { - clinicalAttributesMap = new EnumMap<>(ClinicalAttributeDataSource.class); - } if (Objects.isNull(customDataSamples)) { customDataSamples = new ArrayList<>(); } - return new StudyViewFilterHelper(studyViewFilter, clinicalAttributesMap, customDataSamples); + return new StudyViewFilterHelper(studyViewFilter, customDataSamples); } - + private final StudyViewFilter studyViewFilter; - private final CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter; private final List customDataSamples; - private final boolean applyPatientIdFilters; - - private StudyViewFilterHelper(@NonNull StudyViewFilter studyViewFilter, @NonNull Map> clinicalAttributesMap, - @NonNull List customDataSamples) { + private StudyViewFilterHelper(@NonNull StudyViewFilter studyViewFilter, + @NonNull List customDataSamples) { this.studyViewFilter = studyViewFilter; - this.categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter, clinicalAttributesMap); + this.customDataSamples = customDataSamples; - this.applyPatientIdFilters = shouldApplyPatientIdFilters(); } - + public StudyViewFilter studyViewFilter() { return studyViewFilter; } - - public CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter() { - return categorizedClinicalDataCountFilter; - } - + public List customDataSamples() { return this.customDataSamples; } - - private CategorizedClinicalDataCountFilter extractClinicalDataCountFilters(final StudyViewFilter studyViewFilter, Map> clinicalAttributesMap) { - - if (studyViewFilter.getClinicalDataFilters() == null || clinicalAttributesMap.isEmpty()) { - return CategorizedClinicalDataCountFilter.getBuilder().build(); - } - - List patientCategoricalAttributes = clinicalAttributesMap.get(ClinicalAttributeDataSource.PATIENT) - .stream().filter(ca -> ca.getDatatype().equals("STRING")) - .map(ClinicalAttribute::getAttrId) - .toList(); - - List patientNumericalAttributes = clinicalAttributesMap.get(ClinicalAttributeDataSource.PATIENT) - .stream().filter(ca -> ca.getDatatype().equals("NUMBER")) - .map(ClinicalAttribute::getAttrId) - .toList(); - - List sampleCategoricalAttributes = clinicalAttributesMap.get(ClinicalAttributeDataSource.SAMPLE) - .stream().filter(ca -> ca.getDatatype().equals("STRING")) - .map(ClinicalAttribute::getAttrId) - .toList(); - - List sampleNumericalAttributes = clinicalAttributesMap.get(ClinicalAttributeDataSource.SAMPLE) - .stream().filter(ca -> ca.getDatatype().equals("NUMBER")) - .map(ClinicalAttribute::getAttrId) - .toList(); - - return CategorizedClinicalDataCountFilter.getBuilder() - .setPatientCategoricalClinicalDataFilters(studyViewFilter.getClinicalDataFilters() - .stream().filter(clinicalDataFilter -> patientCategoricalAttributes.contains(clinicalDataFilter.getAttributeId())) - .toList()) - .setPatientNumericalClinicalDataFilters(studyViewFilter.getClinicalDataFilters().stream() - .filter(clinicalDataFilter -> patientNumericalAttributes.contains(clinicalDataFilter.getAttributeId())) - .toList()) - .setSampleCategoricalClinicalDataFilters(studyViewFilter.getClinicalDataFilters().stream() - .filter(clinicalDataFilter -> sampleCategoricalAttributes.contains(clinicalDataFilter.getAttributeId())) - .toList()) - .setSampleNumericalClinicalDataFilters(studyViewFilter.getClinicalDataFilters().stream() - .filter(clinicalDataFilter -> sampleNumericalAttributes.contains(clinicalDataFilter.getAttributeId())) - .toList()) - .build(); - } - public boolean shouldApplyPatientIdFilters() { - return studyViewFilter.getClinicalEventFilters() != null && !studyViewFilter.getClinicalEventFilters().isEmpty() - || studyViewFilter.getPatientTreatmentFilters() != null && studyViewFilter.getPatientTreatmentFilters().getFilters()!= null && !studyViewFilter.getPatientTreatmentFilters().getFilters().isEmpty() - || categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters().isEmpty() - || categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters().isEmpty(); + public boolean isCategoricalClinicalDataFilter(ClinicalDataFilter clinicalDataFilter) { + var filterValue = clinicalDataFilter.getValues().getFirst(); + return filterValue.getValue() != null; } } diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java index 5bf385f366e..d522b2f3b9b 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java @@ -101,7 +101,7 @@ public List getMolecularProfileSampleCounts(StudyViewFilterCon } public StudyViewFilterHelper createStudyViewFilterHelper(StudyViewFilterContext studyViewFilterContext) { - return StudyViewFilterHelper.build(studyViewFilterContext.studyViewFilter(), getClinicalAttributeNameMap(), studyViewFilterContext.customDataFilterSamples()); + return StudyViewFilterHelper.build(studyViewFilterContext.studyViewFilter(), studyViewFilterContext.customDataFilterSamples()); } @Override diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index f2ce040188e..ca289ebc4b5 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -5,7 +5,7 @@ - INTERSECT + INTERSECT SELECT sample_unique_id FROM sample_derived WHERE cancer_study_identifier IN @@ -32,7 +32,7 @@ ) - + INTERSECT SELECT * FROM ( @@ -47,16 +47,16 @@ #{studyId} - AND + AND gp.stable_id LIKE '%_${genomicProfileId}' ) - + - + INTERSECT SELECT sample_unique_id @@ -115,39 +115,21 @@ #{molecularProfileId} - + hugo_gene_symbol = #{geneFilterQuery.hugoGeneSymbol} - cna_alteration = #{alteration.code} + cna_alteration = #{alteration.code} - - - - - - - - - - - - - - - - - - - + @@ -161,10 +143,24 @@ + + + + + + + + + + + + + + - + SELECT concat(ced.cancer_study_identifier, '_', ced.sample_id) AS sample_unique_id @@ -180,7 +176,7 @@ key = 'SAMPLE_ID' AND (event_type LIKE 'Sample Acquisition' OR event_type LIKE 'SPECIMEN') - GROUP BY patient_unique_id, ced.value, cancer_study_identifier + GROUP BY patient_unique_id, ced.value, cancer_study_identifier ) ced INNER JOIN ( @@ -198,10 +194,10 @@ ced_inner.treatment = '${sampleTreatmentFilter.treatment}' - AND ced.time_taken <= ced_inner.treatment_time_taken + AND ced.time_taken <= ced_inner.treatment_time_taken - AND ced.time_taken > ced_inner.treatment_time_taken + AND ced.time_taken > ced_inner.treatment_time_taken @@ -212,62 +208,87 @@ + SELECT sample_unique_id + FROM sample_derived + WHERE patient_unique_id in ( SELECT patient_unique_id FROM clinical_event_derived - - - event_type = '${dataFilterValue.value}' - - + + event_type = '${dataFilterValue.value}' + + + ) - + + SELECT sample_unique_id + FROM sample_derived + WHERE patient_unique_id in ( SELECT patient_unique_id FROM clinical_event_derived - - - lower(event_type) = 'treatment' - AND key = 'AGENT' - AND value = '${patientTreatmentFilter.treatment}' - - - + + lower(event_type) = 'treatment' + AND key = 'AGENT' + AND value = '${patientTreatmentFilter.treatment}' + + + ) + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + ( + + + + + + + + + + + + + + + + + + UNION DISTINCT + SELECT sample_unique_id + FROM sample_derived + WHERE patient_unique_id in ( + + + + + + + + + + + + + + + + + ) + ) + @@ -292,7 +313,7 @@ AND match(attribute_value, '^[-+]?[0-9]*[.,]?[0-9]+$') - + AND abs( @@ -323,7 +344,7 @@ - + SELECT ${unique_id} FROM ${table_name} @@ -339,7 +360,7 @@ - + @@ -403,7 +424,7 @@ - + @@ -432,18 +453,18 @@ #{studyId} - + AND alteration_value IN #{dataFilterValue.value} - + AND alteration_value IS NULL - + AND alteration_value IS NULL OR alteration_value IN diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index 5af781dfeb0..2da2eff0f0b 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -14,7 +14,7 @@ FROM sample_derived - + ORDER BY sample_stable_id ASC; @@ -31,7 +31,7 @@ variant_type = 'mutation' AND - + @@ -53,7 +53,7 @@ variant_type = 'cna' AND - + @@ -72,7 +72,7 @@ variant_type = 'structural_variant' AND - + GROUP BY entrez_gene_id, hugo_gene_symbol; @@ -120,7 +120,7 @@ AND type = 'patient' - + - + - + SELECT @@ -182,7 +182,7 @@ AND UPPER(value) NOT IN #{filteredAttributeValue} - + AND attribute_name IN @@ -220,13 +220,13 @@ GROUP BY attribute_name, value - + SELECT count(distinct sample_unique_id) as count FROM sample_derived - WHERE sample_unique_id IN () + WHERE sample_unique_id IN () - + SELECT attr_id as attrId, @@ -344,16 +344,16 @@ - + - - + - + - + - + - - + + - - SELECT count(distinct ced.value) AS totalSamples FROM clinical_event_derived ced @@ -484,9 +484,6 @@ AND (event_type LIKE 'Sample Acquisition' OR event_type LIKE 'SPECIMEN') AND concat(ced.cancer_study_identifier, '_', ced.value) IN ( ) - - AND patient_unique_id IN () - AND patient_unique_id IN ( SELECT @@ -503,7 +500,7 @@ ) - + @@ -528,10 +525,10 @@ GROUP BY patient_unique_id, ced.value, cancer_study_identifier ), treatments AS ( - SELECT + SELECT patient_unique_id, value AS treatment, argMin(start_date, start_date) AS treatment_time_taken @@ -550,43 +547,34 @@ INNER JOIN treatments ON treatments.patient_unique_id = ced.patient_unique_id concat(ced.cancer_study_identifier, '_', ced.sample_id) IN ( ) - - AND patient_unique_id IN () - GROUP BY treatments.treatment; - - - - - sample_unique_id IN ( ) - - AND patient_unique_id IN () - - + patient_unique_id in ( SELECT patient_unique_id @@ -594,34 +582,18 @@ sample_unique_id IN () - - - INTERSECT - - ) - + - sample_unique_id IN ( - - INTERSECT - - ) + sample_unique_id IN () - - SELECT sample_unique_id - FROM sample_derived - - patient_unique_id IN () - - - + ${attribute_value}='' @@ -656,7 +628,7 @@ upperUTF8(${attribute_value})='FALSE' - + multiIf( diff --git a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/MolecularProfileCountTest.java b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/MolecularProfileCountTest.java index b7a25d3ec0e..34cce3f47a4 100644 --- a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/MolecularProfileCountTest.java +++ b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/MolecularProfileCountTest.java @@ -2,7 +2,6 @@ import org.cbioportal.persistence.helper.StudyViewFilterHelper; import org.cbioportal.persistence.mybatisclickhouse.config.MyBatisConfig; -import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; import org.cbioportal.web.parameter.StudyViewFilter; import org.junit.Test; @@ -45,7 +44,7 @@ public void getMolecularProfileCounts() { studyViewFilter.setGenomicProfiles(profileGroups); - var molecularProfileCounts = studyViewMapper.getMolecularProfileSampleCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); + var molecularProfileCounts = studyViewMapper.getMolecularProfileSampleCounts(StudyViewFilterHelper.build(studyViewFilter, null)); var size = molecularProfileCounts.stream().filter(gc->gc.getValue().equals("mutations")) .findFirst().get().getCount().intValue(); @@ -63,7 +62,7 @@ public void getMolecularProfileCountsMultipleStudies() { studyViewFilter.setGenomicProfiles(profileGroups); - var molecularProfileCounts = studyViewMapper.getMolecularProfileSampleCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); + var molecularProfileCounts = studyViewMapper.getMolecularProfileSampleCounts(StudyViewFilterHelper.build(studyViewFilter, null)); var size = molecularProfileCounts.stream().filter(gc->gc.getValue().equals("mutations")) .findFirst().get().getCount().intValue(); @@ -81,7 +80,7 @@ public void getMolecularProfileCountsMultipleProfilesUnion() { studyViewFilter.setGenomicProfiles(profileGroups); - var molecularProfileCounts = studyViewMapper.getMolecularProfileSampleCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); + var molecularProfileCounts = studyViewMapper.getMolecularProfileSampleCounts(StudyViewFilterHelper.build(studyViewFilter, null)); var sizeMutations = molecularProfileCounts.stream().filter(gc->gc.getValue().equals("mutations")) .findFirst().get().getCount().intValue(); @@ -104,7 +103,7 @@ public void getMolecularProfileCountsMultipleProfilesIntersect() { studyViewFilter.setGenomicProfiles(profileGroups); - var molecularProfileCounts = studyViewMapper.getMolecularProfileSampleCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); + var molecularProfileCounts = studyViewMapper.getMolecularProfileSampleCounts(StudyViewFilterHelper.build(studyViewFilter, null)); var sizeMutations = molecularProfileCounts.stream().filter(gc->gc.getValue().equals("mutations")) .findFirst().get().getCount().intValue(); diff --git a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewCaseListSamplesCountsTest.java b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewCaseListSamplesCountsTest.java index 929650750bb..f62d95ab686 100644 --- a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewCaseListSamplesCountsTest.java +++ b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewCaseListSamplesCountsTest.java @@ -4,7 +4,6 @@ import org.cbioportal.persistence.mybatisclickhouse.config.MyBatisConfig; import org.cbioportal.service.impl.StudyViewColumnarServiceImpl; -import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; import org.cbioportal.web.parameter.StudyViewFilter; import org.junit.Test; import org.junit.runner.RunWith; @@ -46,7 +45,7 @@ public void getMolecularProfileCounts() { studyViewFilter.setCaseLists(caseListGroups); - var sampleListCounts = studyViewMapper.getCaseListDataCountsPerStudy(StudyViewFilterHelper.build(studyViewFilter, null, null) ); + var sampleListCounts = studyViewMapper.getCaseListDataCountsPerStudy(StudyViewFilterHelper.build(studyViewFilter, null) ); var size = sampleListCounts.stream().filter(gc->gc.getValue().equals("mrna")) .findFirst().get().getCount().intValue(); @@ -64,7 +63,7 @@ public void getMolecularProfileCountsMultipleListsOr() { studyViewFilter.setCaseLists(caseListGroups); - var sampleListCounts = studyViewMapper.getCaseListDataCountsPerStudy(StudyViewFilterHelper.build(studyViewFilter, null, null) ); + var sampleListCounts = studyViewMapper.getCaseListDataCountsPerStudy(StudyViewFilterHelper.build(studyViewFilter, null) ); var size = sampleListCounts.stream().filter(gc->gc.getValue().equals("mrna")) .findFirst().get().getCount().intValue(); @@ -83,7 +82,7 @@ public void getMolecularProfileCountsMultipleListsAnd() { studyViewFilter.setCaseLists(caseListGroups); - var sampleListCounts = studyViewMapper.getCaseListDataCountsPerStudy(StudyViewFilterHelper.build(studyViewFilter, null, null) ); + var sampleListCounts = studyViewMapper.getCaseListDataCountsPerStudy(StudyViewFilterHelper.build(studyViewFilter, null) ); var size = sampleListCounts.stream().filter(gc->gc.getValue().equals("mrna")) .findFirst().get().getCount().intValue(); @@ -101,7 +100,7 @@ public void getMolecularProfileCountsAcrossStudies() { studyViewFilter.setCaseLists(caseListGroups); - var unMergedCounts = studyViewMapper.getCaseListDataCountsPerStudy(StudyViewFilterHelper.build(studyViewFilter, null, null) ); + var unMergedCounts = studyViewMapper.getCaseListDataCountsPerStudy(StudyViewFilterHelper.build(studyViewFilter, null) ); var caseListCountsMerged = StudyViewColumnarServiceImpl.mergeCaseListCounts( unMergedCounts diff --git a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java index 90bc9b864d8..d8ff81d2004 100644 --- a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java +++ b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperClinicalDataCountTest.java @@ -1,11 +1,8 @@ package org.cbioportal.persistence.mybatisclickhouse; -import org.cbioportal.model.ClinicalAttribute; import org.cbioportal.model.ClinicalDataCount; -import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; import org.cbioportal.persistence.helper.StudyViewFilterHelper; import org.cbioportal.persistence.mybatisclickhouse.config.MyBatisConfig; -import org.cbioportal.web.parameter.CategorizedClinicalDataCountFilter; import org.cbioportal.web.parameter.ClinicalDataFilter; import org.cbioportal.web.parameter.DataFilterValue; import org.cbioportal.web.parameter.StudyViewFilter; @@ -21,9 +18,7 @@ import java.math.BigDecimal; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; import static org.junit.Assert.assertEquals; @@ -46,7 +41,7 @@ public void getMutationCounts() { studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); var mutationsCounts = studyViewMapper.getClinicalDataCounts( - StudyViewFilterHelper.build(studyViewFilter, null, null), + StudyViewFilterHelper.build(studyViewFilter, null), List.of("mutation_count"), Collections.emptyList() ); @@ -67,7 +62,7 @@ public void getCenterCounts() { studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); var categoricalClinicalDataCounts = studyViewMapper.getClinicalDataCounts( - StudyViewFilterHelper.build(studyViewFilter, null, null), + StudyViewFilterHelper.build(studyViewFilter, null), List.of("center"), Collections.emptyList() ); @@ -89,7 +84,7 @@ public void getDeadCounts() { studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); var categoricalClinicalDataCounts = studyViewMapper.getClinicalDataCounts( - StudyViewFilterHelper.build(studyViewFilter, null, null), + StudyViewFilterHelper.build(studyViewFilter, null), List.of("dead"), Collections.emptyList() ); @@ -110,7 +105,7 @@ public void getMutationAndCenterCounts() { studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); var combinedClinicalDataCounts = studyViewMapper.getClinicalDataCounts( - StudyViewFilterHelper.build(studyViewFilter, null, null), + StudyViewFilterHelper.build(studyViewFilter, null), List.of("mutation_count", "center"), Collections.emptyList() ); @@ -124,7 +119,7 @@ public void getAgeCounts() { studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB)); var ageCounts = studyViewMapper.getClinicalDataCounts( - StudyViewFilterHelper.build(studyViewFilter, null, null), + StudyViewFilterHelper.build(studyViewFilter, null), List.of("age"), Collections.emptyList() ); @@ -141,7 +136,7 @@ public void getAgeCountsForMultipleStudies() { studyViewFilter.setStudyIds(List.of(STUDY_GENIE_PUB, STUDY_ACC_TCGA)); var ageCounts = studyViewMapper.getClinicalDataCounts( - StudyViewFilterHelper.build(studyViewFilter, null, null), + StudyViewFilterHelper.build(studyViewFilter, null), List.of("age"), Collections.emptyList() ); @@ -185,15 +180,8 @@ public void getMutationCountsFilteredByAge() { ClinicalDataFilter filter = buildClinicalDataFilter("age", 20, 70); studyViewFilter.setClinicalDataFilters(List.of(filter)); - Map> clinicalAttributeDataSourceListMap = new HashMap<>(); - var clinicalAttr = new ClinicalAttribute(); - clinicalAttr.setAttrId("age"); - clinicalAttr.setPatientAttribute(true); - clinicalAttr.setDatatype("NUMBER"); - clinicalAttributeDataSourceListMap.put(ClinicalAttributeDataSource.PATIENT, List.of(clinicalAttr)); - clinicalAttributeDataSourceListMap.put(ClinicalAttributeDataSource.SAMPLE, List.of()); var mutationCountsFiltered = studyViewMapper.getClinicalDataCounts( - StudyViewFilterHelper.build(studyViewFilter, clinicalAttributeDataSourceListMap, null), + StudyViewFilterHelper.build(studyViewFilter, null), List.of("mutation_count"), Collections.emptyList() ); @@ -214,15 +202,8 @@ public void getMutationCountsFilteredByAgeWithOpenStartValues() { ClinicalDataFilter filter = buildClinicalDataFilter("age", null, 20); studyViewFilter.setClinicalDataFilters(List.of(filter)); - Map> clinicalAttributeDataSourceListMap = new HashMap<>(); - var clinicalAttr = new ClinicalAttribute(); - clinicalAttr.setAttrId("age"); - clinicalAttr.setPatientAttribute(true); - clinicalAttr.setDatatype("NUMBER"); - clinicalAttributeDataSourceListMap.put(ClinicalAttributeDataSource.PATIENT, List.of(clinicalAttr)); - clinicalAttributeDataSourceListMap.put(ClinicalAttributeDataSource.SAMPLE, List.of()); var mutationCountsFiltered = studyViewMapper.getClinicalDataCounts( - StudyViewFilterHelper.build(studyViewFilter, clinicalAttributeDataSourceListMap, null), + StudyViewFilterHelper.build(studyViewFilter, null), List.of("mutation_count"), Collections.emptyList() ); @@ -247,15 +228,8 @@ public void getMutationCountsFilteredByAgeWithOpenEndValues() { ClinicalDataFilter filter = buildClinicalDataFilter("age", 80, null); studyViewFilter.setClinicalDataFilters(List.of(filter)); - Map> clinicalAttributeDataSourceListMap = new HashMap<>(); - var clinicalAttr = new ClinicalAttribute(); - clinicalAttr.setAttrId("age"); - clinicalAttr.setPatientAttribute(true); - clinicalAttr.setDatatype("NUMBER"); - clinicalAttributeDataSourceListMap.put(ClinicalAttributeDataSource.PATIENT, List.of(clinicalAttr)); - clinicalAttributeDataSourceListMap.put(ClinicalAttributeDataSource.SAMPLE, List.of()); var mutationCountsFiltered = studyViewMapper.getClinicalDataCounts( - StudyViewFilterHelper.build(studyViewFilter, clinicalAttributeDataSourceListMap, null), + StudyViewFilterHelper.build(studyViewFilter, null), List.of("mutation_count"), Collections.emptyList() ); diff --git a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java index b0c54597f3f..5e99f865a0d 100644 --- a/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java +++ b/src/test/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapperTest.java @@ -53,7 +53,7 @@ public class StudyViewMapperTest extends AbstractTestcontainers { public void getFilteredSamples() { StudyViewFilter studyViewFilter = new StudyViewFilter(); studyViewFilter.setStudyIds(Arrays.asList(STUDY_TCGA_PUB, STUDY_ACC_TCGA)); - var filteredSamples = studyViewMapper.getFilteredSamples(StudyViewFilterHelper.build(studyViewFilter, null, null)); + var filteredSamples = studyViewMapper.getFilteredSamples(StudyViewFilterHelper.build(studyViewFilter, null)); assertEquals(19, filteredSamples.size()); } @@ -61,7 +61,7 @@ public void getFilteredSamples() { public void getMutatedGenes() { StudyViewFilter studyViewFilter = new StudyViewFilter(); studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB)); - var alterationCountByGenes = studyViewMapper.getMutatedGenes(StudyViewFilterHelper.build(studyViewFilter, null, null), + var alterationCountByGenes = studyViewMapper.getMutatedGenes(StudyViewFilterHelper.build(studyViewFilter, null), AlterationFilterHelper.build(studyViewFilter.getAlterationFilter())); assertEquals(3, alterationCountByGenes.size()); @@ -82,7 +82,7 @@ public void getMutatedGenesWithAlterationFilter() { mutationEventTypeFilterMap.put(MutationEventType.other, Boolean.FALSE); alterationFilter.setMutationEventTypes(mutationEventTypeFilterMap); - var alterationCountByGenes = studyViewMapper.getMutatedGenes(StudyViewFilterHelper.build(studyViewFilter, null, null), + var alterationCountByGenes = studyViewMapper.getMutatedGenes(StudyViewFilterHelper.build(studyViewFilter, null), AlterationFilterHelper.build(alterationFilter)); assertEquals(2, alterationCountByGenes.size()); @@ -92,7 +92,7 @@ public void getMutatedGenesWithAlterationFilter() { onlyMutationStatusFilter.setIncludeSomatic(false); onlyMutationStatusFilter.setIncludeUnknownStatus(true); - var alterationCountByGenes1 = studyViewMapper.getMutatedGenes(StudyViewFilterHelper.build(studyViewFilter, null, null), + var alterationCountByGenes1 = studyViewMapper.getMutatedGenes(StudyViewFilterHelper.build(studyViewFilter, null), AlterationFilterHelper.build(onlyMutationStatusFilter)); assertEquals(1, alterationCountByGenes1.size()); @@ -103,7 +103,7 @@ public void getMutatedGenesWithAlterationFilter() { mutationTypeAndStatusFilter.setIncludeSomatic(false); mutationTypeAndStatusFilter.setIncludeUnknownStatus(true); - var alterationCountByGenes2 = studyViewMapper.getMutatedGenes(StudyViewFilterHelper.build(studyViewFilter, null, null), + var alterationCountByGenes2 = studyViewMapper.getMutatedGenes(StudyViewFilterHelper.build(studyViewFilter, null), AlterationFilterHelper.build(onlyMutationStatusFilter)); assertEquals(1, alterationCountByGenes2.size()); } @@ -113,7 +113,7 @@ public void getTotalProfiledCountsByGene() { StudyViewFilter studyViewFilter = new StudyViewFilter(); studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB)); - var totalProfiledCountsMap = studyViewMapper.getTotalProfiledCounts(StudyViewFilterHelper.build(studyViewFilter, null, null), + var totalProfiledCountsMap = studyViewMapper.getTotalProfiledCounts(StudyViewFilterHelper.build(studyViewFilter, null), "MUTATION_EXTENDED"); assertEquals(3, totalProfiledCountsMap.size()); @@ -128,7 +128,7 @@ public void getClinicalEventTypeCounts() { StudyViewFilter studyViewFilter = new StudyViewFilter(); studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB)); - var clinicalEventTypeCounts = studyViewMapper.getClinicalEventTypeCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); + var clinicalEventTypeCounts = studyViewMapper.getClinicalEventTypeCounts(StudyViewFilterHelper.build(studyViewFilter, null)); assertEquals(4, clinicalEventTypeCounts.size()); @@ -144,7 +144,7 @@ public void getClinicalEventTypeCounts() { dataFilter.setValues(List.of(dataFilterValue)); studyViewFilter.setClinicalEventFilters(List.of(dataFilter)); - clinicalEventTypeCounts = studyViewMapper.getClinicalEventTypeCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); + clinicalEventTypeCounts = studyViewMapper.getClinicalEventTypeCounts(StudyViewFilterHelper.build(studyViewFilter, null)); assertEquals(3, clinicalEventTypeCounts.size()); @@ -160,9 +160,9 @@ public void getPatientTreatmentReportCounts() { studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB)); - var patientTreatmentCounts = studyViewMapper.getPatientTreatmentCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); + var patientTreatmentCounts = studyViewMapper.getPatientTreatmentCounts(StudyViewFilterHelper.build(studyViewFilter, null)); - var patientTreatments = studyViewMapper.getPatientTreatments(StudyViewFilterHelper.build(studyViewFilter, null, null)); + var patientTreatments = studyViewMapper.getPatientTreatments(StudyViewFilterHelper.build(studyViewFilter, null)); assertEquals(1, patientTreatmentCounts); assertEquals("madeupanib", patientTreatments.getFirst().treatment()); @@ -177,9 +177,9 @@ public void getPatientTreatmentReportCounts() { andedPatientTreatmentFilters.setFilters(List.of(oredPatientTreatmentFilters)); studyViewFilter.setPatientTreatmentFilters(andedPatientTreatmentFilters); - patientTreatmentCounts = studyViewMapper.getPatientTreatmentCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); + patientTreatmentCounts = studyViewMapper.getPatientTreatmentCounts(StudyViewFilterHelper.build(studyViewFilter, null)); - patientTreatments = studyViewMapper.getPatientTreatments(StudyViewFilterHelper.build(studyViewFilter, null, null)); + patientTreatments = studyViewMapper.getPatientTreatments(StudyViewFilterHelper.build(studyViewFilter, null)); assertEquals(1, patientTreatmentCounts); assertEquals("madeupanib", patientTreatments.getFirst().treatment()); @@ -192,9 +192,9 @@ public void getSampleTreatmentCounts() { studyViewFilter.setStudyIds(List.of(STUDY_TCGA_PUB)); - var totalSampleTreatmentCount = studyViewMapper.getTotalSampleTreatmentCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); + var totalSampleTreatmentCount = studyViewMapper.getTotalSampleTreatmentCounts(StudyViewFilterHelper.build(studyViewFilter, null)); - var sampleTreatmentCounts = studyViewMapper.getSampleTreatmentCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); + var sampleTreatmentCounts = studyViewMapper.getSampleTreatmentCounts(StudyViewFilterHelper.build(studyViewFilter, null)); assertEquals(1, totalSampleTreatmentCount); assertEquals("madeupanib", sampleTreatmentCounts.getFirst().treatment()); @@ -212,9 +212,9 @@ public void getSampleTreatmentCounts() { andedSampleTreatmentFilters.setFilters(List.of(oredSampleTreatmentFilters)); studyViewFilter.setSampleTreatmentFilters(andedSampleTreatmentFilters); - totalSampleTreatmentCount = studyViewMapper.getTotalSampleTreatmentCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); + totalSampleTreatmentCount = studyViewMapper.getTotalSampleTreatmentCounts(StudyViewFilterHelper.build(studyViewFilter, null)); - sampleTreatmentCounts = studyViewMapper.getSampleTreatmentCounts(StudyViewFilterHelper.build(studyViewFilter, null, null)); + sampleTreatmentCounts = studyViewMapper.getSampleTreatmentCounts(StudyViewFilterHelper.build(studyViewFilter, null)); assertEquals(0, totalSampleTreatmentCount); assertEquals(0, sampleTreatmentCounts.size()); From 5db0254b91e394e164d92cda5fa4350fd3823ec1 Mon Sep 17 00:00:00 2001 From: alisman Date: Thu, 5 Sep 2024 16:56:29 -0400 Subject: [PATCH 45/87] add api test specs to backend (#10979) --- test/api-e2e/index.js | 47 + test/api-e2e/mergeJson.js | 28 + test/api-e2e/specs/clinical-data-filters.json | 3581 +++++++++++++++++ .../specs/custom-data-bin-counts-filter.json | 204 + .../specs/custom-data-counts-filter.json | 204 + test/api-e2e/specs/genie-public.json | 10 + test/api-e2e/specs/mutation-data-counts.json | 144 + .../specs/sample-lists-counts-filter.json | 169 + 8 files changed, 4387 insertions(+) create mode 100644 test/api-e2e/index.js create mode 100644 test/api-e2e/mergeJson.js create mode 100644 test/api-e2e/specs/clinical-data-filters.json create mode 100644 test/api-e2e/specs/custom-data-bin-counts-filter.json create mode 100644 test/api-e2e/specs/custom-data-counts-filter.json create mode 100644 test/api-e2e/specs/genie-public.json create mode 100644 test/api-e2e/specs/mutation-data-counts.json create mode 100644 test/api-e2e/specs/sample-lists-counts-filter.json diff --git a/test/api-e2e/index.js b/test/api-e2e/index.js new file mode 100644 index 00000000000..7a1a60f8df0 --- /dev/null +++ b/test/api-e2e/index.js @@ -0,0 +1,47 @@ +const fs = require('fs/promises'); +const watch = require('fs').watch; +const path = require('path'); + +let apiTestRoot; + +if (!process.env.BACKEND_ROOT) { + console.log("YOU MUST EXPORT BACKEND_ROOT ENV VARIABLE"); + process.exit(1); +} else { + apiTestRoot = `${process.env.BACKEND_ROOT}/test/api-e2e`; +} + +async function mergeFiles(){ + + const files = (await fs.readdir(`${apiTestRoot}/specs`)).map(fileName => { + return path.join(`${apiTestRoot}/specs`, fileName); + }); + + const jsons = files.map(path => { + return fs.readFile(path).then(data => { + try { + const json = JSON.parse(data); + return { file: path, suites: json }; + } catch (ex) { + console.log('invalid apiTest json spec'); + return []; + } + }); + }); + + Promise.all(jsons) + .then(d => { + fs.writeFile(`${process.cwd()}/api-e2e/merged-tests.json`, JSON.stringify(d)); + }) + .then(r => console.log('merged-tests.json written')); + +} + +watch(`${apiTestRoot}/specs`, async function(event, filename) { + if (event === 'change') { + mergeFiles() + } +}); + + +mergeFiles(); \ No newline at end of file diff --git a/test/api-e2e/mergeJson.js b/test/api-e2e/mergeJson.js new file mode 100644 index 00000000000..08e8c0a4309 --- /dev/null +++ b/test/api-e2e/mergeJson.js @@ -0,0 +1,28 @@ +const fsProm = require('fs/promises'); +const path = require('path'); + +async function mergeApiTestJson() { + const files = (await fsProm.readdir('./api-e2e/specs')).map(fileName => { + return path.join('./api-e2e/specs', fileName); + }); + + const jsons = files.map(path => { + return fsProm.readFile(path).then(data => { + try { + const json = JSON.parse(data); + return { file: path, suites: json }; + } catch (ex) { + console.log('invalid apiTest json spec'); + return []; + } + }); + }); + + Promise.all(jsons) + .then(d => { + fsProm.writeFile('./api-e2e/merged-tests.json', JSON.stringify(d)); + }) + .then(r => console.log('merged-tests.json written')); +} + +exports.mergeApiTestJson = mergeApiTestJson; diff --git a/test/api-e2e/specs/clinical-data-filters.json b/test/api-e2e/specs/clinical-data-filters.json new file mode 100644 index 00000000000..e6f3377745c --- /dev/null +++ b/test/api-e2e/specs/clinical-data-filters.json @@ -0,0 +1,3581 @@ +[ + { + "name": "Age at Which Sequencing was Reported <= 25", + "note": "Filter result should include patients/samples with special age value of '<18'", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Age at Which Sequencing was Reported:≤ 25", + "tests": [ + { + "hash": 22663238, + "filterString": "Age at Which Sequencing was Reported:≤ 25", + "data": { + "attributes": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "disableLogScale": false, + "showNA": false + } + ], + "studyViewFilter": { + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&", + "label": "ClinicalDataBin", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 1521321988, + "filterString": "Age at Which Sequencing was Reported:≤ 25", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/filtered-samples/fetch?", + "label": "FilteredSamples", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 1565039040, + "filterString": "Age at Which Sequencing was Reported:≤ 25", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/cna-genes/fetch?", + "label": "CNAGenes", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 1753439688, + "filterString": "Age at Which Sequencing was Reported:≤ 25", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/sample-lists-counts/fetch?", + "label": "CaseList", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 2068869541, + "filterString": "Age at Which Sequencing was Reported:≤ 25", + "data": { + "attributes": [ + { + "attributeId": "CENTER" + }, + { + "attributeId": "SEQ_ASSAY_ID" + }, + { + "attributeId": "SAMPLE_TYPE_DETAILED" + }, + { + "attributeId": "SAMPLE_COUNT" + }, + { + "attributeId": "SAMPLE_TYPE" + }, + { + "attributeId": "SEX" + }, + { + "attributeId": "CANCER_TYPE_DETAILED" + }, + { + "attributeId": "PRIMARY_RACE" + }, + { + "attributeId": "DEAD" + }, + { + "attributeId": "ETHNICITY" + }, + { + "attributeId": "ONCOTREE_CODE" + }, + { + "attributeId": "CANCER_TYPE" + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-counts/fetch?", + "label": "ClinicalDataCounts", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 2119685176, + "filterString": "Age at Which Sequencing was Reported:≤ 25", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/mutated-genes/fetch?", + "label": "MutatedGenes", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -150802423, + "filterString": "Age at Which Sequencing was Reported:≤ 25", + "data": { + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/filtered-samples/fetch?", + "label": "FilteredSamples", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -258471519, + "filterString": "Age at Which Sequencing was Reported:≤ 25", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/molecular-profile-sample-counts/fetch?", + "label": "MolecularProfileSample", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -1147867666, + "filterString": "Age at Which Sequencing was Reported:≤ 25", + "data": { + "attributes": [ + { + "attributeId": "MUTATION_COUNT", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "FRACTION_GENOME_ALTERED", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "INT_CONTACT", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "INT_DOD", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "YEAR_DEATH", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "YEAR_CONTACT", + "disableLogScale": false, + "showNA": false + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&", + "label": "ClinicalDataBin", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -527271474, + "filterString": "Age at Which Sequencing was Reported:≤ 25", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/structuralvariant-genes/fetch?", + "label": "StructuralVariantGenes", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -1398413375, + "filterString": "Age at Which Sequencing was Reported:≤ 25", + "data": { + "attributes": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "disableLogScale": false, + "showNA": false + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&", + "label": "ClinicalDataBin", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -23841008, + "filterString": "Age at Which Sequencing was Reported:≤ 25", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&", + "label": "ClinicalDataDensity", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + } + ] + }, + { + "name": "(Age at Which Sequencing was Reported <= 25) AND (Interval in days from DOB to DOD <= 6570)", + "note": "Filter result should include patients/samples with special age value of '<18' and special day value of '<6570'", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]},{\"attributeId\":\"INT_DOD\",\"values\":[{\"end\":6570}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Age at Which Sequencing was Reported:≤ 25Interval in days from DOB to DOD:≤ 6570", + "tests": [ + { + "hash": 98873588, + "filterString": "Age at Which Sequencing was Reported:≤ 25Interval in days from DOB to DOD:≤ 6570", + "data": { + "attributes": [ + { + "attributeId": "MUTATION_COUNT", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "FRACTION_GENOME_ALTERED", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "INT_CONTACT", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "YEAR_DEATH", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "YEAR_CONTACT", + "disableLogScale": false, + "showNA": false + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&", + "label": "ClinicalDataBin", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]},{\"attributeId\":\"INT_DOD\",\"values\":[{\"end\":6570}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 392718630, + "filterString": "Age at Which Sequencing was Reported:≤ 25Interval in days from DOB to DOD:≤ 6570", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + }, + { + "attributeId": "INT_DOD", + "values": [ + { + "end": 6570 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/molecular-profile-sample-counts/fetch?", + "label": "MolecularProfileSample", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]},{\"attributeId\":\"INT_DOD\",\"values\":[{\"end\":6570}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 430471933, + "filterString": "Age at Which Sequencing was Reported:≤ 25Interval in days from DOB to DOD:≤ 6570", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + }, + { + "attributeId": "INT_DOD", + "values": [ + { + "end": 6570 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/mutated-genes/fetch?", + "label": "MutatedGenes", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]},{\"attributeId\":\"INT_DOD\",\"values\":[{\"end\":6570}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 573897579, + "filterString": "Age at Which Sequencing was Reported:≤ 25Interval in days from DOB to DOD:≤ 6570", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + }, + { + "attributeId": "INT_DOD", + "values": [ + { + "end": 6570 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&", + "label": "ClinicalDataDensity", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]},{\"attributeId\":\"INT_DOD\",\"values\":[{\"end\":6570}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 868889688, + "filterString": "Age at Which Sequencing was Reported:≤ 25Interval in days from DOB to DOD:≤ 6570", + "data": { + "attributes": [ + { + "attributeId": "INT_DOD", + "disableLogScale": false, + "showNA": false + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&", + "label": "ClinicalDataBin", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]},{\"attributeId\":\"INT_DOD\",\"values\":[{\"end\":6570}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 1198202061, + "filterString": "Age at Which Sequencing was Reported:≤ 25Interval in days from DOB to DOD:≤ 6570", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + }, + { + "attributeId": "INT_DOD", + "values": [ + { + "end": 6570 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/sample-lists-counts/fetch?", + "label": "CaseList", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]},{\"attributeId\":\"INT_DOD\",\"values\":[{\"end\":6570}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 1892761706, + "filterString": "Age at Which Sequencing was Reported:≤ 25Interval in days from DOB to DOD:≤ 6570", + "data": { + "attributes": [ + { + "attributeId": "CENTER" + }, + { + "attributeId": "SEQ_ASSAY_ID" + }, + { + "attributeId": "SAMPLE_TYPE_DETAILED" + }, + { + "attributeId": "SAMPLE_COUNT" + }, + { + "attributeId": "SAMPLE_TYPE" + }, + { + "attributeId": "SEX" + }, + { + "attributeId": "CANCER_TYPE_DETAILED" + }, + { + "attributeId": "PRIMARY_RACE" + }, + { + "attributeId": "DEAD" + }, + { + "attributeId": "ETHNICITY" + }, + { + "attributeId": "ONCOTREE_CODE" + }, + { + "attributeId": "CANCER_TYPE" + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + }, + { + "attributeId": "INT_DOD", + "values": [ + { + "end": 6570 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-counts/fetch?", + "label": "ClinicalDataCounts", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]},{\"attributeId\":\"INT_DOD\",\"values\":[{\"end\":6570}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 2009673299, + "filterString": "Age at Which Sequencing was Reported:≤ 25Interval in days from DOB to DOD:≤ 6570", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + }, + { + "attributeId": "INT_DOD", + "values": [ + { + "end": 6570 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/structuralvariant-genes/fetch?", + "label": "StructuralVariantGenes", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]},{\"attributeId\":\"INT_DOD\",\"values\":[{\"end\":6570}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 2128015567, + "filterString": "Age at Which Sequencing was Reported:≤ 25Interval in days from DOB to DOD:≤ 6570", + "data": { + "attributes": [ + { + "attributeId": "MUTATION_COUNT", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "FRACTION_GENOME_ALTERED", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "INT_CONTACT", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "YEAR_DEATH", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "YEAR_CONTACT", + "disableLogScale": false, + "showNA": false + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + }, + { + "attributeId": "INT_DOD", + "values": [ + { + "end": 6570 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&", + "label": "ClinicalDataBin", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]},{\"attributeId\":\"INT_DOD\",\"values\":[{\"end\":6570}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -1993560289, + "filterString": "Age at Which Sequencing was Reported:≤ 25Interval in days from DOB to DOD:≤ 6570", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + }, + { + "attributeId": "INT_DOD", + "values": [ + { + "end": 6570 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/filtered-samples/fetch?", + "label": "FilteredSamples", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]},{\"attributeId\":\"INT_DOD\",\"values\":[{\"end\":6570}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -2113570212, + "filterString": "Age at Which Sequencing was Reported:≤ 25Interval in days from DOB to DOD:≤ 6570", + "data": { + "attributes": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "disableLogScale": false, + "showNA": false + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + }, + { + "attributeId": "INT_DOD", + "values": [ + { + "end": 6570 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&", + "label": "ClinicalDataBin", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]},{\"attributeId\":\"INT_DOD\",\"values\":[{\"end\":6570}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -1113756923, + "filterString": "Age at Which Sequencing was Reported:≤ 25Interval in days from DOB to DOD:≤ 6570", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + }, + { + "attributeId": "INT_DOD", + "values": [ + { + "end": 6570 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/cna-genes/fetch?", + "label": "CNAGenes", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]},{\"attributeId\":\"INT_DOD\",\"values\":[{\"end\":6570}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -1676848333, + "filterString": "Age at Which Sequencing was Reported:≤ 25Interval in days from DOB to DOD:≤ 6570", + "data": { + "attributes": [ + { + "attributeId": "INT_DOD", + "disableLogScale": false, + "showNA": false + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "end": 25 + } + ] + }, + { + "attributeId": "INT_DOD", + "values": [ + { + "end": 6570 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&", + "label": "ClinicalDataBin", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"end\":25}]},{\"attributeId\":\"INT_DOD\",\"values\":[{\"end\":6570}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + } + ] + }, + { + "name": "(Age at Which Sequencing was Reported > 85) AND (Interval in days from DOB to date of last contact > 32485)", + "note": "Filter result should include patients/samples with special age value of '>89' and special date value of '>32485'", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"start\":85}]},{\"attributeId\":\"INT_CONTACT\",\"values\":[{\"start\":32485}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Age at Which Sequencing was Reported:> 85Interval in days from DOB to date of last contact:> 32485", + "tests": [ + { + "hash": 108607037, + "filterString": "Age at Which Sequencing was Reported:> 85Interval in days from DOB to date of last contact:> 32485", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "start": 85 + } + ] + }, + { + "attributeId": "INT_CONTACT", + "values": [ + { + "start": 32485 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/molecular-profile-sample-counts/fetch?", + "label": "MolecularProfileSample", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"start\":85}]},{\"attributeId\":\"INT_CONTACT\",\"values\":[{\"start\":32485}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 119943124, + "filterString": "Age at Which Sequencing was Reported:> 85Interval in days from DOB to date of last contact:> 32485", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "start": 85 + } + ] + }, + { + "attributeId": "INT_CONTACT", + "values": [ + { + "start": 32485 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/mutated-genes/fetch?", + "label": "MutatedGenes", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"start\":85}]},{\"attributeId\":\"INT_CONTACT\",\"values\":[{\"start\":32485}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 1054938683, + "filterString": "Age at Which Sequencing was Reported:> 85Interval in days from DOB to date of last contact:> 32485", + "data": { + "attributes": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "disableLogScale": false, + "showNA": false + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "start": 85 + } + ] + }, + { + "attributeId": "INT_CONTACT", + "values": [ + { + "start": 32485 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&", + "label": "ClinicalDataBin", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"start\":85}]},{\"attributeId\":\"INT_CONTACT\",\"values\":[{\"start\":32485}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 1187512938, + "filterString": "Age at Which Sequencing was Reported:> 85Interval in days from DOB to date of last contact:> 32485", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "start": 85 + } + ] + }, + { + "attributeId": "INT_CONTACT", + "values": [ + { + "start": 32485 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/structuralvariant-genes/fetch?", + "label": "StructuralVariantGenes", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"start\":85}]},{\"attributeId\":\"INT_CONTACT\",\"values\":[{\"start\":32485}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 1344961217, + "filterString": "Age at Which Sequencing was Reported:> 85Interval in days from DOB to date of last contact:> 32485", + "data": { + "attributes": [ + { + "attributeId": "MUTATION_COUNT", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "FRACTION_GENOME_ALTERED", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "INT_DOD", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "YEAR_DEATH", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "YEAR_CONTACT", + "disableLogScale": false, + "showNA": false + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "start": 85 + } + ] + }, + { + "attributeId": "INT_CONTACT", + "values": [ + { + "start": 32485 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&", + "label": "ClinicalDataBin", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"start\":85}]},{\"attributeId\":\"INT_CONTACT\",\"values\":[{\"start\":32485}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 1644005436, + "filterString": "Age at Which Sequencing was Reported:> 85Interval in days from DOB to date of last contact:> 32485", + "data": { + "attributes": [ + { + "attributeId": "MUTATION_COUNT", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "FRACTION_GENOME_ALTERED", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "INT_DOD", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "YEAR_DEATH", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "YEAR_CONTACT", + "disableLogScale": false, + "showNA": false + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "start": 85 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&", + "label": "ClinicalDataBin", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"start\":85}]},{\"attributeId\":\"INT_CONTACT\",\"values\":[{\"start\":32485}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 1749565419, + "filterString": "Age at Which Sequencing was Reported:> 85Interval in days from DOB to date of last contact:> 32485", + "data": { + "attributes": [ + { + "attributeId": "INT_CONTACT", + "disableLogScale": false, + "showNA": false + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "start": 85 + } + ] + }, + { + "attributeId": "INT_CONTACT", + "values": [ + { + "start": 32485 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&", + "label": "ClinicalDataBin", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"start\":85}]},{\"attributeId\":\"INT_CONTACT\",\"values\":[{\"start\":32485}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 2086100212, + "filterString": "Age at Which Sequencing was Reported:> 85Interval in days from DOB to date of last contact:> 32485", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "start": 85 + } + ] + }, + { + "attributeId": "INT_CONTACT", + "values": [ + { + "start": 32485 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&", + "label": "ClinicalDataDensity", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"start\":85}]},{\"attributeId\":\"INT_CONTACT\",\"values\":[{\"start\":32485}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -733925422, + "filterString": "Age at Which Sequencing was Reported:> 85Interval in days from DOB to date of last contact:> 32485", + "data": { + "attributes": [ + { + "attributeId": "INT_CONTACT", + "disableLogScale": false, + "showNA": false + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "start": 85 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&", + "label": "ClinicalDataBin", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"start\":85}]},{\"attributeId\":\"INT_CONTACT\",\"values\":[{\"start\":32485}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -1597753624, + "filterString": "Age at Which Sequencing was Reported:> 85Interval in days from DOB to date of last contact:> 32485", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "start": 85 + } + ] + }, + { + "attributeId": "INT_CONTACT", + "values": [ + { + "start": 32485 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/filtered-samples/fetch?", + "label": "FilteredSamples", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"start\":85}]},{\"attributeId\":\"INT_CONTACT\",\"values\":[{\"start\":32485}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -1582241175, + "filterString": "Age at Which Sequencing was Reported:> 85Interval in days from DOB to date of last contact:> 32485", + "data": { + "attributes": [ + { + "attributeId": "CENTER" + }, + { + "attributeId": "SEQ_ASSAY_ID" + }, + { + "attributeId": "SAMPLE_TYPE_DETAILED" + }, + { + "attributeId": "SAMPLE_COUNT" + }, + { + "attributeId": "SAMPLE_TYPE" + }, + { + "attributeId": "SEX" + }, + { + "attributeId": "CANCER_TYPE_DETAILED" + }, + { + "attributeId": "PRIMARY_RACE" + }, + { + "attributeId": "ETHNICITY" + }, + { + "attributeId": "ONCOTREE_CODE" + }, + { + "attributeId": "CANCER_TYPE" + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "start": 85 + } + ] + }, + { + "attributeId": "INT_CONTACT", + "values": [ + { + "start": 32485 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-counts/fetch?", + "label": "ClinicalDataCounts", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"start\":85}]},{\"attributeId\":\"INT_CONTACT\",\"values\":[{\"start\":32485}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -991091876, + "filterString": "Age at Which Sequencing was Reported:> 85Interval in days from DOB to date of last contact:> 32485", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "start": 85 + } + ] + }, + { + "attributeId": "INT_CONTACT", + "values": [ + { + "start": 32485 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/cna-genes/fetch?", + "label": "CNAGenes", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"start\":85}]},{\"attributeId\":\"INT_CONTACT\",\"values\":[{\"start\":32485}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -1305635740, + "filterString": "Age at Which Sequencing was Reported:> 85Interval in days from DOB to date of last contact:> 32485", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE_AT_SEQ_REPORT", + "values": [ + { + "start": 85 + } + ] + }, + { + "attributeId": "INT_CONTACT", + "values": [ + { + "start": 32485 + } + ] + } + ], + "studyIds": [ + "genie_public" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/sample-lists-counts/fetch?", + "label": "CaseList", + "studies": [ + "genie_public" + ], + "filterUrl": "/study/summary?id=genie_public#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE_AT_SEQ_REPORT\",\"values\":[{\"start\":85}]},{\"attributeId\":\"INT_CONTACT\",\"values\":[{\"start\":32485}]}],\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + } + ] + }, + { + "name": "(Diagnosis Age: 45 < x ≤ 70) AND (Mutation Count: 20 < x ≤ 80) AND (Ethnicity Category: Hispanic Or Latino)", + "note": "Multiple studies with both numerical and categorical clinical data filters", + "studies": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "filterUrl": "/study/summary?id=brca_akt1_genie_2019%2Cbrca_tcga_pan_can_atlas_2018%2Cskcm_tcga_pan_can_atlas_2018#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70}]},{\"attributeId\":\"MUTATION_COUNT\",\"values\":[{\"start\":20,\"end\":40},{\"start\":40,\"end\":60},{\"start\":60,\"end\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"Hispanic Or Latino\"}]}],\"studyIds\":[\"brca_akt1_genie_2019\",\"brca_tcga_pan_can_atlas_2018\",\"skcm_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Diagnosis Age: < x ≤ 4570Mutation Count: < x ≤ 2080Ethnicity Category:Hispanic Or Latino", + "tests": [ + { + "hash": 136627119, + "filterString": "Diagnosis Age: < x ≤ 4570Mutation Count: < x ≤ 2080Ethnicity Category:Hispanic Or Latino", + "data": { + "attributes": [ + { + "attributeId": "AGE", + "disableLogScale": false, + "showNA": false + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE", + "values": [ + { + "start": 45, + "end": 50 + }, + { + "start": 50, + "end": 55 + }, + { + "start": 55, + "end": 60 + }, + { + "start": 60, + "end": 65 + }, + { + "start": 65, + "end": 70 + } + ] + }, + { + "attributeId": "MUTATION_COUNT", + "values": [ + { + "start": 20, + "end": 40 + }, + { + "start": 40, + "end": 60 + }, + { + "start": 60, + "end": 80 + } + ] + }, + { + "attributeId": "ETHNICITY", + "values": [ + { + "value": "Hispanic Or Latino" + } + ] + } + ], + "studyIds": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&", + "label": "ClinicalDataBin", + "studies": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "filterUrl": "/study/summary?id=brca_akt1_genie_2019%2Cbrca_tcga_pan_can_atlas_2018%2Cskcm_tcga_pan_can_atlas_2018#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70}]},{\"attributeId\":\"MUTATION_COUNT\",\"values\":[{\"start\":20,\"end\":40},{\"start\":40,\"end\":60},{\"start\":60,\"end\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"Hispanic Or Latino\"}]}],\"studyIds\":[\"brca_akt1_genie_2019\",\"brca_tcga_pan_can_atlas_2018\",\"skcm_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 800772645, + "filterString": "Diagnosis Age: < x ≤ 4570Mutation Count: < x ≤ 2080Ethnicity Category:Hispanic Or Latino", + "data": { + "attributes": [ + { + "attributeId": "OS_STATUS" + }, + { + "attributeId": "DFS_STATUS" + }, + { + "attributeId": "DSS_STATUS" + }, + { + "attributeId": "PFS_STATUS" + }, + { + "attributeId": "SUBTYPE" + }, + { + "attributeId": "TUMOR_TYPE" + }, + { + "attributeId": "SAMPLE_COUNT" + }, + { + "attributeId": "SEX" + }, + { + "attributeId": "AKT_MUTATION_STATUS" + }, + { + "attributeId": "SAMPLE_TYPE" + }, + { + "attributeId": "RACE" + }, + { + "attributeId": "CANCER_TYPE_DETAILED" + }, + { + "attributeId": "AKT_INHIBITOR_YN" + }, + { + "attributeId": "AJCC_STAGE" + }, + { + "attributeId": "ADDITIONAL_SEQUENCING" + }, + { + "attributeId": "CANCER_TYPE" + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE", + "values": [ + { + "start": 45, + "end": 50 + }, + { + "start": 50, + "end": 55 + }, + { + "start": 55, + "end": 60 + }, + { + "start": 60, + "end": 65 + }, + { + "start": 65, + "end": 70 + } + ] + }, + { + "attributeId": "MUTATION_COUNT", + "values": [ + { + "start": 20, + "end": 40 + }, + { + "start": 40, + "end": 60 + }, + { + "start": 60, + "end": 80 + } + ] + }, + { + "attributeId": "ETHNICITY", + "values": [ + { + "value": "Hispanic Or Latino" + } + ] + } + ], + "studyIds": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-counts/fetch?", + "label": "ClinicalDataCounts", + "studies": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "filterUrl": "/study/summary?id=brca_akt1_genie_2019%2Cbrca_tcga_pan_can_atlas_2018%2Cskcm_tcga_pan_can_atlas_2018#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70}]},{\"attributeId\":\"MUTATION_COUNT\",\"values\":[{\"start\":20,\"end\":40},{\"start\":40,\"end\":60},{\"start\":60,\"end\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"Hispanic Or Latino\"}]}],\"studyIds\":[\"brca_akt1_genie_2019\",\"brca_tcga_pan_can_atlas_2018\",\"skcm_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 1202870663, + "filterString": "Diagnosis Age: < x ≤ 4570Mutation Count: < x ≤ 2080Ethnicity Category:Hispanic Or Latino", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE", + "values": [ + { + "start": 45, + "end": 50 + }, + { + "start": 50, + "end": 55 + }, + { + "start": 55, + "end": 60 + }, + { + "start": 60, + "end": 65 + }, + { + "start": 65, + "end": 70 + } + ] + }, + { + "attributeId": "MUTATION_COUNT", + "values": [ + { + "start": 20, + "end": 40 + }, + { + "start": 40, + "end": 60 + }, + { + "start": 60, + "end": 80 + } + ] + }, + { + "attributeId": "ETHNICITY", + "values": [ + { + "value": "Hispanic Or Latino" + } + ] + } + ], + "studyIds": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/cna-genes/fetch?", + "label": "CNAGenes", + "studies": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "filterUrl": "/study/summary?id=brca_akt1_genie_2019%2Cbrca_tcga_pan_can_atlas_2018%2Cskcm_tcga_pan_can_atlas_2018#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70}]},{\"attributeId\":\"MUTATION_COUNT\",\"values\":[{\"start\":20,\"end\":40},{\"start\":40,\"end\":60},{\"start\":60,\"end\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"Hispanic Or Latino\"}]}],\"studyIds\":[\"brca_akt1_genie_2019\",\"brca_tcga_pan_can_atlas_2018\",\"skcm_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 1487456861, + "filterString": "Diagnosis Age: < x ≤ 4570Mutation Count: < x ≤ 2080Ethnicity Category:Hispanic Or Latino", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE", + "values": [ + { + "start": 45, + "end": 50 + }, + { + "start": 50, + "end": 55 + }, + { + "start": 55, + "end": 60 + }, + { + "start": 60, + "end": 65 + }, + { + "start": 65, + "end": 70 + } + ] + }, + { + "attributeId": "MUTATION_COUNT", + "values": [ + { + "start": 20, + "end": 40 + }, + { + "start": 40, + "end": 60 + }, + { + "start": 60, + "end": 80 + } + ] + }, + { + "attributeId": "ETHNICITY", + "values": [ + { + "value": "Hispanic Or Latino" + } + ] + } + ], + "studyIds": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/filtered-samples/fetch?", + "label": "FilteredSamples", + "studies": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "filterUrl": "/study/summary?id=brca_akt1_genie_2019%2Cbrca_tcga_pan_can_atlas_2018%2Cskcm_tcga_pan_can_atlas_2018#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70}]},{\"attributeId\":\"MUTATION_COUNT\",\"values\":[{\"start\":20,\"end\":40},{\"start\":40,\"end\":60},{\"start\":60,\"end\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"Hispanic Or Latino\"}]}],\"studyIds\":[\"brca_akt1_genie_2019\",\"brca_tcga_pan_can_atlas_2018\",\"skcm_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 1663069993, + "filterString": "Diagnosis Age: < x ≤ 4570Mutation Count: < x ≤ 2080Ethnicity Category:Hispanic Or Latino", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE", + "values": [ + { + "start": 45, + "end": 50 + }, + { + "start": 50, + "end": 55 + }, + { + "start": 55, + "end": 60 + }, + { + "start": 60, + "end": 65 + }, + { + "start": 65, + "end": 70 + } + ] + }, + { + "attributeId": "MUTATION_COUNT", + "values": [ + { + "start": 20, + "end": 40 + }, + { + "start": 40, + "end": 60 + }, + { + "start": 60, + "end": 80 + } + ] + }, + { + "attributeId": "ETHNICITY", + "values": [ + { + "value": "Hispanic Or Latino" + } + ] + } + ], + "studyIds": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&", + "label": "ClinicalDataDensity", + "studies": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "filterUrl": "/study/summary?id=brca_akt1_genie_2019%2Cbrca_tcga_pan_can_atlas_2018%2Cskcm_tcga_pan_can_atlas_2018#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70}]},{\"attributeId\":\"MUTATION_COUNT\",\"values\":[{\"start\":20,\"end\":40},{\"start\":40,\"end\":60},{\"start\":60,\"end\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"Hispanic Or Latino\"}]}],\"studyIds\":[\"brca_akt1_genie_2019\",\"brca_tcga_pan_can_atlas_2018\",\"skcm_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": 1829867861, + "filterString": "Diagnosis Age: < x ≤ 4570Mutation Count: < x ≤ 2080Ethnicity Category:Hispanic Or Latino", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE", + "values": [ + { + "start": 45, + "end": 50 + }, + { + "start": 50, + "end": 55 + }, + { + "start": 55, + "end": 60 + }, + { + "start": 60, + "end": 65 + }, + { + "start": 65, + "end": 70 + } + ] + }, + { + "attributeId": "MUTATION_COUNT", + "values": [ + { + "start": 20, + "end": 40 + }, + { + "start": 40, + "end": 60 + }, + { + "start": 60, + "end": 80 + } + ] + }, + { + "attributeId": "ETHNICITY", + "values": [ + { + "value": "Hispanic Or Latino" + } + ] + } + ], + "studyIds": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/structuralvariant-genes/fetch?", + "label": "StructuralVariantGenes", + "studies": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "filterUrl": "/study/summary?id=brca_akt1_genie_2019%2Cbrca_tcga_pan_can_atlas_2018%2Cskcm_tcga_pan_can_atlas_2018#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70}]},{\"attributeId\":\"MUTATION_COUNT\",\"values\":[{\"start\":20,\"end\":40},{\"start\":40,\"end\":60},{\"start\":60,\"end\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"Hispanic Or Latino\"}]}],\"studyIds\":[\"brca_akt1_genie_2019\",\"brca_tcga_pan_can_atlas_2018\",\"skcm_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -1042210500, + "filterString": "Diagnosis Age: < x ≤ 4570Mutation Count: < x ≤ 2080Ethnicity Category:Hispanic Or Latino", + "data": { + "attributes": [ + { + "attributeId": "ETHNICITY" + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE", + "values": [ + { + "start": 45, + "end": 50 + }, + { + "start": 50, + "end": 55 + }, + { + "start": 55, + "end": 60 + }, + { + "start": 60, + "end": 65 + }, + { + "start": 65, + "end": 70 + } + ] + }, + { + "attributeId": "MUTATION_COUNT", + "values": [ + { + "start": 20, + "end": 40 + }, + { + "start": 40, + "end": 60 + }, + { + "start": 60, + "end": 80 + } + ] + } + ], + "studyIds": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-counts/fetch?", + "label": "ClinicalDataCounts", + "studies": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "filterUrl": "/study/summary?id=brca_akt1_genie_2019%2Cbrca_tcga_pan_can_atlas_2018%2Cskcm_tcga_pan_can_atlas_2018#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70}]},{\"attributeId\":\"MUTATION_COUNT\",\"values\":[{\"start\":20,\"end\":40},{\"start\":40,\"end\":60},{\"start\":60,\"end\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"Hispanic Or Latino\"}]}],\"studyIds\":[\"brca_akt1_genie_2019\",\"brca_tcga_pan_can_atlas_2018\",\"skcm_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -1680440837, + "filterString": "Diagnosis Age: < x ≤ 4570Mutation Count: < x ≤ 2080Ethnicity Category:Hispanic Or Latino", + "data": { + "attributes": [ + { + "attributeId": "OS_STATUS" + }, + { + "attributeId": "DFS_STATUS" + }, + { + "attributeId": "DSS_STATUS" + }, + { + "attributeId": "PFS_STATUS" + }, + { + "attributeId": "SUBTYPE" + }, + { + "attributeId": "TUMOR_TYPE" + }, + { + "attributeId": "SAMPLE_COUNT" + }, + { + "attributeId": "SEX" + }, + { + "attributeId": "AKT_MUTATION_STATUS" + }, + { + "attributeId": "SAMPLE_TYPE" + }, + { + "attributeId": "RACE" + }, + { + "attributeId": "CANCER_TYPE_DETAILED" + }, + { + "attributeId": "AKT_INHIBITOR_YN" + }, + { + "attributeId": "AJCC_STAGE" + }, + { + "attributeId": "ADDITIONAL_SEQUENCING" + }, + { + "attributeId": "CANCER_TYPE" + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE", + "values": [ + { + "start": 45, + "end": 50 + }, + { + "start": 50, + "end": 55 + }, + { + "start": 55, + "end": 60 + }, + { + "start": 60, + "end": 65 + }, + { + "start": 65, + "end": 70 + } + ] + }, + { + "attributeId": "MUTATION_COUNT", + "values": [ + { + "start": 20, + "end": 40 + }, + { + "start": 40, + "end": 60 + }, + { + "start": 60, + "end": 80 + } + ] + } + ], + "studyIds": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-counts/fetch?", + "label": "ClinicalDataCounts", + "studies": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "filterUrl": "/study/summary?id=brca_akt1_genie_2019%2Cbrca_tcga_pan_can_atlas_2018%2Cskcm_tcga_pan_can_atlas_2018#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70}]},{\"attributeId\":\"MUTATION_COUNT\",\"values\":[{\"start\":20,\"end\":40},{\"start\":40,\"end\":60},{\"start\":60,\"end\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"Hispanic Or Latino\"}]}],\"studyIds\":[\"brca_akt1_genie_2019\",\"brca_tcga_pan_can_atlas_2018\",\"skcm_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -467228120, + "filterString": "Diagnosis Age: < x ≤ 4570Mutation Count: < x ≤ 2080Ethnicity Category:Hispanic Or Latino", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE", + "values": [ + { + "start": 45, + "end": 50 + }, + { + "start": 50, + "end": 55 + }, + { + "start": 55, + "end": 60 + }, + { + "start": 60, + "end": 65 + }, + { + "start": 65, + "end": 70 + } + ] + }, + { + "attributeId": "MUTATION_COUNT", + "values": [ + { + "start": 20, + "end": 40 + }, + { + "start": 40, + "end": 60 + }, + { + "start": 60, + "end": 80 + } + ] + }, + { + "attributeId": "ETHNICITY", + "values": [ + { + "value": "Hispanic Or Latino" + } + ] + } + ], + "studyIds": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/molecular-profile-sample-counts/fetch?", + "label": "MolecularProfileSample", + "studies": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "filterUrl": "/study/summary?id=brca_akt1_genie_2019%2Cbrca_tcga_pan_can_atlas_2018%2Cskcm_tcga_pan_can_atlas_2018#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70}]},{\"attributeId\":\"MUTATION_COUNT\",\"values\":[{\"start\":20,\"end\":40},{\"start\":40,\"end\":60},{\"start\":60,\"end\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"Hispanic Or Latino\"}]}],\"studyIds\":[\"brca_akt1_genie_2019\",\"brca_tcga_pan_can_atlas_2018\",\"skcm_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -668421227, + "filterString": "Diagnosis Age: < x ≤ 4570Mutation Count: < x ≤ 2080Ethnicity Category:Hispanic Or Latino", + "data": { + "attributes": [ + { + "attributeId": "MUTATION_COUNT", + "disableLogScale": false, + "showNA": false + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE", + "values": [ + { + "start": 45, + "end": 50 + }, + { + "start": 50, + "end": 55 + }, + { + "start": 55, + "end": 60 + }, + { + "start": 60, + "end": 65 + }, + { + "start": 65, + "end": 70 + } + ] + }, + { + "attributeId": "MUTATION_COUNT", + "values": [ + { + "start": 20, + "end": 40 + }, + { + "start": 40, + "end": 60 + }, + { + "start": 60, + "end": 80 + } + ] + }, + { + "attributeId": "ETHNICITY", + "values": [ + { + "value": "Hispanic Or Latino" + } + ] + } + ], + "studyIds": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&", + "label": "ClinicalDataBin", + "studies": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "filterUrl": "/study/summary?id=brca_akt1_genie_2019%2Cbrca_tcga_pan_can_atlas_2018%2Cskcm_tcga_pan_can_atlas_2018#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70}]},{\"attributeId\":\"MUTATION_COUNT\",\"values\":[{\"start\":20,\"end\":40},{\"start\":40,\"end\":60},{\"start\":60,\"end\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"Hispanic Or Latino\"}]}],\"studyIds\":[\"brca_akt1_genie_2019\",\"brca_tcga_pan_can_atlas_2018\",\"skcm_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -308561323, + "filterString": "Diagnosis Age: < x ≤ 4570Mutation Count: < x ≤ 2080Ethnicity Category:Hispanic Or Latino", + "skip": "Should be fixed by NA backend fix", + "data": { + "attributes": [ + { + "attributeId": "FRACTION_GENOME_ALTERED", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "MSI_SCORE_MANTIS", + "disableLogScale": false, + "showNA": false, + "customBins": [ + 0.4, + 0.6 + ] + }, + { + "attributeId": "MSI_SENSOR_SCORE", + "disableLogScale": false, + "showNA": false, + "customBins": [ + 4, + 10 + ] + }, + { + "attributeId": "AGE_AT_MET_DIAGNOSIS", + "disableLogScale": false, + "showNA": false + }, + { + "attributeId": "PRIMARY_DX_DATE_INT", + "disableLogScale": false, + "showNA": false + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE", + "values": [ + { + "start": 45, + "end": 50 + }, + { + "start": 50, + "end": 55 + }, + { + "start": 55, + "end": 60 + }, + { + "start": 60, + "end": 65 + }, + { + "start": 65, + "end": 70 + } + ] + }, + { + "attributeId": "MUTATION_COUNT", + "values": [ + { + "start": 20, + "end": 40 + }, + { + "start": 40, + "end": 60 + }, + { + "start": 60, + "end": 80 + } + ] + }, + { + "attributeId": "ETHNICITY", + "values": [ + { + "value": "Hispanic Or Latino" + } + ] + } + ], + "studyIds": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&", + "label": "ClinicalDataBin", + "studies": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "filterUrl": "/study/summary?id=brca_akt1_genie_2019%2Cbrca_tcga_pan_can_atlas_2018%2Cskcm_tcga_pan_can_atlas_2018#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70}]},{\"attributeId\":\"MUTATION_COUNT\",\"values\":[{\"start\":20,\"end\":40},{\"start\":40,\"end\":60},{\"start\":60,\"end\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"Hispanic Or Latino\"}]}],\"studyIds\":[\"brca_akt1_genie_2019\",\"brca_tcga_pan_can_atlas_2018\",\"skcm_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -1698801537, + "filterString": "Diagnosis Age: < x ≤ 4570Mutation Count: < x ≤ 2080Ethnicity Category:Hispanic Or Latino", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE", + "values": [ + { + "start": 45, + "end": 50 + }, + { + "start": 50, + "end": 55 + }, + { + "start": 55, + "end": 60 + }, + { + "start": 60, + "end": 65 + }, + { + "start": 65, + "end": 70 + } + ] + }, + { + "attributeId": "MUTATION_COUNT", + "values": [ + { + "start": 20, + "end": 40 + }, + { + "start": 40, + "end": 60 + }, + { + "start": 60, + "end": 80 + } + ] + }, + { + "attributeId": "ETHNICITY", + "values": [ + { + "value": "Hispanic Or Latino" + } + ] + } + ], + "studyIds": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/mutated-genes/fetch?", + "label": "MutatedGenes", + "studies": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "filterUrl": "/study/summary?id=brca_akt1_genie_2019%2Cbrca_tcga_pan_can_atlas_2018%2Cskcm_tcga_pan_can_atlas_2018#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70}]},{\"attributeId\":\"MUTATION_COUNT\",\"values\":[{\"start\":20,\"end\":40},{\"start\":40,\"end\":60},{\"start\":60,\"end\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"Hispanic Or Latino\"}]}],\"studyIds\":[\"brca_akt1_genie_2019\",\"brca_tcga_pan_can_atlas_2018\",\"skcm_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -2100211505, + "filterString": "Diagnosis Age: < x ≤ 4570Mutation Count: < x ≤ 2080Ethnicity Category:Hispanic Or Latino", + "data": { + "clinicalDataFilters": [ + { + "attributeId": "AGE", + "values": [ + { + "start": 45, + "end": 50 + }, + { + "start": 50, + "end": 55 + }, + { + "start": 55, + "end": 60 + }, + { + "start": 60, + "end": 65 + }, + { + "start": 65, + "end": 70 + } + ] + }, + { + "attributeId": "MUTATION_COUNT", + "values": [ + { + "start": 20, + "end": 40 + }, + { + "start": 40, + "end": 60 + }, + { + "start": 60, + "end": 80 + } + ] + }, + { + "attributeId": "ETHNICITY", + "values": [ + { + "value": "Hispanic Or Latino" + } + ] + } + ], + "studyIds": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + }, + "url": "/api/column-store/sample-lists-counts/fetch?", + "label": "CaseList", + "studies": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "filterUrl": "/study/summary?id=brca_akt1_genie_2019%2Cbrca_tcga_pan_can_atlas_2018%2Cskcm_tcga_pan_can_atlas_2018#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70}]},{\"attributeId\":\"MUTATION_COUNT\",\"values\":[{\"start\":20,\"end\":40},{\"start\":40,\"end\":60},{\"start\":60,\"end\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"Hispanic Or Latino\"}]}],\"studyIds\":[\"brca_akt1_genie_2019\",\"brca_tcga_pan_can_atlas_2018\",\"skcm_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + }, + { + "hash": -1464683354, + "filterString": "Diagnosis Age: < x ≤ 4570Mutation Count: < x ≤ 2080Ethnicity Category:Hispanic Or Latino", + "data": { + "attributes": [ + { + "attributeId": "ETHNICITY" + } + ], + "studyViewFilter": { + "clinicalDataFilters": [ + { + "attributeId": "AGE", + "values": [ + { + "start": 45, + "end": 50 + }, + { + "start": 50, + "end": 55 + }, + { + "start": 55, + "end": 60 + }, + { + "start": 60, + "end": 65 + }, + { + "start": 65, + "end": 70 + } + ] + }, + { + "attributeId": "MUTATION_COUNT", + "values": [ + { + "start": 20, + "end": 40 + }, + { + "start": 40, + "end": 60 + }, + { + "start": 60, + "end": 80 + } + ] + }, + { + "attributeId": "ETHNICITY", + "values": [ + { + "value": "Hispanic Or Latino" + } + ] + } + ], + "studyIds": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "alterationFilter": { + "copyNumberAlterationEventTypes": { + "AMP": true, + "HOMDEL": true + }, + "mutationEventTypes": { + "any": true + }, + "structuralVariants": null, + "includeDriver": true, + "includeVUS": true, + "includeUnknownOncogenicity": true, + "includeUnknownTier": true, + "includeGermline": true, + "includeSomatic": true, + "includeUnknownStatus": true, + "tiersBooleanMap": {} + } + } + }, + "url": "/api/column-store/clinical-data-counts/fetch?", + "label": "ClinicalDataCounts", + "studies": [ + "brca_akt1_genie_2019", + "brca_tcga_pan_can_atlas_2018", + "skcm_tcga_pan_can_atlas_2018" + ], + "filterUrl": "/study/summary?id=brca_akt1_genie_2019%2Cbrca_tcga_pan_can_atlas_2018%2Cskcm_tcga_pan_can_atlas_2018#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70}]},{\"attributeId\":\"MUTATION_COUNT\",\"values\":[{\"start\":20,\"end\":40},{\"start\":40,\"end\":60},{\"start\":60,\"end\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"Hispanic Or Latino\"}]}],\"studyIds\":[\"brca_akt1_genie_2019\",\"brca_tcga_pan_can_atlas_2018\",\"skcm_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}" + } + ] + } +] \ No newline at end of file diff --git a/test/api-e2e/specs/custom-data-bin-counts-filter.json b/test/api-e2e/specs/custom-data-bin-counts-filter.json new file mode 100644 index 00000000000..3388c2abc62 --- /dev/null +++ b/test/api-e2e/specs/custom-data-bin-counts-filter.json @@ -0,0 +1,204 @@ +[ + + + + { + "name":"filter on one value from one numerical custom data filter for two studies", + "note":"testing one numerical custom data filter of one value on two tcga studies", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdb47955a443698dbcfeb\",\"values\":[{\"start\":1,\"end\":1}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Custom Data 1:1", + "studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":418622245,"filterString":"Custom Data 1:1","data":{"customDataFilters":[{"attributeId":"66ccdb47955a443698dbcfeb","values":[{"start":1,"end":1}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdb47955a443698dbcfeb\",\"values\":[{\"start\":1,\"end\":1}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":678693631,"filterString":"Custom Data 1:1","data":{"customDataFilters":[{"attributeId":"66ccdb47955a443698dbcfeb","values":[{"start":1,"end":1}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdb47955a443698dbcfeb\",\"values\":[{\"start\":1,\"end\":1}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1520219763,"filterString":"Custom Data 1:1","data":{"customDataFilters":[{"attributeId":"66ccdb47955a443698dbcfeb","values":[{"start":1,"end":1}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdb47955a443698dbcfeb\",\"values\":[{\"start\":1,\"end\":1}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1522651462,"filterString":"Custom Data 1:1","data":{"customDataFilters":[{"attributeId":"66ccdb47955a443698dbcfeb","values":[{"start":1,"end":1}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdb47955a443698dbcfeb\",\"values\":[{\"start\":1,\"end\":1}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1637985053,"filterString":"Custom Data 1:1","data":{"customDataFilters":[{"attributeId":"66ccdb47955a443698dbcfeb","values":[{"start":1,"end":1}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdb47955a443698dbcfeb\",\"values\":[{\"start\":1,\"end\":1}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1541821463,"filterString":"Custom Data 1:1","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66ccdb47955a443698dbcfeb","values":[{"start":1,"end":1}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdb47955a443698dbcfeb\",\"values\":[{\"start\":1,\"end\":1}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-821508532,"filterString":"Custom Data 1:1","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"SUBTYPE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"},{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66ccdb47955a443698dbcfeb","values":[{"start":1,"end":1}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdb47955a443698dbcfeb\",\"values\":[{\"start\":1,\"end\":1}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-102244533,"filterString":"Custom Data 1:1","data":{"customDataFilters":[{"attributeId":"66ccdb47955a443698dbcfeb","values":[{"start":1,"end":1}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdb47955a443698dbcfeb\",\"values\":[{\"start\":1,\"end\":1}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1199065875,"filterString":"Custom Data 1:1","data":{"customDataFilters":[{"attributeId":"66ccdb47955a443698dbcfeb","values":[{"start":1,"end":1}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdb47955a443698dbcfeb\",\"values\":[{\"start\":1,\"end\":1}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + + + + { + "name":"filter on one range from one numerical custom data filter for two studies", + "note":"testing one numerical custom data filter of a range of values on two tcga studies", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Custom Data 1: ≤ x ≤ 12", + "studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":501384332,"filterString":"Custom Data 1: ≤ x ≤ 12","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":1,"end":1},{"start":2,"end":2}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":557019544,"filterString":"Custom Data 1: ≤ x ≤ 12","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":1,"end":1},{"start":2,"end":2}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1254714393,"filterString":"Custom Data 1: ≤ x ≤ 12","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":1,"end":1},{"start":2,"end":2}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-757451850,"filterString":"Custom Data 1: ≤ x ≤ 12","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":1,"end":1},{"start":2,"end":2}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-2103178783,"filterString":"Custom Data 1: ≤ x ≤ 12","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"},{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":1,"end":1},{"start":2,"end":2}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1297492922,"filterString":"Custom Data 1: ≤ x ≤ 12","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":1,"end":1},{"start":2,"end":2}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1854970704,"filterString":"Custom Data 1: ≤ x ≤ 12","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":1,"end":1},{"start":2,"end":2}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-706009544,"filterString":"Custom Data 1: ≤ x ≤ 12","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":1,"end":1},{"start":2,"end":2}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-610618304,"filterString":"Custom Data 1: ≤ x ≤ 12","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":1,"end":1},{"start":2,"end":2}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + + + + { + "name":"filter on two ranges from two numerical custom data filters for two studies", + "note":"testing two numerical custom data filters of two ranges of values on two tcga studies", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Custom Data 1: ≤ x ≤ 12Custom Data 2: ≤ x ≤ 34", + "studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":30346742,"filterString":"Custom Data 1: ≤ x ≤ 12Custom Data 2: ≤ x ≤ 34","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":1,"end":1},{"start":2,"end":2}]},{"attributeId":"66cce0eb955a443698dbcfee","values":[{"start":3,"end":3},{"start":4,"end":4}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":563253048,"filterString":"Custom Data 1: ≤ x ≤ 12Custom Data 2: ≤ x ≤ 34","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":1,"end":1},{"start":2,"end":2}]},{"attributeId":"66cce0eb955a443698dbcfee","values":[{"start":3,"end":3},{"start":4,"end":4}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":686960538,"filterString":"Custom Data 1: ≤ x ≤ 12Custom Data 2: ≤ x ≤ 34","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":1,"end":1},{"start":2,"end":2}]},{"attributeId":"66cce0eb955a443698dbcfee","values":[{"start":3,"end":3},{"start":4,"end":4}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":698458271,"filterString":"Custom Data 1: ≤ x ≤ 12Custom Data 2: ≤ x ≤ 34","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"},{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":1,"end":1},{"start":2,"end":2}]},{"attributeId":"66cce0eb955a443698dbcfee","values":[{"start":3,"end":3},{"start":4,"end":4}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1522791666,"filterString":"Custom Data 1: ≤ x ≤ 12Custom Data 2: ≤ x ≤ 34","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":1,"end":1},{"start":2,"end":2}]},{"attributeId":"66cce0eb955a443698dbcfee","values":[{"start":3,"end":3},{"start":4,"end":4}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-326774441,"filterString":"Custom Data 1: ≤ x ≤ 12Custom Data 2: ≤ x ≤ 34","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":1,"end":1},{"start":2,"end":2}]},{"attributeId":"66cce0eb955a443698dbcfee","values":[{"start":3,"end":3},{"start":4,"end":4}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-2096736380,"filterString":"Custom Data 1: ≤ x ≤ 12Custom Data 2: ≤ x ≤ 34","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":1,"end":1},{"start":2,"end":2}]},{"attributeId":"66cce0eb955a443698dbcfee","values":[{"start":3,"end":3},{"start":4,"end":4}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-713212562,"filterString":"Custom Data 1: ≤ x ≤ 12Custom Data 2: ≤ x ≤ 34","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":1,"end":1},{"start":2,"end":2}]},{"attributeId":"66cce0eb955a443698dbcfee","values":[{"start":3,"end":3},{"start":4,"end":4}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1496938882,"filterString":"Custom Data 1: ≤ x ≤ 12Custom Data 2: ≤ x ≤ 34","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":1,"end":1},{"start":2,"end":2}]},{"attributeId":"66cce0eb955a443698dbcfee","values":[{"start":3,"end":3},{"start":4,"end":4}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + { + "name":"filter on NA value from one numerical custom data filters for two studies", + "note":"testing one numerical custom data filter NA value on two tcga studies", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccec22955a443698dbcfef\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Custom Data 1:NA", + "studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":339834269,"filterString":"Custom Data 1:NA","data":{"customDataFilters":[{"attributeId":"66ccec22955a443698dbcfef","values":[{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccec22955a443698dbcfef\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":754370467,"filterString":"Custom Data 1:NA","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66ccec22955a443698dbcfef","values":[{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccec22955a443698dbcfef\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1305299561,"filterString":"Custom Data 1:NA","data":{"customDataFilters":[{"attributeId":"66ccec22955a443698dbcfef","values":[{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccec22955a443698dbcfef\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1309793679,"filterString":"Custom Data 1:NA","data":{"customDataFilters":[{"attributeId":"66ccec22955a443698dbcfef","values":[{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccec22955a443698dbcfef\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1348752016,"filterString":"Custom Data 1:NA","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"},{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66ccec22955a443698dbcfef","values":[{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccec22955a443698dbcfef\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1472052757,"filterString":"Custom Data 1:NA","data":{"customDataFilters":[{"attributeId":"66ccec22955a443698dbcfef","values":[{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccec22955a443698dbcfef\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1496979176,"filterString":"Custom Data 1:NA","data":{"customDataFilters":[{"attributeId":"66ccec22955a443698dbcfef","values":[{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccec22955a443698dbcfef\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-778603201,"filterString":"Custom Data 1:NA","data":{"customDataFilters":[{"attributeId":"66ccec22955a443698dbcfef","values":[{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccec22955a443698dbcfef\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-619194809,"filterString":"Custom Data 1:NA","data":{"customDataFilters":[{"attributeId":"66ccec22955a443698dbcfef","values":[{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccec22955a443698dbcfef\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + { + "name":"filter on NA and non-NA value from one numerical custom data filter for two studies", + "note":"testing one numerical custom data filter of a NA and non-NA values on two tcga studies", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Custom Data 1:NA3, ", + "studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":174452477,"filterString":"Custom Data 1:NA3, ","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":3,"end":3},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":478055151,"filterString":"Custom Data 1:NA3, ","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":3,"end":3},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":486060333,"filterString":"Custom Data 1:NA3, ","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":3,"end":3},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1540742773,"filterString":"Custom Data 1:NA3, ","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":3,"end":3},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1732866902,"filterString":"Custom Data 1:NA3, ","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":3,"end":3},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-980559746,"filterString":"Custom Data 1:NA3, ","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"},{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":3,"end":3},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1727290565,"filterString":"Custom Data 1:NA3, ","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":3,"end":3},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1079023485,"filterString":"Custom Data 1:NA3, ","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":3,"end":3},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1738524363,"filterString":"Custom Data 1:NA3, ","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":3,"end":3},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + + + + { + "name":"filter on NA and non-NA ranges from two numerical custom data filters for two studies", + "note":"testing two numerical custom data filters of two ranges of NA and non-NA values on two tcga studies", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Custom Data 1:NA3, Custom Data 2: ≤ x ≤ NA34, ", + "studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":765505771,"filterString":"Custom Data 1:NA3, Custom Data 2: ≤ x ≤ NA34, ","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":3,"end":3},{"value":"NA"}]},{"attributeId":"66cce0eb955a443698dbcfee","values":[{"start":3,"end":3},{"start":4,"end":4},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1105630905,"filterString":"Custom Data 1:NA3, Custom Data 2: ≤ x ≤ NA34, ","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":3,"end":3},{"value":"NA"}]},{"attributeId":"66cce0eb955a443698dbcfee","values":[{"start":3,"end":3},{"start":4,"end":4},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1366413063,"filterString":"Custom Data 1:NA3, Custom Data 2: ≤ x ≤ NA34, ","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":3,"end":3},{"value":"NA"}]},{"attributeId":"66cce0eb955a443698dbcfee","values":[{"start":3,"end":3},{"start":4,"end":4},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1905957431,"filterString":"Custom Data 1:NA3, Custom Data 2: ≤ x ≤ NA34, ","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":3,"end":3},{"value":"NA"}]},{"attributeId":"66cce0eb955a443698dbcfee","values":[{"start":3,"end":3},{"start":4,"end":4},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-468408875,"filterString":"Custom Data 1:NA3, Custom Data 2: ≤ x ≤ NA34, ","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":3,"end":3},{"value":"NA"}]},{"attributeId":"66cce0eb955a443698dbcfee","values":[{"start":3,"end":3},{"start":4,"end":4},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-192671518,"filterString":"Custom Data 1:NA3, Custom Data 2: ≤ x ≤ NA34, ","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"},{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":3,"end":3},{"value":"NA"}]},{"attributeId":"66cce0eb955a443698dbcfee","values":[{"start":3,"end":3},{"start":4,"end":4},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-829483558,"filterString":"Custom Data 1:NA3, Custom Data 2: ≤ x ≤ NA34, ","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":3,"end":3},{"value":"NA"}]},{"attributeId":"66cce0eb955a443698dbcfee","values":[{"start":3,"end":3},{"start":4,"end":4},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1186157391,"filterString":"Custom Data 1:NA3, Custom Data 2: ≤ x ≤ NA34, ","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":3,"end":3},{"value":"NA"}]},{"attributeId":"66cce0eb955a443698dbcfee","values":[{"start":3,"end":3},{"start":4,"end":4},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-548915327,"filterString":"Custom Data 1:NA3, Custom Data 2: ≤ x ≤ NA34, ","data":{"customDataFilters":[{"attributeId":"66ccdd8a955a443698dbcfed","values":[{"start":3,"end":3},{"value":"NA"}]},{"attributeId":"66cce0eb955a443698dbcfee","values":[{"start":3,"end":3},{"start":4,"end":4},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccdd8a955a443698dbcfed\",\"values\":[{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66cce0eb955a443698dbcfee\",\"values\":[{\"start\":3,\"end\":3},{\"start\":4,\"end\":4},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + + { + "name":"filter on NA and non-NA ranges from two numerical custom data filters", + "note":"testing two numerical custom data filters of two ranges of NA and non-NA values on one tcga study", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf430955a443698dbcff4\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66ccf437955a443698dbcff5\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Custom Data 1: ≤ x ≤ NA13, Custom Data 2: ≤ x ≤ 14", + "studies":["coadread_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":427644381,"filterString":"Custom Data 1: ≤ x ≤ NA13, Custom Data 2: ≤ x ≤ 14","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"SUBTYPE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66ccf430955a443698dbcff4","values":[{"start":1,"end":1},{"start":2,"end":2},{"start":3,"end":3},{"value":"NA"}]},{"attributeId":"66ccf437955a443698dbcff5","values":[{"start":1,"end":1},{"start":2,"end":2},{"start":3,"end":3},{"start":4,"end":4}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf430955a443698dbcff4\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66ccf437955a443698dbcff5\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":905935608,"filterString":"Custom Data 1: ≤ x ≤ NA13, Custom Data 2: ≤ x ≤ 14","data":{"customDataFilters":[{"attributeId":"66ccf430955a443698dbcff4","values":[{"start":1,"end":1},{"start":2,"end":2},{"start":3,"end":3},{"value":"NA"}]},{"attributeId":"66ccf437955a443698dbcff5","values":[{"start":1,"end":1},{"start":2,"end":2},{"start":3,"end":3},{"start":4,"end":4}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf430955a443698dbcff4\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66ccf437955a443698dbcff5\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1286716938,"filterString":"Custom Data 1: ≤ x ≤ NA13, Custom Data 2: ≤ x ≤ 14","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66ccf430955a443698dbcff4","values":[{"start":1,"end":1},{"start":2,"end":2},{"start":3,"end":3},{"value":"NA"}]},{"attributeId":"66ccf437955a443698dbcff5","values":[{"start":1,"end":1},{"start":2,"end":2},{"start":3,"end":3},{"start":4,"end":4}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf430955a443698dbcff4\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66ccf437955a443698dbcff5\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1649516672,"filterString":"Custom Data 1: ≤ x ≤ NA13, Custom Data 2: ≤ x ≤ 14","data":{"customDataFilters":[{"attributeId":"66ccf430955a443698dbcff4","values":[{"start":1,"end":1},{"start":2,"end":2},{"start":3,"end":3},{"value":"NA"}]},{"attributeId":"66ccf437955a443698dbcff5","values":[{"start":1,"end":1},{"start":2,"end":2},{"start":3,"end":3},{"start":4,"end":4}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf430955a443698dbcff4\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66ccf437955a443698dbcff5\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1739292769,"filterString":"Custom Data 1: ≤ x ≤ NA13, Custom Data 2: ≤ x ≤ 14","data":{"customDataFilters":[{"attributeId":"66ccf430955a443698dbcff4","values":[{"start":1,"end":1},{"start":2,"end":2},{"start":3,"end":3},{"value":"NA"}]},{"attributeId":"66ccf437955a443698dbcff5","values":[{"start":1,"end":1},{"start":2,"end":2},{"start":3,"end":3},{"start":4,"end":4}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf430955a443698dbcff4\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66ccf437955a443698dbcff5\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1793634446,"filterString":"Custom Data 1: ≤ x ≤ NA13, Custom Data 2: ≤ x ≤ 14","data":{"customDataFilters":[{"attributeId":"66ccf430955a443698dbcff4","values":[{"start":1,"end":1},{"start":2,"end":2},{"start":3,"end":3},{"value":"NA"}]},{"attributeId":"66ccf437955a443698dbcff5","values":[{"start":1,"end":1},{"start":2,"end":2},{"start":3,"end":3},{"start":4,"end":4}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf430955a443698dbcff4\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66ccf437955a443698dbcff5\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1810417744,"filterString":"Custom Data 1: ≤ x ≤ NA13, Custom Data 2: ≤ x ≤ 14","data":{"customDataFilters":[{"attributeId":"66ccf430955a443698dbcff4","values":[{"start":1,"end":1},{"start":2,"end":2},{"start":3,"end":3},{"value":"NA"}]},{"attributeId":"66ccf437955a443698dbcff5","values":[{"start":1,"end":1},{"start":2,"end":2},{"start":3,"end":3},{"start":4,"end":4}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf430955a443698dbcff4\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66ccf437955a443698dbcff5\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":2037606724,"filterString":"Custom Data 1: ≤ x ≤ NA13, Custom Data 2: ≤ x ≤ 14","data":{"customDataFilters":[{"attributeId":"66ccf430955a443698dbcff4","values":[{"start":1,"end":1},{"start":2,"end":2},{"start":3,"end":3},{"value":"NA"}]},{"attributeId":"66ccf437955a443698dbcff5","values":[{"start":1,"end":1},{"start":2,"end":2},{"start":3,"end":3},{"start":4,"end":4}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf430955a443698dbcff4\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66ccf437955a443698dbcff5\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":2114122888,"filterString":"Custom Data 1: ≤ x ≤ NA13, Custom Data 2: ≤ x ≤ 14","data":{"customDataFilters":[{"attributeId":"66ccf430955a443698dbcff4","values":[{"start":1,"end":1},{"start":2,"end":2},{"start":3,"end":3},{"value":"NA"}]},{"attributeId":"66ccf437955a443698dbcff5","values":[{"start":1,"end":1},{"start":2,"end":2},{"start":3,"end":3},{"start":4,"end":4}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf430955a443698dbcff4\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"value\":\"NA\"}]},{\"attributeId\":\"66ccf437955a443698dbcff5\",\"values\":[{\"start\":1,\"end\":1},{\"start\":2,\"end\":2},{\"start\":3,\"end\":3},{\"start\":4,\"end\":4}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + } + +] \ No newline at end of file diff --git a/test/api-e2e/specs/custom-data-counts-filter.json b/test/api-e2e/specs/custom-data-counts-filter.json new file mode 100644 index 00000000000..a153244dd32 --- /dev/null +++ b/test/api-e2e/specs/custom-data-counts-filter.json @@ -0,0 +1,204 @@ +[ + + { + "name":"filter on one value from one categorical custom data filter", + "note":"testing one categorical custom data filter of one value on one tcga study", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Custom Data 1:brown", + "studies":["coadread_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":312314842,"filterString":"Custom Data 1:brown","data":{"customDataFilters":[{"attributeId":"66ccf867955a443698dbcff7","values":[{"value":"brown"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf867955a443698dbcff7\",\"values\":[{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":673375402,"filterString":"Custom Data 1:brown","data":{"customDataFilters":[{"attributeId":"66ccf867955a443698dbcff7","values":[{"value":"brown"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf867955a443698dbcff7\",\"values\":[{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1033942632,"filterString":"Custom Data 1:brown","data":{"customDataFilters":[{"attributeId":"66ccf867955a443698dbcff7","values":[{"value":"brown"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf867955a443698dbcff7\",\"values\":[{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1228886100,"filterString":"Custom Data 1:brown","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66ccf867955a443698dbcff7","values":[{"value":"brown"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf867955a443698dbcff7\",\"values\":[{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1281389110,"filterString":"Custom Data 1:brown","data":{"customDataFilters":[{"attributeId":"66ccf867955a443698dbcff7","values":[{"value":"brown"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf867955a443698dbcff7\",\"values\":[{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-560317715,"filterString":"Custom Data 1:brown","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"RACE"},{"attributeId":"SEX"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"ETHNICITY"},{"attributeId":"OS_STATUS"}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66ccf867955a443698dbcff7","values":[{"value":"brown"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf867955a443698dbcff7\",\"values\":[{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1697313733,"filterString":"Custom Data 1:brown","data":{"customDataFilters":[{"attributeId":"66ccf867955a443698dbcff7","values":[{"value":"brown"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf867955a443698dbcff7\",\"values\":[{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1118688942,"filterString":"Custom Data 1:brown","data":{"customDataFilters":[{"attributeId":"66ccf867955a443698dbcff7","values":[{"value":"brown"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf867955a443698dbcff7\",\"values\":[{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-720636062,"filterString":"Custom Data 1:brown","data":{"customDataFilters":[{"attributeId":"66ccf867955a443698dbcff7","values":[{"value":"brown"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf867955a443698dbcff7\",\"values\":[{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + + + { + "name":"filter on two values from one categorical custom data filter", + "note":"testing one categorical custom data filter of two values on one tcga study", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Custom Data 1:brown OR blue", + "studies":["coadread_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":545045433,"filterString":"Custom Data 1:brown OR blue","data":{"customDataFilters":[{"attributeId":"66c8eeb56704ad7736da5640","values":[{"value":"brown"},{"value":"blue"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":622148073,"filterString":"Custom Data 1:brown OR blue","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66c8eeb56704ad7736da5640","values":[{"value":"brown"},{"value":"blue"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":852259554,"filterString":"Custom Data 1:brown OR blue","data":{"customDataFilters":[{"attributeId":"66c8eeb56704ad7736da5640","values":[{"value":"brown"},{"value":"blue"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1061545187,"filterString":"Custom Data 1:brown OR blue","data":{"customDataFilters":[{"attributeId":"66c8eeb56704ad7736da5640","values":[{"value":"brown"},{"value":"blue"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1064825610,"filterString":"Custom Data 1:brown OR blue","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"},{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66c8eeb56704ad7736da5640","values":[{"value":"brown"},{"value":"blue"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1193468041,"filterString":"Custom Data 1:brown OR blue","data":{"customDataFilters":[{"attributeId":"66c8eeb56704ad7736da5640","values":[{"value":"brown"},{"value":"blue"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1145081809,"filterString":"Custom Data 1:brown OR blue","data":{"customDataFilters":[{"attributeId":"66c8eeb56704ad7736da5640","values":[{"value":"brown"},{"value":"blue"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1975471089,"filterString":"Custom Data 1:brown OR blue","data":{"customDataFilters":[{"attributeId":"66c8eeb56704ad7736da5640","values":[{"value":"brown"},{"value":"blue"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1152947775,"filterString":"Custom Data 1:brown OR blue","data":{"customDataFilters":[{"attributeId":"66c8eeb56704ad7736da5640","values":[{"value":"brown"},{"value":"blue"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + + + { + "name":"filter on values from two categorical custom data filters", + "note":"testing two categorical custom data filters on one tcga study", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66c8f20b6704ad7736da5641\",\"values\":[{\"value\":\"black\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Custom Data 1:brown OR blueCustom Data 2:black", + "studies":["coadread_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":264464087,"filterString":"Custom Data 1:brown OR blueCustom Data 2:black","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66c8eeb56704ad7736da5640","values":[{"value":"brown"},{"value":"blue"}]},{"attributeId":"66c8f20b6704ad7736da5641","values":[{"value":"black"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66c8f20b6704ad7736da5641\",\"values\":[{\"value\":\"black\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":430654219,"filterString":"Custom Data 1:brown OR blueCustom Data 2:black","data":{"customDataFilters":[{"attributeId":"66c8eeb56704ad7736da5640","values":[{"value":"brown"},{"value":"blue"}]},{"attributeId":"66c8f20b6704ad7736da5641","values":[{"value":"black"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66c8f20b6704ad7736da5641\",\"values\":[{\"value\":\"black\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":771185693,"filterString":"Custom Data 1:brown OR blueCustom Data 2:black","data":{"customDataFilters":[{"attributeId":"66c8eeb56704ad7736da5640","values":[{"value":"brown"},{"value":"blue"}]},{"attributeId":"66c8f20b6704ad7736da5641","values":[{"value":"black"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66c8f20b6704ad7736da5641\",\"values\":[{\"value\":\"black\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":916097460,"filterString":"Custom Data 1:brown OR blueCustom Data 2:black","data":{"customDataFilters":[{"attributeId":"66c8eeb56704ad7736da5640","values":[{"value":"brown"},{"value":"blue"}]},{"attributeId":"66c8f20b6704ad7736da5641","values":[{"value":"black"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66c8f20b6704ad7736da5641\",\"values\":[{\"value\":\"black\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1369241692,"filterString":"Custom Data 1:brown OR blueCustom Data 2:black","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"},{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66c8eeb56704ad7736da5640","values":[{"value":"brown"},{"value":"blue"}]},{"attributeId":"66c8f20b6704ad7736da5641","values":[{"value":"black"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66c8f20b6704ad7736da5641\",\"values\":[{\"value\":\"black\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-858045359,"filterString":"Custom Data 1:brown OR blueCustom Data 2:black","data":{"customDataFilters":[{"attributeId":"66c8eeb56704ad7736da5640","values":[{"value":"brown"},{"value":"blue"}]},{"attributeId":"66c8f20b6704ad7736da5641","values":[{"value":"black"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66c8f20b6704ad7736da5641\",\"values\":[{\"value\":\"black\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1384923935,"filterString":"Custom Data 1:brown OR blueCustom Data 2:black","data":{"customDataFilters":[{"attributeId":"66c8eeb56704ad7736da5640","values":[{"value":"brown"},{"value":"blue"}]},{"attributeId":"66c8f20b6704ad7736da5641","values":[{"value":"black"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66c8f20b6704ad7736da5641\",\"values\":[{\"value\":\"black\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1116575213,"filterString":"Custom Data 1:brown OR blueCustom Data 2:black","data":{"customDataFilters":[{"attributeId":"66c8eeb56704ad7736da5640","values":[{"value":"brown"},{"value":"blue"}]},{"attributeId":"66c8f20b6704ad7736da5641","values":[{"value":"black"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66c8f20b6704ad7736da5641\",\"values\":[{\"value\":\"black\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-2133908901,"filterString":"Custom Data 1:brown OR blueCustom Data 2:black","data":{"customDataFilters":[{"attributeId":"66c8eeb56704ad7736da5640","values":[{"value":"brown"},{"value":"blue"}]},{"attributeId":"66c8f20b6704ad7736da5641","values":[{"value":"black"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8eeb56704ad7736da5640\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66c8f20b6704ad7736da5641\",\"values\":[{\"value\":\"black\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + + + { + "name":"filter on NA value from one categorical custom data filter", + "note":"testing one categorical custom data filter of NA value on one tcga study", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Custom Data 1:NA", + "studies":["coadread_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":5612331,"filterString":"Custom Data 1:NA","data":{"customDataFilters":[{"attributeId":"66c8f44c6704ad7736da5642","values":[{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1469853731,"filterString":"Custom Data 1:NA","data":{"customDataFilters":[{"attributeId":"66c8f44c6704ad7736da5642","values":[{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1691282374,"filterString":"Custom Data 1:NA","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66c8f44c6704ad7736da5642","values":[{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-189652935,"filterString":"Custom Data 1:NA","data":{"customDataFilters":[{"attributeId":"66c8f44c6704ad7736da5642","values":[{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1351213633,"filterString":"Custom Data 1:NA","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66c8f44c6704ad7736da5642","values":[{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-586981172,"filterString":"Custom Data 1:NA","data":{"customDataFilters":[{"attributeId":"66c8f44c6704ad7736da5642","values":[{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-729997819,"filterString":"Custom Data 1:NA","data":{"customDataFilters":[{"attributeId":"66c8f44c6704ad7736da5642","values":[{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-296670215,"filterString":"Custom Data 1:NA","data":{"customDataFilters":[{"attributeId":"66c8f44c6704ad7736da5642","values":[{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1523589773,"filterString":"Custom Data 1:NA","data":{"customDataFilters":[{"attributeId":"66c8f44c6704ad7736da5642","values":[{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + + + { + "name":"filter on NA and non-NA values from one categorical custom data filter", + "note":"testing one categorical custom data filter of NA and non-NA values on one tcga study", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"},{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Custom Data 1:NA OR brown", + "studies":["coadread_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":1177917620,"filterString":"Custom Data 1:NA OR brown","data":{"customDataFilters":[{"attributeId":"66c8f44c6704ad7736da5642","values":[{"value":"NA"},{"value":"brown"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"},{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":2006011672,"filterString":"Custom Data 1:NA OR brown","data":{"customDataFilters":[{"attributeId":"66c8f44c6704ad7736da5642","values":[{"value":"NA"},{"value":"brown"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"},{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":2113305978,"filterString":"Custom Data 1:NA OR brown","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66c8f44c6704ad7736da5642","values":[{"value":"NA"},{"value":"brown"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"},{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-764324949,"filterString":"Custom Data 1:NA OR brown","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66c8f44c6704ad7736da5642","values":[{"value":"NA"},{"value":"brown"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"},{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1237941519,"filterString":"Custom Data 1:NA OR brown","data":{"customDataFilters":[{"attributeId":"66c8f44c6704ad7736da5642","values":[{"value":"NA"},{"value":"brown"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"},{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-236823616,"filterString":"Custom Data 1:NA OR brown","data":{"customDataFilters":[{"attributeId":"66c8f44c6704ad7736da5642","values":[{"value":"NA"},{"value":"brown"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"},{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-374914274,"filterString":"Custom Data 1:NA OR brown","data":{"customDataFilters":[{"attributeId":"66c8f44c6704ad7736da5642","values":[{"value":"NA"},{"value":"brown"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"},{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1513553528,"filterString":"Custom Data 1:NA OR brown","data":{"customDataFilters":[{"attributeId":"66c8f44c6704ad7736da5642","values":[{"value":"NA"},{"value":"brown"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"},{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-796594416,"filterString":"Custom Data 1:NA OR brown","data":{"customDataFilters":[{"attributeId":"66c8f44c6704ad7736da5642","values":[{"value":"NA"},{"value":"brown"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f44c6704ad7736da5642\",\"values\":[{\"value\":\"NA\"},{\"value\":\"brown\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + + + + { + "name":"filter on NA and non-NA values from two categorical custom data filter", + "note":"testing two categorical custom data filters of NA and non-NA values on one tcga study", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f7656704ad7736da5644\",\"values\":[{\"value\":\"brown\"},{\"value\":\"NA\"}]},{\"attributeId\":\"66c8f7716704ad7736da5645\",\"values\":[{\"value\":\"black\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Custom Data 1:brown OR NACustom Data 2:black OR NA", + "studies":["coadread_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":239529000,"filterString":"Custom Data 1:brown OR NACustom Data 2:black OR NA","data":{"customDataFilters":[{"attributeId":"66c8f7656704ad7736da5644","values":[{"value":"brown"},{"value":"NA"}]},{"attributeId":"66c8f7716704ad7736da5645","values":[{"value":"black"},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f7656704ad7736da5644\",\"values\":[{\"value\":\"brown\"},{\"value\":\"NA\"}]},{\"attributeId\":\"66c8f7716704ad7736da5645\",\"values\":[{\"value\":\"black\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":311010422,"filterString":"Custom Data 1:brown OR NACustom Data 2:black OR NA","data":{"customDataFilters":[{"attributeId":"66c8f7656704ad7736da5644","values":[{"value":"brown"},{"value":"NA"}]},{"attributeId":"66c8f7716704ad7736da5645","values":[{"value":"black"},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f7656704ad7736da5644\",\"values\":[{\"value\":\"brown\"},{\"value\":\"NA\"}]},{\"attributeId\":\"66c8f7716704ad7736da5645\",\"values\":[{\"value\":\"black\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1080856338,"filterString":"Custom Data 1:brown OR NACustom Data 2:black OR NA","data":{"customDataFilters":[{"attributeId":"66c8f7656704ad7736da5644","values":[{"value":"brown"},{"value":"NA"}]},{"attributeId":"66c8f7716704ad7736da5645","values":[{"value":"black"},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f7656704ad7736da5644\",\"values\":[{\"value\":\"brown\"},{\"value\":\"NA\"}]},{\"attributeId\":\"66c8f7716704ad7736da5645\",\"values\":[{\"value\":\"black\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-989223190,"filterString":"Custom Data 1:brown OR NACustom Data 2:black OR NA","data":{"customDataFilters":[{"attributeId":"66c8f7656704ad7736da5644","values":[{"value":"brown"},{"value":"NA"}]},{"attributeId":"66c8f7716704ad7736da5645","values":[{"value":"black"},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f7656704ad7736da5644\",\"values\":[{\"value\":\"brown\"},{\"value\":\"NA\"}]},{\"attributeId\":\"66c8f7716704ad7736da5645\",\"values\":[{\"value\":\"black\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-311732972,"filterString":"Custom Data 1:brown OR NACustom Data 2:black OR NA","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66c8f7656704ad7736da5644","values":[{"value":"brown"},{"value":"NA"}]},{"attributeId":"66c8f7716704ad7736da5645","values":[{"value":"black"},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f7656704ad7736da5644\",\"values\":[{\"value\":\"brown\"},{\"value\":\"NA\"}]},{\"attributeId\":\"66c8f7716704ad7736da5645\",\"values\":[{\"value\":\"black\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-2064702415,"filterString":"Custom Data 1:brown OR NACustom Data 2:black OR NA","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66c8f7656704ad7736da5644","values":[{"value":"brown"},{"value":"NA"}]},{"attributeId":"66c8f7716704ad7736da5645","values":[{"value":"black"},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f7656704ad7736da5644\",\"values\":[{\"value\":\"brown\"},{\"value\":\"NA\"}]},{\"attributeId\":\"66c8f7716704ad7736da5645\",\"values\":[{\"value\":\"black\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1010204165,"filterString":"Custom Data 1:brown OR NACustom Data 2:black OR NA","data":{"customDataFilters":[{"attributeId":"66c8f7656704ad7736da5644","values":[{"value":"brown"},{"value":"NA"}]},{"attributeId":"66c8f7716704ad7736da5645","values":[{"value":"black"},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f7656704ad7736da5644\",\"values\":[{\"value\":\"brown\"},{\"value\":\"NA\"}]},{\"attributeId\":\"66c8f7716704ad7736da5645\",\"values\":[{\"value\":\"black\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-800009830,"filterString":"Custom Data 1:brown OR NACustom Data 2:black OR NA","data":{"customDataFilters":[{"attributeId":"66c8f7656704ad7736da5644","values":[{"value":"brown"},{"value":"NA"}]},{"attributeId":"66c8f7716704ad7736da5645","values":[{"value":"black"},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f7656704ad7736da5644\",\"values\":[{\"value\":\"brown\"},{\"value\":\"NA\"}]},{\"attributeId\":\"66c8f7716704ad7736da5645\",\"values\":[{\"value\":\"black\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1632432862,"filterString":"Custom Data 1:brown OR NACustom Data 2:black OR NA","data":{"customDataFilters":[{"attributeId":"66c8f7656704ad7736da5644","values":[{"value":"brown"},{"value":"NA"}]},{"attributeId":"66c8f7716704ad7736da5645","values":[{"value":"black"},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66c8f7656704ad7736da5644\",\"values\":[{\"value\":\"brown\"},{\"value\":\"NA\"}]},{\"attributeId\":\"66c8f7716704ad7736da5645\",\"values\":[{\"value\":\"black\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + + { + "name":"filter on NA and non-NA values from two categorical custom data filter for two studies", + "note":"testing two categorical custom data filters of NA and non-NA values on two tcga studies", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf311955a443698dbcff0\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66ccf319955a443698dbcff1\",\"values\":[{\"value\":\"black\"},{\"value\":\"blond\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Custom Data 1:brown OR blueCustom Data 2:black OR blond OR NA", + "studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":143455619,"filterString":"Custom Data 1:brown OR blueCustom Data 2:black OR blond OR NA","data":{"customDataFilters":[{"attributeId":"66ccf311955a443698dbcff0","values":[{"value":"brown"},{"value":"blue"}]},{"attributeId":"66ccf319955a443698dbcff1","values":[{"value":"black"},{"value":"blond"},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf311955a443698dbcff0\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66ccf319955a443698dbcff1\",\"values\":[{\"value\":\"black\"},{\"value\":\"blond\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":165703449,"filterString":"Custom Data 1:brown OR blueCustom Data 2:black OR blond OR NA","data":{"customDataFilters":[{"attributeId":"66ccf311955a443698dbcff0","values":[{"value":"brown"},{"value":"blue"}]},{"attributeId":"66ccf319955a443698dbcff1","values":[{"value":"black"},{"value":"blond"},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf311955a443698dbcff0\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66ccf319955a443698dbcff1\",\"values\":[{\"value\":\"black\"},{\"value\":\"blond\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":312717167,"filterString":"Custom Data 1:brown OR blueCustom Data 2:black OR blond OR NA","data":{"customDataFilters":[{"attributeId":"66ccf311955a443698dbcff0","values":[{"value":"brown"},{"value":"blue"}]},{"attributeId":"66ccf319955a443698dbcff1","values":[{"value":"black"},{"value":"blond"},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf311955a443698dbcff0\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66ccf319955a443698dbcff1\",\"values\":[{\"value\":\"black\"},{\"value\":\"blond\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":738888681,"filterString":"Custom Data 1:brown OR blueCustom Data 2:black OR blond OR NA","data":{"customDataFilters":[{"attributeId":"66ccf311955a443698dbcff0","values":[{"value":"brown"},{"value":"blue"}]},{"attributeId":"66ccf319955a443698dbcff1","values":[{"value":"black"},{"value":"blond"},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf311955a443698dbcff0\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66ccf319955a443698dbcff1\",\"values\":[{\"value\":\"black\"},{\"value\":\"blond\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1281047624,"filterString":"Custom Data 1:brown OR blueCustom Data 2:black OR blond OR NA","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"SUBTYPE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"},{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66ccf311955a443698dbcff0","values":[{"value":"brown"},{"value":"blue"}]},{"attributeId":"66ccf319955a443698dbcff1","values":[{"value":"black"},{"value":"blond"},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf311955a443698dbcff0\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66ccf319955a443698dbcff1\",\"values\":[{\"value\":\"black\"},{\"value\":\"blond\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1313590561,"filterString":"Custom Data 1:brown OR blueCustom Data 2:black OR blond OR NA","data":{"customDataFilters":[{"attributeId":"66ccf311955a443698dbcff0","values":[{"value":"brown"},{"value":"blue"}]},{"attributeId":"66ccf319955a443698dbcff1","values":[{"value":"black"},{"value":"blond"},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf311955a443698dbcff0\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66ccf319955a443698dbcff1\",\"values\":[{\"value\":\"black\"},{\"value\":\"blond\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1158878867,"filterString":"Custom Data 1:brown OR blueCustom Data 2:black OR blond OR NA","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"customDataFilters":[{"attributeId":"66ccf311955a443698dbcff0","values":[{"value":"brown"},{"value":"blue"}]},{"attributeId":"66ccf319955a443698dbcff1","values":[{"value":"black"},{"value":"blond"},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf311955a443698dbcff0\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66ccf319955a443698dbcff1\",\"values\":[{\"value\":\"black\"},{\"value\":\"blond\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-340914622,"filterString":"Custom Data 1:brown OR blueCustom Data 2:black OR blond OR NA","data":{"customDataFilters":[{"attributeId":"66ccf311955a443698dbcff0","values":[{"value":"brown"},{"value":"blue"}]},{"attributeId":"66ccf319955a443698dbcff1","values":[{"value":"black"},{"value":"blond"},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf311955a443698dbcff0\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66ccf319955a443698dbcff1\",\"values\":[{\"value\":\"black\"},{\"value\":\"blond\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-255469361,"filterString":"Custom Data 1:brown OR blueCustom Data 2:black OR blond OR NA","data":{"customDataFilters":[{"attributeId":"66ccf311955a443698dbcff0","values":[{"value":"brown"},{"value":"blue"}]},{"attributeId":"66ccf319955a443698dbcff1","values":[{"value":"black"},{"value":"blond"},{"value":"NA"}]}],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"customDataFilters\":[{\"attributeId\":\"66ccf311955a443698dbcff0\",\"values\":[{\"value\":\"brown\"},{\"value\":\"blue\"}]},{\"attributeId\":\"66ccf319955a443698dbcff1\",\"values\":[{\"value\":\"black\"},{\"value\":\"blond\"},{\"value\":\"NA\"}]}],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + } + +] \ No newline at end of file diff --git a/test/api-e2e/specs/genie-public.json b/test/api-e2e/specs/genie-public.json new file mode 100644 index 00000000000..bde93511d5e --- /dev/null +++ b/test/api-e2e/specs/genie-public.json @@ -0,0 +1,10 @@ +[ + { + "name":"", + "note":"", + "studies":[], + "tests":[ + {"hash":788956100,"filterString":"","data":{"attributes":[{"attributeId":"CANCER_TYPE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"SAMPLE_COUNT"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"SAMPLE_TYPE"},{"attributeId":"CENTER"},{"attributeId":"ONCOTREE_CODE"},{"attributeId":"PRIMARY_RACE"},{"attributeId":"SAMPLE_TYPE_DETAILED"},{"attributeId":"SEQ_ASSAY_ID"},{"attributeId":"DEAD"}],"studyViewFilter":{"studyIds":["genie_public"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["genie_public"],"filterUrl":"/study/summary?id=genie_public#filterJson={\"studyIds\":[\"genie_public\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + } +] \ No newline at end of file diff --git a/test/api-e2e/specs/mutation-data-counts.json b/test/api-e2e/specs/mutation-data-counts.json new file mode 100644 index 00000000000..ed597d02151 --- /dev/null +++ b/test/api-e2e/specs/mutation-data-counts.json @@ -0,0 +1,144 @@ +[ + { + "name":"EGFR - Not mutated", + "note":"Testing mutation-data-counts on gene EGFR for not mutated option", + "filterUrl": "/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED", + "studies":[], + "tests":[ + {"hash":22051614,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":620673099,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1192356903,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1324133908,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1139160943,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-257272205,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-278160651,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1608562947,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1625005371,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1009057295,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"genomicDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations"}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/mutation-data-counts/fetch?projection=SUMMARY&","label":"MutationDataCounts","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + { + "name":"EGFR not mutated and TP53 mutated", + "note":"Testing mutation-data-counts on gene EGFR for not mutated option with gene TP53 for mutated option", + "filterUrl": "/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED", + "studies":[], + "tests":[ + {"hash":22051614,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":143713892,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":222803587,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":314140877,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":620673099,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":881434958,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"genomicDataFilters":[{"hugoGeneSymbol":"TP53","profileType":"mutations"}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/mutation-data-counts/fetch?projection=SUMMARY&","label":"MutationDataCounts","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1192356903,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1248706660,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1324133908,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1428199453,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"genomicDataFilters":[{"hugoGeneSymbol":"TP53","profileType":"mutations"}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/mutation-data-counts/fetch?projection=SUMMARY&","label":"MutationDataCounts","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1668007162,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1139160943,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-257272205,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-278160651,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1608562947,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1625005371,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1009057295,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"genomicDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations"}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/mutation-data-counts/fetch?projection=SUMMARY&","label":"MutationDataCounts","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-2112407976,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-2087113982,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1529241108,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-340189452,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1510622,"filterString":"EGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"genomicDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations"}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/mutation-data-counts/fetch?projection=SUMMARY&","label":"MutationDataCounts","studies":["brca_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + { + "name":"EGFR not mutated, TP53 mutated and KIT not mutated", + "note":"Testing mutation-data-counts on gene EGFR for not mutated option, gene TP53 for mutated option, and gene KIT for not mutated option", + "filterUrl": "/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED", + "studies":[], + "tests":[ + {"hash":178647819,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":277310196,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":278580013,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"genomicDataFilters":[{"hugoGeneSymbol":"TP53","profileType":"mutations"}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/mutation-data-counts/fetch?projection=SUMMARY&","label":"MutationDataCounts","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":360256980,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":380625957,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"},{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":457045892,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":481416586,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":715368392,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":927275539,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1126223694,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1140942412,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"genomicDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations"}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/mutation-data-counts/fetch?projection=SUMMARY&","label":"MutationDataCounts","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1170802177,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"genomicDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations"}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/mutation-data-counts/fetch?projection=SUMMARY&","label":"MutationDataCounts","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1432940156,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1550203105,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":2003099437,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":2143173755,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1609590030,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-747771555,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1073541122,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"genomicDataFilters":[{"hugoGeneSymbol":"TP53","profileType":"mutations"}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/mutation-data-counts/fetch?projection=SUMMARY&","label":"MutationDataCounts","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-819305774,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATED","data":{"genomicDataFilters":[{"hugoGeneSymbol":"EGFR","profileType":"mutations"}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/mutation-data-counts/fetch?projection=SUMMARY&","label":"MutationDataCounts","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-720781833,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1688390826,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"},{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1804503997,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-53896411,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1725071627,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-880239237,"filterString":"KIT: Mutations: Mutated vs Not Mutated:NOT MUTATEDEGFR: Mutations: Mutated vs Not Mutated:NOT MUTATEDTP53: Mutations: Mutated vs Not Mutated:MUTATED","data":{"genomicDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations"}],"studyViewFilter":{"mutationDataFilters":[{"hugoGeneSymbol":"KIT","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"EGFR","profileType":"mutations","values":[[{"value":"NOT_MUTATED"}]],"categorization":"MUTATED"},{"hugoGeneSymbol":"TP53","profileType":"mutations","values":[[{"value":"MUTATED"}]],"categorization":"MUTATED"}],"studyIds":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/mutation-data-counts/fetch?projection=SUMMARY&","label":"MutationDataCounts","studies":["brca_tcga_pan_can_atlas_2018","coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=brca_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018#filterJson={\"mutationDataFilters\":[{\"hugoGeneSymbol\":\"KIT\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"EGFR\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"NOT_MUTATED\"}]],\"categorization\":\"MUTATED\"},{\"hugoGeneSymbol\":\"TP53\",\"profileType\":\"mutations\",\"values\":[[{\"value\":\"MUTATED\"}]],\"categorization\":\"MUTATED\"}],\"studyIds\":[\"brca_tcga_pan_can_atlas_2018\",\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + } +] \ No newline at end of file diff --git a/test/api-e2e/specs/sample-lists-counts-filter.json b/test/api-e2e/specs/sample-lists-counts-filter.json new file mode 100644 index 00000000000..89b724003f9 --- /dev/null +++ b/test/api-e2e/specs/sample-lists-counts-filter.json @@ -0,0 +1,169 @@ +[ + { + "name":"filter on one sample list", + "note":"testing filter of one sample list on one tcga study", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Samples with mutation data", + "studies":["coadread_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":866410181,"filterString":"Samples with mutation data","data":{"caseLists":[["sequenced"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1149121007,"filterString":"Samples with mutation data","data":{"caseLists":[["sequenced"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1163999981,"filterString":"Samples with mutation data","data":{"caseLists":[["sequenced"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1759009751,"filterString":"Samples with mutation data","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"caseLists":[["sequenced"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1937341369,"filterString":"Samples with mutation data","data":{"caseLists":[["sequenced"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-416829426,"filterString":"Samples with mutation data","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"}],"studyViewFilter":{"caseLists":[["sequenced"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1551038568,"filterString":"Samples with mutation data","data":{"caseLists":[["sequenced"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-297511361,"filterString":"Samples with mutation data","data":{"caseLists":[["sequenced"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-289903881,"filterString":"Samples with mutation data","data":{"caseLists":[["sequenced"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + + { + "name":"filter on intersection of three sample lists", + "note":"testing filter of an intersection of three sample lists on one tcga study", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"],[\"protein_quantification\"],[\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Samples with mutation data AND Samples with protein data (Mass Spec) AND All Tumors", + "studies":["coadread_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":383071101,"filterString":"Samples with mutation data AND Samples with protein data (Mass Spec) AND All Tumors","data":{"caseLists":[["sequenced"],["protein_quantification"],["coad"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"],[\"protein_quantification\"],[\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":751585015,"filterString":"Samples with mutation data AND Samples with protein data (Mass Spec) AND All Tumors","data":{"caseLists":[["sequenced"],["protein_quantification"],["coad"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"],[\"protein_quantification\"],[\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":832689153,"filterString":"Samples with mutation data AND Samples with protein data (Mass Spec) AND All Tumors","data":{"caseLists":[["sequenced"],["protein_quantification"],["coad"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"],[\"protein_quantification\"],[\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1092029607,"filterString":"Samples with mutation data AND Samples with protein data (Mass Spec) AND All Tumors","data":{"caseLists":[["sequenced"],["protein_quantification"],["coad"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"],[\"protein_quantification\"],[\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1161151797,"filterString":"Samples with mutation data AND Samples with protein data (Mass Spec) AND All Tumors","data":{"caseLists":[["sequenced"],["protein_quantification"],["coad"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"],[\"protein_quantification\"],[\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1612343521,"filterString":"Samples with mutation data AND Samples with protein data (Mass Spec) AND All Tumors","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"caseLists":[["sequenced"],["protein_quantification"],["coad"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"],[\"protein_quantification\"],[\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-90997818,"filterString":"Samples with mutation data AND Samples with protein data (Mass Spec) AND All Tumors","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"}],"studyViewFilter":{"caseLists":[["sequenced"],["protein_quantification"],["coad"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"],[\"protein_quantification\"],[\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1814453168,"filterString":"Samples with mutation data AND Samples with protein data (Mass Spec) AND All Tumors","data":{"caseLists":[["sequenced"],["protein_quantification"],["coad"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"],[\"protein_quantification\"],[\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1751424593,"filterString":"Samples with mutation data AND Samples with protein data (Mass Spec) AND All Tumors","data":{"caseLists":[["sequenced"],["protein_quantification"],["coad"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\"],[\"protein_quantification\"],[\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + + { + "name":"filter on union of three sample lists", + "note":"testing filter of a union of three sample lists on one tcga study", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\",\"protein_quantification\",\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": " (Samples with mutation data OR Samples with protein data (Mass Spec) OR All Tumors) ", + "studies":["coadread_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":469752001,"filterString":" (Samples with mutation data OR Samples with protein data (Mass Spec) OR All Tumors) ","data":{"caseLists":[["sequenced","protein_quantification","coad"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\",\"protein_quantification\",\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":627529616,"filterString":" (Samples with mutation data OR Samples with protein data (Mass Spec) OR All Tumors) ","data":{"caseLists":[["sequenced","protein_quantification","coad"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\",\"protein_quantification\",\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":2027739703,"filterString":" (Samples with mutation data OR Samples with protein data (Mass Spec) OR All Tumors) ","data":{"caseLists":[["sequenced","protein_quantification","coad"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\",\"protein_quantification\",\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":2027944437,"filterString":" (Samples with mutation data OR Samples with protein data (Mass Spec) OR All Tumors) ","data":{"caseLists":[["sequenced","protein_quantification","coad"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\",\"protein_quantification\",\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-176663329,"filterString":" (Samples with mutation data OR Samples with protein data (Mass Spec) OR All Tumors) ","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"caseLists":[["sequenced","protein_quantification","coad"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\",\"protein_quantification\",\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1250812410,"filterString":" (Samples with mutation data OR Samples with protein data (Mass Spec) OR All Tumors) ","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"}],"studyViewFilter":{"caseLists":[["sequenced","protein_quantification","coad"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\",\"protein_quantification\",\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-169204035,"filterString":" (Samples with mutation data OR Samples with protein data (Mass Spec) OR All Tumors) ","data":{"caseLists":[["sequenced","protein_quantification","coad"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\",\"protein_quantification\",\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1125707801,"filterString":" (Samples with mutation data OR Samples with protein data (Mass Spec) OR All Tumors) ","data":{"caseLists":[["sequenced","protein_quantification","coad"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\",\"protein_quantification\",\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1200683793,"filterString":" (Samples with mutation data OR Samples with protein data (Mass Spec) OR All Tumors) ","data":{"caseLists":[["sequenced","protein_quantification","coad"]],"studyIds":["coadread_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"sequenced\",\"protein_quantification\",\"coad\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + + { + "name":"filter on one sample list for two studies", + "note":"testing filter of one sample list on two tcga studies", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Samples with protein data (RPPA)", + "studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":515521465,"filterString":"Samples with protein data (RPPA)","data":{"caseLists":[["rppa"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":634740897,"filterString":"Samples with protein data (RPPA)","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"},{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"caseLists":[["rppa"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":842194000,"filterString":"Samples with protein data (RPPA)","data":{"caseLists":[["rppa"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1486907628,"filterString":"Samples with protein data (RPPA)","data":{"caseLists":[["rppa"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-550666830,"filterString":"Samples with protein data (RPPA)","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"caseLists":[["rppa"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1282542624,"filterString":"Samples with protein data (RPPA)","data":{"caseLists":[["rppa"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-632242696,"filterString":"Samples with protein data (RPPA)","data":{"caseLists":[["rppa"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-642497562,"filterString":"Samples with protein data (RPPA)","data":{"caseLists":[["rppa"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1118081576,"filterString":"Samples with protein data (RPPA)","data":{"caseLists":[["rppa"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + + { + "name":"filter on intersection of three case lists for two studies", + "note":"testing filter of an intersection of three sample lists on two tcga studies", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"],[\"read\"],[\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": "Samples with protein data (RPPA) AND All Tumors AND Samples with mutation and CNA data", + "studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":53680963,"filterString":"Samples with protein data (RPPA) AND All Tumors AND Samples with mutation and CNA data","data":{"caseLists":[["rppa"],["read"],["cnaseq"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"],[\"read\"],[\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":71164185,"filterString":"Samples with protein data (RPPA) AND All Tumors AND Samples with mutation and CNA data","data":{"caseLists":[["rppa"],["read"],["cnaseq"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"],[\"read\"],[\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":588558105,"filterString":"Samples with protein data (RPPA) AND All Tumors AND Samples with mutation and CNA data","data":{"caseLists":[["rppa"],["read"],["cnaseq"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"],[\"read\"],[\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":740410348,"filterString":"Samples with protein data (RPPA) AND All Tumors AND Samples with mutation and CNA data","data":{"caseLists":[["rppa"],["read"],["cnaseq"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"],[\"read\"],[\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":785192084,"filterString":"Samples with protein data (RPPA) AND All Tumors AND Samples with mutation and CNA data","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"},{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"caseLists":[["rppa"],["read"],["cnaseq"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"],[\"read\"],[\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":2046240485,"filterString":"Samples with protein data (RPPA) AND All Tumors AND Samples with mutation and CNA data","data":{"caseLists":[["rppa"],["read"],["cnaseq"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"],[\"read\"],[\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-310950369,"filterString":"Samples with protein data (RPPA) AND All Tumors AND Samples with mutation and CNA data","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"caseLists":[["rppa"],["read"],["cnaseq"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"],[\"read\"],[\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1116606317,"filterString":"Samples with protein data (RPPA) AND All Tumors AND Samples with mutation and CNA data","data":{"caseLists":[["rppa"],["read"],["cnaseq"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"],[\"read\"],[\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1856037301,"filterString":"Samples with protein data (RPPA) AND All Tumors AND Samples with mutation and CNA data","data":{"caseLists":[["rppa"],["read"],["cnaseq"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"rppa\"],[\"read\"],[\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + }, + + + { + "name":"filter on union of three case lists for two studies", + "note":"testing filter of a union of three sample lists on two tcga studies", + "filterURL": "/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"cna\",\"read\",\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}", + "filterText": " (Samples with CNA data OR All Tumors OR Samples with mutation and CNA data) ", + "studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"], + "tests":[ + {"hash":361026600,"filterString":" (Samples with CNA data OR All Tumors OR Samples with mutation and CNA data) ","data":{"caseLists":[["cna","read","cnaseq"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"cna\",\"read\",\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":760591814,"filterString":" (Samples with CNA data OR All Tumors OR Samples with mutation and CNA data) ","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"AGE","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false},{"attributeId":"DAYS_TO_BIRTH","disableLogScale":false,"showNA":false}],"studyViewFilter":{"caseLists":[["cna","read","cnaseq"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"cna\",\"read\",\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1774242588,"filterString":" (Samples with CNA data OR All Tumors OR Samples with mutation and CNA data) ","data":{"caseLists":[["cna","read","cnaseq"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"cna\",\"read\",\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1802772817,"filterString":" (Samples with CNA data OR All Tumors OR Samples with mutation and CNA data) ","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"PATH_M_STAGE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"AJCC_STAGING_EDITION"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"},{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"caseLists":[["cna","read","cnaseq"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"cna\",\"read\",\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1930437032,"filterString":" (Samples with CNA data OR All Tumors OR Samples with mutation and CNA data) ","data":{"caseLists":[["cna","read","cnaseq"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"cna\",\"read\",\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-874302583,"filterString":" (Samples with CNA data OR All Tumors OR Samples with mutation and CNA data) ","data":{"caseLists":[["cna","read","cnaseq"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"cna\",\"read\",\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1156570192,"filterString":" (Samples with CNA data OR All Tumors OR Samples with mutation and CNA data) ","data":{"caseLists":[["cna","read","cnaseq"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"cna\",\"read\",\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-235271242,"filterString":" (Samples with CNA data OR All Tumors OR Samples with mutation and CNA data) ","data":{"caseLists":[["cna","read","cnaseq"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"cna\",\"read\",\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-741791712,"filterString":" (Samples with CNA data OR All Tumors OR Samples with mutation and CNA data) ","data":{"caseLists":[["cna","read","cnaseq"]],"studyIds":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["coadread_tcga_pan_can_atlas_2018","lgg_tcga_pan_can_atlas_2018"],"filterUrl":"/study/summary?id=coadread_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018#filterJson={\"caseLists\":[[\"cna\",\"read\",\"cnaseq\"]],\"studyIds\":[\"coadread_tcga_pan_can_atlas_2018\",\"lgg_tcga_pan_can_atlas_2018\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + } + +] \ No newline at end of file From e2d502aadc69ed47e1c5f03020486b5de160184a Mon Sep 17 00:00:00 2001 From: alisman Date: Mon, 9 Sep 2024 11:09:40 -0400 Subject: [PATCH 46/87] fix api test merge writer (#10980) --- test/api-e2e/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/api-e2e/index.js b/test/api-e2e/index.js index 7a1a60f8df0..1f5bac806cc 100644 --- a/test/api-e2e/index.js +++ b/test/api-e2e/index.js @@ -31,7 +31,7 @@ async function mergeFiles(){ Promise.all(jsons) .then(d => { - fs.writeFile(`${process.cwd()}/api-e2e/merged-tests.json`, JSON.stringify(d)); + fs.writeFile(`${process.cwd()}/api-e2e/json/merged-tests.json`, JSON.stringify(d)); }) .then(r => console.log('merged-tests.json written')); From 10c4a87943323888003dd22be81425b02cdcc4ec Mon Sep 17 00:00:00 2001 From: Gaofei Zhao <15748980+dippindots@users.noreply.github.com> Date: Wed, 11 Sep 2024 14:46:32 -0400 Subject: [PATCH 47/87] Genomic and Generic Assay bin counts endpoints (#10964) * Genomic and Generic Assay bin counts endpoints --- .../persistence/StudyViewRepository.java | 7 + ...tributeDataSource.java => DataSource.java} | 4 +- .../helper/StudyViewFilterHelper.java | 75 ++++- .../mybatisclickhouse/StudyViewMapper.java | 6 + .../StudyViewMyBatisRepository.java | 49 ++- .../service/StudyViewColumnarService.java | 4 + .../impl/StudyViewColumnarServiceImpl.java | 31 +- .../web/columnar/BasicDataBinner.java | 316 ++++++++++++++++++ .../StudyViewColumnStoreController.java | 47 +++ .../CategorizedClinicalDataCountFilter.java | 6 +- ...ategorizedGenericAssayDataCountFilter.java | 72 ++++ .../CategorizedGenomicDataCountFilter.java | 73 ++++ .../web/util/StudyViewFilterApplier.java | 4 +- .../db-scripts/clickhouse/clickhouse.sql | 108 +++++- .../StudyViewFilterMapper.xml | 167 ++++++++- .../mybatisclickhouse/StudyViewMapper.xml | 63 ++++ .../MolecularProfileCountTest.java | 8 +- .../StudyViewCaseListSamplesCountsTest.java | 8 +- .../StudyViewMapperClinicalDataCountTest.java | 18 +- .../StudyViewMapperTest.java | 32 +- src/test/resources/clickhouse_cgds.sql | 3 +- .../specs/generic-assay-data-bin-counts.json | 126 +++++++ .../specs/genomic-data-bin-counts.json | 150 +++++++++ 23 files changed, 1298 insertions(+), 79 deletions(-) rename src/main/java/org/cbioportal/persistence/enums/{ClinicalAttributeDataSource.java => DataSource.java} (71%) create mode 100644 src/main/java/org/cbioportal/web/columnar/BasicDataBinner.java create mode 100644 src/main/java/org/cbioportal/web/parameter/CategorizedGenericAssayDataCountFilter.java create mode 100644 src/main/java/org/cbioportal/web/parameter/CategorizedGenomicDataCountFilter.java create mode 100644 test/api-e2e/specs/generic-assay-data-bin-counts.json create mode 100644 test/api-e2e/specs/genomic-data-bin-counts.json diff --git a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java index b5c7748ffe9..3b60e17fcd4 100644 --- a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java +++ b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java @@ -9,6 +9,7 @@ import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.GenomicDataCountItem; import org.cbioportal.model.GenomicDataCount; +import org.cbioportal.model.MolecularProfile; import org.cbioportal.model.PatientTreatment; import org.cbioportal.model.Sample; import org.cbioportal.model.SampleTreatment; @@ -67,4 +68,10 @@ public interface StudyViewRepository { Map getMutationCounts(StudyViewFilterContext studyViewFilterContext, GenomicDataFilter genomicDataFilter); List getMutationCountsByType(StudyViewFilterContext studyViewFilterContext, List genomicDataFilters); + + List getGenomicDataBinCounts(StudyViewFilterContext studyViewFilterContext, List filteredAttributes); + + List getGenericAssayDataBinCounts(StudyViewFilterContext studyViewFilterContext, List filteredAttributes); + + List getGenericAssayProfiles(); } diff --git a/src/main/java/org/cbioportal/persistence/enums/ClinicalAttributeDataSource.java b/src/main/java/org/cbioportal/persistence/enums/DataSource.java similarity index 71% rename from src/main/java/org/cbioportal/persistence/enums/ClinicalAttributeDataSource.java rename to src/main/java/org/cbioportal/persistence/enums/DataSource.java index ed320c1cebd..09b81b79edb 100644 --- a/src/main/java/org/cbioportal/persistence/enums/ClinicalAttributeDataSource.java +++ b/src/main/java/org/cbioportal/persistence/enums/DataSource.java @@ -1,11 +1,11 @@ package org.cbioportal.persistence.enums; -public enum ClinicalAttributeDataSource { +public enum DataSource { PATIENT("PATIENT"),SAMPLE("SAMPLE"); private final String value; - ClinicalAttributeDataSource(String value) { + DataSource(String value) { this.value = value; } diff --git a/src/main/java/org/cbioportal/persistence/helper/StudyViewFilterHelper.java b/src/main/java/org/cbioportal/persistence/helper/StudyViewFilterHelper.java index a5d16a6de94..c94600c57d8 100644 --- a/src/main/java/org/cbioportal/persistence/helper/StudyViewFilterHelper.java +++ b/src/main/java/org/cbioportal/persistence/helper/StudyViewFilterHelper.java @@ -1,44 +1,109 @@ package org.cbioportal.persistence.helper; +import org.cbioportal.model.MolecularProfile; +import org.cbioportal.persistence.enums.DataSource; import org.cbioportal.web.parameter.ClinicalDataFilter; +import org.cbioportal.web.parameter.CategorizedGenericAssayDataCountFilter; +import org.cbioportal.web.parameter.CategorizedGenomicDataCountFilter; import org.cbioportal.web.parameter.CustomSampleIdentifier; import org.cbioportal.web.parameter.StudyViewFilter; import org.springframework.lang.NonNull; import org.springframework.lang.Nullable; import java.util.ArrayList; +import java.util.EnumMap; import java.util.List; +import java.util.Map; import java.util.Objects; public final class StudyViewFilterHelper { public static StudyViewFilterHelper build(@Nullable StudyViewFilter studyViewFilter, - @Nullable List customDataSamples) { + @Nullable Map> genericAssayProfilesMap, + @Nullable List customDataSamples) { if (Objects.isNull(studyViewFilter)) { studyViewFilter = new StudyViewFilter(); } + if (Objects.isNull(genericAssayProfilesMap)) { + genericAssayProfilesMap = new EnumMap<>(DataSource.class); + } if (Objects.isNull(customDataSamples)) { customDataSamples = new ArrayList<>(); } - return new StudyViewFilterHelper(studyViewFilter, customDataSamples); + return new StudyViewFilterHelper(studyViewFilter, genericAssayProfilesMap, customDataSamples); } private final StudyViewFilter studyViewFilter; + private final CategorizedGenomicDataCountFilter categorizedGenomicDataCountFilter; + private final CategorizedGenericAssayDataCountFilter categorizedGenericAssayDataCountFilter; private final List customDataSamples; - private StudyViewFilterHelper(@NonNull StudyViewFilter studyViewFilter, - @NonNull List customDataSamples) { + private StudyViewFilterHelper(@NonNull StudyViewFilter studyViewFilter, + @NonNull Map> genericAssayProfilesMap, + @NonNull List customDataSamples) { this.studyViewFilter = studyViewFilter; - + this.categorizedGenomicDataCountFilter = extractGenomicDataCountFilters(studyViewFilter); + this.categorizedGenericAssayDataCountFilter = extractGenericAssayDataCountFilters(studyViewFilter, genericAssayProfilesMap); this.customDataSamples = customDataSamples; } public StudyViewFilter studyViewFilter() { return studyViewFilter; } + + public CategorizedGenomicDataCountFilter categorizedGenomicDataCountFilter() { + return categorizedGenomicDataCountFilter; + } + public CategorizedGenericAssayDataCountFilter categorizedGenericAssayDataCountFilter() { + return categorizedGenericAssayDataCountFilter; + } + public List customDataSamples() { return this.customDataSamples; } + + private CategorizedGenomicDataCountFilter extractGenomicDataCountFilters(final StudyViewFilter studyViewFilter) { + if (studyViewFilter.getGenomicDataFilters() == null) + { + return CategorizedGenomicDataCountFilter.getBuilder().build(); + } + + CategorizedGenomicDataCountFilter.Builder builder = CategorizedGenomicDataCountFilter.getBuilder(); + + builder.setSampleNumericalGenomicDataFilters(studyViewFilter.getGenomicDataFilters().stream() + .filter(genomicDataFilter -> !genomicDataFilter.getProfileType().equals("cna") && !genomicDataFilter.getProfileType().equals("gistic")) + .toList()); + builder.setSampleCategoricalGenomicDataFilters(studyViewFilter.getGenomicDataFilters().stream() + .filter(genomicDataFilter -> genomicDataFilter.getProfileType().equals("cna") || genomicDataFilter.getProfileType().equals("gistic")) + .toList()); + return builder.build(); + } + + private CategorizedGenericAssayDataCountFilter extractGenericAssayDataCountFilters(final StudyViewFilter studyViewFilter, Map> genericAssayProfilesMap) { + if ((studyViewFilter.getGenericAssayDataFilters() == null || genericAssayProfilesMap.isEmpty())) + { + return CategorizedGenericAssayDataCountFilter.getBuilder().build(); + } + + CategorizedGenericAssayDataCountFilter.Builder builder = CategorizedGenericAssayDataCountFilter.getBuilder(); + + // TODO: Support patient level profiles and data filtering + List sampleCategoricalProfileTypes = genericAssayProfilesMap.get(DataSource.SAMPLE) + .stream().filter(profile -> profile.getDatatype().equals("CATEGORICAL") || profile.getDatatype().equals("BINARY")) + .map(profile -> profile.getStableId().replace(profile.getCancerStudyIdentifier() + "_", "")) + .toList(); + List sampleNumericalProfileTypes = genericAssayProfilesMap.get(DataSource.SAMPLE) + .stream().filter(profile -> profile.getDatatype().equals("LIMIT-VALUE")) + .map(profile -> profile.getStableId().replace(profile.getCancerStudyIdentifier() + "_", "")) + .toList(); + builder.setSampleNumericalGenericAssayDataFilters(studyViewFilter.getGenericAssayDataFilters().stream() + .filter(genericAssayDataFilter -> sampleNumericalProfileTypes.contains(genericAssayDataFilter.getProfileType())) + .toList()); + builder.setSampleCategoricalGenericAssayDataFilters(studyViewFilter.getGenericAssayDataFilters().stream() + .filter(genericAssayDataFilter -> sampleCategoricalProfileTypes.contains(genericAssayDataFilter.getProfileType())) + .toList()); + return builder.build(); + } public boolean isCategoricalClinicalDataFilter(ClinicalDataFilter clinicalDataFilter) { var filterValue = clinicalDataFilter.getValues().getFirst(); diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java index 6dabd46d0df..5bc659e5c5a 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java @@ -12,6 +12,7 @@ import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.GenomicDataCountItem; import org.cbioportal.model.PatientTreatment; +import org.cbioportal.model.MolecularProfile; import org.cbioportal.model.Sample; import org.cbioportal.model.SampleTreatment; import org.cbioportal.persistence.helper.AlterationFilterHelper; @@ -65,4 +66,9 @@ public interface StudyViewMapper { Map getMutationCounts(StudyViewFilterHelper studyViewFilterHelper, GenomicDataFilter genomicDataFilter); List getMutationCountsByType(StudyViewFilterHelper studyViewFilterHelper, List genomicDataFilters); + + List getGenomicDataBinCounts(StudyViewFilterHelper studyViewFilterHelper, List attributeIds); + List getGenericAssayDataBinCounts(StudyViewFilterHelper studyViewFilterHelper, List attributeIds); + + List getGenericAssayProfiles(); } diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java index d522b2f3b9b..41687281c5d 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java @@ -9,12 +9,13 @@ import org.cbioportal.model.GenomicDataCountItem; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.CopyNumberCountByGene; +import org.cbioportal.model.MolecularProfile; import org.cbioportal.model.PatientTreatment; import org.cbioportal.model.Sample; import org.cbioportal.model.SampleTreatment; import org.cbioportal.model.StudyViewFilterContext; import org.cbioportal.persistence.StudyViewRepository; -import org.cbioportal.persistence.enums.ClinicalAttributeDataSource; +import org.cbioportal.persistence.enums.DataSource; import org.cbioportal.persistence.helper.AlterationFilterHelper; import org.cbioportal.persistence.helper.StudyViewFilterHelper; import org.cbioportal.web.parameter.ClinicalDataType; @@ -24,6 +25,7 @@ import java.util.ArrayList; import java.util.Collections; +import java.util.EnumMap; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -33,9 +35,9 @@ @Repository public class StudyViewMyBatisRepository implements StudyViewRepository { - private Map> clinicalAttributesMap = new HashMap<>(); - - + private Map> clinicalAttributesMap = new EnumMap<>(DataSource.class); + private Map> genericAssayProfilesMap = new EnumMap<>(DataSource.class); + private static final List FILTERED_CLINICAL_ATTR_VALUES = Collections.emptyList(); private final StudyViewMapper mapper; @@ -101,7 +103,7 @@ public List getMolecularProfileSampleCounts(StudyViewFilterCon } public StudyViewFilterHelper createStudyViewFilterHelper(StudyViewFilterContext studyViewFilterContext) { - return StudyViewFilterHelper.build(studyViewFilterContext.studyViewFilter(), studyViewFilterContext.customDataFilterSamples()); + return StudyViewFilterHelper.build(studyViewFilterContext.studyViewFilter() , getGenericAssayProfilesMap(), studyViewFilterContext.customDataFilterSamples()); } @Override @@ -109,6 +111,11 @@ public List getClinicalAttributes() { return mapper.getClinicalAttributes(); } + @Override + public List getGenericAssayProfiles() { + return mapper.getGenericAssayProfiles(); + } + @Override public Map getClinicalAttributeDatatypeMap() { if (clinicalAttributesMap.isEmpty()) { @@ -118,11 +125,11 @@ public Map getClinicalAttributeDatatypeMap() { Map attributeDatatypeMap = new HashMap<>(); clinicalAttributesMap - .get(ClinicalAttributeDataSource.SAMPLE) + .get(DataSource.SAMPLE) .forEach(attribute -> attributeDatatypeMap.put(attribute.getAttrId(), ClinicalDataType.SAMPLE)); clinicalAttributesMap - .get(ClinicalAttributeDataSource.PATIENT) + .get(DataSource.PATIENT) .forEach(attribute -> attributeDatatypeMap.put(attribute.getAttrId(), ClinicalDataType.PATIENT)); return attributeDatatypeMap; @@ -199,18 +206,34 @@ public List getSampleTreatments(StudyViewFilterContext studyVie public int getTotalSampleTreatmentCount(StudyViewFilterContext studyViewFilterContext) { return mapper.getTotalSampleTreatmentCounts(createStudyViewFilterHelper(studyViewFilterContext)); } + + @Override + public List getGenomicDataBinCounts(StudyViewFilterContext studyViewFilterContext, List attributeIds) { + return mapper.getGenomicDataBinCounts(createStudyViewFilterHelper(studyViewFilterContext), attributeIds); + } + @Override + public List getGenericAssayDataBinCounts(StudyViewFilterContext studyViewFilterContext, List attributeIds) { + return mapper.getGenericAssayDataBinCounts(createStudyViewFilterHelper(studyViewFilterContext), attributeIds); + } + private void buildClinicalAttributeNameMap() { clinicalAttributesMap = this.getClinicalAttributes() .stream() - .collect(Collectors.groupingBy(ca -> ca.getPatientAttribute() ? ClinicalAttributeDataSource.PATIENT : ClinicalAttributeDataSource.SAMPLE)); + .collect(Collectors.groupingBy(ca -> ca.getPatientAttribute().booleanValue() ? DataSource.PATIENT : DataSource.SAMPLE)); } - - private Map> getClinicalAttributeNameMap() { - if (clinicalAttributesMap.isEmpty()) { - buildClinicalAttributeNameMap(); + + private void buildGenericAssayProfilesMap() { + genericAssayProfilesMap = this.getGenericAssayProfiles() + .stream() + .collect(Collectors.groupingBy(ca -> ca.getPatientLevel().booleanValue() ? DataSource.PATIENT : DataSource.SAMPLE)); + } + + private Map> getGenericAssayProfilesMap() { + if (genericAssayProfilesMap.isEmpty()) { + buildGenericAssayProfilesMap(); } - return clinicalAttributesMap; + return genericAssayProfilesMap; } @Override diff --git a/src/main/java/org/cbioportal/service/StudyViewColumnarService.java b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java index 369f33aab41..4a631a67204 100644 --- a/src/main/java/org/cbioportal/service/StudyViewColumnarService.java +++ b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java @@ -45,6 +45,10 @@ public interface StudyViewColumnarService { List getCNACountsByGeneSpecific(StudyViewFilter studyViewFilter, List genomicDataFilters); List getMutationCountsByGeneSpecific(StudyViewFilter studyViewFilter, List genomicDataFilters); + + List getGenomicDataBinCounts(StudyViewFilter studyViewFilter, List filteredAttributes); + + List getGenericAssayDataBinCounts(StudyViewFilter studyViewFilter, List filteredAttributes); List getMutationTypeCountsByGeneSpecific(StudyViewFilter studyViewFilter, List genomicDataFilters); } diff --git a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java index c3ebffa4a4f..b1ada8fac31 100644 --- a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java @@ -81,6 +81,16 @@ public SampleTreatmentReport getSampleTreatmentReport(StudyViewFilter studyViewF return treatmentCountReportService.getSampleTreatmentReport(createContext(studyViewFilter)); } + @Override + public List getGenomicDataBinCounts(StudyViewFilter studyViewFilter, List filteredAttributes) { + return generateDataCountItemsFromDataCounts(studyViewRepository.getGenomicDataBinCounts(createContext(studyViewFilter), filteredAttributes)); + } + + @Override + public List getGenericAssayDataBinCounts(StudyViewFilter studyViewFilter, List filteredAttributes) { + return generateDataCountItemsFromDataCounts(studyViewRepository.getGenericAssayDataBinCounts(createContext(studyViewFilter), filteredAttributes)); + } + public List getCnaGenes(StudyViewFilter studyViewFilter) { return alterationCountService.getCnaGenes(createContext(studyViewFilter)); } @@ -97,14 +107,7 @@ public Map getClinicalAttributeDatatypeMap() { @Override public List getClinicalDataCounts(StudyViewFilter studyViewFilter, List filteredAttributes) { - return studyViewRepository.getClinicalDataCounts(createContext(studyViewFilter), filteredAttributes) - .stream().collect(Collectors.groupingBy(ClinicalDataCount::getAttributeId)) - .entrySet().parallelStream().map(e -> { - ClinicalDataCountItem item = new ClinicalDataCountItem(); - item.setAttributeId(e.getKey()); - item.setCounts(e.getValue()); - return item; - }).collect(Collectors.toList()); + return generateDataCountItemsFromDataCounts(studyViewRepository.getClinicalDataCounts(createContext(studyViewFilter), filteredAttributes)); } @Override @@ -156,8 +159,16 @@ private StudyViewFilterContext createContext(StudyViewFilter studyViewFilter) { List customSampleIdentifiers = customDataFilterUtil.extractCustomDataSamples(studyViewFilter); return new StudyViewFilterContext(studyViewFilter, customSampleIdentifiers); } - - + + private List generateDataCountItemsFromDataCounts(List dataCounts) { + return dataCounts.stream().collect(Collectors.groupingBy(ClinicalDataCount::getAttributeId)) + .entrySet().parallelStream().map(e -> { + ClinicalDataCountItem item = new ClinicalDataCountItem(); + item.setAttributeId(e.getKey()); + item.setCounts(e.getValue()); + return item; + }).toList(); + } public static List mergeCaseListCounts(List counts) { Map> countsPerListType = counts.stream() diff --git a/src/main/java/org/cbioportal/web/columnar/BasicDataBinner.java b/src/main/java/org/cbioportal/web/columnar/BasicDataBinner.java new file mode 100644 index 00000000000..d6978e35a5e --- /dev/null +++ b/src/main/java/org/cbioportal/web/columnar/BasicDataBinner.java @@ -0,0 +1,316 @@ +package org.cbioportal.web.columnar; + +import org.cbioportal.model.*; +import org.cbioportal.service.StudyViewColumnarService; +import org.cbioportal.web.columnar.util.NewClinicalDataBinUtil; +import org.cbioportal.web.parameter.*; +import org.cbioportal.web.util.DataBinner; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Component; + +import java.util.*; +import java.util.stream.Collectors; + +import static java.util.Collections.emptyList; + +// BasicDataBinner is a generalized class derived from ClinicalDataBinner +// BasicDataBinner should eventually deprecate ClinicalDataBinner +// we are using BasicDataBinner for genomic data bin counts and generic assay bin counts now +// but BasicDataBinner can support clinical data counts too +// after we switched clinical data counts to use this, then We can remove ClinicalDataBinner +@Component +public class BasicDataBinner { + private final StudyViewColumnarService studyViewColumnarService; + private final DataBinner dataBinner; + + @Autowired + public BasicDataBinner( + StudyViewColumnarService studyViewColumnarService, + DataBinner dataBinner + ) { + this.studyViewColumnarService = studyViewColumnarService; + this.dataBinner = dataBinner; + } + + // convert from counts to clinical data + private List convertCountsToData(List clinicalDataCounts) + { + return clinicalDataCounts + .stream() + .map(NewClinicalDataBinUtil::generateClinicalDataFromClinicalDataCount) + .flatMap(Collection::stream) + .toList(); + } + + @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()") + public List getDataBins( + DataBinMethod dataBinMethod, + T dataBinCountFilter, + boolean shouldRemoveSelfFromFilter) { + // get data bin filters based on the type of the filter + // either Genomic data or Generic Assay data or clinical data + List dataBinFilters = fetchDataBinFilters(dataBinCountFilter); + StudyViewFilter studyViewFilter = dataBinCountFilter.getStudyViewFilter(); + // define result variables + List resultDataBins = Collections.emptyList(); + // if no data bin filters or no study view filer object is passed in + // return empty result + if (dataBinFilters.isEmpty() || studyViewFilter == null) { + return resultDataBins; + } + + if (shouldRemoveSelfFromFilter && dataBinFilters.size() == 1) { + removeSelfFromFilter(dataBinFilters.get(0), studyViewFilter); + } + + List uniqueKeys = dataBinFilters.stream().map(this::getDataBinFilterUniqueKey).toList(); + + // a new StudyView filter to partially filter by study and sample ids only + // we need this additional partial filter because we always need to know the bins generated for the initial state + // which allows us to keep the number of bins and bin ranges consistent even if there are additional data filters. + // we only want to update the counts for each bin, we don't want to regenerate the bins for the filtered data. + // NOTE: partial filter is only needed when dataBinMethod == DataBinMethod.STATIC but that's always the case + // for the frontend implementation. we can't really use dataBinMethod == DataBinMethod.DYNAMIC because of the + // complication it brings to the frontend visualization and filtering + StudyViewFilter partialFilter = new StudyViewFilter(); + partialFilter.setStudyIds(studyViewFilter.getStudyIds()); + partialFilter.setSampleIdentifiers(studyViewFilter.getSampleIdentifiers()); + + // we need to fetch data for the partial filter in order to generate the bins for initial state + // we use the filtered data to calculate the counts for each bin, we do not regenerate bins for the filtered data + List unfilteredClinicalDataCounts; + List filteredClinicalDataCounts; + Map attributeDatatypeMap; + switch (dataBinCountFilter) { + // TODO: first case is to support clinical data, but clinical data is not using this now. We should update controller to use this method later + case ClinicalDataBinCountFilter clinicalDataBinCountFilter -> { + unfilteredClinicalDataCounts = studyViewColumnarService.getClinicalDataCounts(partialFilter, uniqueKeys); + filteredClinicalDataCounts = studyViewColumnarService.getClinicalDataCounts(studyViewFilter, uniqueKeys); + attributeDatatypeMap = studyViewColumnarService.getClinicalAttributeDatatypeMap(); + } + case GenomicDataBinCountFilter genomicDataBinCountFilter -> { + unfilteredClinicalDataCounts = studyViewColumnarService.getGenomicDataBinCounts(partialFilter, uniqueKeys); + filteredClinicalDataCounts = studyViewColumnarService.getGenomicDataBinCounts(studyViewFilter, uniqueKeys); + attributeDatatypeMap = Collections.emptyMap(); + } + case GenericAssayDataBinCountFilter genericAssayDataBinCountFilter -> { + unfilteredClinicalDataCounts = studyViewColumnarService.getGenericAssayDataBinCounts(partialFilter, uniqueKeys); + filteredClinicalDataCounts = studyViewColumnarService.getGenericAssayDataBinCounts(studyViewFilter, uniqueKeys); + attributeDatatypeMap = Collections.emptyMap(); + } + default -> { + unfilteredClinicalDataCounts = Collections.emptyList(); + filteredClinicalDataCounts = Collections.emptyList(); + attributeDatatypeMap = Collections.emptyMap(); + } + } + + // TODO ignoring conflictingPatientAttributeIds for now + List unfilteredClinicalData = convertCountsToData( + unfilteredClinicalDataCounts.stream().flatMap(c -> c.getCounts().stream()).toList() + ); + List filteredClinicalData = convertCountsToData( + filteredClinicalDataCounts.stream().flatMap(c -> c.getCounts().stream()).toList() + ); + + Map> unfilteredClinicalDataByAttributeId = + unfilteredClinicalData.stream().collect(Collectors.groupingBy(Binnable::getAttrId)); + + Map> filteredClinicalDataByAttributeId = + filteredClinicalData.stream().collect(Collectors.groupingBy(Binnable::getAttrId)); + + // TODO: need to update attributeDatatypeMap to include patient level data for Generic Assay Profiles + if (dataBinMethod == DataBinMethod.STATIC) { + if (!unfilteredClinicalData.isEmpty()) { + resultDataBins = calculateStaticDataBins( + dataBinner, + dataBinFilters, + attributeDatatypeMap, + unfilteredClinicalDataByAttributeId, + filteredClinicalDataByAttributeId + ); + } + } + // TODO: need to update attributeDatatypeMap to include patient level data for Generic Assay Profiles + else { // dataBinMethod == DataBinMethod.DYNAMIC + // TODO we should consider removing dynamic binning support + // we never use dynamic binning in the frontend because number of bins and the bin ranges can change + // each time there is a new filter which makes the frontend implementation complicated + if (!filteredClinicalData.isEmpty()) { + resultDataBins = calculateDynamicDataBins( + dataBinner, + dataBinFilters, + attributeDatatypeMap, + filteredClinicalDataByAttributeId + ); + } + } + + return resultDataBins; + } + + private void removeSelfFromFilter(S dataBinFilter, StudyViewFilter studyViewFilter) { + switch (dataBinFilter) { + case ClinicalDataBinFilter clinicalDataBinFilter when studyViewFilter.getClinicalDataFilters() != null -> + studyViewFilter.getClinicalDataFilters().removeIf(f -> f.getAttributeId().equals(clinicalDataBinFilter.getAttributeId())); + case GenomicDataBinFilter genomicDataBinFilter when studyViewFilter.getGenomicDataFilters() != null -> + studyViewFilter.getGenomicDataFilters().removeIf(f -> + f.getHugoGeneSymbol().equals(genomicDataBinFilter.getHugoGeneSymbol()) + && f.getProfileType().equals(genomicDataBinFilter.getProfileType()) + ); + case GenericAssayDataBinFilter genericAssayDataBinFilter when studyViewFilter.getGenericAssayDataFilters() != null -> + studyViewFilter.getGenericAssayDataFilters().removeIf(f -> + f.getStableId().equals(genericAssayDataBinFilter.getStableId()) + && f.getProfileType().equals(genericAssayDataBinFilter.getProfileType()) + ); + default -> { + // Do not remove any filters + } + } + } + + private List fetchDataBinFilters(T dataBinCountFilter) { + switch (dataBinCountFilter) { + case ClinicalDataBinCountFilter clinicalDataBinCountFilter -> { + return (List) clinicalDataBinCountFilter.getAttributes(); + } + case GenomicDataBinCountFilter genomicDataBinCountFilter -> { + return (List) genomicDataBinCountFilter.getGenomicDataBinFilters(); + } + case GenericAssayDataBinCountFilter genericAssayDataBinCountFilter -> { + return (List) genericAssayDataBinCountFilter.getGenericAssayDataBinFilters(); + } + default -> { + return new ArrayList<>(); + } + } + } + + private String getDataBinFilterUniqueKey(S dataBinFilter) { + switch (dataBinFilter) { + case ClinicalDataBinFilter clinicalDataBinFilter -> { + return clinicalDataBinFilter.getAttributeId(); + } + case GenomicDataBinFilter genomicDataBinFilter -> { + return genomicDataBinFilter.getHugoGeneSymbol() + genomicDataBinFilter.getProfileType(); + } + case GenericAssayDataBinFilter genericAssayDataBinFilter -> { + return genericAssayDataBinFilter.getStableId() + genericAssayDataBinFilter.getProfileType(); + } + default -> { + return null; + } + } + } + + private List calculateStaticDataBins( + DataBinner dataBinner, + List dataBinFilters, + Map attributeDatatypeMap, + Map> unfilteredClinicalDataByAttributeId, + Map> filteredClinicalDataByAttributeId + ) { + List result = new ArrayList<>(); + + for (T dataBinFilter : dataBinFilters) { + // if there is data for requested attribute + if (attributeDatatypeMap.isEmpty() || attributeDatatypeMap.containsKey(getDataBinFilterUniqueKey(dataBinFilter))) { + List dataBins = dataBinner + .calculateClinicalDataBins( + dataBinFilter, + filteredClinicalDataByAttributeId.getOrDefault(getDataBinFilterUniqueKey(dataBinFilter), emptyList()), + unfilteredClinicalDataByAttributeId.getOrDefault(getDataBinFilterUniqueKey(dataBinFilter), emptyList()) + ) + .stream() + .map(dataBin -> (U) transform(dataBinFilter, dataBin)) + .toList(); + + result.addAll(dataBins); + } + } + + return result; + } + + private List calculateDynamicDataBins( + DataBinner dataBinner, + List dataBinFilters, + Map attributeDatatypeMap, + Map> filteredClinicalDataByAttributeId + ) { + List result = new ArrayList<>(); + + for (T dataBinFilter : dataBinFilters) { + // if there is data for requested attribute + if (attributeDatatypeMap.isEmpty() || attributeDatatypeMap.containsKey(getDataBinFilterUniqueKey(dataBinFilter))) { + List dataBins = dataBinner + .calculateDataBins( + dataBinFilter, + filteredClinicalDataByAttributeId.getOrDefault(getDataBinFilterUniqueKey(dataBinFilter), emptyList()) + ) + .stream() + .map(dataBin -> (U) transform(dataBinFilter, dataBin)) + .toList(); + result.addAll(dataBins); + } + } + + return result; + } + + private T transform(S dataBinFilter, DataBin dataBin) { + switch (dataBinFilter) { + case ClinicalDataBinFilter clinicalDataBinFilter -> { + return (T) dataBinToClinicalDataBin(clinicalDataBinFilter, dataBin); + } + case GenomicDataBinFilter genomicDataBinFilter -> { + return (T) dataBintoGenomicDataBin(genomicDataBinFilter, dataBin); + } + case GenericAssayDataBinFilter genericAssayDataBinFilter -> { + return (T) dataBintoGenericAssayDataBin(genericAssayDataBinFilter, dataBin); + } + default -> { + return null; + } + } + } + + private ClinicalDataBin dataBinToClinicalDataBin(ClinicalDataBinFilter attribute, DataBin dataBin) { + ClinicalDataBin clinicalDataBin = new ClinicalDataBin(); + clinicalDataBin.setAttributeId(attribute.getAttributeId()); + setCommonDataBinProperties(dataBin, clinicalDataBin); + return clinicalDataBin; + } + + private GenomicDataBin dataBintoGenomicDataBin(GenomicDataBinFilter genomicDataBinFilter, DataBin dataBin) { + GenomicDataBin genomicDataBin = new GenomicDataBin(); + genomicDataBin.setHugoGeneSymbol(genomicDataBinFilter.getHugoGeneSymbol()); + genomicDataBin.setProfileType(genomicDataBinFilter.getProfileType()); + setCommonDataBinProperties(dataBin, genomicDataBin); + return genomicDataBin; + } + + private GenericAssayDataBin dataBintoGenericAssayDataBin(GenericAssayDataBinFilter genericAssayDataBinFilter, + DataBin dataBin) { + GenericAssayDataBin genericAssayDataBin = new GenericAssayDataBin(); + genericAssayDataBin.setStableId(genericAssayDataBinFilter.getStableId()); + genericAssayDataBin.setProfileType(genericAssayDataBinFilter.getProfileType()); + setCommonDataBinProperties(dataBin, genericAssayDataBin); + return genericAssayDataBin; + } + + private void setCommonDataBinProperties(DataBin originalDataBin, U targetDatabin) { + targetDatabin.setCount(originalDataBin.getCount()); + if (originalDataBin.getSpecialValue() != null) { + targetDatabin.setSpecialValue(originalDataBin.getSpecialValue()); + } + if (originalDataBin.getStart() != null) { + targetDatabin.setStart(originalDataBin.getStart()); + } + if (originalDataBin.getEnd() != null) { + targetDatabin.setEnd(originalDataBin.getEnd()); + } + } + +} diff --git a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java index ffeff0ad7b3..fc55e05481b 100644 --- a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java +++ b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java @@ -19,6 +19,8 @@ import org.cbioportal.model.ClinicalViolinPlotData; import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.DensityPlotData; +import org.cbioportal.model.GenericAssayDataBin; +import org.cbioportal.model.GenomicDataBin; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.PatientTreatmentReport; import org.cbioportal.model.Sample; @@ -34,6 +36,8 @@ import org.cbioportal.web.parameter.ClinicalDataCountFilter; import org.cbioportal.web.parameter.ClinicalDataFilter; import org.cbioportal.web.parameter.DataBinMethod; +import org.cbioportal.web.parameter.GenericAssayDataBinCountFilter; +import org.cbioportal.web.parameter.GenomicDataBinCountFilter; import org.cbioportal.web.parameter.GenomicDataCountFilter; import org.cbioportal.web.parameter.GenomicDataFilter; import org.cbioportal.web.parameter.MutationOption; @@ -70,6 +74,8 @@ public class StudyViewColumnStoreController { private final StudyViewColumnarService studyViewColumnarService; private final ClinicalDataBinner clinicalDataBinner; + + private final BasicDataBinner basicDataBinner; private final ClinicalDataDensityPlotService clinicalDataDensityPlotService; private final ViolinPlotService violinPlotService; @@ -79,11 +85,13 @@ public class StudyViewColumnStoreController { @Autowired public StudyViewColumnStoreController(StudyViewColumnarService studyViewColumnarService, ClinicalDataBinner clinicalDataBinner, + BasicDataBinner basicDataBinner, ClinicalDataDensityPlotService clinicalDataDensityPlotService, ViolinPlotService violinPlotService ) { this.studyViewColumnarService = studyViewColumnarService; this.clinicalDataBinner = clinicalDataBinner; + this.basicDataBinner = basicDataBinner; this.clinicalDataDensityPlotService = clinicalDataDensityPlotService; this.violinPlotService = violinPlotService; } @@ -524,4 +532,43 @@ public ResponseEntity fetchSampleTreatmentCounts( // // return new ResponseEntity<>(clinicalDataBins, HttpStatus.OK); // } + + @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") + @PostMapping(value = "/column-store/genomic-data-bin-counts/fetch", + consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + @ApiResponse(responseCode = "200", description = "OK", + content = @Content(array = @ArraySchema(schema = @Schema(implementation = GenomicDataBin.class)))) + public ResponseEntity> fetchGenomicDataBinCounts( + @RequestParam(defaultValue = "DYNAMIC") DataBinMethod dataBinMethod, + @RequestBody(required = false) GenomicDataBinCountFilter genomicDataBinCountFilter, + @RequestAttribute(required = false, value = "involvedCancerStudies") Collection involvedCancerStudies, + @RequestAttribute(required = false, value = "interceptedGenomicDataBinCountFilter") GenomicDataBinCountFilter interceptedGenomicDataBinCountFilter + ) { + List genomicDataBins = basicDataBinner.getDataBins( + dataBinMethod, + interceptedGenomicDataBinCountFilter, + true + ); + return new ResponseEntity<>(genomicDataBins, HttpStatus.OK); + } + + @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") + @PostMapping(value = "/column-store/generic-assay-data-bin-counts/fetch", + consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + @ApiResponse(responseCode = "200", description = "OK", + content = @Content(array = @ArraySchema(schema = @Schema(implementation = GenericAssayDataBin.class)))) + public ResponseEntity> fetchGenericAssayDataBinCounts( + @RequestParam(defaultValue = "DYNAMIC") DataBinMethod dataBinMethod, + @RequestBody(required = false) GenericAssayDataBinCountFilter genericAssayDataBinCountFilter, + @RequestAttribute(required = false, value = "involvedCancerStudies") Collection involvedCancerStudies, + @RequestAttribute(required = false, value = "interceptedGenericAssayDataBinCountFilter") GenericAssayDataBinCountFilter interceptedGenericAssayDataBinCountFilter + ) { + List genericAssayDataBins = basicDataBinner.getDataBins( + dataBinMethod, + interceptedGenericAssayDataBinCountFilter, + true + ); + return new ResponseEntity<>(genericAssayDataBins, HttpStatus.OK); + } + } diff --git a/src/main/java/org/cbioportal/web/parameter/CategorizedClinicalDataCountFilter.java b/src/main/java/org/cbioportal/web/parameter/CategorizedClinicalDataCountFilter.java index 734d9bb53e7..22ce588453e 100644 --- a/src/main/java/org/cbioportal/web/parameter/CategorizedClinicalDataCountFilter.java +++ b/src/main/java/org/cbioportal/web/parameter/CategorizedClinicalDataCountFilter.java @@ -11,6 +11,7 @@ public static Builder getBuilder() { private final List sampleCategoricalClinicalDataFilters; private final List patientNumericalClinicalDataFilters; private final List patientCategoricalClinicalDataFilters; + private CategorizedClinicalDataCountFilter(Builder builder) { this.sampleCategoricalClinicalDataFilters = builder.sampleCategoricalClinicalDataFilters; this.sampleNumericalClinicalDataFilters = builder.sampleNumericalClinicalDataFilters; @@ -33,8 +34,7 @@ public List getPatientNumericalClinicalDataFilters() { public List getPatientCategoricalClinicalDataFilters() { return patientCategoricalClinicalDataFilters; } - - + public static class Builder { private List sampleNumericalClinicalDataFilters; private List sampleCategoricalClinicalDataFilters; @@ -42,7 +42,7 @@ public static class Builder { private List patientCategoricalClinicalDataFilters; private Builder(){ - + } public Builder setSampleCategoricalClinicalDataFilters(List sampleCategoricalClinicalDataFilters) { this.sampleCategoricalClinicalDataFilters = sampleCategoricalClinicalDataFilters; diff --git a/src/main/java/org/cbioportal/web/parameter/CategorizedGenericAssayDataCountFilter.java b/src/main/java/org/cbioportal/web/parameter/CategorizedGenericAssayDataCountFilter.java new file mode 100644 index 00000000000..3d9face92c8 --- /dev/null +++ b/src/main/java/org/cbioportal/web/parameter/CategorizedGenericAssayDataCountFilter.java @@ -0,0 +1,72 @@ +package org.cbioportal.web.parameter; + +import java.util.List; + +public final class CategorizedGenericAssayDataCountFilter { + + public static Builder getBuilder() { + return new Builder(); + } + + private final List sampleNumericalGenericAssayDataFilters; + private final List sampleCategoricalGenericAssayDataFilters; + private final List patientNumericalGenericAssayDataFilters; + private final List patientCategoricalGenericAssayDataFilters; + private CategorizedGenericAssayDataCountFilter(Builder builder) { + this.sampleCategoricalGenericAssayDataFilters = builder.sampleCategoricalGenericAssayDataFilters; + this.sampleNumericalGenericAssayDataFilters = builder.sampleNumericalGenericAssayDataFilters; + this.patientCategoricalGenericAssayDataFilters = builder.patientCategoricalGenericAssayDataFilters; + this.patientNumericalGenericAssayDataFilters = builder.patientNumericalGenericAssayDataFilters; + } + + public List getSampleNumericalGenericAssayDataFilters() { + return sampleNumericalGenericAssayDataFilters; + } + + public List getSampleCategoricalGenericAssayDataFilters() { + return sampleCategoricalGenericAssayDataFilters; + } + + public List getPatientNumericalGenericAssayDataFilters() { + return patientNumericalGenericAssayDataFilters; + } + + public List getPatientCategoricalGenericAssayDataFilters() { + return patientCategoricalGenericAssayDataFilters; + } + + public static class Builder { + private List sampleNumericalGenericAssayDataFilters; + private List sampleCategoricalGenericAssayDataFilters; + private List patientNumericalGenericAssayDataFilters; + private List patientCategoricalGenericAssayDataFilters; + + private Builder(){ + + } + + public Builder setSampleCategoricalGenericAssayDataFilters(List sampleCategoricalGenericAssayDataFilters) { + this.sampleCategoricalGenericAssayDataFilters = sampleCategoricalGenericAssayDataFilters; + return this; + } + + public Builder setSampleNumericalGenericAssayDataFilters(List sampleNumericalGenericAssayDataFilters) { + this.sampleNumericalGenericAssayDataFilters = sampleNumericalGenericAssayDataFilters; + return this; + } + + public Builder setPatientCategoricalGenericAssayDataFilters(List patientCategoricalGenericAssayDataFilters) { + this.patientCategoricalGenericAssayDataFilters = patientCategoricalGenericAssayDataFilters; + return this; + } + + public Builder setPatientNumericalGenericAssayDataFilters(List patientNumericalGenericAssayDataFilters) { + this.patientNumericalGenericAssayDataFilters = patientNumericalGenericAssayDataFilters; + return this; + } + + public CategorizedGenericAssayDataCountFilter build() { + return new CategorizedGenericAssayDataCountFilter(this); + } + } +} diff --git a/src/main/java/org/cbioportal/web/parameter/CategorizedGenomicDataCountFilter.java b/src/main/java/org/cbioportal/web/parameter/CategorizedGenomicDataCountFilter.java new file mode 100644 index 00000000000..01e67c010fc --- /dev/null +++ b/src/main/java/org/cbioportal/web/parameter/CategorizedGenomicDataCountFilter.java @@ -0,0 +1,73 @@ +package org.cbioportal.web.parameter; + +import java.util.List; + +public final class CategorizedGenomicDataCountFilter { + + public static Builder getBuilder() { + return new Builder(); + } + + private final List sampleNumericalGenomicDataFilters; + private final List sampleCategoricalGenomicDataFilters; + private final List patientNumericalGenomicDataFilters; + private final List patientCategoricalGenomicDataFilters; + + private CategorizedGenomicDataCountFilter(Builder builder) { + this.sampleCategoricalGenomicDataFilters = builder.sampleCategoricalGenomicDataFilters; + this.sampleNumericalGenomicDataFilters = builder.sampleNumericalGenomicDataFilters; + this.patientCategoricalGenomicDataFilters = builder.patientCategoricalGenomicDataFilters; + this.patientNumericalGenomicDataFilters = builder.patientNumericalGenomicDataFilters; + } + + public List getSampleNumericalGenomicDataFilters() { + return sampleNumericalGenomicDataFilters; + } + + public List getSampleCategoricalGenomicDataFilters() { + return sampleCategoricalGenomicDataFilters; + } + + public List getPatientNumericalGenomicDataFilters() { + return patientNumericalGenomicDataFilters; + } + + public List getPatientCategoricalGenomicDataFilters() { + return patientCategoricalGenomicDataFilters; + } + + public static class Builder { + private List sampleNumericalGenomicDataFilters; + private List sampleCategoricalGenomicDataFilters; + private List patientNumericalGenomicDataFilters; + private List patientCategoricalGenomicDataFilters; + + private Builder(){ + + } + + public Builder setSampleCategoricalGenomicDataFilters(List sampleCategoricalGenomicDataFilters) { + this.sampleCategoricalGenomicDataFilters = sampleCategoricalGenomicDataFilters; + return this; + } + + public Builder setSampleNumericalGenomicDataFilters(List sampleNumericalGenomicDataFilters) { + this.sampleNumericalGenomicDataFilters = sampleNumericalGenomicDataFilters; + return this; + } + + public Builder setPatientCategoricalGenomicDataFilters(List patientCategoricalGenomicDataFilters) { + this.patientCategoricalGenomicDataFilters = patientCategoricalGenomicDataFilters; + return this; + } + + public Builder setPatientNumericalGenomicDataFilters(List patientNumericalGenomicDataFilters) { + this.patientNumericalGenomicDataFilters = patientNumericalGenomicDataFilters; + return this; + } + + public CategorizedGenomicDataCountFilter build() { + return new CategorizedGenomicDataCountFilter(this); + } + } +} diff --git a/src/main/java/org/cbioportal/web/util/StudyViewFilterApplier.java b/src/main/java/org/cbioportal/web/util/StudyViewFilterApplier.java index 0fb4e83dc2c..16e5483d6dd 100644 --- a/src/main/java/org/cbioportal/web/util/StudyViewFilterApplier.java +++ b/src/main/java/org/cbioportal/web/util/StudyViewFilterApplier.java @@ -723,7 +723,6 @@ public List getUniqkeyKeys(List studyIds, List caseIds) public List getDataBins( DataBinMethod dataBinMethod, T dataBinCountFilter) { List dataBinFilters = fetchDataBinFilters(dataBinCountFilter); - StudyViewFilter studyViewFilter = dataBinCountFilter.getStudyViewFilter(); if (dataBinFilters.size() == 1) { @@ -733,6 +732,7 @@ public resultDataBins; List filteredSampleIds = new ArrayList<>(); List filteredStudyIds = new ArrayList<>(); + List filteredData = fetchData(dataBinCountFilter, studyViewFilter, filteredSampleIds, filteredStudyIds); @@ -740,7 +740,7 @@ public > filteredClinicalDataByAttributeId = filteredData.stream() .collect(Collectors.groupingBy(Binnable::getAttrId)); - + if (dataBinMethod == DataBinMethod.STATIC) { StudyViewFilter filter = studyViewFilter == null ? null : new StudyViewFilter(); diff --git a/src/main/resources/db-scripts/clickhouse/clickhouse.sql b/src/main/resources/db-scripts/clickhouse/clickhouse.sql index 9e89e8506f9..ffb18b1979d 100644 --- a/src/main/resources/db-scripts/clickhouse/clickhouse.sql +++ b/src/main/resources/db-scripts/clickhouse/clickhouse.sql @@ -323,10 +323,116 @@ FROM WHERE alteration_value != 'NA') AS subquery JOIN sample_derived sd ON sd.internal_id = subquery.sample_id; +CREATE TABLE IF NOT EXISTS genetic_alteration_numerical_derived +( + sample_unique_id String, + cancer_study_identifier LowCardinality(String), + hugo_gene_symbol String, + profile_type LowCardinality(String), + alteration_value String + ) + ENGINE = MergeTree() + ORDER BY (profile_type, cancer_study_identifier, hugo_gene_symbol, sample_unique_id ); + +INSERT INTO TABLE genetic_alteration_numerical_derived +SELECT + sample_unique_id, + cancer_study_identifier, + hugo_gene_symbol, + profile_type, + alteration_value +FROM + (SELECT + sample_id, + hugo_gene_symbol, + profile_type, + alteration_value + FROM + (SELECT + g.hugo_gene_symbol AS hugo_gene_symbol, + replaceOne(stable_id, concat(cs.cancer_study_identifier, '_'), '') as profile_type, -- Compute profile_type + arrayMap(x -> (x = '' ? NULL : x), splitByString(',', assumeNotNull(trim(trailing ',' from ga.values)))) AS alteration_value, + arrayMap(x -> (x = '' ? NULL : toInt32(x)), splitByString(',', assumeNotNull(trim(trailing ',' from gps.ordered_sample_list)))) AS sample_id + FROM + genetic_profile gp + JOIN cancer_study cs ON cs.cancer_study_id = gp.cancer_study_id + JOIN genetic_profile_samples gps ON gp.genetic_profile_id = gps.genetic_profile_id + JOIN genetic_alteration ga ON gp.genetic_profile_id = ga.genetic_profile_id + JOIN gene g ON ga.genetic_entity_id = g.genetic_entity_id + WHERE + gp.genetic_alteration_type != 'COPY_NUMBER_ALTERATION') + ARRAY JOIN alteration_value, sample_id + ) AS subquery + JOIN sample_derived sd ON sd.internal_id = subquery.sample_id; + +CREATE TABLE IF NOT EXISTS generic_assay_data_derived +( + sample_unique_id String, + genetic_entity_id String, + value String, + generic_assay_type String, + profile_stable_id String, + entity_stable_id String, + datatype String, + patient_level NUMERIC, + profile_type String +) + ENGINE = MergeTree() + ORDER BY (profile_type, entity_stable_id, sample_unique_id); + +INSERT INTO TABLE generic_assay_data_derived +SELECT + sd.sample_unique_id as sample_unique_id, + genetic_entity_id, + value, + generic_assay_type, + profile_stable_id, + entity_stable_id, + datatype, + patient_level, + replaceOne(profile_stable_id, concat(cs.cancer_study_identifier, '_'), '') as profile_type +FROM + (SELECT + sample_id, + genetic_entity_id, + value, + cancer_study_id, + generic_assay_type, + genetic_profile_id, + profile_stable_id, + entity_stable_id, + patient_level, + datatype + FROM + (SELECT + sample_id as sample_unique_id, + gp.cancer_study_id AS cancer_study_id, + ga.genetic_entity_id as genetic_entity_id, + gp.genetic_profile_id as genetic_profile_id, + gp.generic_assay_type as generic_assay_type, + gp.stable_id as profile_stable_id, + ge.stable_id as entity_stable_id, + gp.datatype as datatype, + gp.patient_level as patient_level, + arrayMap(x -> (x = '' ? NULL : x), splitByString(',', assumeNotNull(trim(trailing ',' from ga.values)))) AS value, + arrayMap(x -> (x = '' ? NULL : toInt64(x)), splitByString(',', assumeNotNull(trim(trailing ',' from gps.ordered_sample_list)))) AS sample_id + FROM genetic_profile gp + JOIN genetic_profile_samples gps ON gp.genetic_profile_id = gps.genetic_profile_id + JOIN genetic_alteration ga ON gp.genetic_profile_id = ga.genetic_profile_id + JOIN genetic_entity ge on ga.genetic_entity_id = ge.id + WHERE + gp.generic_assay_type IS NOT NULL + ) + ARRAY JOIN value, sample_id) AS subquery + JOIN cancer_study cs ON cs.cancer_study_id = subquery.cancer_study_id + JOIN sample_derived sd ON sd.internal_id = subquery.sample_id; + OPTIMIZE TABLE sample_to_gene_panel_derived; OPTIMIZE TABLE gene_panel_to_gene_derived; OPTIMIZE TABLE sample_derived; OPTIMIZE TABLE genomic_event_derived; OPTIMIZE TABLE clinical_data_derived; OPTIMIZE TABLE clinical_event_derived; -OPTIMIZE TABLE genetic_alteration_cna_derived; \ No newline at end of file +OPTIMIZE TABLE genetic_alteration_cna_derived; +OPTIMIZE TABLE genetic_alteration_numerical_derived; +OPTIMIZE TABLE generic_assay_data_derived; diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index ca289ebc4b5..7c78f4db52e 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -131,18 +131,42 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -157,7 +181,7 @@ - + @@ -361,6 +385,131 @@ + + SELECT ${unique_id} + FROM ${table_name} + WHERE hugo_gene_symbol = '${genomicDataFilter.hugoGeneSymbol}' AND + profile_type='${genomicDataFilter.profileType}' + + + + AND + + + + + + AND match(alteration_value, '^>?=?[-+]?[0-9]*[.,]?[0-9]+$') + + + AND match(alteration_value, '^<?=?[-+]?[0-9]*[.,]?[0-9]+$') + + + AND match(alteration_value, '^[-+]?[0-9]*[.,]?[0-9]+$') + + + + + AND abs( + minus( + + + , + ${dataFilterValue.start} + ) + ) < exp(-11) + + + + AND + + + > ${dataFilterValue.start} + + + AND + + + <= ${dataFilterValue.end} + + + + + + + + + + + SELECT ${unique_id} + FROM ${table_name} + WHERE entity_stable_id = '${genericAssayDataFilter.stableId}' AND + profile_type='${genericAssayDataFilter.profileType}' + + + + AND + + + + + + AND match(value, '^>?=?[-+]?[0-9]*[.,]?[0-9]+$') + + + AND match(value, '^<?=?[-+]?[0-9]*[.,]?[0-9]+$') + + + AND match(value, '^[-+]?[0-9]*[.,]?[0-9]+$') + + + + + AND abs( + minus( + + + , + ${dataFilterValue.start} + ) + ) < exp(-11) + + + + AND + + + > ${dataFilterValue.start} + + + AND + + + <= ${dataFilterValue.end} + + + + + + + + + + SELECT ${unique_id} + FROM ${table_name} + WHERE entity_stable_id = '${genericAssayDataFilter.stableId}' AND + profile_type='${genericAssayDataFilter.profileType}' + + + AND ( + + + + ) = '${dataFilterValue.value}' + + + + diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index 2da2eff0f0b..ddd65175da7 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -551,6 +551,69 @@ GROUP BY treatments.treatment; + + + + + + - + + + + WITH cna_query as ( SELECT hugo_gene_symbol as hugoGeneSymbol, #{profileType} as profileType, - multiIf(alteration_value = 2, 'Amplified', alteration_value = 1, 'Gained', alteration_value = 0, 'Diploid', alteration_value = -1, - 'Heterozygously deleted', alteration_value = -2, 'Homozygously deleted', 'NA') as label, + multiIf(alteration_value = '2', 'Amplified', alteration_value = '1', 'Gained', alteration_value = '0', 'Diploid', alteration_value = '-1', + 'Heterozygously deleted', alteration_value = '-2', 'Homozygously deleted', 'NA') as label, toString(alteration_value) as value, cast(count(*) as INTEGER) as count - FROM genetic_alteration_cna_derived + FROM genetic_alteration_derived - profile_type = #{profileType} - AND sample_unique_id IN () + + + + != 'NA' AND + profile_type = #{profileType} AND + + + hugo_gene_symbol = #{genomicDataFilter.hugoGeneSymbol} @@ -265,13 +272,14 @@ ) SELECT * FROM cna_query UNION ALL + SELECT - hugoGeneSymbol, + coalesce((SELECT hugoGeneSymbol FROM cna_sum LIMIT 1), #{genomicDataFilters[0].hugoGeneSymbol}) as hugoGeneSymbol, #{profileType}, 'NA' as label, 'NA' as value, - cast(((SELECT * FROM ()) - cna_count) as INTEGER) as count - FROM cna_sum + cast(((SELECT * FROM ()) - coalesce((SELECT cna_count FROM cna_sum LIMIT 1), 0)) as INTEGER) as count @@ -280,14 +288,20 @@ SELECT count(distinct sgp.sample_unique_id) FROM sample_to_gene_panel_derived sgp JOIN gene_panel_to_gene_derived gpg ON sgp.gene_panel_id = gpg.gene_panel_id - WHERE sample_unique_id IN () + WHERE + + + AND gpg.gene = #{genomicDataFilter.hugoGeneSymbol} AND sgp.alteration_type = 'MUTATION_EXTENDED' ), mutated_count as ( SELECT count(distinct sample_unique_id) FROM genomic_event_derived - WHERE sample_unique_id IN () + WHERE + + + AND hugo_gene_symbol = #{genomicDataFilter.hugoGeneSymbol} AND variant_type = 'mutation' ) @@ -308,7 +322,9 @@ count(distinct(sample_unique_id)) as uniqueCount FROM genomic_event_derived - sample_unique_id IN () + + + AND variant_type = 'mutation' hugo_gene_symbol = #{genomicDataFilter.hugoGeneSymbol} @@ -563,24 +579,46 @@ From b58a18c25b93dcf6250b94a1680180492be833fe Mon Sep 17 00:00:00 2001 From: Charles Haynes <33608920+haynescd@users.noreply.github.com> Date: Tue, 8 Oct 2024 13:04:06 -0400 Subject: [PATCH 68/87] Rfc80/add na clinical data filtering (#11050) * Add Categorical Clinical Attribute NA filtering * add api tests --------- Co-authored-by: alisman --- .../StudyViewFilterMapper.xml | 96 +++++++++++++++--- test/api-e2e/specs/clinical-data-filters.json | 99 ++++++++++++++++++- 2 files changed, 181 insertions(+), 14 deletions(-) diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index b1e179be264..1ff28729b63 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -317,6 +317,46 @@ + + + + + + + + + + + + + + + ( + + + SELECT DISTINCT ${unique_id} + FROM sample_derived sd + LEFT JOIN () AS categorical_clinical_data + ON + + + sd.sample_unique_id = categorical_clinical_data.sample_unique_id + + + sd.patient_unique_id = categorical_clinical_data.patient_unique_id + + + WHERE empty(attribute_value) + AND EXISTS () + + + + + UNION ALL + + + + SELECT ${unique_id} FROM ${table_name} WHERE attribute_name = '${clinicalDataFilter.attributeId}' AND @@ -368,23 +408,53 @@ + + ) - - SELECT ${unique_id} - FROM ${table_name} - WHERE attribute_name = '${clinicalDataFilter.attributeId}' AND - type='${type}' - - - AND ( - - - - ) ILIKE '${dataFilterValue.value}' - + + SELECT sample_unique_id, patient_unique_id, attribute_value + FROM clinical_data_derived + WHERE attribute_name = '${clinicalDataFilter.attributeId}' AND type='${type}' + AND cancer_study_identifier IN + + #{studyId} + + + + ( + SELECT ${unique_id} + FROM sample_derived sd + LEFT JOIN () AS categorical_clinical_data + ON + + + sd.sample_unique_id = categorical_clinical_data.sample_unique_id + + + sd.patient_unique_id = categorical_clinical_data.patient_unique_id + + + WHERE + + + + empty(attribute_value) + + + ( + + + + ) ILIKE '${dataFilterValue.value}' + + + + AND EXISTS () + ) + diff --git a/test/api-e2e/specs/clinical-data-filters.json b/test/api-e2e/specs/clinical-data-filters.json index 2c6614d99d6..b11a6ae46b8 100644 --- a/test/api-e2e/specs/clinical-data-filters.json +++ b/test/api-e2e/specs/clinical-data-filters.json @@ -3585,5 +3585,102 @@ } ] - } + }, + { + "name":"combined study with NA filtering", + "note":"tests that filtering for null values in combined study scenario", + "studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"], + "tests":[ + {"hash":116543724,"filterString":"Diagnosis Age:> 35Ethnicity Category:NASex:Male","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]},{"attributeId":"SEX","values":[{"value":"Male"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]},{\"attributeId\":\"SEX\",\"values\":[{\"value\":\"Male\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":200691544,"filterString":"Diagnosis Age:> 35Ethnicity Category:NASex:Male","data":{"attributes":[{"attributeId":"AGE","disableLogScale":false,"showNA":true}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]},{"attributeId":"SEX","values":[{"value":"Male"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]},{\"attributeId\":\"SEX\",\"values\":[{\"value\":\"Male\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":253200274,"filterString":"Diagnosis Age:> 35Ethnicity Category:NASex:Male","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]},{"attributeId":"SEX","values":[{"value":"Male"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/treatments/patient-counts/fetch?","label":"PatientTreatmentCounts","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]},{\"attributeId\":\"SEX\",\"values\":[{\"value\":\"Male\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":454519627,"filterString":"Diagnosis Age:> 35Ethnicity Category:NASex:Male","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]},{"attributeId":"SEX","values":[{"value":"Male"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]},{\"attributeId\":\"SEX\",\"values\":[{\"value\":\"Male\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":485763930,"filterString":"Diagnosis Age:> 35","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/treatments/sample-counts/fetch?","label":"SampleTreatmentCounts","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":671783082,"filterString":"Diagnosis Age:> 35Ethnicity Category:NA","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/treatments/sample-counts/fetch?","label":"SampleTreatmentCounts","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":771549251,"filterString":"Diagnosis Age:> 35Ethnicity Category:NASex:Male","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]},{"attributeId":"SEX","values":[{"value":"Male"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]},{\"attributeId\":\"SEX\",\"values\":[{\"value\":\"Male\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":776522566,"filterString":"Diagnosis Age:> 35","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":810813272,"filterString":"Diagnosis Age:> 35","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":827100857,"filterString":"Diagnosis Age:> 35Ethnicity Category:NASex:Male","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]},{"attributeId":"SEX","values":[{"value":"Male"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/treatments/sample-counts/fetch?","label":"SampleTreatmentCounts","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]},{\"attributeId\":\"SEX\",\"values\":[{\"value\":\"Male\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":855110806,"filterString":"Diagnosis Age:> 35Ethnicity Category:NA","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":871317982,"filterString":"Diagnosis Age:> 35Ethnicity Category:NASex:Male","data":{"attributes":[{"attributeId":"ETHNICITY"}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]},{"attributeId":"SEX","values":[{"value":"Male"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]},{\"attributeId\":\"SEX\",\"values\":[{\"value\":\"Male\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1105068765,"filterString":"Diagnosis Age:> 35Ethnicity Category:NA","data":{"attributes":[{"attributeId":"ETHNICITY"}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1237466137,"filterString":"Diagnosis Age:> 35Ethnicity Category:NASex:Male","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]},{"attributeId":"SEX","values":[{"value":"Male"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]},{\"attributeId\":\"SEX\",\"values\":[{\"value\":\"Male\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1257110931,"filterString":"Diagnosis Age:> 35Ethnicity Category:NASex:Male","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]},{"attributeId":"SEX","values":[{"value":"Male"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]},{\"attributeId\":\"SEX\",\"values\":[{\"value\":\"Male\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1409508827,"filterString":"Diagnosis Age:> 35Ethnicity Category:NA","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1443165209,"filterString":"Diagnosis Age:> 35Ethnicity Category:NASex:Male","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]},{"attributeId":"SEX","values":[{"value":"Male"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]},{\"attributeId\":\"SEX\",\"values\":[{\"value\":\"Male\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1443814778,"filterString":"Diagnosis Age:> 35Ethnicity Category:NA","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1525661014,"filterString":"Diagnosis Age:> 35Ethnicity Category:NASex:Male","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"AGE_AT_SEQUENCING","disableLogScale":false,"showNA":false},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]},{"attributeId":"SEX","values":[{"value":"Male"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]},{\"attributeId\":\"SEX\",\"values\":[{\"value\":\"Male\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1550663762,"filterString":"Diagnosis Age:> 35","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1585556210,"filterString":"Diagnosis Age:> 35Ethnicity Category:NA","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1651744711,"filterString":"Diagnosis Age:> 35Ethnicity Category:NA","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"AGE_AT_SEQUENCING","disableLogScale":false,"showNA":false},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":1705888582,"filterString":"Diagnosis Age:> 35Ethnicity Category:NASex:Male","data":{"attributes":[{"attributeId":"SEX"}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]},{\"attributeId\":\"SEX\",\"values\":[{\"value\":\"Male\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":2126419529,"filterString":"Diagnosis Age:> 35Ethnicity Category:NA","data":{"attributes":[{"attributeId":"AGE","disableLogScale":false,"showNA":true}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":2139127562,"filterString":"Diagnosis Age:> 35Ethnicity Category:NA","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1883258438,"filterString":"Diagnosis Age:> 35","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/filtered-samples/fetch?","label":"FilteredSamples","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1561872327,"filterString":"Diagnosis Age:> 35","data":{"attributes":[{"attributeId":"AGE","disableLogScale":false,"showNA":true}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1220621576,"filterString":"Diagnosis Age:> 35","data":{"attributes":[{"attributeId":"AGE","disableLogScale":false,"showNA":true}],"studyViewFilter":{"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1923060437,"filterString":"Diagnosis Age:> 35","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/molecular-profile-sample-counts/fetch?","label":"MolecularProfileSample","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1738309871,"filterString":"Diagnosis Age:> 35","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/treatments/patient-counts/fetch?","label":"PatientTreatmentCounts","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1932069010,"filterString":"Diagnosis Age:> 35","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"PFS_I_ADV_STATUS"},{"attributeId":"PFS_M_ADV_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SAMPLE_COUNT"},{"attributeId":"SEX"},{"attributeId":"ETHNICITY"},{"attributeId":"SAMPLE_TYPE"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"},{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-699110345,"filterString":"Diagnosis Age:> 35","data":{"attributes":[{"attributeId":"MUTATION_COUNT","disableLogScale":false,"showNA":false},{"attributeId":"FRACTION_GENOME_ALTERED","disableLogScale":false,"showNA":false},{"attributeId":"MSI_SCORE_MANTIS","disableLogScale":false,"showNA":false,"customBins":[0.4,0.6]},{"attributeId":"MSI_SENSOR_SCORE","disableLogScale":false,"showNA":false,"customBins":[4,10]},{"attributeId":"AGE_AT_SEQUENCING","disableLogScale":false,"showNA":false},{"attributeId":"ANEUPLOIDY_SCORE","disableLogScale":false,"showNA":false}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-bin-counts/fetch?dataBinMethod=STATIC&","label":"ClinicalDataBin","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1780947390,"filterString":"Diagnosis Age:> 35","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/mutated-genes/fetch?","label":"MutatedGenes","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-362266422,"filterString":"Diagnosis Age:> 35","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/cna-genes/fetch?","label":"CNAGenes","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-435479582,"filterString":"Diagnosis Age:> 35Ethnicity Category:NA","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"PFS_I_ADV_STATUS"},{"attributeId":"PFS_M_ADV_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SAMPLE_COUNT"},{"attributeId":"SEX"},{"attributeId":"SAMPLE_TYPE"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"},{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-266683455,"filterString":"Diagnosis Age:> 35Ethnicity Category:NA","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/treatments/patient-counts/fetch?","label":"PatientTreatmentCounts","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1430535934,"filterString":"Diagnosis Age:> 35Ethnicity Category:NA","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/sample-lists-counts/fetch?","label":"CaseList","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1122848760,"filterString":"Diagnosis Age:> 35Ethnicity Category:NA","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/structuralvariant-genes/fetch?","label":"StructuralVariantGenes","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-5165043,"filterString":"Diagnosis Age:> 35Ethnicity Category:NA","data":{"attributes":[{"attributeId":"ETHNICITY"}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1424542894,"filterString":"Diagnosis Age:> 35Ethnicity Category:NA","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"PFS_I_ADV_STATUS"},{"attributeId":"PFS_M_ADV_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SAMPLE_COUNT"},{"attributeId":"SEX"},{"attributeId":"SAMPLE_TYPE"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"},{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1577223707,"filterString":"Diagnosis Age:> 35Ethnicity Category:NASex:Male","data":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]},{"attributeId":"SEX","values":[{"value":"Male"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}},"url":"/api/column-store/clinical-data-density-plot/fetch?xAxisAttributeId=FRACTION_GENOME_ALTERED&xAxisBinCount=44&xAxisStart=0&xAxisEnd=1&yAxisAttributeId=MUTATION_COUNT&yAxisBinCount=38&yAxisStart=0&xAxisLogScale=false&yAxisLogScale=false&","label":"ClinicalDataDensity","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]},{\"attributeId\":\"SEX\",\"values\":[{\"value\":\"Male\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-623942387,"filterString":"Diagnosis Age:> 35Ethnicity Category:NASex:Male","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"PFS_I_ADV_STATUS"},{"attributeId":"PFS_M_ADV_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SAMPLE_COUNT"},{"attributeId":"SAMPLE_TYPE"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"},{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]},{\"attributeId\":\"SEX\",\"values\":[{\"value\":\"Male\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-404177705,"filterString":"Diagnosis Age:> 35Ethnicity Category:NASex:Male","data":{"attributes":[{"attributeId":"SEX"}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]},{"attributeId":"SEX","values":[{"value":"Male"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]},{\"attributeId\":\"SEX\",\"values\":[{\"value\":\"Male\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"}, + + {"hash":-1732888866,"filterString":"Diagnosis Age:> 35Ethnicity Category:NASex:Male","data":{"attributes":[{"attributeId":"OS_STATUS"},{"attributeId":"DFS_STATUS"},{"attributeId":"DSS_STATUS"},{"attributeId":"PFS_STATUS"},{"attributeId":"PFS_I_ADV_STATUS"},{"attributeId":"PFS_M_ADV_STATUS"},{"attributeId":"SUBTYPE"},{"attributeId":"TUMOR_TYPE"},{"attributeId":"PATH_T_STAGE"},{"attributeId":"SAMPLE_COUNT"},{"attributeId":"SAMPLE_TYPE"},{"attributeId":"RACE"},{"attributeId":"CANCER_TYPE_DETAILED"},{"attributeId":"OS_STATUS"},{"attributeId":"CANCER_TYPE"}],"studyViewFilter":{"clinicalDataFilters":[{"attributeId":"AGE","values":[{"start":35,"end":40},{"start":40,"end":45},{"start":45,"end":50},{"start":50,"end":55},{"start":55,"end":60},{"start":60,"end":65},{"start":65,"end":70},{"start":70,"end":75},{"start":75,"end":80},{"start":80}]},{"attributeId":"ETHNICITY","values":[{"value":"NA"}]},{"attributeId":"SEX","values":[{"value":"Male"}]}],"studyIds":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"alterationFilter":{"copyNumberAlterationEventTypes":{"AMP":true,"HOMDEL":true},"mutationEventTypes":{"any":true},"structuralVariants":null,"includeDriver":true,"includeVUS":true,"includeUnknownOncogenicity":true,"includeUnknownTier":true,"includeGermline":true,"includeSomatic":true,"includeUnknownStatus":true,"tiersBooleanMap":{}}}},"url":"/api/column-store/clinical-data-counts/fetch?","label":"ClinicalDataCounts","studies":["acc_tcga_pan_can_atlas_2018","nsclc_public_genie_bpc"],"filterUrl":"/study/summary?id=acc_tcga_pan_can_atlas_2018%2Cnsclc_public_genie_bpc#filterJson={\"clinicalDataFilters\":[{\"attributeId\":\"AGE\",\"values\":[{\"start\":35,\"end\":40},{\"start\":40,\"end\":45},{\"start\":45,\"end\":50},{\"start\":50,\"end\":55},{\"start\":55,\"end\":60},{\"start\":60,\"end\":65},{\"start\":65,\"end\":70},{\"start\":70,\"end\":75},{\"start\":75,\"end\":80},{\"start\":80}]},{\"attributeId\":\"ETHNICITY\",\"values\":[{\"value\":\"NA\"}]},{\"attributeId\":\"SEX\",\"values\":[{\"value\":\"Male\"}]}],\"studyIds\":[\"acc_tcga_pan_can_atlas_2018\",\"nsclc_public_genie_bpc\"],\"alterationFilter\":{\"copyNumberAlterationEventTypes\":{\"AMP\":true,\"HOMDEL\":true},\"mutationEventTypes\":{\"any\":true},\"structuralVariants\":null,\"includeDriver\":true,\"includeVUS\":true,\"includeUnknownOncogenicity\":true,\"includeUnknownTier\":true,\"includeGermline\":true,\"includeSomatic\":true,\"includeUnknownStatus\":true,\"tiersBooleanMap\":{}}}"} + ] + } + + + ] \ No newline at end of file From 0ac1039105b1938f788958e4c2372d17cb6b1a88 Mon Sep 17 00:00:00 2001 From: Charles Haynes <33608920+haynescd@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:22:59 -0400 Subject: [PATCH 69/87] Add generic-assay-data-counts endpoint (#11059) * Add generic-assay-data-counts endpoint * Update GenericAssayFilter to support NA's * Add tests for generic assay data counts endpoint (categorical) --------- Co-authored-by: alisman --- .../persistence/StudyViewRepository.java | 4 + .../mybatisclickhouse/StudyViewMapper.java | 4 + .../StudyViewMyBatisRepository.java | 10 ++- .../service/StudyViewColumnarService.java | 4 + .../impl/StudyViewColumnarServiceImpl.java | 9 ++- .../StudyViewColumnStoreController.java | 29 +++++++ .../StudyViewFilterMapper.xml | 54 ++++++++----- .../mybatisclickhouse/StudyViewMapper.xml | 49 ++++++++++++ .../specs/generic-assay-data-counts.json | 75 +++++++++++++++++++ 9 files changed, 215 insertions(+), 23 deletions(-) create mode 100644 test/api-e2e/specs/generic-assay-data-counts.json diff --git a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java index e73d1225916..6dab21a2081 100644 --- a/src/main/java/org/cbioportal/persistence/StudyViewRepository.java +++ b/src/main/java/org/cbioportal/persistence/StudyViewRepository.java @@ -7,6 +7,7 @@ import org.cbioportal.model.ClinicalDataCount; import org.cbioportal.model.ClinicalEventTypeCount; import org.cbioportal.model.CopyNumberCountByGene; +import org.cbioportal.model.GenericAssayDataCountItem; import org.cbioportal.model.GenomicDataCountItem; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.MolecularProfile; @@ -16,6 +17,7 @@ import org.cbioportal.model.StudyViewFilterContext; import org.cbioportal.web.parameter.ClinicalDataType; import org.cbioportal.web.parameter.GenericAssayDataBinFilter; +import org.cbioportal.web.parameter.GenericAssayDataFilter; import org.cbioportal.web.parameter.GenomicDataBinFilter; import org.cbioportal.web.parameter.GenomicDataFilter; @@ -68,6 +70,8 @@ public interface StudyViewRepository { int getTotalSampleTreatmentCount(StudyViewFilterContext studyViewFilterContext); List getCNACounts(StudyViewFilterContext studyViewFilterContext, List genomicDataFilters); + + List getGenericAssayDataCounts(StudyViewFilterContext studyViewFilterContext, List genericAssayDataFilters); Map getMutationCounts(StudyViewFilterContext studyViewFilterContext, GenomicDataFilter genomicDataFilter); diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java index 304612d6c81..00333c43a3c 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.java @@ -9,6 +9,7 @@ import org.cbioportal.model.ClinicalEventTypeCount; import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.GenePanelToGene; +import org.cbioportal.model.GenericAssayDataCountItem; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.GenomicDataCountItem; import org.cbioportal.model.PatientTreatment; @@ -18,6 +19,7 @@ import org.cbioportal.persistence.helper.AlterationFilterHelper; import org.cbioportal.persistence.helper.StudyViewFilterHelper; import org.cbioportal.web.parameter.GenericAssayDataBinFilter; +import org.cbioportal.web.parameter.GenericAssayDataFilter; import org.cbioportal.web.parameter.GenomicDataBinFilter; import org.cbioportal.web.parameter.GenomicDataFilter; @@ -66,6 +68,8 @@ public interface StudyViewMapper { int getTotalSampleTreatmentCounts(@Param("studyViewFilterHelper") StudyViewFilterHelper studyViewFilterHelper); List getCNACounts(StudyViewFilterHelper studyViewFilterHelper, List genomicDataFilters); + + List getGenericAssayDataCounts(StudyViewFilterHelper studyViewFilterHelper, List genericAssayDataFilters); Map getMutationCounts(StudyViewFilterHelper studyViewFilterHelper, GenomicDataFilter genomicDataFilter); diff --git a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java index 4f0e5cde5d0..5419d12d1a9 100644 --- a/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java +++ b/src/main/java/org/cbioportal/persistence/mybatisclickhouse/StudyViewMyBatisRepository.java @@ -6,6 +6,7 @@ import org.cbioportal.model.ClinicalDataCount; import org.cbioportal.model.ClinicalEventTypeCount; import org.cbioportal.model.GenePanelToGene; +import org.cbioportal.model.GenericAssayDataCountItem; import org.cbioportal.model.GenomicDataCountItem; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.CopyNumberCountByGene; @@ -20,6 +21,7 @@ import org.cbioportal.persistence.helper.StudyViewFilterHelper; import org.cbioportal.web.parameter.ClinicalDataType; import org.cbioportal.web.parameter.GenericAssayDataBinFilter; +import org.cbioportal.web.parameter.GenericAssayDataFilter; import org.cbioportal.web.parameter.GenomicDataBinFilter; import org.cbioportal.web.parameter.GenomicDataFilter; import org.springframework.beans.factory.annotation.Autowired; @@ -245,17 +247,19 @@ private Map> getGenericAssayProfilesMap() { @Override public List getCNACounts(StudyViewFilterContext studyViewFilterContext, List genomicDataFilters) { - return mapper.getCNACounts(createStudyViewFilterHelper(studyViewFilterContext), genomicDataFilters); } - public Map getMutationCounts(StudyViewFilterContext studyViewFilterContext, GenomicDataFilter genomicDataFilter) { + @Override + public List getGenericAssayDataCounts(StudyViewFilterContext studyViewFilterContext, List genericAssayDataFilters) { + return mapper.getGenericAssayDataCounts(createStudyViewFilterHelper(studyViewFilterContext), genericAssayDataFilters); + } + public Map getMutationCounts(StudyViewFilterContext studyViewFilterContext, GenomicDataFilter genomicDataFilter) { return mapper.getMutationCounts(createStudyViewFilterHelper(studyViewFilterContext), genomicDataFilter); } public List getMutationCountsByType(StudyViewFilterContext studyViewFilterContext, List genomicDataFilters) { - return mapper.getMutationCountsByType(createStudyViewFilterHelper(studyViewFilterContext), genomicDataFilters); } diff --git a/src/main/java/org/cbioportal/service/StudyViewColumnarService.java b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java index 9e59c326945..d4dafd536ca 100644 --- a/src/main/java/org/cbioportal/service/StudyViewColumnarService.java +++ b/src/main/java/org/cbioportal/service/StudyViewColumnarService.java @@ -5,6 +5,7 @@ import org.cbioportal.model.ClinicalData; import org.cbioportal.model.ClinicalDataCountItem; import org.cbioportal.model.ClinicalEventTypeCount; +import org.cbioportal.model.GenericAssayDataCountItem; import org.cbioportal.model.GenomicDataCountItem; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.CopyNumberCountByGene; @@ -14,6 +15,7 @@ import org.cbioportal.service.exception.StudyNotFoundException; import org.cbioportal.web.parameter.ClinicalDataType; import org.cbioportal.web.parameter.GenericAssayDataBinFilter; +import org.cbioportal.web.parameter.GenericAssayDataFilter; import org.cbioportal.web.parameter.GenomicDataBinFilter; import org.cbioportal.web.parameter.GenomicDataFilter; import org.cbioportal.web.parameter.StudyViewFilter; @@ -46,6 +48,8 @@ public interface StudyViewColumnarService { SampleTreatmentReport getSampleTreatmentReport(StudyViewFilter studyViewFilter); List getCNACountsByGeneSpecific(StudyViewFilter studyViewFilter, List genomicDataFilters); + + List getGenericAssayDataCounts(StudyViewFilter studyViewFilter, List genericAssayDataFilters); List getMutationCountsByGeneSpecific(StudyViewFilter studyViewFilter, List genomicDataFilters); diff --git a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java index fc9af001d41..ea715b98652 100644 --- a/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/StudyViewColumnarServiceImpl.java @@ -7,6 +7,7 @@ import org.cbioportal.model.ClinicalDataCountItem; import org.cbioportal.model.ClinicalEventTypeCount; import org.cbioportal.model.CopyNumberCountByGene; +import org.cbioportal.model.GenericAssayDataCountItem; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.PatientTreatmentReport; import org.cbioportal.model.GenomicDataCountItem; @@ -21,6 +22,7 @@ import org.cbioportal.web.parameter.ClinicalDataType; import org.cbioportal.web.parameter.CustomSampleIdentifier; import org.cbioportal.web.parameter.GenericAssayDataBinFilter; +import org.cbioportal.web.parameter.GenericAssayDataFilter; import org.cbioportal.web.parameter.GenomicDataBinFilter; import org.cbioportal.web.parameter.GenomicDataFilter; import org.cbioportal.web.parameter.StudyViewFilter; @@ -143,7 +145,12 @@ public List getSampleClinicalData(StudyViewFilter studyViewFilter, public List getCNACountsByGeneSpecific(StudyViewFilter studyViewFilter, List genomicDataFilters) { return studyViewRepository.getCNACounts(createContext(studyViewFilter), genomicDataFilters); } - + + @Override + public List getGenericAssayDataCounts(StudyViewFilter studyViewFilter, List genericAssayDataFilters) { + return studyViewRepository.getGenericAssayDataCounts(createContext(studyViewFilter), genericAssayDataFilters); + } + @Override public List getMutationCountsByGeneSpecific(StudyViewFilter studyViewFilter, List genomicDataFilters) { List genomicDataCountItemList = new ArrayList<>(); diff --git a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java index 0d0df0de0ef..e5ebbfecda0 100644 --- a/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java +++ b/src/main/java/org/cbioportal/web/columnar/StudyViewColumnStoreController.java @@ -20,6 +20,7 @@ import org.cbioportal.model.CopyNumberCountByGene; import org.cbioportal.model.DensityPlotData; import org.cbioportal.model.GenericAssayDataBin; +import org.cbioportal.model.GenericAssayDataCountItem; import org.cbioportal.model.GenomicDataBin; import org.cbioportal.model.GenomicDataCount; import org.cbioportal.model.PatientTreatmentReport; @@ -40,6 +41,8 @@ import org.cbioportal.web.parameter.ClinicalDataFilter; import org.cbioportal.web.parameter.DataBinMethod; import org.cbioportal.web.parameter.GenericAssayDataBinCountFilter; +import org.cbioportal.web.parameter.GenericAssayDataCountFilter; +import org.cbioportal.web.parameter.GenericAssayDataFilter; import org.cbioportal.web.parameter.GenomicDataBinCountFilter; import org.cbioportal.web.parameter.GenomicDataCountFilter; import org.cbioportal.web.parameter.GenomicDataFilter; @@ -399,6 +402,32 @@ public ResponseEntity> fetchGenomicDataCounts( return new ResponseEntity<>(result, HttpStatus.OK); } + @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") + @PostMapping(value = "/column-store/generic-assay-data-counts/fetch", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) + @Operation(description = "Fetch generic assay data counts by study view filter") + @ApiResponse(responseCode = "200", description = "OK", + content = @Content(array = @ArraySchema(schema = @Schema(implementation = GenericAssayDataCountItem.class)))) + public ResponseEntity> fetchGenericAssayDataCounts( + @Parameter(required = true, description = "Generic assay data count filter") @Valid @RequestBody(required = false) GenericAssayDataCountFilter genericAssayDataCountFilter, + @Parameter(hidden = true) // prevent reference to this attribute in the swagger-ui interface + @RequestAttribute(required = false, value = "involvedCancerStudies") Collection involvedCancerStudies, + @Parameter(hidden = true) // prevent reference to this attribute in the swagger-ui interface. this + // attribute is needed for the @PreAuthorize tag above. + @Valid @RequestAttribute(required = false, value = "interceptedGenericAssayDataCountFilter") GenericAssayDataCountFilter interceptedGenericAssayDataCountFilter) { + + List gaFilters = interceptedGenericAssayDataCountFilter.getGenericAssayDataFilters(); + StudyViewFilter studyViewFilter = interceptedGenericAssayDataCountFilter.getStudyViewFilter(); + // 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 portion of the chart + + if (gaFilters.size() == 1) { + studyViewFilterUtil.removeSelfFromGenericAssayFilter(gaFilters.getFirst().getStableId(), studyViewFilter); + } + + return new ResponseEntity<>(studyViewColumnarService.getGenericAssayDataCounts(studyViewFilter, gaFilters), HttpStatus.OK); + } + @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.utils.security.AccessLevel).READ)") @PostMapping(value = "/column-store/mutation-data-counts/fetch", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @Operation(description = "Fetch mutation data counts by GenomicDataCountFilter") diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index 1ff28729b63..4e4fb92d61b 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -442,6 +442,10 @@ empty(attribute_value) + OR + + + = 'NA' ( @@ -541,13 +545,11 @@ - - SELECT sample_unique_id, value + + SELECT sample_unique_id, value, datatype FROM generic_assay_data_derived WHERE profile_type = #{genericAssayDataFilter.profileType} AND entity_stable_id = #{genericAssayDataFilter.stableId} - - AND datatype = 'LIMIT-VALUE' @@ -569,8 +571,9 @@ SELECT DISTINCT sd.sample_unique_id FROM sample_derived sd - LEFT JOIN () AS generic_numerical_query ON sd.sample_unique_id = generic_numerical_query.sample_unique_id - WHERE value IS null OR + LEFT JOIN () AS generic_numerical_query ON sd.sample_unique_id = generic_numerical_query.sample_unique_id + WHERE datatype = 'LIMIT-VALUE' + AND value IS null OR = 'NA' @@ -582,8 +585,10 @@ SELECT DISTINCT sample_unique_id - FROM () AS generic_numerical_query + FROM () AS generic_numerical_query WHERE + datatype = 'LIMIT-VALUE' + AND != 'NA' @@ -639,18 +644,29 @@ SELECT ${unique_id} - FROM ${table_name} - WHERE entity_stable_id = '${genericAssayDataFilter.stableId}' AND - profile_type='${genericAssayDataFilter.profileType}' - - - AND ( - - - - ) ILIKE '${dataFilterValue.value}' - - + FROM sample_derived sd + LEFT JOIN () AS generic_assay_query + ON sd.sample_unique_id = generic_assay_query.sample_unique_id + + datatype != 'LIMIT-VALUE' + + + + value IS null OR + + + = 'NA' + + + ( + + + + ) ILIKE '${dataFilterValue.value}' + + + + diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index dc94c3fc3aa..e7b082753db 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -282,6 +282,47 @@ 'NA' as value, cast(((SELECT * FROM ()) - coalesce((SELECT cna_count FROM cna_sum LIMIT 1), 0)) as INTEGER) as count + + + + @@ -70,7 +70,7 @@ - GROUP BY entrez_gene_id, hugo_gene_symbol, alteration, cytoband; + GROUP BY entrez_gene_id, hugo_gene_symbol, alteration, cytoband @@ -439,21 +439,21 @@ FROM sample_to_gene_panel_derived stgp INNER JOIN gene_panel_to_gene_derived gptg on stgp.gene_panel_id = gptg.gene_panel_id - stgp.alteration_type = '${alterationType}' + stgp.alteration_type = #{alterationType} AND stgp.gene_panel_id != 'WES' AND - GROUP BY gptg.gene; + GROUP BY gptg.gene SELECT - sample_unique_id as sampleId, - patient_unique_id as patientId, + replaceOne(sample_unique_id, concat(cancer_study_identifier, '_'), '') as sampleId, + replaceOne(patient_unique_id, concat(cancer_study_identifier, '_'), '') as patientId, attribute_name as attrId, attribute_value as attrValue, cancer_study_identifier as studyId @@ -113,7 +113,7 @@
diff --git a/src/main/resources/org/cbioportal/persistence/mybatis/GenePanelMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatis/GenePanelMapper.xml index 96a1d434c15..9b070e64ab1 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatis/GenePanelMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatis/GenePanelMapper.xml @@ -121,6 +121,7 @@ WHERE + SAMPLE_ID IS NOT NULL AND genetic_profile.STABLE_ID IN #{item} @@ -132,6 +133,7 @@ + SAMPLE_ID IS NOT NULL AND NULL diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index 4fb339978e2..74a2ac58cd9 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -38,7 +38,7 @@ SELECT * FROM ( SELECT sample_derived.sample_unique_id - FROM sample_profile + FROM sample_profile GYMP JOIN genetic_profile gp ON sample_profile.genetic_profile_id = gp.genetic_profile_id JOIN cancer_study cs ON gp.cancer_study_id = cs.cancer_study_id JOIN sample_derived on sample_profile.sample_id = sample_derived.internal_id @@ -48,8 +48,10 @@ #{studyId} AND - - gp.stable_id LIKE concat('%_', #{genomicProfileId}) + + + gp.stable_id=concat(#{studyId}, '_', #{genomicProfileId}) + From 73b410d894c754efb0756b1965d103f5b5c93b0e Mon Sep 17 00:00:00 2001 From: Onur Sumer Date: Wed, 30 Oct 2024 16:21:00 -0400 Subject: [PATCH 84/87] add internal id to sample and clinical data SQL queries (#11139) --- .../service/impl/ViolinPlotServiceImpl.java | 12 ++++-------- .../resources/db-scripts/clickhouse/clickhouse.sql | 9 ++++++--- .../mybatisclickhouse/StudyViewMapper.xml | 3 +++ 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/cbioportal/service/impl/ViolinPlotServiceImpl.java b/src/main/java/org/cbioportal/service/impl/ViolinPlotServiceImpl.java index 3b7527f8ca7..a73ef75290e 100644 --- a/src/main/java/org/cbioportal/service/impl/ViolinPlotServiceImpl.java +++ b/src/main/java/org/cbioportal/service/impl/ViolinPlotServiceImpl.java @@ -39,11 +39,9 @@ public ClinicalViolinPlotData getClinicalViolinPlotData( result.setRows(new ArrayList<>()); // collect filtered samples into a set for quick lookup - Set samplesForSampleCountsIds = + Set samplesForSampleCountsIds = samplesForSampleCounts.stream() - .map(s -> s.getInternalId() == null ? - s.getCancerStudyIdentifier() + "_" + s.getStableId(): s.getInternalId().toString() - ) + .map(Sample::getInternalId) .collect(Collectors.toSet()); // clinicalDataMap is a map sampleId->studyId->data @@ -216,14 +214,12 @@ public ClinicalViolinPlotData getClinicalViolinPlotData( @SafeVarargs private static int countFilteredSamples( - Set filteredSampleIds, + Set filteredSampleIds, List... dataLists ) { return (int) Arrays.stream(dataLists) .flatMap(Collection::stream) - .map(c -> c.getInternalId() == null ? - c.getStudyId() + "_" + c.getSampleId() : c.getInternalId().toString() - ) + .map(ClinicalData::getInternalId) .filter(filteredSampleIds::contains) .count(); } diff --git a/src/main/resources/db-scripts/clickhouse/clickhouse.sql b/src/main/resources/db-scripts/clickhouse/clickhouse.sql index f0980375e54..88aa4ca8cbe 100644 --- a/src/main/resources/db-scripts/clickhouse/clickhouse.sql +++ b/src/main/resources/db-scripts/clickhouse/clickhouse.sql @@ -212,6 +212,7 @@ WHERE CREATE TABLE IF NOT EXISTS clinical_data_derived ( + internal_id Int, sample_unique_id String, patient_unique_id String, attribute_name LowCardinality(String), @@ -224,7 +225,8 @@ CREATE TABLE IF NOT EXISTS clinical_data_derived -- Insert sample attribute data INSERT INTO TABLE clinical_data_derived -SELECT sm.sample_unique_id AS sample_unique_id, +SELECT sm.internal_id AS internal_id, + sm.sample_unique_id AS sample_unique_id, sm.patient_unique_id AS patient_unique_id, cam.attr_id AS attribute_name, ifNull(csamp.attr_value, '') AS attribute_value, @@ -241,10 +243,11 @@ WHERE cam.patient_attribute = 0; -- INSERT patient attribute data INSERT INTO TABLE clinical_data_derived -SELECT '' AS sample_unique_id, +SELECT p.internal_id AS internal_id, + '' AS sample_unique_id, concat(cs.cancer_study_identifier, '_', p.stable_id) AS patient_unique_id, cam.attr_id AS attribute_name, - ifNull(clinpat.attr_value, '') AS attribute_value, + ifNull(clinpat.attr_value, '') AS attribute_value, cs.cancer_study_identifier AS cancer_study_identifier, 'patient' AS type FROM patient AS p diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml index fd7d37b6d6f..cbd67048194 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewMapper.xml @@ -6,6 +6,7 @@ SELECT + internal_id as internalId, replaceOne(sample_unique_id, concat(cancer_study_identifier, '_'), '') as sampleId, replaceOne(patient_unique_id, concat(cancer_study_identifier, '_'), '') as patientId, attribute_name as attrId, @@ -113,6 +115,7 @@