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 + + +