From a2437bc6c15ef60453e77c06e1c9fa500394dabc Mon Sep 17 00:00:00 2001 From: alisman Date: Mon, 21 Oct 2024 20:45:42 -0400 Subject: [PATCH 1/7] Fix errant genetic profile matches due to overlapping type suffix --- .../persistence/mybatisclickhouse/StudyViewFilterMapper.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index 4fb339978e2..4f63c6aba6c 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml @@ -48,8 +48,10 @@ #{studyId} AND - - gp.stable_id LIKE concat('%_', #{genomicProfileId}) + + + gp.stable_id='#{studyId}_#{genomicProfileId}' + From 3d7953cdedcb8dcbdcce1684b923ca8459270030 Mon Sep 17 00:00:00 2001 From: alisman Date: Mon, 21 Oct 2024 22:49:27 -0400 Subject: [PATCH 2/7] fix legacy broken profile counts --- .../org/cbioportal/persistence/mybatis/GenePanelMapper.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/resources/org/cbioportal/persistence/mybatis/GenePanelMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatis/GenePanelMapper.xml index 96a1d434c15..0d93794a63b 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 From bfc617990e92fe9fdeaad16d946abe5456cdba1f Mon Sep 17 00:00:00 2001 From: alisman Date: Mon, 21 Oct 2024 23:43:34 -0400 Subject: [PATCH 3/7] Fix clinical event availability grouping (broken for multi study where stable sampleids are repeated) --- .../org/cbioportal/persistence/mybatis/ClinicalEventMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/org/cbioportal/persistence/mybatis/ClinicalEventMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatis/ClinicalEventMapper.xml index 58cd60d098f..b421cc154e3 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatis/ClinicalEventMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatis/ClinicalEventMapper.xml @@ -181,7 +181,7 @@ - Group by clinical_event.EVENT_TYPE, patient.STABLE_ID + Group by clinical_event.EVENT_TYPE, patient.internal_id From 8ac5d44654fee1aec5d89d8a38bf94b8f4ebb92d Mon Sep 17 00:00:00 2001 From: alisman Date: Tue, 29 Oct 2024 15:03:31 -0400 Subject: [PATCH 4/7] Fix genomic profile filtering --- .../mybatisclickhouse/StudyViewFilterMapper.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatisclickhouse/StudyViewFilterMapper.xml index 4f63c6aba6c..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,9 +48,9 @@ #{studyId} AND - - - gp.stable_id='#{studyId}_#{genomicProfileId}' + + + gp.stable_id=concat(#{studyId}, '_', #{genomicProfileId}) From a004d91148f121773cbeb9b4a1aaf41be1afd792 Mon Sep 17 00:00:00 2001 From: alisman Date: Tue, 29 Oct 2024 15:40:50 -0400 Subject: [PATCH 5/7] Fix casing of table name --- .../org/cbioportal/persistence/mybatis/ClinicalEventMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/org/cbioportal/persistence/mybatis/ClinicalEventMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatis/ClinicalEventMapper.xml index b421cc154e3..7ccbc6af795 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatis/ClinicalEventMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatis/ClinicalEventMapper.xml @@ -181,7 +181,7 @@ - Group by clinical_event.EVENT_TYPE, patient.internal_id + Group by clinical_event.EVENT_TYPE, patient.INTERNAL_ID From 7e53ba2f171aedba16ecd28455afff3eef65ef25 Mon Sep 17 00:00:00 2001 From: alisman Date: Tue, 29 Oct 2024 15:45:11 -0400 Subject: [PATCH 6/7] Fix another casing issue --- .../org/cbioportal/persistence/mybatis/GenePanelMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/org/cbioportal/persistence/mybatis/GenePanelMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatis/GenePanelMapper.xml index 0d93794a63b..9d6f7fe473b 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatis/GenePanelMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatis/GenePanelMapper.xml @@ -121,7 +121,7 @@ WHERE - sample_id IS NOT NULL AND + SAMPLE_ID IS NOT NULL AND genetic_profile.STABLE_ID IN #{item} From 9143285654651eb73759a3652502b2a97d1ab24f Mon Sep 17 00:00:00 2001 From: alisman Date: Tue, 29 Oct 2024 15:56:08 -0400 Subject: [PATCH 7/7] Fix another casing issue --- .../org/cbioportal/persistence/mybatis/GenePanelMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/org/cbioportal/persistence/mybatis/GenePanelMapper.xml b/src/main/resources/org/cbioportal/persistence/mybatis/GenePanelMapper.xml index 9d6f7fe473b..9b070e64ab1 100644 --- a/src/main/resources/org/cbioportal/persistence/mybatis/GenePanelMapper.xml +++ b/src/main/resources/org/cbioportal/persistence/mybatis/GenePanelMapper.xml @@ -133,7 +133,7 @@ - sample_id IS NOT NULL + SAMPLE_ID IS NOT NULL AND NULL