      }((ca96047008397cd89fb3946d58bcdf0a5127caf9}(sha(ca96047008397cd89fb3946d58bcdf0a5127caf9node_idEC_kwDOAe-hB9oAKGNhOTYwNDcwMDgzOTdjZDg5ZmIzOTQ2ZDU4YmNkZjBhNTEyN2NhZjkcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-15T07:46:01Zu	committer}(hGitHubh
noreply@github.comh2023-08-15T07:46:01Zumessage%Add label check test for pull requesttree}(h(824c4622444dc4b7ac8206b190a9068a13b5ae0burlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/824c4622444dc4b7ac8206b190a9068a13b5ae0buhghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/ca96047008397cd89fb3946d58bcdf0a5127caf9
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk2y05CRBK7hj4Ov3rIwAAj3QIALAZwiF/sjfh7PjU6YB5TAj7
ihI51EWcIn4ib5NkuitT/T7WAbRyzLd20XBMCFvKMcRAcNZK2NYZQkJxzd7gN7WO
no+RbUrVbLha2P1GhxLo0m3qtBD4Zxj3HF5J+9wfpNwmHseeFceUkQQ40TMNisBs
7G8pZF60pNp0j4u7EGqAEe9FIz2NBTpM0fxpzvpdf7/yp8oOzjUrFG2l0KTySSny
dya5z2NJTO0Ao/zOnol5wm2umcp/RvuMTljwQYYAtMzb0Chs9ifHLCZENMgRH4LI
6Uqs4VVN0lNTEnBFb9d3GyS4n24RtmpT7I6368uZPJkF5nVlnonw9X/KKZv+lJM=
=NEX/
-----END PGP SIGNATURE-----
payloadX  tree 824c4622444dc4b7ac8206b190a9068a13b5ae0b
parent 63d2c6a2dc80d078c83d983f7c7067b52d7bc316
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1692085561 -0400
committer GitHub <noreply@github.com> 1692085561 -0400

Add label check test for pull requestuuhchttps://api.github.com/repos/cBioPortal/cbioportal/commits/ca96047008397cd89fb3946d58bcdf0a5127caf9html_urlXhttps://github.com/cBioPortal/cbioportal/commit/ca96047008397cd89fb3946d58bcdf0a5127caf9comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/ca96047008397cd89fb3946d58bcdf0a5127caf9/commentsh	}(login
dippindotsidJtO hMDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_id h'https://api.github.com/users/dippindotsh)https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuh}(h.web-flowh0J/hMDQ6VXNlcjE5ODY0NDQ3h24https://avatars.githubusercontent.com/u/19864447?v=4h4h5h%https://api.github.com/users/web-flowh)https://github.com/web-flowh8/https://api.github.com/users/web-flow/followersh:<https://api.github.com/users/web-flow/following{/other_user}h<5https://api.github.com/users/web-flow/gists{/gist_id}h><https://api.github.com/users/web-flow/starred{/owner}{/repo}h@3https://api.github.com/users/web-flow/subscriptionshB*https://api.github.com/users/web-flow/orgshD+https://api.github.com/users/web-flow/reposhF6https://api.github.com/users/web-flow/events{/privacy}hH5https://api.github.com/users/web-flow/received_eventshJUserhLuparents]}(h(63d2c6a2dc80d078c83d983f7c7067b52d7bc316hchttps://api.github.com/repos/cBioPortal/cbioportal/commits/63d2c6a2dc80d078c83d983f7c7067b52d7bc316h)Xhttps://github.com/cBioPortal/cbioportal/commit/63d2c6a2dc80d078c83d983f7c7067b52d7bc316uastats}(totalK2	additionsK2	deletionsK ufiles]}(h(ceb4c8b79341f873df9e2fb7bb25e0457b947f93filename!.github/workflows/label-check.ymlstatusaddedhfK2hgK changesK2blob_url|https://github.com/cBioPortal/cbioportal/blob/ca96047008397cd89fb3946d58bcdf0a5127caf9/.github%2Fworkflows%2Flabel-check.ymlraw_url{https://github.com/cBioPortal/cbioportal/raw/ca96047008397cd89fb3946d58bcdf0a5127caf9/.github%2Fworkflows%2Flabel-check.ymlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/.github%2Fworkflows%2Flabel-check.yml?ref=ca96047008397cd89fb3946d58bcdf0a5127caf9patchX  @@ -0,0 +1,50 @@
+# This GitHub Actions workflow is designed to automatically check pull requests in the cBioPortal repository for valid labels before they can be merged.
+# The workflow ensures that pull requests have labels that are defined in the .github/release-drafter.yml file's "categories" section.
+# If a pull request lacks a valid label, the workflow will fail, preventing the merge until valid labels are applied.
+name: Label Check
+
+on:
+  pull_request:
+    types:
+      - opened
+      - synchronize
+
+jobs:
+  label-check:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check PR Labels
+        uses: actions/checkout@v2
+
+      - name: Install dependencies
+        run: |
+          wget https://github.com/mikefarah/yq/releases/download/v4.34.2/yq_linux_amd64 -O /usr/local/bin/yq
+          chmod +x /usr/local/bin/yq
+      - name: Get Labels from release-drafter.yml
+        id: get_labels
+        run: |
+          curl -s "https://raw.githubusercontent.com/cBioPortal/cbioportal/master/.github/release-drafter.yml" | \
+            yq -r '.categories[].labels[]' > labels.txt
+      - name: Check Labels
+        id: check_labels
+        run: |
+          PR_NUMBER=$(jq -r ".number" $GITHUB_EVENT_PATH)
+          PR_LABELS=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER" | \
+                       jq -r '.labels[].name')
+          mapfile -t AVAILABLE_LABELS < labels.txt
+          for LABEL in ${PR_LABELS[@]}; do
+            if [[ "$LABEL" == "skip-changelog" ]]; then
+              echo "PR contains a valid label: skip-changelog"
+              exit 0  # Valid label found, exit successfully
+            fi
+            for AVAILABLE_LABEL in "${AVAILABLE_LABELS[@]}"; do
+              if [[ "$AVAILABLE_LABEL" == "$LABEL" ]]; then
+                echo "PR contains a valid label: $LABEL"
+                exit 0  # Valid label found, exit successfully
+              fi
+            done
+          done
+          echo "No valid label found on PR."
+          echo "Available label options from release-drafter.yml:"
+          cat labels.txt
+          exit 1  # No valid label found, exit with an erroruau(1d3b60991850479d7e5fc4e7cb4d31cef157411c}(sha(1d3b60991850479d7e5fc4e7cb4d31cef157411cnode_idEC_kwDOAe-hB9oAKDFkM2I2MDk5MTg1MDQ3OWQ3ZTVmYzRlN2NiNGQzMWNlZjE1NzQxMWMcommit}(author}(namelismanaemaillismanBusiness@gmail.comdate2023-08-15T19:43:03Zu	committer}(hlismanahlismanBusiness@gmail.comh2023-08-15T19:43:03Zumessagemonkeystree}(h{(3c06ad124734dfd65cbdd836bfff872f5dd5c3f2urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/3c06ad124734dfd65cbdd836bfff872f5dd5c3f2uhghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/1d3b60991850479d7e5fc4e7cb4d31cef157411c
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuhchttps://api.github.com/repos/cBioPortal/cbioportal/commits/1d3b60991850479d7e5fc4e7cb4d31cef157411chtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/1d3b60991850479d7e5fc4e7cb4d31cef157411ccomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/1d3b60991850479d7e5fc4e7cb4d31cef157411c/commentsh}(loginalismanidJ h}MDQ6VXNlcjE4NjUyMQ==
avatar_url2https://avatars.githubusercontent.com/u/186521?v=4gravatar_idh5h$https://api.github.com/users/alismanhhttps://github.com/alisman
followers_url.https://api.github.com/users/alisman/followers
following_url;https://api.github.com/users/alisman/following{/other_user}	gists_url4https://api.github.com/users/alisman/gists{/gist_id}starred_url;https://api.github.com/users/alisman/starred{/owner}{/repo}subscriptions_url2https://api.github.com/users/alisman/subscriptionsorganizations_url)https://api.github.com/users/alisman/orgs	repos_url*https://api.github.com/users/alisman/repos
events_url5https://api.github.com/users/alisman/events{/privacy}received_events_url4https://api.github.com/users/alisman/received_eventstypeUser
site_adminuh}(halismanhJ h}MDQ6VXNlcjE4NjUyMQ==h2https://avatars.githubusercontent.com/u/186521?v=4hh5h$https://api.github.com/users/alismanhhttps://github.com/alismanh.https://api.github.com/users/alisman/followersh;https://api.github.com/users/alisman/following{/other_user}h4https://api.github.com/users/alisman/gists{/gist_id}h;https://api.github.com/users/alisman/starred{/owner}{/repo}h2https://api.github.com/users/alisman/subscriptionsh)https://api.github.com/users/alisman/orgsh*https://api.github.com/users/alisman/reposh5https://api.github.com/users/alisman/events{/privacy}h4https://api.github.com/users/alisman/received_eventshUserhuparents]}(h{(dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7hchttps://api.github.com/repos/cBioPortal/cbioportal/commits/dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7hXhttps://github.com/cBioPortal/cbioportal/commit/dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7uastats}(totalK	additionsK	deletionsKufiles]}(h{(aefe54bddecd289d83dad02af2fc7332c42f6efbfilename.circleci/config.ymlstatusmodifiedhKhKchangesKblob_urlmhttps://github.com/cBioPortal/cbioportal/blob/1d3b60991850479d7e5fc4e7cb4d31cef157411c/.circleci%2Fconfig.ymlraw_urllhttps://github.com/cBioPortal/cbioportal/raw/1d3b60991850479d7e5fc4e7cb4d31cef157411c/.circleci%2Fconfig.ymlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/.circleci%2Fconfig.yml?ref=1d3b60991850479d7e5fc4e7cb4d31cef157411cpatchX  @@ -44,7 +44,7 @@ jobs:
                     git clone https://github.com/$FRONTEND_ORG/cbioportal-frontend.git && \
                     cd cbioportal-frontend && \
                     git fetch --tags && \
-                    git checkout ${FRONTEND_VERSION}
+                    git checkout master
             - persist_to_workspace:
                 root: /tmp/repos
                 paths:
@@ -219,7 +219,7 @@ jobs:
             - store_artifacts:
                     path: /tmp/repos/cbioportal-frontend/end-to-end-test/local/junit/errors/
                     destination: /errors
-                
+
         environment:
             PORTAL_SOURCE_DIR: /tmp/repos/cbioportal-frontend/
             TEST_HOME: /tmp/repos/cbioportal-frontend/end-to-end-test/localuau(fff09f454900087338c19c1dc3768aab5e2187ec}(sha(fff09f454900087338c19c1dc3768aab5e2187ecnode_idEC_kwDOAe-hB9oAKGZmZjA5ZjQ1NDkwMDA4NzMzOGMxOWMxZGMzNzY4YWFiNWUyMTg3ZWMcommit}(author}(name
Qi-Xuan Luemailqlu@carisls.comdate2023-07-24T14:12:54Zu	committer}(h
Qi-Xuan Luhqlu@carisls.comh2023-07-24T14:12:54Zumessage*add tests for genomic-data-counts endpointtree}(h(84205300fc9d92f40c8d924a774d0801f35f43e1urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/84205300fc9d92f40c8d924a774d0801f35f43e1uj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/fff09f454900087338c19c1dc3768aab5e2187ec
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/fff09f454900087338c19c1dc3768aab5e2187echtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/fff09f454900087338c19c1dc3768aab5e2187eccomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/fff09f454900087338c19c1dc3768aab5e2187ec/commentshNhNparents]}(h(a789cdc44f85c4f2e0f198f308ea435f572b0f9ej  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/a789cdc44f85c4f2e0f198f308ea435f572b0f9ej  Xhttps://github.com/cBioPortal/cbioportal/commit/a789cdc44f85c4f2e0f198f308ea435f572b0f9euastats}(totalKf	additionsKc	deletionsKufiles](}(h(90321953200ffdd26705c7e1191a093116bb1d94filenameBservice/src/main/java/org/cbioportal/service/StudyViewService.javastatusmodifiedj!  K j"  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/fff09f454900087338c19c1dc3768aab5e2187ec/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/fff09f454900087338c19c1dc3768aab5e2187ec/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.java?ref=fff09f454900087338c19c1dc3768aab5e2187ecpatchX  @@ -19,9 +19,6 @@ List<AlterationCountByGene> getStructuralVariantAlterationCountByGenes(List<Stri
 
     List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> studyIds, List<String> sampleIds, AlterationFilter annotationFilter)
         throws StudyNotFoundException;
-    
-//    List<GenomicDataCount> getCNAAlterationCountsByEvent(List<String> studyIds, List<String> sampleIds, AlterationFilter annotationFilter)
-//        throws StudyNotFoundException;
 
     List<GenomicDataCount> getCNAAlterationCountsByEvent(String molecularProfileId, List<Integer> entrezGeneIds,
                                                          List<Integer> alterations) throws MolecularProfileNotFoundException;u}(h(9f524a58de07144cd04cbc95b7fdda0f4156af7dj'  Oservice/src/test/java/org/cbioportal/service/impl/StudyViewServiceImplTest.javaj)  modifiedj!  K=j"  K j+  K=j,  https://github.com/cBioPortal/cbioportal/blob/fff09f454900087338c19c1dc3768aab5e2187ec/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javaj.  https://github.com/cBioPortal/cbioportal/raw/fff09f454900087338c19c1dc3768aab5e2187ec/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javaj0  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.java?ref=fff09f454900087338c19c1dc3768aab5e2187ecj2  X  @@ -14,6 +14,7 @@
 import org.mockito.Spy;
 import org.mockito.junit.MockitoJUnitRunner;
 
+import java.lang.reflect.Array;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -41,6 +42,8 @@ public class StudyViewServiceImplTest extends BaseServiceImplTest {
     private SignificantCopyNumberRegionService significantCopyNumberRegionService;
     @Mock
     private GenericAssayService genericAssayService;
+    @Mock
+    private DiscreteCopyNumberService discreteCopyNumberService;
     private AlterationFilter alterationFilter = new AlterationFilter();
 
     @Test
@@ -255,6 +258,64 @@ public void getCNAAlterationCountByGenes() throws Exception {
         Assert.assertEquals(1, result.size());
     }
 
+    @Test
+    public void getCNAAlterationCountByEvent() throws Exception {
+
+        List<Integer> entrezGeneIds = new ArrayList<>();
+        List<Integer> alterations = new ArrayList<>();
+        
+        for (int i = -2; i < 3; i++) {
+            entrezGeneIds.add(BaseServiceImplTest.ENTREZ_GENE_ID_1);
+            alterations.add(i);
+        }
+
+        List<CopyNumberCount> alterationCountByEvents = new ArrayList<>();
+        CopyNumberCount alterationCountByEvent1 = new CopyNumberCount();
+        CopyNumberCount alterationCountByEvent2 = new CopyNumberCount();
+        CopyNumberCount alterationCountByEvent3 = new CopyNumberCount();
+        CopyNumberCount alterationCountByEvent4 = new CopyNumberCount();
+        CopyNumberCount alterationCountByEvent5 = new CopyNumberCount();
+        
+        alterationCountByEvent1.setMolecularProfileId(BaseServiceImplTest.MOLECULAR_PROFILE_ID);
+        alterationCountByEvent1.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
+        alterationCountByEvent1.setAlteration(-2);
+        alterationCountByEvent1.setNumberOfSamples(5);
+        alterationCountByEvent1.setNumberOfSamplesWithAlterationInGene(1);
+        alterationCountByEvent2.setMolecularProfileId(BaseServiceImplTest.MOLECULAR_PROFILE_ID);
+        alterationCountByEvent2.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
+        alterationCountByEvent2.setAlteration(-1);
+        alterationCountByEvent2.setNumberOfSamples(5);
+        alterationCountByEvent2.setNumberOfSamplesWithAlterationInGene(1);
+        alterationCountByEvent3.setMolecularProfileId(BaseServiceImplTest.MOLECULAR_PROFILE_ID);
+        alterationCountByEvent3.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
+        alterationCountByEvent3.setAlteration(0);
+        alterationCountByEvent3.setNumberOfSamples(5);
+        alterationCountByEvent3.setNumberOfSamplesWithAlterationInGene(1);
+        alterationCountByEvent4.setMolecularProfileId(BaseServiceImplTest.MOLECULAR_PROFILE_ID);
+        alterationCountByEvent4.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
+        alterationCountByEvent4.setAlteration(1);
+        alterationCountByEvent4.setNumberOfSamples(5);
+        alterationCountByEvent4.setNumberOfSamplesWithAlterationInGene(1);
+        alterationCountByEvent5.setMolecularProfileId(BaseServiceImplTest.MOLECULAR_PROFILE_ID);
+        alterationCountByEvent5.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
+        alterationCountByEvent5.setAlteration(2);
+        alterationCountByEvent5.setNumberOfSamples(5);
+        alterationCountByEvent5.setNumberOfSamplesWithAlterationInGene(1);
+        alterationCountByEvents.add(alterationCountByEvent1);
+        alterationCountByEvents.add(alterationCountByEvent2);
+        alterationCountByEvents.add(alterationCountByEvent3);
+        alterationCountByEvents.add(alterationCountByEvent4);
+        alterationCountByEvents.add(alterationCountByEvent5);
+
+        Mockito.when(discreteCopyNumberService.fetchCopyNumberCounts(
+            eq(BaseServiceImplTest.MOLECULAR_PROFILE_ID),
+            eq(entrezGeneIds),
+            eq(alterations)
+)).thenReturn(alterationCountByEvents);
+        List<GenomicDataCount> result = studyViewService.getCNAAlterationCountsByEvent(BaseServiceImplTest.MOLECULAR_PROFILE_ID, entrezGeneIds, alterations);
+        Assert.assertEquals(5, result.size());
+    }
+
     @Test
     public void fetchGenericAssayDataCounts() throws Exception {
 u}(h(0d4c47bedb72f9b3111c1c56a743bf27cfd42570j'  Aweb/src/test/java/org/cbioportal/web/StudyViewControllerTest.javaj)  modifiedj!  K&j"  K j+  K&j,  https://github.com/cBioPortal/cbioportal/blob/fff09f454900087338c19c1dc3768aab5e2187ec/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj.  https://github.com/cBioPortal/cbioportal/raw/fff09f454900087338c19c1dc3768aab5e2187ec/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj0  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.java?ref=fff09f454900087338c19c1dc3768aab5e2187ecj2  XW  @@ -62,6 +62,9 @@ public class StudyViewControllerTest {
     private static final String TEST_GENERIC_ASSAY_DATA_VALUE_2 = "value2";
     private static final String TEST_CLINICAL_EVENT_TYPE = "STATUS";
     private static final Integer TEST_CLINICAL_EVENT_TYPE_COUNT = 513;
+    private static final String TEST_CNA_ALTERATION_NAME = "test_cna_event_type";
+    private static final String TEST_CNA_ALTERATION_VALUE = "2";
+    private static final String TEST_MOLECULAR_PROFILE_ID = "test_molecular_profile_id";
 
     private List<SampleIdentifier> filteredSampleIdentifiers = new ArrayList<>();
     private List<ClinicalData> clinicalData = new ArrayList<>();
@@ -506,6 +509,41 @@ public void fetchSampleCounts() throws Exception {
             .andExpect(MockMvcResultMatchers.jsonPath("$[1].count").value(2));
     }
 
+
+    @Test
+    public void fetchGenomicDataCounts() throws Exception {
+        List<GenomicDataCount> genomicDataCounts = new ArrayList<>();
+        GenomicDataCount genomicDataCount1 = new GenomicDataCount();
+        genomicDataCount1.setLabel(TEST_CNA_ALTERATION_NAME);
+        genomicDataCount1.setValue(TEST_CNA_ALTERATION_VALUE);
+        genomicDataCount1.setCount(1);
+        genomicDataCounts.add(genomicDataCount1);
+
+        List<Integer> entrezGeneIds = new ArrayList<>();
+        List<Integer> alterations = DiscreteCopyNumberEventType.ALL.getAlterationTypes();
+        for (int i = 0; i < alterations.size(); i++) entrezGeneIds.add(TEST_ENTREZ_GENE_ID_1);
+        
+        when(studyViewService.getCNAAlterationCountsByEvent(
+            eq(TEST_MOLECULAR_PROFILE_ID),
+            eq(entrezGeneIds),
+            eq(alterations)))
+            .thenReturn(genomicDataCounts);
+
+        CopyNumberCountFilter copyNumberCountFilter = new CopyNumberCountFilter();
+        copyNumberCountFilter.setEntrezGeneId(TEST_ENTREZ_GENE_ID_1);
+        copyNumberCountFilter.setMolecularProfileId(TEST_MOLECULAR_PROFILE_ID);
+        
+        mockMvc.perform(MockMvcRequestBuilders.post("/genomic-data-counts/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(copyNumberCountFilter)))
+            .andExpect(MockMvcResultMatchers.status().isOk())
+            .andExpect(MockMvcResultMatchers.content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].label").value(TEST_CNA_ALTERATION_NAME))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].value").value(TEST_CNA_ALTERATION_VALUE))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].count").value(1));
+    }
+    
     @Ignore("Skip StudyViewControllerTest.fetchClinicalDataDensityPlot due to assertion errors")
     @Test
     public void fetchClinicalDataDensityPlot() throws Exception {ueu(fcac80a9b0b0ad5026e0535d022051f4c057947a}(sha(fcac80a9b0b0ad5026e0535d022051f4c057947anode_idEC_kwDOAe-hB9oAKGZjYWM4MGE5YjBiMGFkNTAyNmUwNTM1ZDAyMjA1MWY0YzA1Nzk0N2Ecommit}(author}(nameKarthikemailkalletlakarthik@gmail.comdate2023-07-12T14:21:44Zu	committer}(jN  KarthikjP  kalletlakarthik@gmail.comjR  2023-07-12T14:21:44ZumessageDMerge remote-tracking branch 'cbio/master' into timeline-performancetree}(jF  (2807f688c04e8445d2cedc36ccd1de75041a7760urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/2807f688c04e8445d2cedc36ccd1de75041a7760uj^  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/fcac80a9b0b0ad5026e0535d022051f4c057947a
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj^  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/fcac80a9b0b0ad5026e0535d022051f4c057947ahtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/fcac80a9b0b0ad5026e0535d022051f4c057947acomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/fcac80a9b0b0ad5026e0535d022051f4c057947a/commentsjL  }(login	kalletlakidJƴ jH  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5j^  &https://api.github.com/users/kalletlakjj  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminujT  }(jo  	kalletlakjq  Jƴ jH  MDQ6VXNlcjEyOTU2ODcwjs  4https://avatars.githubusercontent.com/u/12956870?v=4ju  h5j^  &https://api.github.com/users/kalletlakjj  https://github.com/kalletlakjx  0https://api.github.com/users/kalletlak/followersjz  =https://api.github.com/users/kalletlak/following{/other_user}j|  6https://api.github.com/users/kalletlak/gists{/gist_id}j~  =https://api.github.com/users/kalletlak/starred{/owner}{/repo}j  4https://api.github.com/users/kalletlak/subscriptionsj  +https://api.github.com/users/kalletlak/orgsj  ,https://api.github.com/users/kalletlak/reposj  7https://api.github.com/users/kalletlak/events{/privacy}j  6https://api.github.com/users/kalletlak/received_eventsj  Userj  uparents](}(jF  (48f4d695b1be25eb5a67ee733b4b559afe7c49acj^  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/48f4d695b1be25eb5a67ee733b4b559afe7c49acjj  Xhttps://github.com/cBioPortal/cbioportal/commit/48f4d695b1be25eb5a67ee733b4b559afe7c49acu}(jF  (2712b20be8520460d71e154f155412422f7ba22fj^  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2712b20be8520460d71e154f155412422f7ba22fjj  Xhttps://github.com/cBioPortal/cbioportal/commit/2712b20be8520460d71e154f155412422f7ba22fuestats}(totalK	additionsK	deletionsKufiles](}(jF  (ad5612c67213e693e63929ab5689b4e0e179060dfilenameCcore/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.javastatusmodifiedj  Kj  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/fcac80a9b0b0ad5026e0535d022051f4c057947a/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/fcac80a9b0b0ad5026e0535d022051f4c057947a/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.java?ref=fcac80a9b0b0ad5026e0535d022051f4c057947apatchXV  @@ -1262,4 +1262,20 @@ public static String getReferenceGenomeName() {
     public static String getOncoKbToken()  {
         return portalProperties.getProperty(ONCOKB_TOKEN, null);
     }
+
+    public static String getDownloadControl() {
+        String downloadControlOption = getProperty("skin.hide_download_controls");
+        /*
+            skin.hide_download_controls   return_value
+                    true                    hide
+                    false                   show
+                    data                    data
+                    null/empty              show
+         */
+        switch ((downloadControlOption != null) ? downloadControlOption.trim().toLowerCase() : "false") {
+            case "true" : return "hide";
+            case "data" : return "data";
+            default: return "show";
+        }
+    }
 }u}(jF  (b20f514cc23a4e4418c7f98327a5122c92b8860cj  Hdocs/deployment/customization/Customizing-your-instance-of-cBioPortal.mdj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/fcac80a9b0b0ad5026e0535d022051f4c057947a/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdj  https://github.com/cBioPortal/cbioportal/raw/fcac80a9b0b0ad5026e0535d022051f4c057947a/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdj  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.md?ref=fcac80a9b0b0ad5026e0535d022051f4c057947aj  XV  @@ -243,11 +243,9 @@ Below you can find the complete list of all the available skin properties.
         </tr>
 		<tr>
             <td>skin.hide_download_controls</td>
-            <td>removes all download and copy-to-clipboard options.</td>
-            <td>show</td>
-            <td>
-                string. "show" enables all download and copy-to-clipboard options. "data" disables data download but keeps figure and top-level data. "hide" disables all the download and copy-to-keyboard options.
-            </td>
+            <td>controls download options in UI. **true**: hides all download options. **false**:  shows all download options. **data**: disable data download but not figure download</td>
+            <td>false</td>
+            <td>true / false / data</td>
         </tr>
         <tr>
             <td>skin.show_settings_menu</td>u}(jF  (3dba7cba8c20257809f9bf122aff3f7bcd8842e9j  )portal/src/main/webapp/config_service.jspj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/fcac80a9b0b0ad5026e0535d022051f4c057947a/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj  https://github.com/cBioPortal/cbioportal/raw/fcac80a9b0b0ad5026e0535d022051f4c057947a/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=fcac80a9b0b0ad5026e0535d022051f4c057947aj  X  @@ -146,7 +146,6 @@
             "skin.patient_view.copy_number_table.columns.show_on_init",
             "skin.patient_view.structural_variant_table.columns.show_on_init",
             "comparison.categorical_na_values",
-            "skin.hide_download_controls",
             "study_download_url",
             "skin.home_page.show_reference_genome"
         };
@@ -203,6 +202,8 @@
         obj.put("oncoKbTokenDefined", !StringUtils.isEmpty(GlobalProperties.getOncoKbToken()));
 
         obj.put("sessionServiceEnabled", !StringUtils.isEmpty(GlobalProperties.getSessionServiceUrl()));
+        
+        obj.put("skin_hide_download_controls", GlobalProperties.getDownloadControl());
 
         out.println(obj.toJSONString());
 u}(jF  (ce06c5554dfb518cc4e7df046af786eb1d86f988j  ,src/main/resources/portal.properties.EXAMPLEj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/fcac80a9b0b0ad5026e0535d022051f4c057947a/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj  https://github.com/cBioPortal/cbioportal/raw/fcac80a9b0b0ad5026e0535d022051f4c057947a/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=fcac80a9b0b0ad5026e0535d022051f4c057947aj  X  @@ -108,7 +108,7 @@ skin.study_view.link_text=To build your own case set, try out our enhanced Study
 # skin.home_page.show_reference_genome=false
 
 ## setting controlling whether Download tabs and download/copy-to-clipboard controls should be shown
-# skin.hide_download_controls=show
+# skin.hide_download_controls=false
 
 ## setting controlling which name should be used to display the authenticated user (email, or username)
 # skin.user_display_name=emailueu(63d9ab030cba3c82550862e161e203c5ddf33c52}(sha(63d9ab030cba3c82550862e161e203c5ddf33c52node_idEC_kwDOAe-hB9oAKDYzZDlhYjAzMGNiYTNjODI1NTA4NjJlMTYxZTIwM2M1ZGRmMzNjNTIcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-01T13:35:48Zu	committer}(j  Gaofei Zhaoj  ,15748980+dippindots@users.noreply.github.comj  2023-08-01T13:35:48Zumessage5Allow redis service unavailable when Redis is enabledtree}(j  (4cdf498013d84ddf0e841c387f80a124bb99d633urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/4cdf498013d84ddf0e841c387f80a124bb99d633uj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/63d9ab030cba3c82550862e161e203c5ddf33c52
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/63d9ab030cba3c82550862e161e203c5ddf33c52html_urlXhttps://github.com/cBioPortal/cbioportal/commit/63d9ab030cba3c82550862e161e203c5ddf33c52comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/63d9ab030cba3c82550862e161e203c5ddf33c52/commentsj  }(login
dippindotsidJtO j  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j  'https://api.github.com/users/dippindotsj  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj  }(j   
dippindotsj  JtO j  MDQ6VXNlcjE1NzQ4OTgwj  4https://avatars.githubusercontent.com/u/15748980?v=4j  h5j  'https://api.github.com/users/dippindotsj  https://github.com/dippindotsj	  1https://api.github.com/users/dippindots/followersj  >https://api.github.com/users/dippindots/following{/other_user}j
  7https://api.github.com/users/dippindots/gists{/gist_id}j  >https://api.github.com/users/dippindots/starred{/owner}{/repo}j  5https://api.github.com/users/dippindots/subscriptionsj  ,https://api.github.com/users/dippindots/orgsj  -https://api.github.com/users/dippindots/reposj  8https://api.github.com/users/dippindots/events{/privacy}j  7https://api.github.com/users/dippindots/received_eventsj  Userj  uparents]}(j  (0ed47592726452a87ac27cce7fef0cdce7719adaj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/0ed47592726452a87ac27cce7fef0cdce7719adaj  Xhttps://github.com/cBioPortal/cbioportal/commit/0ed47592726452a87ac27cce7fef0cdce7719adauastats}(totalK3	additionsK3	deletionsK ufiles](}(j  (2da81e8787c9c0aa846a08dfa3d2fa80a233ee13filename\persistence/persistence-api/src/main/java/org/cbioportal/persistence/config/RedisConfig.javastatusmodifiedj7  Kj8  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/63d9ab030cba3c82550862e161e203c5ddf33c52/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fconfig%2FRedisConfig.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/63d9ab030cba3c82550862e161e203c5ddf33c52/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fconfig%2FRedisConfig.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fconfig%2FRedisConfig.java?ref=63d9ab030cba3c82550862e161e203c5ddf33c52patchX  @@ -2,14 +2,17 @@
 
 import org.cbioportal.persistence.util.CustomKeyGenerator;
 import org.cbioportal.persistence.util.CustomRedisCachingProvider;
+import org.cbioportal.persistence.util.LoggingCacheErrorHandler;
 import org.cbioportal.utils.config.annotation.ConditionalOnProperty;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cache.CacheManager;
 import org.springframework.cache.annotation.CachingConfigurerSupport;
 import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.cache.interceptor.CacheErrorHandler;
 import org.springframework.cache.interceptor.CacheResolver;
 import org.springframework.cache.interceptor.KeyGenerator;
 import org.springframework.cache.interceptor.NamedCacheResolver;
+
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 
@@ -29,6 +32,11 @@ public CacheManager cacheManager() {
         );
     }
 
+    @Override
+    public CacheErrorHandler errorHandler() {
+        return new LoggingCacheErrorHandler();
+    }
+
     @Bean
     @Override
     public KeyGenerator keyGenerator() {u}(j  (70007bb896609c8f4e841897ff756cf3ec343cdbj=  gpersistence/persistence-api/src/main/java/org/cbioportal/persistence/util/LoggingCacheErrorHandler.javaj?  addedj7  K+j8  K jA  K+jB  https://github.com/cBioPortal/cbioportal/blob/63d9ab030cba3c82550862e161e203c5ddf33c52/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Futil%2FLoggingCacheErrorHandler.javajD  https://github.com/cBioPortal/cbioportal/raw/63d9ab030cba3c82550862e161e203c5ddf33c52/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Futil%2FLoggingCacheErrorHandler.javajF  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Futil%2FLoggingCacheErrorHandler.java?ref=63d9ab030cba3c82550862e161e203c5ddf33c52jH  X  @@ -0,0 +1,43 @@
+package org.cbioportal.persistence.util;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.cache.Cache;
+import org.springframework.cache.interceptor.CacheErrorHandler;
+
+/**
+ * Implementation of org.springframework.cache.interceptor.CacheErrorHandler
+ * that logs the error messages when performing Redis operations.
+ * Redis will throw a RuntimeException causing our APIs to return HTTP 500 responses, so we defined
+ * this class to just log the errors and allow our app fallback to the non-cached version.
+ */
+
+public class LoggingCacheErrorHandler implements CacheErrorHandler {
+
+    private static final Logger LOG = LoggerFactory.getLogger(LoggingCacheErrorHandler.class);
+
+    @Override
+    public void handleCacheGetError(RuntimeException exception, Cache cache, Object key) {
+        LOG.error(String.format("Cache '%s' failed to get entry with key '%s'", cache.getName(), key), exception);
+        exception.printStackTrace();
+    }
+
+    @Override
+    public void handleCachePutError(RuntimeException exception, Cache cache, Object key, Object value) {
+        LOG.error(String.format("Cache '%s' failed to put entry with key '%s'", cache.getName(), key), exception);
+        exception.printStackTrace();
+    }
+
+    @Override
+    public void handleCacheEvictError(RuntimeException exception, Cache cache, Object key) {
+        LOG.error(String.format("Cache '%s' failed to evict entry with key '%s'", cache.getName(), key), exception);
+        exception.printStackTrace();
+    }
+
+    @Override
+    public void handleCacheClearError(RuntimeException exception, Cache cache) {
+        LOG.error(String.format("Cache '%s' failed to clear entries", cache.getName()), exception);
+        exception.printStackTrace();
+    }
+
+}ueu(1239c3e45daaa5c4e80d36656c44a14d71ac6c6c}(sha(1239c3e45daaa5c4e80d36656c44a14d71ac6c6cnode_idEC_kwDOAe-hB9oAKDEyMzljM2U0NWRhYWE1YzRlODBkMzY2NTZjNDRhMTRkNzFhYzZjNmMcommit}(author}(name
Qi-Xuan Luemailqlu@carisls.comdate2023-07-27T12:49:40Zu	committer}(j\  
Qi-Xuan Luj^  qlu@carisls.comj`  2023-07-27T12:49:40Zumessage@get DiscreteCNAProfileCaseIdentifiers with provided profileTypestree}(jT  (05b79c914fe1960447fadd7e293bb516706b1a35urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/05b79c914fe1960447fadd7e293bb516706b1a35ujl  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujl  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1239c3e45daaa5c4e80d36656c44a14d71ac6c6chtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/1239c3e45daaa5c4e80d36656c44a14d71ac6c6ccomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/commentsjZ  Njb  Nparents]}(jT  (082f3f56b88555f9ff9a0c1e57bfe7b3bd3326adjl  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326adjx  Xhttps://github.com/cBioPortal/cbioportal/commit/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326aduastats}(totalK	additionsK_	deletionsK5ufiles](}(jT  (4e7038acdcdfb38c56d91f3ba0ed0194111945d9filenameIservice/src/main/java/org/cbioportal/service/MolecularProfileService.javastatusmodifiedj  Kj  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FMolecularProfileService.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FMolecularProfileService.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FMolecularProfileService.java?ref=1239c3e45daaa5c4e80d36656c44a14d71ac6c6cpatchX  @@ -42,4 +42,8 @@ List<MolecularProfile> getMolecularProfilesReferringTo(String referredMolecularP
     List<MolecularProfileCaseIdentifier> getFirstMutationProfileCaseIdentifiers(List<String> studyIds, List<String> sampleIds);
     List<MolecularProfileCaseIdentifier> getFirstDiscreteCNAProfileCaseIdentifiers(List<String> studyIds, List<String> sampleIds);
     List<MolecularProfileCaseIdentifier> getFirstStructuralVariantProfileCaseIdentifiers(List<String> studyIds, List<String> sampleIds);
+
+    List<MolecularProfileCaseIdentifier> getFilteredMutationProfileCaseIdentifiers(List<String> studyIds, List<String> sampleIds, List<String> profileTypes);
+    List<MolecularProfileCaseIdentifier> getFilteredDiscreteCNAProfileCaseIdentifiers(List<String> studyIds, List<String> sampleIds, List<String> profileTypes);
+    List<MolecularProfileCaseIdentifier> getFilteredStructuralVariantProfileCaseIdentifiers(List<String> studyIds, List<String> sampleIds, List<String> profileTypes);
 }u}(jT  (adc5fa89c74a5ceb8c0b7f12a77d4c98c9241dcdj  Bservice/src/main/java/org/cbioportal/service/StudyViewService.javaj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javaj  https://github.com/cBioPortal/cbioportal/raw/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.java?ref=1239c3e45daaa5c4e80d36656c44a14d71ac6c6cj  X\  @@ -23,6 +23,7 @@ List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> studyIds,
     List<GenomicDataCount> getCNAAlterationCountsByGeneSpecific(List<String> studyIds,
                                                                 List<String> sampleIds,
                                                                 List<String> hugoGeneSymbols,
+                                                                List<String> profileTypes,
                                                                 AlterationFilter alterationFilter) 
         throws StudyNotFoundException;
 u}(jT  (011580c5345d79fd514d7d43c17e5c0c9238d871j  Rservice/src/main/java/org/cbioportal/service/impl/MolecularProfileServiceImpl.javaj  modifiedj  K+j  Kj  K1j  https://github.com/cBioPortal/cbioportal/blob/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FMolecularProfileServiceImpl.javaj  https://github.com/cBioPortal/cbioportal/raw/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FMolecularProfileServiceImpl.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FMolecularProfileServiceImpl.java?ref=1239c3e45daaa5c4e80d36656c44a14d71ac6c6cj  X  @@ -14,7 +14,9 @@
 import org.springframework.security.access.prepost.PostFilter;
 import org.springframework.stereotype.Service;
 
+import javax.swing.text.html.Option;
 import java.util.*;
+import java.util.function.Function;
 import java.util.function.Predicate;
 import java.util.stream.Collectors;
 
@@ -120,27 +122,62 @@ public List<MolecularProfile> getMolecularProfilesReferringTo(String referredMol
 
     @Override
     public List<MolecularProfileCaseIdentifier> getMolecularProfileCaseIdentifiers(List<String> studyIds, List<String> sampleIds) {
-        return getFilteredMolecularProfileCaseIdentifiers(studyIds, sampleIds, Optional.empty());
+        return getFilteredMolecularProfileCaseIdentifiers(studyIds, sampleIds, Optional.empty(), Optional.empty());
     }
 
     @Override
 	public List<MolecularProfileCaseIdentifier> getFirstMutationProfileCaseIdentifiers(List<String> studyIds, List<String> sampleIds) {
-        return getFilteredMolecularProfileCaseIdentifiers(studyIds, sampleIds, Optional.of(molecularProfileUtil.isMutationProfile));
+        return getFirstMolecularProfileCaseIdentifiers(studyIds, sampleIds, Optional.of(molecularProfileUtil.isMutationProfile));
 	}
 
 	@Override
 	public List<MolecularProfileCaseIdentifier> getFirstDiscreteCNAProfileCaseIdentifiers(List<String> studyIds, List<String> sampleIds) {
-        return getFilteredMolecularProfileCaseIdentifiers(studyIds, sampleIds, Optional.of(molecularProfileUtil.isDiscreteCNAMolecularProfile));
+        return getFirstMolecularProfileCaseIdentifiers(studyIds, sampleIds, Optional.of(molecularProfileUtil.isDiscreteCNAMolecularProfile));
 	}
 
     @Override
     public List<MolecularProfileCaseIdentifier> getFirstStructuralVariantProfileCaseIdentifiers(List<String> studyIds, List<String> sampleIds) {
-        return getFilteredMolecularProfileCaseIdentifiers(studyIds, sampleIds, Optional.of(molecularProfileUtil.isStructuralVariantMolecularProfile));
+        return getFirstMolecularProfileCaseIdentifiers(studyIds, sampleIds, Optional.of(molecularProfileUtil.isStructuralVariantMolecularProfile));
     }
 
-    private List<MolecularProfileCaseIdentifier> getFilteredMolecularProfileCaseIdentifiers(List<String> studyIds, List<String> sampleIds, Optional<Predicate<MolecularProfile>> profileFilter) {
+    @Override
+    public List<MolecularProfileCaseIdentifier> getFilteredMutationProfileCaseIdentifiers(List<String> studyIds, List<String> sampleIds, List<String> profileTypes) {
+        return getFilteredMolecularProfileCaseIdentifiers(studyIds, sampleIds, Optional.empty(), Optional.of(molecularProfileUtil.isMutationProfile));
+    }
+
+    @Override
+    public List<MolecularProfileCaseIdentifier> getFilteredDiscreteCNAProfileCaseIdentifiers(List<String> studyIds, List<String> sampleIds, List<String> profileTypes) {
+        return getFilteredMolecularProfileCaseIdentifiers(studyIds, sampleIds,  Optional.of(profileTypes), Optional.of(molecularProfileUtil.isDiscreteCNAMolecularProfile));
+    }
+
+    @Override
+    public List<MolecularProfileCaseIdentifier> getFilteredStructuralVariantProfileCaseIdentifiers(List<String> studyIds, List<String> sampleIds, List<String> profileTypes) {
+        return getFilteredMolecularProfileCaseIdentifiers(studyIds, sampleIds, Optional.empty(), Optional.of(molecularProfileUtil.isStructuralVariantMolecularProfile));
+    }
+
+    public List<MolecularProfileCaseIdentifier> getFirstMolecularProfileCaseIdentifiers(List<String> studyIds, List<String> sampleIds, Optional<Predicate<MolecularProfile>> profileFilter) {
         List<MolecularProfile> molecularProfiles =
             getMolecularProfilesInStudies(studyIds.stream().distinct().collect(Collectors.toList()), "SUMMARY");
-        return molecularProfileUtil.getFilteredMolecularProfileCaseIdentifiers(molecularProfiles, studyIds, sampleIds, profileFilter);
+        return molecularProfileUtil.getFirstMolecularProfileCaseIdentifiers(molecularProfiles, studyIds, sampleIds, profileFilter);
+    }
+    
+    
+    private List<MolecularProfileCaseIdentifier> getFilteredMolecularProfileCaseIdentifiers(List<String> studyIds, List<String> sampleIds, Optional<List<String>> profileTypes, Optional<Predicate<MolecularProfile>> profileFilter) {
+        List<MolecularProfile> molecularProfiles =
+            getMolecularProfilesInStudies(studyIds.stream().distinct().collect(Collectors.toList()), "SUMMARY");
+        Optional<List<Integer>> molecularProfileIds = Optional.empty();
+        if (profileTypes.isPresent()) {
+            Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
+                .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
+            molecularProfileIds = Optional.of(profileTypes.get()
+                .stream()
+                .flatMap(profileType -> molecularProfileMap.getOrDefault(profileType, new ArrayList<MolecularProfile>())
+                    .stream()
+                    .map(MolecularProfile::getMolecularProfileId)
+                    .collect(Collectors.toList())
+                    .stream()).collect(Collectors.toList()));
+        }
+            
+        return molecularProfileUtil.getFilteredMolecularProfileCaseIdentifiers(molecularProfiles, studyIds, sampleIds, molecularProfileIds, profileFilter);
     }
 }u}(jT  (82a2fd08b9bd6055caba821306f4b798c279224fj  Kservice/src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj  https://github.com/cBioPortal/cbioportal/raw/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.java?ref=1239c3e45daaa5c4e80d36656c44a14d71ac6c6cj  X'  @@ -193,10 +193,12 @@ public List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> stu
     public List<GenomicDataCount> getCNAAlterationCountsByGeneSpecific(List<String> studyIds,
                                                                        List<String> sampleIds,
                                                                        List<String> hugoGeneSymbols,
+                                                                       List<String> profileTypes,
                                                                        AlterationFilter alterationFilter) throws StudyNotFoundException {
+        
         List<MolecularProfileCaseIdentifier> caseIdentifiers =
-            molecularProfileService.getFirstDiscreteCNAProfileCaseIdentifiers(studyIds, sampleIds);
-
+            molecularProfileService.getFilteredDiscreteCNAProfileCaseIdentifiers(studyIds, sampleIds, profileTypes);
+        
         Select<Integer> entrezGeneIds = Select.byValues(
             geneService
             .fetchGenes(hugoGeneSymbols,u}(jT  (02e88549fabe4cf1e3363542dbfd4533d0ecb6dej  Kservice/src/main/java/org/cbioportal/service/util/MolecularProfileUtil.javaj  modifiedj  Kj  Kj  K-j  https://github.com/cBioPortal/cbioportal/blob/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FMolecularProfileUtil.javaj  https://github.com/cBioPortal/cbioportal/raw/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FMolecularProfileUtil.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FMolecularProfileUtil.java?ref=1239c3e45daaa5c4e80d36656c44a14d71ac6c6cj  X  @@ -3,10 +3,8 @@
 import org.cbioportal.model.MolecularProfile;
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
 import org.springframework.stereotype.Component;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
+
+import java.util.*;
 import java.util.function.Predicate;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
@@ -36,6 +34,31 @@ public Map<String, List<MolecularProfile>> categorizeMolecularProfilesByStableId
     }
 
     public List<MolecularProfileCaseIdentifier> getFilteredMolecularProfileCaseIdentifiers(List<MolecularProfile> molecularProfiles,
+                                                                                           List<String> studyIds,
+                                                                                           List<String> sampleIds,
+                                                                                           Optional<List<Integer>> molecularProfileIds,
+                                                                                           Optional<Predicate<MolecularProfile>> profileFilter) {
+        
+        Map<String, List<MolecularProfile>> mapByStudyId = getFilteredMolecularProfilesByStudyId(molecularProfiles, profileFilter);
+        List<MolecularProfileCaseIdentifier> caseIdentifiers = new ArrayList<>();
+        for (int i = 0; i < studyIds.size(); i++) {
+            String studyId = studyIds.get(i);
+            if (mapByStudyId.containsKey(studyId)) {
+                // add case identifiers for all molecular profiles
+                int finalI = i;
+                mapByStudyId
+                    .getOrDefault(studyId, new ArrayList<>())
+                    .stream().filter(profile ->
+                        (!molecularProfileIds.isPresent() || molecularProfileIds.get().contains(profile.getMolecularProfileId())))
+                    .forEach(molecularProfile -> {
+                        caseIdentifiers.add(new MolecularProfileCaseIdentifier(sampleIds.get(finalI), molecularProfile.getStableId()));
+                    });
+            }
+        }
+        return caseIdentifiers;
+    }
+
+    public List<MolecularProfileCaseIdentifier> getFirstMolecularProfileCaseIdentifiers(List<MolecularProfile> molecularProfiles,
                                                                                            List<String> studyIds,
                                                                                            List<String> sampleIds,
                                                                                            Optional<Predicate<MolecularProfile>> profileFilter) {
@@ -44,18 +67,8 @@ public List<MolecularProfileCaseIdentifier> getFilteredMolecularProfileCaseIdent
         for (int i = 0; i < studyIds.size(); i++) {
             String studyId = studyIds.get(i);
             if (mapByStudyId.containsKey(studyId)) {
-                if (profileFilter.isPresent()) {
-                    // only add identifier for one molecular profile
-                    caseIdentifiers.add(new MolecularProfileCaseIdentifier(sampleIds.get(i), mapByStudyId.get(studyId).get(0).getStableId()));
-                } else {
-                    // add case identifiers for all molecular profiles
-                    int finalI = i;
-                    mapByStudyId
-                        .getOrDefault(studyId, new ArrayList<>())
-                        .forEach(molecularProfile -> {
-                            caseIdentifiers.add(new MolecularProfileCaseIdentifier(sampleIds.get(finalI), molecularProfile.getStableId()));
-                        });
-                }
+                // only add identifier for one molecular profile
+                caseIdentifiers.add(new MolecularProfileCaseIdentifier(sampleIds.get(i), mapByStudyId.get(studyId).get(0).getStableId()));
             }
         }
         return caseIdentifiers;u}(jT  (34cb9b67c5242b44649cb694cd8c5b76109d033dj  Jservice/src/test/java/org/cbioportal/service/impl/BaseServiceImplTest.javaj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.javaj  https://github.com/cBioPortal/cbioportal/raw/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.java?ref=1239c3e45daaa5c4e80d36656c44a14d71ac6c6cj  X-  @@ -11,6 +11,7 @@ public class BaseServiceImplTest {
     public static final String MOLECULAR_PROFILE_ID = "molecular_profile_id";
     public static final String MOLECULAR_PROFILE_ID_A = "molecular_profile_id_a";
     public static final String MOLECULAR_PROFILE_ID_B = "molecular_profile_id_b";
+    public static final String MOLECULAR_PROFILE_TYPE = "molecular_profile_type";
     public static final String SAMPLE_ID1 = "sample_id1";
     public static final String SAMPLE_ID2 = "sample_id2";
     public static final String SAMPLE_ID3 = "sample_id3";u}(jT  (43d142c3bbc4adb2229e658d1d7abe0672c27cfdj  Oservice/src/test/java/org/cbioportal/service/impl/StudyViewServiceImplTest.javaj  modifiedj  Kj  Kj  K	j  https://github.com/cBioPortal/cbioportal/blob/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javaj  https://github.com/cBioPortal/cbioportal/raw/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.java?ref=1239c3e45daaa5c4e80d36656c44a14d71ac6c6cj  X  @@ -264,18 +264,19 @@ public void getCNAAlterationCountByGeneSpecific() throws Exception {
         List<String> sampleIds = Arrays.asList(BaseServiceImplTest.SAMPLE_ID1, BaseServiceImplTest.SAMPLE_ID2, BaseServiceImplTest.SAMPLE_ID3);
         List<String> studyIds = Collections.nCopies(3, BaseServiceImplTest.STUDY_ID);
         List<String> hugoGeneSymbols = Arrays.asList(BaseServiceImplTest.HUGO_GENE_SYMBOL_1);
-
+        List<String> profileTypes = Arrays.asList(BaseServiceImplTest.MOLECULAR_PROFILE_TYPE);
+        
         List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers = new ArrayList<>();
         MolecularProfileCaseIdentifier profileCaseIdentifier1 = new MolecularProfileCaseIdentifier(BaseServiceImplTest.SAMPLE_ID1, BaseServiceImplTest.MOLECULAR_PROFILE_ID);
         molecularProfileCaseIdentifiers.add(profileCaseIdentifier1);
         MolecularProfileCaseIdentifier profileCaseIdentifier2 = new MolecularProfileCaseIdentifier(BaseServiceImplTest.SAMPLE_ID2, BaseServiceImplTest.MOLECULAR_PROFILE_ID);
         molecularProfileCaseIdentifiers.add(profileCaseIdentifier2);
         Mockito.when(molecularProfileService.getFirstDiscreteCNAProfileCaseIdentifiers(studyIds, sampleIds))
             .thenReturn(molecularProfileCaseIdentifiers);
-        
+
         List<CopyNumberCountByGene> alterationCountByGenes = new ArrayList<>();
         CopyNumberCountByGene alterationCountByGene1 = new CopyNumberCountByGene();
-        
+
         alterationCountByGene1.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
         alterationCountByGene1.setAlteration(-2);
         alterationCountByGene1.setNumberOfAlteredCases(1);
@@ -312,7 +313,7 @@ public void getCNAAlterationCountByGeneSpecific() throws Exception {
             eq(false),
             any(AlterationFilter.class)))
             .thenReturn(new Pair<>(alterationCountByGenes, 5L));
-        List<GenomicDataCount> result = studyViewService.getCNAAlterationCountsByGeneSpecific(studyIds, sampleIds, hugoGeneSymbols, new AlterationFilter());
+        List<GenomicDataCount> result = studyViewService.getCNAAlterationCountsByGeneSpecific(studyIds, sampleIds, hugoGeneSymbols, profileTypes, new AlterationFilter());
         Assert.assertEquals(5L, result.size());
     }
 u}(jT  (e0c8e1701655edb37bff70cabaccdeef74565565j  Oservice/src/test/java/org/cbioportal/service/util/MolecularProfileUtilTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FMolecularProfileUtilTest.javaj  https://github.com/cBioPortal/cbioportal/raw/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FMolecularProfileUtilTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FMolecularProfileUtilTest.java?ref=1239c3e45daaa5c4e80d36656c44a14d71ac6c6cj  X  @@ -9,6 +9,7 @@
 import org.mockito.InjectMocks;
 import org.mockito.junit.MockitoJUnitRunner;
 
+import javax.swing.text.html.Option;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -62,7 +63,7 @@ public void getFilteredMolecularProfileCaseIdentifiers() {
         List<String> sampleIds = Arrays.asList(BaseServiceImplTest.SAMPLE_ID1, BaseServiceImplTest.SAMPLE_ID2, BaseServiceImplTest.SAMPLE_ID3);
 
 
-        List<MolecularProfileCaseIdentifier> result = molecularProfileUtil.getFilteredMolecularProfileCaseIdentifiers(new ArrayList<>(), studyIds, sampleIds, Optional.empty());
+        List<MolecularProfileCaseIdentifier> result = molecularProfileUtil.getFilteredMolecularProfileCaseIdentifiers(new ArrayList<>(), studyIds, sampleIds, Optional.empty(), Optional.empty());
         // no molecular profiles
         Assert.assertEquals(0, result.size());
 
@@ -72,21 +73,21 @@ public void getFilteredMolecularProfileCaseIdentifiers() {
             linearCNAMolecularProfile,
             continuousMRNAMolecularProfile,
             discreteMRNAMolecularProfile);
-        result = molecularProfileUtil.getFilteredMolecularProfileCaseIdentifiers(allMolecularProfiles, studyIds, sampleIds, Optional.empty());
+        result = molecularProfileUtil.getFilteredMolecularProfileCaseIdentifiers(allMolecularProfiles, studyIds, sampleIds, Optional.empty(), Optional.empty());
         // all molecular profiles
         // return would 18(6 profiles X 3 samples) instead of 24(8 profiles X 3 samples)
         Assert.assertEquals("all profiles", 18, result.size());
 
         //filtered mutation profile case identifiers
-        result = molecularProfileUtil.getFilteredMolecularProfileCaseIdentifiers(allMolecularProfiles, studyIds, sampleIds, Optional.of(molecularProfileUtil.isMutationProfile));
+        result = molecularProfileUtil.getFilteredMolecularProfileCaseIdentifiers(allMolecularProfiles, studyIds, sampleIds, Optional.empty(), Optional.of(molecularProfileUtil.isMutationProfile));
         Assert.assertEquals("mutation profile case identifiers", 3, result.size());
 
         //filtered discrete CNA profile case identifiers
-        result = molecularProfileUtil.getFilteredMolecularProfileCaseIdentifiers(allMolecularProfiles, studyIds, sampleIds, Optional.of(molecularProfileUtil.isDiscreteCNAMolecularProfile));
+        result = molecularProfileUtil.getFilteredMolecularProfileCaseIdentifiers(allMolecularProfiles, studyIds, sampleIds, Optional.empty(), Optional.of(molecularProfileUtil.isDiscreteCNAMolecularProfile));
         Assert.assertEquals("discrete CNA profile case identifiers", 3, result.size());
 
         //filtered structural variant profile case identifiers
-        result = molecularProfileUtil.getFilteredMolecularProfileCaseIdentifiers(allMolecularProfiles, studyIds, sampleIds, Optional.of(molecularProfileUtil.isStructuralVariantMolecularProfile));
+        result = molecularProfileUtil.getFilteredMolecularProfileCaseIdentifiers(allMolecularProfiles, studyIds, sampleIds, Optional.empty(), Optional.of(molecularProfileUtil.isStructuralVariantMolecularProfile));
         Assert.assertEquals("structural variant profile case identifiers", 3, result.size());
 
     }u}(jT  (27dca6a7ff6735e5ab5473e04ede783eed10a865j  =web/src/main/java/org/cbioportal/web/StudyViewController.javaj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj  https://github.com/cBioPortal/cbioportal/raw/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java      j  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=1239c3e45daaa5c4e80d36656c44a14d71ac6c6cj  X  @@ -894,6 +894,7 @@ public ResponseEntity<List<GenomicDataCount>> fetchGenomicDataCounts(
             studyIds,
             sampleIds,
             gdFilters.stream().map(GenomicDataFilter::getHugoGeneSymbol).collect(Collectors.toList()),
+            gdFilters.stream().map(GenomicDataFilter::getProfileType).collect(Collectors.toList()), 
             studyViewFilter.getAlterationFilter());
 
         return new ResponseEntity<>(result, HttpStatus.OK);u}(jT  (49b16f74efae80f2a0bc3a00e2f2d1538c96227ej  Iweb/src/main/java/org/cbioportal/web/parameter/CopyNumberCountFilter.javaj  removedj  K j  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FCopyNumberCountFilter.javaj  https://github.com/cBioPortal/cbioportal/raw/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FCopyNumberCountFilter.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FCopyNumberCountFilter.java?ref=082f3f56b88555f9ff9a0c1e57bfe7b3bd3326adj  X2  @@ -1,20 +0,0 @@
-package org.cbioportal.web.parameter;
-
-public class CopyNumberCountFilter {
-
-    private String molecularProfileId;
-
-    private Integer entrezGeneId;
-
-    public String getMolecularProfileId() {return  molecularProfileId; }
-    
-    public void setMolecularProfileId(String molecularProfileId) {this.molecularProfileId = molecularProfileId; }
-
-    public Integer getEntrezGeneId() {
-        return entrezGeneId;
-    }
-
-    public void setEntrezGeneId(Integer entrezGeneId) {
-        this.entrezGeneId = entrezGeneId;
-    }
-}u}(jT  (5c0d28a78f183901f414ff40604f299ff6b2db84j  Aweb/src/test/java/org/cbioportal/web/StudyViewControllerTest.javaj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj  https://github.com/cBioPortal/cbioportal/raw/1239c3e45daaa5c4e80d36656c44a14d71ac6c6c/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.java?ref=1239c3e45daaa5c4e80d36656c44a14d71ac6c6cj  X  @@ -526,6 +526,7 @@ public void fetchGenomicDataCounts() throws Exception {
             anyList(),
             anyList(),
             anyList(),
+            anyList(),
             any(AlterationFilter.class)))
             .thenReturn(genomicDataCounts);
 ueu(06744949aad0688f34e04fe7a6a20ced0cb0e37f}(sha(06744949aad0688f34e04fe7a6a20ced0cb0e37fnode_idEC_kwDOAe-hB9oAKDA2NzQ0OTQ5YWFkMDY4OGYzNGUwNGZlN2E2YTIwY2VkMGNiMGUzN2Ycommit}(author}(nameKarthikemailkalletlakarthik@gmail.comdate2023-07-03T04:15:09Zu	committer}(j  Karthikj  kalletlakarthik@gmail.comj  2023-07-12T15:03:52Zumessage!Changes related to download grouptree}(j  (0e3a0f7c39ae4d3a3b6f328de8e5a28e8881e0bfurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/0e3a0f7c39ae4d3a3b6f328de8e5a28e8881e0bfuj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/06744949aad0688f34e04fe7a6a20ced0cb0e37f
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/06744949aad0688f34e04fe7a6a20ced0cb0e37fhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/06744949aad0688f34e04fe7a6a20ced0cb0e37fcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/06744949aad0688f34e04fe7a6a20ced0cb0e37f/commentsj  }(login	kalletlakidJƴ j  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5j  &https://api.github.com/users/kalletlakj  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminuj  }(j  	kalletlakj  Jƴ j  MDQ6VXNlcjEyOTU2ODcwj  4https://avatars.githubusercontent.com/u/12956870?v=4j  h5j  &https://api.github.com/users/kalletlakj  https://github.com/kalletlakj  0https://api.github.com/users/kalletlak/followersj  =https://api.github.com/users/kalletlak/following{/other_user}j   6https://api.github.com/users/kalletlak/gists{/gist_id}j"  =https://api.github.com/users/kalletlak/starred{/owner}{/repo}j$  4https://api.github.com/users/kalletlak/subscriptionsj&  +https://api.github.com/users/kalletlak/orgsj(  ,https://api.github.com/users/kalletlak/reposj*  7https://api.github.com/users/kalletlak/events{/privacy}j,  6https://api.github.com/users/kalletlak/received_eventsj.  Userj0  uparents]}(j  (2712b20be8520460d71e154f155412422f7ba22fj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2712b20be8520460d71e154f155412422f7ba22fj  Xhttps://github.com/cBioPortal/cbioportal/commit/2712b20be8520460d71e154f155412422f7ba22fuastats}(totalK,	additionsK	deletionsKufiles](}(j  (f9df86ed8afd28abb0a6972640e3b73c1c6b931bfilenameCcore/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.javastatusmodifiedjJ  KjK  KchangesK&blob_urlhttps://github.com/cBioPortal/cbioportal/blob/06744949aad0688f34e04fe7a6a20ced0cb0e37f/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/06744949aad0688f34e04fe7a6a20ced0cb0e37f/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.java?ref=06744949aad0688f34e04fe7a6a20ced0cb0e37fpatchX  @@ -50,11 +50,13 @@
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.commons.lang.StringUtils;
 import org.cbioportal.security.spring.authentication.PortalUserDetails;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Component;
 import org.springframework.util.ResourceUtils;
@@ -362,6 +364,10 @@ public static String parseUrl(String url)
     @Value("${frontend.url.runtime:}") 
     public void setFrontendUrlRuntime(String property) { frontendUrlRuntime = property; }
 
+    private static String downloadGroup;
+    @Value("${download_group:}") // default is empty string
+    public void setDownloadGroup(String property) { downloadGroup = property; }
+
     private static Logger LOG = LoggerFactory.getLogger(GlobalProperties.class);
     private static ConfigPropertyResolver portalProperties = new ConfigPropertyResolver();
     private static Properties mavenProperties = initializeProperties(MAVEN_PROPERTIES_FILE_NAME);
@@ -1264,18 +1270,26 @@ public static String getOncoKbToken()  {
     }
 
     public static String getDownloadControl() {
-        String downloadControlOption = getProperty("skin.hide_download_controls");
-        /*
-            skin.hide_download_controls   return_value
-                    true                    hide
-                    false                   show
-                    data                    data
-                    null/empty              show
-         */
-        switch ((downloadControlOption != null) ? downloadControlOption.trim().toLowerCase() : "false") {
-            case "true" : return "hide";
-            case "data" : return "data";
-            default: return "show";
+        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+
+        if(authentication != null &&
+            StringUtils.isNotEmpty(downloadGroup) &&
+            authentication.getAuthorities().contains(new SimpleGrantedAuthority(downloadGroup))) {
+            return "show";
+        }else {
+            String downloadControlOption = getProperty("skin.hide_download_controls");
+            /*
+                skin.hide_download_controls   return_value
+                        true                    hide
+                        false                   show
+                        data                    data
+                        null/empty              show
+             */
+            switch ((downloadControlOption != null) ? downloadControlOption.trim().toLowerCase() : "false") {
+                case "true" : return "hide";
+                case "data" : return "data";
+                default: return "show";
+            }
         }
     }
 }u}(j  (ab5bbf48c3e1265677a20e9b240c0521c4e4da03jP  )portal/src/main/webapp/config_service.jspjR  modifiedjJ  KjK  KjT  KjU  https://github.com/cBioPortal/cbioportal/blob/06744949aad0688f34e04fe7a6a20ced0cb0e37f/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspjW  https://github.com/cBioPortal/cbioportal/raw/06744949aad0688f34e04fe7a6a20ced0cb0e37f/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspjY  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=06744949aad0688f34e04fe7a6a20ced0cb0e37fj[  Xp  @@ -202,7 +202,7 @@
         obj.put("oncoKbTokenDefined", !StringUtils.isEmpty(GlobalProperties.getOncoKbToken()));
 
         obj.put("sessionServiceEnabled", !StringUtils.isEmpty(GlobalProperties.getSessionServiceUrl()));
-        
+
         obj.put("skin_hide_download_controls", GlobalProperties.getDownloadControl());
 
         out.println(obj.toJSONString());u}(j  (efae1b8c7946f5f768afae5b44f7b2585dab18b9jP  ,src/main/resources/portal.properties.EXAMPLEjR  modifiedjJ  KjK  KjT  KjU  https://github.com/cBioPortal/cbioportal/blob/06744949aad0688f34e04fe7a6a20ced0cb0e37f/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEjW  https://github.com/cBioPortal/cbioportal/raw/06744949aad0688f34e04fe7a6a20ced0cb0e37f/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEjY  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=06744949aad0688f34e04fe7a6a20ced0cb0e37fj[  X-  @@ -433,4 +433,6 @@ persistence.cache_type=no-cache
 
 # Set StudyDownloadLinkUrl
 # Allows download links within DataSets Tab (See Portal.Properties documentation for more info)
-# study_download_url=
\ No newline at end of file
+# study_download_url=
+
+# download_group=
\ No newline at end of fileueu(0ada6996596429a4dbaa171a28fb30f8a519faad}(sha(0ada6996596429a4dbaa171a28fb30f8a519faadnode_idEC_kwDOAe-hB9oAKDBhZGE2OTk2NTk2NDI5YTRkYmFhMTcxYTI4ZmIzMGY4YTUxOWZhYWQcommit}(author}(name
Ino de Bruijnemailino@ino.biodate2023-05-02T19:23:45Zu	committer}(jw  Gaofei Zhaojy  ,15748980+dippindots@users.noreply.github.comj{  2023-06-07T23:24:12Zumessageminor tweak text newstree}(jo  (44a67a0f7a108963a7cd502f69ebede5526e6ad8urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/44a67a0f7a108963a7cd502f69ebede5526e6ad8uj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/0ada6996596429a4dbaa171a28fb30f8a519faad
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/0ada6996596429a4dbaa171a28fb30f8a519faadhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/0ada6996596429a4dbaa171a28fb30f8a519faadcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/0ada6996596429a4dbaa171a28fb30f8a519faad/commentsju  }(logininodbidJZ jq  MDQ6VXNlcjEzMzQwMDQ=
avatar_url3https://avatars.githubusercontent.com/u/1334004?v=4gravatar_idh5j  "https://api.github.com/users/inodbj  https://github.com/inodb
followers_url,https://api.github.com/users/inodb/followers
following_url9https://api.github.com/users/inodb/following{/other_user}	gists_url2https://api.github.com/users/inodb/gists{/gist_id}starred_url9https://api.github.com/users/inodb/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/inodb/subscriptionsorganizations_url'https://api.github.com/users/inodb/orgs	repos_url(https://api.github.com/users/inodb/repos
events_url3https://api.github.com/users/inodb/events{/privacy}received_events_url2https://api.github.com/users/inodb/received_eventstypeUser
site_adminuj}  }(j  
dippindotsj  JtO jq  MDQ6VXNlcjE1NzQ4OTgwj  4https://avatars.githubusercontent.com/u/15748980?v=4j  h5j  'https://api.github.com/users/dippindotsj  https://github.com/dippindotsj  1https://api.github.com/users/dippindots/followersj  >https://api.github.com/users/dippindots/following{/other_user}j  7https://api.github.com/users/dippindots/gists{/gist_id}j  >https://api.github.com/users/dippindots/starred{/owner}{/repo}j  5https://api.github.com/users/dippindots/subscriptionsj  ,https://api.github.com/users/dippindots/orgsj  -https://api.github.com/users/dippindots/reposj  8https://api.github.com/users/dippindots/events{/privacy}j  7https://api.github.com/users/dippindots/received_eventsj  Userj  uparents]}(jo  (38a91ab2aacb888db86764f0ecbad0b6735cc410j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/38a91ab2aacb888db86764f0ecbad0b6735cc410j  Xhttps://github.com/cBioPortal/cbioportal/commit/38a91ab2aacb888db86764f0ecbad0b6735cc410uastats}(totalK	additionsK	deletionsKufiles]}(jo  (8a74fdd36d44e849e1dbe438aaa90011417c9f24filenamedocs/News.mdstatusmodifiedj  Kj  KchangesKblob_urlehttps://github.com/cBioPortal/cbioportal/blob/0ada6996596429a4dbaa171a28fb30f8a519faad/docs%2FNews.mdraw_urldhttps://github.com/cBioPortal/cbioportal/raw/0ada6996596429a4dbaa171a28fb30f8a519faad/docs%2FNews.mdcontents_urlwhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FNews.md?ref=0ada6996596429a4dbaa171a28fb30f8a519faadpatchX  @@ -1,5 +1,5 @@
 ## May 2, 2023
-*   **New Feature**: Mutations tab supports new revue variants annotation.
+*   **New Feature**: The mutations tab now shows variant annotations from the [repository of Variant with Unexpected Effects (reVUE)](https://www.cancerrevue.org/).
     <img src="https://user-images.githubusercontent.com/16869603/234271379-6a0876ea-8477-426e-a0e4-5e0b0b66aef9.gif" width="700" />
 
 ## Apr 11, 2023uau(a9cf296b1a0253753d88d4b4dde139b18a1d99f4}(sha(a9cf296b1a0253753d88d4b4dde139b18a1d99f4node_idEC_kwDOAe-hB9oAKGE5Y2YyOTZiMWEwMjUzNzUzZDg4ZDRiNGRkZTEzOWIxOGExZDk5ZjQcommit}(author}(name
Ino de Bruijnemailino@ino.biodate2023-08-03T16:26:25Zu	committer}(j  GitHubj  noreply@github.comj  2023-08-03T16:26:25Zumessagefix typotree}(j  (c13bbaddb9f4f62f36005e51ccc43bb318744c87urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c13bbaddb9f4f62f36005e51ccc43bb318744c87uj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/a9cf296b1a0253753d88d4b4dde139b18a1d99f4
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJky9UxCRBK7hj4Ov3rIwAA4YUIAFz6KewY2EldkD+MjvBTgNKA
SwKcz/otpSs8ZlxEc73n8BeSvvOIIOnUSJpXHtS5cnTTMVzgvIthVKGpUsrKufDK
Rb9axla5tD1uHPtiG36fEkzpG2apYts4KRd4DF6XA/2wICMqA3WlTbSsfBS4Jq0Q
G23vHFC5o5DbDZN8QH3oFXSGMBgu+e5ag2NtC7xisBmZyjAIACA5MStEqkMBUcwz
3fyoY3wy059mw62FcxGkEYKxkOf5T8uVKjqzXUzuB7J5+QLrHKuW9uBr2UoHDCQ6
6Mj71YTDassNc5LV5C5623brUPEtwS+VZcDpya0PzJ49oD5FU0FAMlKVURNmd1U=
=tiI1
-----END PGP SIGNATURE-----
payloadtree c13bbaddb9f4f62f36005e51ccc43bb318744c87
parent 2bcdaea03059ab97d72d167dff0c83d1c0c3a616
author Ino de Bruijn <ino@ino.bio> 1691079985 -0400
committer GitHub <noreply@github.com> 1691079985 -0400

fix typouuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/a9cf296b1a0253753d88d4b4dde139b18a1d99f4html_urlXhttps://github.com/cBioPortal/cbioportal/commit/a9cf296b1a0253753d88d4b4dde139b18a1d99f4comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/a9cf296b1a0253753d88d4b4dde139b18a1d99f4/commentsj  }(logininodbidJZ j  MDQ6VXNlcjEzMzQwMDQ=
avatar_url3https://avatars.githubusercontent.com/u/1334004?v=4gravatar_idh5j  "https://api.github.com/users/inodbj
  https://github.com/inodb
followers_url,https://api.github.com/users/inodb/followers
following_url9https://api.github.com/users/inodb/following{/other_user}	gists_url2https://api.github.com/users/inodb/gists{/gist_id}starred_url9https://api.github.com/users/inodb/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/inodb/subscriptionsorganizations_url'https://api.github.com/users/inodb/orgs	repos_url(https://api.github.com/users/inodb/repos
events_url3https://api.github.com/users/inodb/events{/privacy}received_events_url2https://api.github.com/users/inodb/received_eventstypeUser
site_adminuj  }(j  web-flowj  J/j  MDQ6VXNlcjE5ODY0NDQ3j  4https://avatars.githubusercontent.com/u/19864447?v=4j  h5j  %https://api.github.com/users/web-flowj
  https://github.com/web-flowj  /https://api.github.com/users/web-flow/followersj  <https://api.github.com/users/web-flow/following{/other_user}j  5https://api.github.com/users/web-flow/gists{/gist_id}j  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j   3https://api.github.com/users/web-flow/subscriptionsj"  *https://api.github.com/users/web-flow/orgsj$  +https://api.github.com/users/web-flow/reposj&  6https://api.github.com/users/web-flow/events{/privacy}j(  5https://api.github.com/users/web-flow/received_eventsj*  Userj,  uparents]}(j  (2bcdaea03059ab97d72d167dff0c83d1c0c3a616j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2bcdaea03059ab97d72d167dff0c83d1c0c3a616j
  Xhttps://github.com/cBioPortal/cbioportal/commit/2bcdaea03059ab97d72d167dff0c83d1c0c3a616uastats}(totalK	additionsK	deletionsKufiles]}(j  (257defa35dd967cc83d1841e8d9765e215f70e65filenamedocs/News.mdstatusmodifiedjF  KjG  KchangesKblob_urlehttps://github.com/cBioPortal/cbioportal/blob/a9cf296b1a0253753d88d4b4dde139b18a1d99f4/docs%2FNews.mdraw_urldhttps://github.com/cBioPortal/cbioportal/raw/a9cf296b1a0253753d88d4b4dde139b18a1d99f4/docs%2FNews.mdcontents_urlwhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FNews.md?ref=a9cf296b1a0253753d88d4b4dde139b18a1d99f4patchX  @@ -5,7 +5,7 @@
     *    Comparison Page - Genomic Alterations Tab
     *    Comparison Page - Mutations Tab
     
-    Please note that the Mutations tab on te Comparison page is a recent feature and was introduced with the two-sided Fisher's exact test already implemented.
+    Please note that the Mutations tab on the Comparison page is a recent feature and was introduced with the two-sided Fisher's exact test already implemented.
 
     Several users pointed out that using a one-sided test was incorrect for these comparisons. Please see discussions [here](https://github.com/cBioPortal/cbioportal/issues/9943) for more information.
 uau(4f467c101e8c7a0fd0ae7f063c47bc8478235fa1}(sha(4f467c101e8c7a0fd0ae7f063c47bc8478235fa1node_idEC_kwDOAe-hB9oAKDRmNDY3YzEwMWU4YzdhMGZkMGFlN2YwNjNjNDdiYzg0NzgyMzVmYTEcommit}(author}(nameKarthikemailkalletlakarthik@gmail.comdate2023-07-31T14:44:17Zu	committer}(jc  Karthikje  kalletlakarthik@gmail.comjg  2023-07-31T14:44:17ZumessageRefactortree}(j[  (f7b72b9342047c5ad85ffbd31484c684347dafc8urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/f7b72b9342047c5ad85ffbd31484c684347dafc8ujs  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/4f467c101e8c7a0fd0ae7f063c47bc8478235fa1
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujs  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4f467c101e8c7a0fd0ae7f063c47bc8478235fa1html_urlXhttps://github.com/cBioPortal/cbioportal/commit/4f467c101e8c7a0fd0ae7f063c47bc8478235fa1comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/4f467c101e8c7a0fd0ae7f063c47bc8478235fa1/commentsja  }(login	kalletlakidJƴ j]  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5js  &https://api.github.com/users/kalletlakj  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminuji  }(j  	kalletlakj  Jƴ j]  MDQ6VXNlcjEyOTU2ODcwj  4https://avatars.githubusercontent.com/u/12956870?v=4j  h5js  &https://api.github.com/users/kalletlakj  https://github.com/kalletlakj  0https://api.github.com/users/kalletlak/followersj  =https://api.github.com/users/kalletlak/following{/other_user}j  6https://api.github.com/users/kalletlak/gists{/gist_id}j  =https://api.github.com/users/kalletlak/starred{/owner}{/repo}j  4https://api.github.com/users/kalletlak/subscriptionsj  +https://api.github.com/users/kalletlak/orgsj  ,https://api.github.com/users/kalletlak/reposj  7https://api.github.com/users/kalletlak/events{/privacy}j  6https://api.github.com/users/kalletlak/received_eventsj  Userj  uparents]}(j[  (9009870589785bc9736f4d71f1b91aff43c90db8js  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9009870589785bc9736f4d71f1b91aff43c90db8j  Xhttps://github.com/cBioPortal/cbioportal/commit/9009870589785bc9736f4d71f1b91aff43c90db8uastats}(totalKl	additionsK,	deletionsK@ufiles]}(j[  (2084cf0afcadc6819055826703884e2dc1224183filenameEweb/src/main/java/org/cbioportal/web/util/StudyViewFilterApplier.javastatusmodifiedj  K,j  K@changesKlblob_urlhttps://github.com/cBioPortal/cbioportal/blob/4f467c101e8c7a0fd0ae7f063c47bc8478235fa1/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/4f467c101e8c7a0fd0ae7f063c47bc8478235fa1/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.java?ref=4f467c101e8c7a0fd0ae7f063c47bc8478235fa1patchX-  @@ -6,7 +6,6 @@
 import java.util.stream.Stream;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.map.MultiKeyMap;
-import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
 import org.cbioportal.model.GeneFilter;
 import org.cbioportal.model.MolecularProfile.MolecularAlterationType;
@@ -879,46 +878,27 @@ private GenericAssayDataBin dataBintoGenericAssayDataBin(GenericAssayDataBinFilt
     }
 
     public <S extends DataFilter> List<SampleIdentifier> intervalFilterExpressionData(
-            List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
-            Boolean negateFilters) {
-
-        if (!CollectionUtils.isEmpty(dataFilters) && !CollectionUtils.isEmpty(sampleIdentifiers)) {
-            Pair<List<ClinicalData>, List<ClinicalDataFilter>> clinicalDataPair = 
-                extractClinicalDataAndAttributes(sampleIdentifiers, molecularProfiles, dataFilters);
-            List<ClinicalData> clinicalDatas = clinicalDataPair.getFirst();
-            List<ClinicalDataFilter> attributes = clinicalDataPair.getSecond();
-            
-            MultiKeyMap clinicalDataMap = new MultiKeyMap();
-
-            clinicalDatas.forEach(clinicalData -> {
-                clinicalDataMap.put(clinicalData.getStudyId(), clinicalData.getSampleId(), clinicalData.getAttrId(),
-                        clinicalData.getAttrValue());
-            });
-
-            List<SampleIdentifier> newSampleIdentifiers = new ArrayList<>();
-            for (SampleIdentifier sampleIdentifier : sampleIdentifiers) {
-                int count =  clinicalDataIntervalFilterApplier.apply(attributes, clinicalDataMap,
-                        sampleIdentifier.getSampleId(), sampleIdentifier.getStudyId(), negateFilters);
-
-                if (count == attributes.size()) {
-                    newSampleIdentifiers.add(sampleIdentifier);
-                }
-            }
-
-            return newSampleIdentifiers;
-        }
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
+        Boolean negateFilters) {
 
-        return sampleIdentifiers;
+        return filterExpressionData(sampleIdentifiers, molecularProfiles, dataFilters, negateFilters, clinicalDataIntervalFilterApplier);
     }
 
     public <S extends DataFilter> List<SampleIdentifier> equalityFilterExpressionData(
         List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
         Boolean negateFilters) {
+
+        return filterExpressionData(sampleIdentifiers, molecularProfiles, dataFilters, negateFilters, clinicalDataEqualityFilterApplier);
+    }
+
+
+    public <S extends DataFilter> List<SampleIdentifier> filterExpressionData(
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
+        Boolean negateFilters, ClinicalDataFilterApplier clinicalDataFilterApplier) {
         if (!CollectionUtils.isEmpty(dataFilters) && !CollectionUtils.isEmpty(sampleIdentifiers)) {
-            Pair<List<ClinicalData>, List<ClinicalDataFilter>> clinicalDataPair =
-                extractClinicalDataAndAttributes(sampleIdentifiers, molecularProfiles, dataFilters);
-            List<ClinicalData> clinicalDatas = clinicalDataPair.getFirst();
-            List<ClinicalDataFilter> attributes = clinicalDataPair.getSecond();
+            List<ClinicalData> clinicalDatas =
+                fetchDataAndTransformToClinicalDataList(sampleIdentifiers, molecularProfiles, dataFilters);
+            List<ClinicalDataFilter> attributes =transformToClinicalDataFilter(dataFilters);
 
             MultiKeyMap clinicalDataMap = new MultiKeyMap();
 
@@ -929,7 +909,7 @@ public <S extends DataFilter> List<SampleIdentifier> equalityFilterExpressionDat
 
             List<SampleIdentifier> newSampleIdentifiers = new ArrayList<>();
             for (SampleIdentifier sampleIdentifier : sampleIdentifiers) {
-                int count =  clinicalDataEqualityFilterApplier.apply(attributes, clinicalDataMap,
+                int count =  clinicalDataFilterApplier.apply(attributes, clinicalDataMap,
                     sampleIdentifier.getSampleId(), sampleIdentifier.getStudyId(), negateFilters);
 
                 if (count == attributes.size()) {
@@ -943,16 +923,15 @@ public <S extends DataFilter> List<SampleIdentifier> equalityFilterExpressionDat
         return sampleIdentifiers;
     }
     
-    private <S extends DataFilter> Pair<List<ClinicalData>, List<ClinicalDataFilter>> extractClinicalDataAndAttributes(
+    private <S extends DataFilter> List<ClinicalData> fetchDataAndTransformToClinicalDataList(
         List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters) {
         Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
             .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
 
         List<String> studyIds = new ArrayList<>();
         List<String> sampleIds = new ArrayList<>();
         studyViewFilterUtil.extractStudyAndSampleIds(sampleIdentifiers, studyIds, sampleIds);
-        List<ClinicalData> clinicalDatas = new ArrayList<>();
-        List<ClinicalDataFilter> attributes = new ArrayList<>();
+        
         if (dataFilters.get(0) instanceof GenomicDataFilter) {
             List<GenomicDataFilter> genomicDataIntervalFilters = (List<GenomicDataFilter>) dataFilters;
             Set<String> hugoGeneSymbols = genomicDataIntervalFilters.stream()
@@ -962,7 +941,7 @@ private <S extends DataFilter> Pair<List<ClinicalData>, List<ClinicalDataFilter>
                     Projection.SUMMARY.name())
                 .stream().collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
 
-            clinicalDatas = genomicDataIntervalFilters.stream().flatMap(genomicDataFilter -> {
+            return genomicDataIntervalFilters.stream().flatMap(genomicDataFilter -> {
 
                 Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
                     .getOrDefault(genomicDataFilter.getProfileType(), new ArrayList<>())
@@ -973,22 +952,13 @@ private <S extends DataFilter> Pair<List<ClinicalData>, List<ClinicalDataFilter>
                 genomicDataBinFilter.setHugoGeneSymbol(genomicDataFilter.getHugoGeneSymbol());
                 genomicDataBinFilter.setProfileType(genomicDataFilter.getProfileType());
                 return invokeDataFunc(sampleIds, studyIds,
-                    Arrays.asList(geneNameIdMap.get(genomicDataFilter.getHugoGeneSymbol()).toString()),
+                    Collections.singletonList(geneNameIdMap.get(genomicDataFilter.getHugoGeneSymbol()).toString()),
                     studyIdToMolecularProfileIdMap, genomicDataBinFilter, fetchMolecularData);
             }).collect(Collectors.toList());
 
-            attributes = genomicDataIntervalFilters.stream().map(genomicDataIntervalFilter -> {
-                String attributeId = studyViewFilterUtil.getGenomicDataFilterUniqueKey(
-                    genomicDataIntervalFilter.getHugoGeneSymbol(), genomicDataIntervalFilter.getProfileType());
-                ClinicalDataFilter clinicalDataIntervalFilter = new ClinicalDataFilter();
-                clinicalDataIntervalFilter.setAttributeId(attributeId);
-                clinicalDataIntervalFilter.setValues(genomicDataIntervalFilter.getValues());
-                return clinicalDataIntervalFilter;
-            }).collect(Collectors.toList());
         } else {
-            List<GenericAssayDataFilter> genericAssayDataFilters = (List<GenericAssayDataFilter>) dataFilters;
 
-            clinicalDatas = genericAssayDataFilters.stream().flatMap(genericAssayDataFilter -> {
+            return ((List<GenericAssayDataFilter>) dataFilters).stream().flatMap(genericAssayDataFilter -> {
 
                 Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
                     .getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>())
@@ -999,29 +969,39 @@ private <S extends DataFilter> Pair<List<ClinicalData>, List<ClinicalDataFilter>
                 genericAssayDataBinFilter.setProfileType(genericAssayDataFilter.getProfileType());
 
                 // get original data stream from invokeDataFunc
-                Stream<ClinicalData> dataStream = invokeDataFunc(sampleIds, studyIds, Arrays.asList(genericAssayDataBinFilter.getStableId()),
+                Stream<ClinicalData> dataStream = invokeDataFunc(sampleIds, studyIds, Collections.singletonList(genericAssayDataBinFilter.getStableId()),
                     studyIdToMolecularProfileIdMap, genericAssayDataBinFilter, fetchGenericAssayData);
                 // For patient level generic assay profile, only keep the one sample per patient
-                List<MolecularProfile> profiles = molecularProfileMap.getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>());
-                if (profiles.size() > 0 && profiles.get(0).getPatientLevel() == true) {
-                    dataStream = dataStream.collect(Collectors.groupingBy(d -> d.getPatientId())).values().stream()
+                List<MolecularProfile> profiles = molecularProfileMap.getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<>());
+                if (profiles.size() > 0 && profiles.get(0).getPatientLevel()) {
+                    dataStream = dataStream.collect(Collectors.groupingBy(ClinicalData::getPatientId)).values().stream()
                         .flatMap(d -> d.stream().limit(1));
                 }
                 // don't change anything for non patient level data
                 return dataStream;
             }).collect(Collectors.toList());
 
-            attributes = genericAssayDataFilters.stream().map(genericAssayDataFilter -> {
-                String attributeId = studyViewFilterUtil.getGenericAssayDataFilterUniqueKey(
+        }
+    }
+
+    private <S extends DataFilter> List<ClinicalDataFilter> transformToClinicalDataFilter(List<S> dataFilters) {
+        List<ClinicalDataFilter> attributes;
+        attributes = dataFilters.stream().map(dataFilter -> {
+            String attributeId;
+            if (dataFilter instanceof GenomicDataFilter) {
+                GenomicDataFilter genomicDataFilter = (GenomicDataFilter) dataFilter;
+                attributeId = studyViewFilterUtil.getGenomicDataFilterUniqueKey(genomicDataFilter.getHugoGeneSymbol(), genomicDataFilter.getProfileType());
+            } else {
+                GenericAssayDataFilter genericAssayDataFilter = (GenericAssayDataFilter) dataFilter;
+                attributeId = studyViewFilterUtil.getGenericAssayDataFilterUniqueKey(
                     genericAssayDataFilter.getStableId(), genericAssayDataFilter.getProfileType());
-                ClinicalDataFilter clinicalDataIntervalFilter = new ClinicalDataFilter();
-                clinicalDataIntervalFilter.setAttributeId(attributeId);
-                clinicalDataIntervalFilter.setValues(genericAssayDataFilter.getValues());
-                return clinicalDataIntervalFilter;
-            }).collect(Collectors.toList());
+            }
 
-        }
-        
-        return new Pair<>(clinicalDatas, attributes);
+            ClinicalDataFilter clinicalDataFilter = new ClinicalDataFilter();
+            clinicalDataFilter.setAttributeId(attributeId);
+            clinicalDataFilter.setValues(dataFilter.getValues());
+            return clinicalDataFilter;
+        }).collect(Collectors.toList());
+        return attributes;
     }
 }uau(a3794f7cd5a60974b8c04938d5b3d784a5bfb09a}(sha(a3794f7cd5a60974b8c04938d5b3d784a5bfb09anode_idEC_kwDOAe-hB9oAKGEzNzk0ZjdjZDVhNjA5NzRiOGMwNDkzOGQ1YjNkNzg0YTViZmIwOWEcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-07-18T20:15:46Zu	committer}(j  GitHubj  noreply@github.comj  2023-07-18T20:15:46ZumessageLMerge pull request #10281 from cBioPortal/frontend-v5.3.14

Frontend v5.3.14tree}(j  (80a6dcc1ebeb04b65464effa596b77ac1b7daf0curlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/80a6dcc1ebeb04b65464effa596b77ac1b7daf0cuj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/a3794f7cd5a60974b8c04938d5b3d784a5bfb09a
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJktvLyCRBK7hj4Ov3rIwAAn0wIAEGO1NMu9QcrD5bcRVUJwDcs
JnFxxItsCgL9qQlD9yA97GxMXXTQSrqqE8umbQhY4j53oBoqPEK7azl70RZL40gb
sYzYNThm3+XruJAZ173QChK7Sd7PZ8NULqrJSWF69tSOPKbWl2BOg8+EcwmcbI3X
3s6I/4FP0PjFLl225BzHa7hFjfzs/BOikY6yOYlFw9FaPjMVeOBlggwCq/3O4Mk4
TW9Oeoves3f7lazg7uiTBMtTmG0oe8+V5whRZpm9ZG3SKpnV/NR8a6yuMNxS2qa4
pXMjR0GJWayVLK0tdDFHBHj+sciP2z58e89zrYajciU1ov9KGKKpAgbN2VfjyGc=
=ygqu
-----END PGP SIGNATURE-----
payloadXe  tree 80a6dcc1ebeb04b65464effa596b77ac1b7daf0c
parent 78dbe9eb8dd58dc5bf3f89c8edc36ea1c920c581
parent 1a115f6c28261e2273e844aa5251f6aad6be90f7
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1689711346 -0400
committer GitHub <noreply@github.com> 1689711346 -0400

Merge pull request #10281 from cBioPortal/frontend-v5.3.14

Frontend v5.3.14uuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/a3794f7cd5a60974b8c04938d5b3d784a5bfb09ahtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/a3794f7cd5a60974b8c04938d5b3d784a5bfb09acomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/a3794f7cd5a60974b8c04938d5b3d784a5bfb09a/commentsj  }(login
dippindotsidJtO j  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j  'https://api.github.com/users/dippindotsj  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj  }(j  web-flowj  J/j  MDQ6VXNlcjE5ODY0NDQ3j  4https://avatars.githubusercontent.com/u/19864447?v=4j  h5j  %https://api.github.com/users/web-flowj  https://github.com/web-flowj  /https://api.github.com/users/web-flow/followersj  <https://api.github.com/users/web-flow/following{/other_user}j  5https://api.github.com/users/web-flow/gists{/gist_id}j
  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j  3https://api.github.com/users/web-flow/subscriptionsj  *https://api.github.com/users/web-flow/orgsj  +https://api.github.com/users/web-flow/reposj  6https://api.github.com/users/web-flow/events{/privacy}j  5https://api.github.com/users/web-flow/received_eventsj  Userj  uparents](}(j  (78dbe9eb8dd58dc5bf3f89c8edc36ea1c920c581j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/78dbe9eb8dd58dc5bf3f89c8edc36ea1c920c581j  Xhttps://github.com/cBioPortal/cbioportal/commit/78dbe9eb8dd58dc5bf3f89c8edc36ea1c920c581u}(j  (1a115f6c28261e2273e844aa5251f6aad6be90f7j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1a115f6c28261e2273e844aa5251f6aad6be90f7j  Xhttps://github.com/cBioPortal/cbioportal/commit/1a115f6c28261e2273e844aa5251f6aad6be90f7uestats}(totalK	additionsK	deletionsKufiles]}(j  (7e4f1b32518ea8c65e2325854dd92b65564f558cfilenamepom.xmlstatusmodifiedj6  Kj7  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/a3794f7cd5a60974b8c04938d5b3d784a5bfb09a/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/a3794f7cd5a60974b8c04938d5b3d784a5bfb09a/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=a3794f7cd5a60974b8c04938d5b3d784a5bfb09apatchXY  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.13</frontend.version>
+    <frontend.version>v5.3.14</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(4d989c9a9550651b209f84367c67970fcf8d2f76}(sha(4d989c9a9550651b209f84367c67970fcf8d2f76node_idEC_kwDOAe-hB9oAKDRkOTg5YzlhOTU1MDY1MWIyMDlmODQzNjdjNjc5NzBmY2Y4ZDJmNzYcommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-06-09T13:51:06Zu	committer}(jS  
pvannieropjU  pim@thehyve.nljW  2023-06-09T13:56:19Zumessage'Add unit tests for resolveEntrezGeneIdstree}(jK  (5dbe85905750684e8392f995e59cd4c2925d77b7urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/5dbe85905750684e8392f995e59cd4c2925d77b7ujc  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/4d989c9a9550651b209f84367c67970fcf8d2f76
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujc  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4d989c9a9550651b209f84367c67970fcf8d2f76html_urlXhttps://github.com/cBioPortal/cbioportal/commit/4d989c9a9550651b209f84367c67970fcf8d2f76comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/4d989c9a9550651b209f84367c67970fcf8d2f76/commentsjQ  }(login
pvannieropidJa jM  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5jc  'https://api.github.com/users/pvannieropjo  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminujY  }(jt  
pvannieropjv  Ja jM  MDQ6VXNlcjc0NTg4NQ==jx  2https://avatars.githubusercontent.com/u/745885?v=4jz  h5jc  'https://api.github.com/users/pvannieropjo  https://github.com/pvannieropj}  1https://api.github.com/users/pvannierop/followersj  >https://api.github.com/users/pvannierop/following{/other_user}j  7https://api.github.com/users/pvannierop/gists{/gist_id}j  >https://api.github.com/users/pvannierop/starred{/owner}{/repo}j  5https://api.github.com/users/pvannierop/subscriptionsj  ,https://api.github.com/users/pvannierop/orgsj  -https://api.github.com/users/pvannierop/reposj  8https://api.github.com/users/pvannierop/events{/privacy}j  7https://api.github.com/users/pvannierop/received_eventsj  Userj  uparents]}(jK  (2f807e84986ad81fbb099ac1e45e559147a16268jc  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2f807e84986ad81fbb099ac1e45e559147a16268jo  Xhttps://github.com/cBioPortal/cbioportal/commit/2f807e84986ad81fbb099ac1e45e559147a16268uastats}(totalK		additionsK	deletionsKufiles](}(jK  (ced8b24d084912d7c9906626f3d68145a5dfc82dfilenameBweb/src/main/java/org/cbioportal/web/util/StudyViewFilterUtil.javastatusmodifiedj  Kj  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/4d989c9a9550651b209f84367c67970fcf8d2f76/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/4d989c9a9550651b209f84367c67970fcf8d2f76/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.java?ref=4d989c9a9550651b209f84367c67970fcf8d2f76patchX  @@ -292,9 +292,7 @@ private Map<String, Integer> getStringIntegerMap(List<String> hugoGeneSymbols) {
         return symbolToEntrezGeneId;
     }
 
-    // TODO Pim test this logic.
-    // TODO Pim write test.
-    public List<StructVarFilterQuery> addEntrezGeneIds(List<StructVarFilterQuery> structVarQueries) {
+    public List<StructVarFilterQuery> resolveEntrezGeneIds(List<StructVarFilterQuery> structVarQueries) {
 
         List<String> hugoGeneSymbols = structVarQueries
             .stream()u}(jK  (a03bfba5958b1100088129e30d5b83801824bcfdj  Yweb/src/main/java/org/cbioportal/web/util/appliers/StructuralVariantSubFilterApplier.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/4d989c9a9550651b209f84367c67970fcf8d2f76/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.javaj  https://github.com/cBioPortal/cbioportal/raw/4d989c9a9550651b209f84367c67970fcf8d2f76/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.java?ref=4d989c9a9550651b209f84367c67970fcf8d2f76j  X  @@ -75,7 +75,7 @@ public List<SampleIdentifier> filter(List<SampleIdentifier> toFilter, StudyViewF
                         .map(SampleIdentifier::getSampleId)
                         .collect(Collectors.toList());
 
-                final List<StructVarFilterQuery> entrezIdEnhancedSvQueries = studyViewFilterUtil.addEntrezGeneIds(structVarQueries);
+                final List<StructVarFilterQuery> entrezIdEnhancedSvQueries = studyViewFilterUtil.resolveEntrezGeneIds(structVarQueries);
                 remainingSampleIdentifiers = structuralVariantService
                     .fetchStructuralVariantsByStructVarQueries(molecularProfileIds, sampleIds, entrezIdEnhancedSvQueries)
                     .stream()u}(jK  (fc15795cf0df8da7ed65d5dea4e6572ef42a8852j  ]web/src/test/java/org/cbioportal/web/util/appliers/StructuralVariantSubFilterApplierTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/4d989c9a9550651b209f84367c67970fcf8d2f76/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.javaj  https://github.com/cBioPortal/cbioportal/raw/4d989c9a9550651b209f84367c67970fcf8d2f76/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.java?ref=4d989c9a9550651b209f84367c67970fcf8d2f76j  X  @@ -21,7 +21,6 @@
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 
 import static org.mockito.ArgumentMatchers.anyList;
 import static org.mockito.ArgumentMatchers.eq;
@@ -86,7 +85,7 @@ public void setUp() throws Exception {
             createStructVar("5", ST_1_ID)
         );
         // Subsequently, return results for svA and svB queries.
-        when(studyViewFilterUtil.addEntrezGeneIds(anyList()))
+        when(studyViewFilterUtil.resolveEntrezGeneIds(anyList()))
             .thenReturn(svA, svB);
         when(structuralVariantService.fetchStructuralVariantsByStructVarQueries(anyList(), anyList(), anyList())
         ).thenReturn(structuralVariantsQuerySvA, structuralVariantsQuerySvB);ueu(f1f4f1d7ce72f6f53fa372dc23451e3a50c7f764}(sha(f1f4f1d7ce72f6f53fa372dc23451e3a50c7f764node_idEC_kwDOAe-hB9oAKGYxZjRmMWQ3Y2U3MmY2ZjUzZmEzNzJkYzIzNDUxZTNhNTBjN2Y3NjQcommit}(author}(nameritikakundraemailkundrar@mskcc.orgdate2023-06-08T17:26:09Zu	committer}(j  GitHubj  noreply@github.comj  2023-06-08T17:26:09ZumessageUpdate overview.mdtree}(j  (ae608a40540884cedbda8b77127047250745fb5eurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/ae608a40540884cedbda8b77127047250745fb5euj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/f1f4f1d7ce72f6f53fa372dc23451e3a50c7f764
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkgg8xCRBK7hj4Ov3rIwAA1rwIAEAH6oJOGMd20alqqc4DBgb3
Zk+d7BnB6jWrwadUdEepYTCNLMYSAgLU3H3XN/cWFQTAdfUHH25AOfrw6af1LO+u
PxiizrThOGHtlePBc+zjH67YVtY/PMrG3NadB2dN2FwOYU+GkbxWX7POd80KRfKt
1n9PFg0Iv4oF9HaM6DAr/sqoBp/UmxVe6mfF491SSKHdA0yNfd7pXrLdalWMHBfY
WVCqaM2JVxj73HqUzHCWW16FMAbKgXeW1KWdrCDnzjsTIWTgIdRZE8O9dWrAU4d2
FJNTdOIJ2IIWcmCKYZrJBPY8ZZ1P7phZWn/pCkOa9n2DNUqyFytyIf1R/q148B8=
=ZMFX
-----END PGP SIGNATURE-----
payloadtree ae608a40540884cedbda8b77127047250745fb5e
parent 100d642e70a4ac4db1eccefc5de684bc40ea0cfb
author ritikakundra <kundrar@mskcc.org> 1686245169 -0400
committer GitHub <noreply@github.com> 1686245169 -0400

Update overview.mduuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/f1f4f1d7ce72f6f53fa372dc23451e3a50c7f764html_urlXhttps://github.com/cBioPortal/cbioportal/commit/f1f4f1d7ce72f6f53fa372dc23451e3a50c7f764comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/f1f4f1d7ce72f6f53fa372dc23451e3a50c7f764/commentsj  }(loginritikakundraidJ9 j  MDQ6VXNlcjEyMDA3ODYy
avatar_url4https://avatars.githubusercontent.com/u/12007862?v=4gravatar_idh5j  )https://api.github.com/users/ritikakundraj  https://github.com/ritikakundra
followers_url3https://api.github.com/users/ritikakundra/followers
following_url@https://api.github.com/users/ritikakundra/following{/other_user}	gists_url9https://api.github.com/users/ritikakundra/gists{/gist_id}starred_url@https://api.github.com/users/ritikakundra/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/ritikakundra/subscriptionsorganizations_url.https://api.github.com/users/ritikakundra/orgs	repos_url/https://api.github.com/users/ritikakundra/repos
events_url:https://api.github.com/users/ritikakundra/events{/privacy}received_events_url9https://api.github.com/users/ritikakundra/received_eventstypeUser
site_adminuj  }(j  web-flowj  J/j  MDQ6VXNlcjE5ODY0NDQ3j  4https://avatars.githubusercontent.com/u/19864447?v=4j  h5j  %https://api.github.com/users/web-flowj  https://github.com/web-flowj  /https://api.github.com/users/web-flow/followersj  <https://api.github.com/users/web-flow/following{/other_user}j  5https://api.github.com/users/web-flow/gists{/gist_id}j
  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j  3https://api.github.com/users/web-flow/subscriptionsj  *https://api.github.com/users/web-flow/orgsj  +https://api.github.com/users/web-flow/reposj  6https://api.github.com/users/web-flow/events{/privacy}j  5https://api.github.com/users/web-flow/received_eventsj  Userj  uparents]}(j  (100d642e70a4ac4db1eccefc5de684bc40ea0cfbj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/100d642e70a4ac4db1eccefc5de684bc40ea0cfbj  Xhttps://github.com/cBioPortal/cbioportal/commit/100d642e70a4ac4db1eccefc5de684bc40ea0cfbuastats}(totalK	additionsK	deletionsK ufiles]}(j  (65539cfd26b7a141cbd26190b722e54146821d60filenamedocs/user-guide/overview.mdstatusmodifiedj2  Kj3  K changesKblob_urlvhttps://github.com/cBioPortal/cbioportal/blob/f1f4f1d7ce72f6f53fa372dc23451e3a50c7f764/docs%2Fuser-guide%2Foverview.mdraw_urluhttps://github.com/cBioPortal/cbioportal/raw/f1f4f1d7ce72f6f53fa372dc23451e3a50c7f764/docs%2Fuser-guide%2Foverview.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fuser-guide%2Foverview.md?ref=f1f4f1d7ce72f6f53fa372dc23451e3a50c7f764patchXf  @@ -28,6 +28,7 @@ Short videos that show how to perform specific analyses or how to use specific p
 6. How to explore the data in a study [youtube.com](https://www.youtube.com/watch?v=N8ffDgkqDWc)
 7. How to run a query for genes of interest [youtube.com](https://www.youtube.com/watch?v=MH-kY5usA70)
 8. How to download data [youtube.com](https://www.youtube.com/watch?v=JId304dp3tc)
+9. Navigating AACR GENIE: Biopharma Collaborative (BPC) dataset [youtube.com](https://www.youtube.com/playlist?list=PLE2tjlUyHL8Gn4ythnuvf2BxWJVpAxkMM)
 
 ### Documentation
 * Frequently Asked Questions [FAQ](/user-guide/faq.md)uau(28e013495ef90de55fd7765fe624f6d3cdd6e125}(sha(28e013495ef90de55fd7765fe624f6d3cdd6e125node_idEC_kwDOAe-hB9oAKDI4ZTAxMzQ5NWVmOTBkZTU1ZmQ3NzY1ZmU2MjRmNmQzY2RkNmUxMjUcommit}(author}(name
Bas Leenknegtemailbasleenknegt@thehyve.nldate2023-06-13T11:41:07Zu	committer}(jO  
Bas LeenknegtjQ  basleenknegt@thehyve.nljS  2023-07-05T12:17:41ZumessagemChanges after PR reviews

- Rename StructVar* to StructuralVariant*
- Revert JsonInclude Always to NON_NULL
-tree}(jG  (be348bd5d039ba2be2716f15718d81c810465025urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/be348bd5d039ba2be2716f15718d81c810465025uj_  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/28e013495ef90de55fd7765fe624f6d3cdd6e125
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj_  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/28e013495ef90de55fd7765fe624f6d3cdd6e125html_urlXhttps://github.com/cBioPortal/cbioportal/commit/28e013495ef90de55fd7765fe624f6d3cdd6e125comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/28e013495ef90de55fd7765fe624f6d3cdd6e125/commentsjM  }(loginBasLeeidJ~2 jI  MDQ6VXNlcjMzMjMwMDY=
avatar_url3https://avatars.githubusercontent.com/u/3323006?v=4gravatar_idh5j_  #https://api.github.com/users/BasLeejk  https://github.com/BasLee
followers_url-https://api.github.com/users/BasLee/followers
following_url:https://api.github.com/users/BasLee/following{/other_user}	gists_url3https://api.github.com/users/BasLee/gists{/gist_id}starred_url:https://api.github.com/users/BasLee/starred{/owner}{/repo}subscriptions_url1https://api.github.com/users/BasLee/subscriptionsorganizations_url(https://api.github.com/users/BasLee/orgs	repos_url)https://api.github.com/users/BasLee/repos
events_url4https://api.github.com/users/BasLee/events{/privacy}received_events_url3https://api.github.com/users/BasLee/received_eventstypeUser
site_adminujU  }(jp  BasLeejr  J~2 jI  MDQ6VXNlcjMzMjMwMDY=jt  3https://avatars.githubusercontent.com/u/3323006?v=4jv  h5j_  #https://api.github.com/users/BasLeejk  https://github.com/BasLeejy  -https://api.github.com/users/BasLee/followersj{  :https://api.github.com/users/BasLee/following{/other_user}j}  3https://api.github.com/users/BasLee/gists{/gist_id}j  :https://api.github.com/users/BasLee/starred{/owner}{/repo}j  1https://api.github.com/users/BasLee/subscriptionsj  (https://api.github.com/users/BasLee/orgsj  )https://api.github.com/users/BasLee/reposj  4https://api.github.com/users/BasLee/events{/privacy}j  3https://api.github.com/users/BasLee/received_eventsj  Userj  uparents]}(jG  (1ed61f4492cfc3ce49df355105cae20821305c23j_  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1ed61f4492cfc3ce49df355105cae20821305c23jk  Xhttps://github.com/cBioPortal/cbioportal/commit/1ed61f4492cfc3ce49df355105cae20821305c23uastats}(totalKo	additionsK7	deletionsK8ufiles](}(jG  (0b857f2367a25249e10cd617d73894bf7a53d800filenameJmodel/src/main/java/org/cbioportal/model/StructuralVariantFilterQuery.javastatusrenamedj  Kj  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/28e013495ef90de55fd7765fe624f6d3cdd6e125/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantFilterQuery.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/28e013495ef90de55fd7765fe624f6d3cdd6e125/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantFilterQuery.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantFilterQuery.java?ref=28e013495ef90de55fd7765fe624f6d3cdd6e125patchX(	  @@ -5,25 +5,25 @@
 
 import java.io.Serializable;
 
-public class StructVarFilterQuery extends BaseAlterationFilter implements Serializable {
+public class StructuralVariantFilterQuery extends BaseAlterationFilter implements Serializable {
     
     private StructuralVariantGeneSubQuery gene1Query;
     private StructuralVariantGeneSubQuery gene2Query;
     
-    public StructVarFilterQuery() {}
-
-    public StructVarFilterQuery(String gene1HugoSymbol,
-                                @Nullable Integer gene1EntrezId,
-                                String gene2HugoSymbol,
-                                @Nullable Integer gene2EntrezId,
-                                boolean includeDriver,
-                                boolean includeVUS,
-                                boolean includeUnknownOncogenicity,
-                                Select<String> tiersSelect,
-                                boolean includeUnknownTier,
-                                boolean includeGermline,
-                                boolean includeSomatic,
-                                boolean includeUnknownStatus) {
+    public StructuralVariantFilterQuery() {}
+
+    public StructuralVariantFilterQuery(String gene1HugoSymbol,
+                                        @Nullable Integer gene1EntrezId,
+                                        String gene2HugoSymbol,
+                                        @Nullable Integer gene2EntrezId,
+                                        boolean includeDriver,
+                                        boolean includeVUS,
+                                        boolean includeUnknownOncogenicity,
+                                        Select<String> tiersSelect,
+                                        boolean includeUnknownTier,
+                                        boolean includeGermline,
+                                        boolean includeSomatic,
+                                        boolean includeUnknownStatus) {
         super(includeDriver, includeVUS, includeUnknownOncogenicity, includeGermline, includeSomatic, includeUnknownStatus, tiersSelect, includeUnknownTier);
         this.gene1Query = new StructuralVariantGeneSubQuery(gene1HugoSymbol, gene1EntrezId);
         this.gene2Query = new StructuralVariantGeneSubQuery(gene2HugoSymbol, gene2EntrezId);previous_filenameBmodel/src/main/java/org/cbioportal/model/StructVarFilterQuery.javau}(jG  (84584fb7a595ab211c423ef9830a999429241f7cj  Nmodel/src/main/java/org/cbioportal/model/StudyViewStructuralVariantFilter.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/28e013495ef90de55fd7765fe624f6d3cdd6e125/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStudyViewStructuralVariantFilter.javaj  https://github.com/cBioPortal/cbioportal/raw/28e013495ef90de55fd7765fe624f6d3cdd6e125/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStudyViewStructuralVariantFilter.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStudyViewStructuralVariantFilter.java?ref=28e013495ef90de55fd7765fe624f6d3cdd6e125j  X8  @@ -8,7 +8,7 @@
 public class StudyViewStructuralVariantFilter implements Serializable {
 
     private Set<String> molecularProfileIds;
-    private List<List<StructVarFilterQuery>> structVarQueries;
+    private List<List<StructuralVariantFilterQuery>> structVarQueries;
 
     @AssertTrue(message = "'specialValue' field of gene1/gene2 StructVarGeneSubQueries cannot be both ANY_GENE or NO_GENE.")
     private boolean isGeneQueriesSpecialValueCorrect() {
@@ -53,11 +53,11 @@ public void setMolecularProfileIds(Set<String> molecularProfileIds) {
         this.molecularProfileIds = molecularProfileIds;
     }
 
-    public List<List<StructVarFilterQuery>> getStructVarQueries() {
+    public List<List<StructuralVariantFilterQuery>> getStructVarQueries() {
         return structVarQueries;
     }
 
-    public void setStructVarQueries(List<List<StructVarFilterQuery>> structVarQueries) {
+    public void setStructVarQueries(List<List<StructuralVariantFilterQuery>> structVarQueries) {
         this.structVarQueries = structVarQueries;
     }
 }
\ No newline at end of fileu}(jG  (8818779e19301d18a688c354ba820e0d87ff7022j  epersistence/persistence-api/src/main/java/org/cbioportal/persistence/StructuralVariantRepository.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/28e013495ef90de55fd7765fe624f6d3cdd6e125/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStructuralVariantRepository.javaj  https://github.com/cBioPortal/cbioportal/raw/28e013495ef90de55fd7765fe624f6d3cdd6e125/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStructuralVariantRepository.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStructuralVariantRepository.java?ref=28e013495ef90de55fd7765fe624f6d3cdd6e125j  X  @@ -3,7 +3,7 @@
 import java.util.List;
 
 import org.cbioportal.model.GeneFilterQuery;
-import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 import org.springframework.cache.annotation.Cacheable;
@@ -25,5 +25,5 @@ List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String> molecu
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
     List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
                                                              List<String> sampleIds,
-                                                             List<StructVarFilterQuery> structVarQueries);
+                                                             List<StructuralVariantFilterQuery> structVarQueries);
 }u}(jG  (2a24f753b0d705cad523959bd9c7d946721489c1j  mpersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/StructuralVariantMapper.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/28e013495ef90de55fd7765fe624f6d3cdd6e125/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.javaj  https://github.com/cBioPortal/cbioportal/raw/28e013495ef90de55fd7765fe624f6d3cdd6e125/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.java?ref=28e013495ef90de55fd7765fe624f6d3cdd6e125j  XP  @@ -26,7 +26,7 @@
 import java.util.List;
 
 import org.cbioportal.model.GeneFilterQuery;
-import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 
@@ -43,5 +43,5 @@ List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String> molecu
 
     List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
                                                                       List<String> sampleIds,
-                                                                      List<StructVarFilterQuery> structVarQueries);
+                                                                      List<StructuralVariantFilterQuery> structVarQueries);
 }u      }(jG  (f03d42130dab8f88ac125c31cc6da20f1255fd83j  xpersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/StructuralVariantMyBatisRepository.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/28e013495ef90de55fd7765fe624f6d3cdd6e125/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepository.javaj  https://github.com/cBioPortal/cbioportal/raw/28e013495ef90de55fd7765fe624f6d3cdd6e125/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepository.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepository.java?ref=28e013495ef90de55fd7765fe624f6d3cdd6e125j  X  @@ -24,7 +24,7 @@
 package org.cbioportal.persistence.mybatis;
 
 import org.cbioportal.model.GeneFilterQuery;
-import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 import org.cbioportal.persistence.StructuralVariantRepository;
@@ -84,7 +84,7 @@ public List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String>
     @Override
     public List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
                                                                              List<String> sampleIds,
-                                                                             List<StructVarFilterQuery> structVarQueries) {
+                                                                             List<StructuralVariantFilterQuery> structVarQueries) {
         if (structVarQueries == null || structVarQueries.isEmpty()
             || molecularProfileIds == null || molecularProfileIds.isEmpty()) {
             return new ArrayList<>();u}(jG  (72f882290e4f3c6fff0045368c39bc13bc7b0d4cj  |persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/StructuralVariantMyBatisRepositoryTest.javaj  modifiedj  K
j  K
j  Kj  https://github.com/cBioPortal/cbioportal/blob/28e013495ef90de55fd7765fe624f6d3cdd6e125/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepositoryTest.javaj  https://github.com/cBioPortal/cbioportal/raw/28e013495ef90de55fd7765fe624f6d3cdd6e125/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepositoryTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepositoryTest.java?ref=28e013495ef90de55fd7765fe624f6d3cdd6e125j  X
  @@ -24,7 +24,7 @@
 package org.cbioportal.persistence.mybatis;
 
 import org.cbioportal.model.GeneFilterQuery;
-import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantGeneSubQuery;
 import org.cbioportal.model.StructuralVariantQuery;
@@ -98,11 +98,11 @@ public void init() {
         geneQueries =  Arrays.asList(geneFilterQuery1, geneFilterQuery2, geneFilterQuery3, geneFilterQuery4);
 
         // Only search for the KIAA1549-BRAF and EML4-ALK fusions.
-        structVarFilterQuery1 = new StructVarFilterQuery("KIAA1549", 57670, "BRAF", 673, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
-        structVarFilterQuery2 = new StructVarFilterQuery("EML4", 27436, "ALK", 238, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
+        structVarFilterQuery1 = new StructuralVariantFilterQuery("KIAA1549", 57670, "BRAF", 673, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
+        structVarFilterQuery2 = new StructuralVariantFilterQuery("EML4", 27436, "ALK", 238, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
         structVarQueries = Arrays.asList(structVarFilterQuery1, structVarFilterQuery2);
-        structVarFilterQueryNullGene1 = new StructVarFilterQuery(null, null, "BRAF", 673, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
-        structVarFilterQueryNullGene2 = new StructVarFilterQuery("NCOA4", 8031, null, null, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
+        structVarFilterQueryNullGene1 = new StructuralVariantFilterQuery(null, null, "BRAF", 673, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
+        structVarFilterQueryNullGene2 = new StructuralVariantFilterQuery("NCOA4", 8031, null, null, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
     }
 
     List<String> molecularProfileIds = new ArrayList<>();
@@ -118,11 +118,11 @@ public void init() {
     private List<GeneFilterQuery> geneQueries;
     List<Integer> noEntrezIds = Collections.emptyList();
     private List<StructuralVariantQuery> noStructVars = Collections.emptyList();
-    private List<StructVarFilterQuery> structVarQueries;
-    private StructVarFilterQuery structVarFilterQuery1;
-    private StructVarFilterQuery structVarFilterQuery2;
-    private StructVarFilterQuery structVarFilterQueryNullGene1;
-    private StructVarFilterQuery structVarFilterQueryNullGene2;
+    private List<StructuralVariantFilterQuery> structVarQueries;
+    private StructuralVariantFilterQuery structVarFilterQuery1;
+    private StructuralVariantFilterQuery structVarFilterQuery2;
+    private StructuralVariantFilterQuery structVarFilterQueryNullGene1;
+    private StructuralVariantFilterQuery structVarFilterQueryNullGene2;
 
     @Test
     public void fetchStructuralVariantsNoSampleIdentifiers() {u}(jG  (6fe7dc5d34d4c72498fa43daa6751eb394b4654cj  Jservice/src/main/java/org/cbioportal/service/StructuralVariantService.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/28e013495ef90de55fd7765fe624f6d3cdd6e125/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStructuralVariantService.javaj  https://github.com/cBioPortal/cbioportal/raw/28e013495ef90de55fd7765fe624f6d3cdd6e125/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStructuralVariantService.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStructuralVariantService.java?ref=28e013495ef90de55fd7765fe624f6d3cdd6e125j  Xl  @@ -26,7 +26,7 @@
 import java.util.List;
 
 import org.cbioportal.model.GeneFilterQuery;
-import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 
@@ -45,5 +45,5 @@ List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String> molecu
 
     List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
                                                                       List<String> sampleIds,
-                                                                      List<StructVarFilterQuery> structVarQueries);
+                                                                      List<StructuralVariantFilterQuery> structVarQueries);
 }
\ No newline at end of fileu}(jG  (bbb420b2b2d035acd398ff99ead9ccbfaad68f5aj  Sservice/src/main/java/org/cbioportal/service/impl/StructuralVariantServiceImpl.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/28e013495ef90de55fd7765fe624f6d3cdd6e125/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStructuralVariantServiceImpl.javaj  https://github.com/cBioPortal/cbioportal/raw/28e013495ef90de55fd7765fe624f6d3cdd6e125/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStructuralVariantServiceImpl.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStructuralVariantServiceImpl.java?ref=28e013495ef90de55fd7765fe624f6d3cdd6e125j  XW  @@ -24,12 +24,11 @@
 package org.cbioportal.service.impl;
 
 import org.cbioportal.model.GeneFilterQuery;
-import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 import org.cbioportal.persistence.StructuralVariantRepository;
 import org.cbioportal.service.StructuralVariantService;
-import org.springframework.beans.PropertyValues;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import java.util.List;
@@ -64,7 +63,7 @@ public List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String>
     @Override
     public List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
                                                                              List<String> sampleIds,
-                                                                             List<StructVarFilterQuery> structVarQueries) {
+                                                                             List<StructuralVariantFilterQuery> structVarQueries) {
         return structuralVariantRepository.fetchStructuralVariantsByStructVarQueries(
             molecularProfileIds, sampleIds, structVarQueries);
     }u}(jG  (6a9e8c9b5a090c4009b997ce92ecaa613e5d8adcj  Cweb/src/main/java/org/cbioportal/web/parameter/StudyViewFilter.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/28e013495ef90de55fd7765fe624f6d3cdd6e125/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FStudyViewFilter.javaj  https://github.com/cBioPortal/cbioportal/raw/28e013495ef90de55fd7765fe624f6d3cdd6e125/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FStudyViewFilter.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FStudyViewFilter.java?ref=28e013495ef90de55fd7765fe624f6d3cdd6e125j  @@ -17,7 +17,7 @@
 import org.cbioportal.web.parameter.filter.*;
 
 @JsonIgnoreProperties(ignoreUnknown = true)
-@JsonInclude(Include.ALWAYS)
+@JsonInclude(Include.NON_NULL)
 public class StudyViewFilter implements Serializable {
 
     @Size(min = 1)u}(jG  (0c92bb446a5e2ba93f3c4d41edeacbf3516ffb36j  Bweb/src/main/java/org/cbioportal/web/util/StudyViewFilterUtil.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/28e013495ef90de55fd7765fe624f6d3cdd6e125/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javaj  https://github.com/cBioPortal/cbioportal/raw/28e013495ef90de55fd7765fe624f6d3cdd6e125/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.java?ref=28e013495ef90de55fd7765fe624f6d3cdd6e125j  Xg  @@ -15,7 +15,7 @@
 import org.cbioportal.model.GeneFilterQuery;
 import org.cbioportal.model.Patient;
 import org.cbioportal.model.SampleList;
-import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariantSpecialValue;
 import org.cbioportal.service.GeneService;
 import org.cbioportal.service.util.CustomDataSession;
@@ -292,7 +292,7 @@ private Map<String, Integer> getStringIntegerMap(List<String> hugoGeneSymbols) {
         return symbolToEntrezGeneId;
     }
 
-    public List<StructVarFilterQuery> resolveEntrezGeneIds(List<StructVarFilterQuery> structVarQueries) {
+    public List<StructuralVariantFilterQuery> resolveEntrezGeneIds(List<StructuralVariantFilterQuery> structVarQueries) {
 
         List<String> hugoGeneSymbols = structVarQueries
             .stream()u}(jG  (9367c54884b028616e93f45bb9039886c7153fe3j  Yweb/src/main/java/org/cbioportal/web/util/appliers/StructuralVariantSubFilterApplier.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/28e013495ef90de55fd7765fe624f6d3cdd6e125/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.javaj  https://github.com/cBioPortal/cbioportal/raw/28e013495ef90de55fd7765fe624f6d3cdd6e125/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.java?ref=28e013495ef90de55fd7765fe624f6d3cdd6e125j  X  @@ -1,7 +1,7 @@
 package org.cbioportal.web.util.appliers;
 
 import org.cbioportal.model.MolecularProfile;
-import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StudyViewStructuralVariantFilter;
 import org.cbioportal.service.MolecularProfileService;
 import org.cbioportal.service.StructuralVariantService;
@@ -59,7 +59,7 @@ public List<SampleIdentifier> filter(List<SampleIdentifier> toFilter, StudyViewF
                 .stream()
                 .collect(Collectors.groupingBy(MolecularProfile::getCancerStudyIdentifier));
 
-            for (List<StructVarFilterQuery> structVarQueries: structuralVariantFilter.getStructVarQueries()) {
+            for (List<StructuralVariantFilterQuery> structVarQueries: structuralVariantFilter.getStructVarQueries()) {
 
                 // Remove samples in remainingSampleIdentifiers that belong to a study that is not accessible to the current user
                 // (do not appear in the molecularProfileMap argument). 
@@ -75,7 +75,7 @@ public List<SampleIdentifier> filter(List<SampleIdentifier> toFilter, StudyViewF
                         .map(SampleIdentifier::getSampleId)
                         .collect(Collectors.toList());
 
-                final List<StructVarFilterQuery> entrezIdEnhancedSvQueries = studyViewFilterUtil.resolveEntrezGeneIds(structVarQueries);
+                final List<StructuralVariantFilterQuery> entrezIdEnhancedSvQueries = studyViewFilterUtil.resolveEntrezGeneIds(structVarQueries);
                 remainingSampleIdentifiers = structuralVariantService
                     .fetchStructuralVariantsByStructVarQueries(molecularProfileIds, sampleIds, entrezIdEnhancedSvQueries)
                     .stream()u}(jG  (cc78e1522dc6ea0d1c6af0fee69ba6f24966576cj  Aweb/src/test/java/org/cbioportal/web/StudyViewControllerTest.javaj  modifiedj  Kj  Kj  K
j  https://github.com/cBioPortal/cbioportal/blob/28e013495ef90de55fd7765fe624f6d3cdd6e125/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj  https://github.com/cBioPortal/cbioportal/raw/28e013495ef90de55fd7765fe624f6d3cdd6e125/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.java?ref=28e013495ef90de55fd7765fe624f6d3cdd6e125j  X  @@ -858,7 +858,7 @@ public void validateStructVarFilter() throws Exception {
         StudyViewFilter studyViewFilter = new StudyViewFilter();
         studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
 
-        final StructVarFilterQuery structVarFilterQuery = new StructVarFilterQuery("A", null, "B", null,
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery("A", null, "B", null,
             true, true, true, Select.all(),
             true, true, true, true);
         final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
@@ -885,7 +885,7 @@ public void validateStructVarFilterBothAnyGene() throws Exception {
         StudyViewFilter studyViewFilter = new StudyViewFilter();
         studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
 
-        final StructVarFilterQuery structVarFilterQuery = new StructVarFilterQuery("A", null, "B", null,
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery("A", null, "B", null,
             true, true, true, Select.all(),
             true, true, true, true);
         final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
@@ -913,7 +913,7 @@ public void validateStructVarFilterBothNoGene() throws Exception {
         StudyViewFilter studyViewFilter = new StudyViewFilter();
         studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
 
-        final StructVarFilterQuery structVarFilterQuery = new StructVarFilterQuery("A", null, "B", null,
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery("A", null, "B", null,
             true, true, true, Select.all(),
             true, true, true, true);
         final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
@@ -942,7 +942,7 @@ public void validateStructVarFilterBothNoGeneId() throws Exception {
         studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
 
         // Test case:
-        final StructVarFilterQuery structVarFilterQuery = new StructVarFilterQuery(null, null, null, null,
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery(null, null, null, null,
             true, true, true, Select.all(),
             true, true, true, true);
             
@@ -968,7 +968,7 @@ public void validateStructVarFilterBothGeneIdAndSpecialValueNull() throws Except
         studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
 
         // Test case:
-        final StructVarFilterQuery structVarFilterQuery = new StructVarFilterQuery(null, null, "B", null,
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery(null, null, "B", null,
             true, true, true, Select.all(),
             true, true, true, true);
         structVarFilterQuery.getGene1Query().setSpecialValue(null);u}(jG  (e8bd8efba6d188222d0992dd3282008e6123bd58j  ]web/src/test/java/org/cbioportal/web/util/appliers/StructuralVariantSubFilterApplierTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/28e013495ef90de55fd7765fe624f6d3cdd6e125/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.javaj  https://github.com/cBioPortal/cbioportal/raw/28e013495ef90de55fd7765fe624f6d3cdd6e125/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.java?ref=28e013495ef90de55fd7765fe624f6d3cdd6e125j  Xs  @@ -1,7 +1,7 @@
 package org.cbioportal.web.util.appliers;
 
 import org.cbioportal.model.MolecularProfile;
-import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StudyViewStructuralVariantFilter;
 import org.cbioportal.model.util.Select;
@@ -55,9 +55,9 @@ public void setUp() throws Exception {
         // For the test this arrangement does not matter much. What is more important
         // is the SVs returned by the structuralVariantService service mock in response to
         // subsequent query filter calls.
-        List<StructVarFilterQuery> svA = Arrays.asList(createQuery(G1, G2));
-        List<StructVarFilterQuery> svB = Arrays.asList(createQuery(G1, G2));
-        List<List<StructVarFilterQuery>> svA_and_svB_filterQuery = Arrays.asList(svA, svB);
+        List<StructuralVariantFilterQuery> svA = Arrays.asList(createQuery(G1, G2));
+        List<StructuralVariantFilterQuery> svB = Arrays.asList(createQuery(G1, G2));
+        List<List<StructuralVariantFilterQuery>> svA_and_svB_filterQuery = Arrays.asList(svA, svB);
 
         final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
         structuralVariantFilter.setStructVarQueries(svA_and_svB_filterQuery);
@@ -119,8 +119,8 @@ public void shouldApplyFilter() {
         Assert.assertTrue(subject.shouldApplyFilter(structVarStudyViewFilter)); 
     }
     
-    private StructVarFilterQuery createQuery(String gene1, String gene2) {
-        return new StructVarFilterQuery(gene1, null, gene2, null,
+    private StructuralVariantFilterQuery createQuery(String gene1, String gene2) {
+        return new StructuralVariantFilterQuery(gene1, null, gene2, null,
             true, true, true, Select.all(),
             true, true, true, true);
     }ueu(55b258c0c0e991d06668fd7942ca4a34d28a2c13}(sha(55b258c0c0e991d06668fd7942ca4a34d28a2c13node_idEC_kwDOAe-hB9oAKDU1YjI1OGMwYzBlOTkxZDA2NjY4ZmQ3OTQyY2E0YTM0ZDI4YTJjMTMcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-11T22:24:05Zu	committer}(j&  Djokovic0311j(  .55948986+Djokovic0311@users.noreply.github.comj*  2023-08-11T22:24:05ZumessageCput generic assay enrichment service in existing enrichment servicetree}(j  (24715bb3cee85f5b190d2994569802c1b6e13432urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/24715bb3cee85f5b190d2994569802c1b6e13432uj6  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/55b258c0c0e991d06668fd7942ca4a34d28a2c13
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj6  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/55b258c0c0e991d06668fd7942ca4a34d28a2c13html_urlXhttps://github.com/cBioPortal/cbioportal/commit/55b258c0c0e991d06668fd7942ca4a34d28a2c13comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/55b258c0c0e991d06668fd7942ca4a34d28a2c13/commentsj$  }(loginDjokovic0311idJUj   MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5j6  )https://api.github.com/users/Djokovic0311jB  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminuj,  }(jG  Djokovic0311jI  JUj   MDQ6VXNlcjU1OTQ4OTg2jK  4https://avatars.githubusercontent.com/u/55948986?v=4jM  h5j6  )https://api.github.com/users/Djokovic0311jB  https://github.com/Djokovic0311jP  3https://api.github.com/users/Djokovic0311/followersjR  @https://api.github.com/users/Djokovic0311/following{/other_user}jT  9https://api.github.com/users/Djokovic0311/gists{/gist_id}jV  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}jX  7https://api.github.com/users/Djokovic0311/subscriptionsjZ  .https://api.github.com/users/Djokovic0311/orgsj\  /https://api.github.com/users/Djokovic0311/reposj^  :https://api.github.com/users/Djokovic0311/events{/privacy}j`  9https://api.github.com/users/Djokovic0311/received_eventsjb  Userjd  uparents]}(j  (e1d28eaaf6fb69301625894ddbd34823e1e46776j6  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/e1d28eaaf6fb69301625894ddbd34823e1e46776jB  Xhttps://github.com/cBioPortal/cbioportal/commit/e1d28eaaf6fb69301625894ddbd34823e1e46776uastats}(totalM/	additionsK	deletionsMufiles](}(j  (51d28da2b77a4a02c65157cd33d6786cbd7a8777filenameMservice/src/main/java/org/cbioportal/service/ExpressionEnrichmentService.javastatusmodifiedj~  Kj  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/55b258c0c0e991d06668fd7942ca4a34d28a2c13/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/55b258c0c0e991d06668fd7942ca4a34d28a2c13/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.java?ref=55b258c0c0e991d06668fd7942ca4a34d28a2c13patchX  @@ -18,7 +18,7 @@ List<GenomicEnrichment> getGenomicEnrichments(String molecularProfileId,
                                                   Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
             throws MolecularProfileNotFoundException;
 
-    List<GenericAssayEnrichment> getGenericAssayEnrichments(String molecularProfileId,
+    List<GenericAssayEnrichment> getGenericAssayNumericalEnrichments(String molecularProfileId,
             Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
             throws MolecularProfileNotFoundException;
     List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(u}(j  (38a69093c7e511f0edb47ae746b5652a9222d833j  Oservice/src/main/java/org/cbioportal/service/GenericAssayEnrichmentService.javaj  removedj~  K j  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/e1d28eaaf6fb69301625894ddbd34823e1e46776/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayEnrichmentService.javaj  https://github.com/cBioPortal/cbioportal/raw/e1d28eaaf6fb69301625894ddbd34823e1e46776/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayEnrichmentService.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayEnrichmentService.java?ref=e1d28eaaf6fb69301625894ddbd34823e1e46776j  X  @@ -1,23 +0,0 @@
-//package org.cbioportal.service;
-//
-//import org.cbioportal.model.EnrichmentType;
-//import org.cbioportal.model.GenericAssayBinaryEnrichment;
-//import org.cbioportal.model.GenericAssayCategoricalEnrichment;
-//import org.cbioportal.model.MolecularProfileCaseIdentifier;
-//import org.cbioportal.service.exception.MolecularProfileNotFoundException;
-//
-//import java.util.List;
-//import java.util.Map;
-//
-//public interface GenericAssayEnrichmentService {
-//    List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
-//        String molecularProfileId,
-//        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
-//        EnrichmentType enrichmentType)
-//        throws MolecularProfileNotFoundException;
-//
-//    List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
-//                                                                                  Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
-//                                                                                  EnrichmentType enrichmentType)
-//        throws MolecularProfileNotFoundException;
-//}u}(j  (151258bd3956f9d4970a48f73aa130a517be80a0j  Vservice/src/main/java/org/cbioportal/service/impl/ExpressionEnrichmentServiceImpl.javaj  modifiedj~  Kj  K=j  KPj  https://github.com/cBioPortal/cbioportal/blob/55b258c0c0e991d06668fd7942ca4a34d28a2c13/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.javaj  https://github.com/cBioPortal/cbioportal/raw/55b258c0c0e991d06668fd7942ca4a34d28a2c13/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.java?ref=55b258c0c0e991d06668fd7942ca4a34d28a2c13j  X'  @@ -66,7 +66,7 @@ public List<GenomicEnrichment> getGenomicEnrichments(String molecularProfileId,
                 MolecularAlterationType.PROTEIN_ARRAY_PROTEIN_LEVEL,
                 MolecularAlterationType.PROTEIN_ARRAY_PHOSPHORYLATION);
 
-        validateMolecularProfile(molecularProfile, validGenomicMolecularAlterationTypes);
+        validateMolecularProfile(molecularProfile, validGenomicMolecularAlterationTypes,"GENOMIC");
 
         Iterable<GeneMolecularAlteration> maItr = molecularDataRepository
                 .getGeneMolecularAlterationsIterableFast(molecularProfile.getStableId());
@@ -98,66 +98,31 @@ public List<GenomicEnrichment> getGenomicEnrichments(String molecularProfileId,
     // transaction needs to be setup here in order to return Iterable from
     // molecularDataRepository in getGenericAssayMolecularAlterationsIterable
     @Transactional(readOnly = true)
-    public List<GenericAssayEnrichment> getGenericAssayEnrichments(String molecularProfileId,
+    public List<GenericAssayEnrichment> getGenericAssayNumericalEnrichments(String molecularProfileId,
             Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
             throws MolecularProfileNotFoundException {
-
-        MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
-
-        validateMolecularProfile(molecularProfile, Arrays.asList(MolecularAlterationType.GENERIC_ASSAY));
+        
+        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, "LIMIT-VALUE");
 
         Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
                 .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
 
-        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets;
-        if (BooleanUtils.isTrue(molecularProfile.getPatientLevel())) {
-            // Build sampleIdToPatientIdMap to quick find if a sample has shared patientId with other samples
-            List<String> sampleIds = molecularProfileCaseSets.values().stream().flatMap(Collection::stream).map(MolecularProfileCaseIdentifier::getCaseId).collect(Collectors.toList());
-            List<String> studyIds = Collections.nCopies(sampleIds.size(), molecularProfile.getCancerStudyIdentifier());
-            List<Sample> samples = sampleService.fetchSamples(studyIds, sampleIds, "ID");
-            Map<String, Integer> sampleIdToPatientIdMap = samples.stream().collect(Collectors.toMap(Sample::getStableId, Sample::getPatientId));
-            // Build filteredMolecularProfileCaseSets
-            filteredMolecularProfileCaseSets = new HashMap<>();
-            for (Map.Entry<String, List<MolecularProfileCaseIdentifier>> pair : molecularProfileCaseSets.entrySet()) {
-                Set<Integer> patientSet = new HashSet<Integer>();
-                List<MolecularProfileCaseIdentifier> identifierListUniqueByPatientId = new ArrayList<>();
-                for (MolecularProfileCaseIdentifier caseIdentifier : pair.getValue()) {
-                    if (!patientSet.contains(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()))) {
-                        identifierListUniqueByPatientId.add(caseIdentifier);
-                        patientSet.add(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()));
-                    }
-                }
-                filteredMolecularProfileCaseSets.put(pair.getKey(), identifierListUniqueByPatientId);
-            }
-        } else {
-                filteredMolecularProfileCaseSets = molecularProfileCaseSets;
-        }
+        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);;
+
         List<GenericAssayEnrichment> genericAssayEnrichments = expressionEnrichmentUtil.getEnrichments(molecularProfile,
                 filteredMolecularProfileCaseSets, enrichmentType, maItr);
         List<String> getGenericAssayStableIds = genericAssayEnrichments.stream()
                 .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
-        Map<String, GenericAssayMeta> genericAssayMetaByStableId = genericAssayService
-                .getGenericAssayMetaByStableIdsAndMolecularIds(getGenericAssayStableIds,
-                        getGenericAssayStableIds.stream().map(stableId -> molecularProfileId)
-                                .collect(Collectors.toList()),
-                        "SUMMARY")
-                .stream().collect(Collectors.toMap(GenericAssayMeta::getStableId, Function.identity()));
+
+        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
+
         return genericAssayEnrichments.stream().map(enrichmentDatum -> {
             enrichmentDatum.setGenericEntityMetaProperties(
                     genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
             return enrichmentDatum;
         }).collect(Collectors.toList());
     }
 
-
-    private void validateMolecularProfile(MolecularProfile molecularProfile,
-            List<MolecularAlterationType> validMolecularAlterationTypes) throws MolecularProfileNotFoundException {
-        if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
-            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-        }
-    }
-
-
     @Override
     @Transactional(readOnly = true)
     public List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
@@ -166,7 +131,7 @@ public List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
         throws MolecularProfileNotFoundException {
 
         // Validate and fetch molecular profile
-        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, true);
+        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, "BINARY");
 
         // Get the molecular alterations for the provided profile
         Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
@@ -203,13 +168,12 @@ public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichm
                                                                                          Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
         throws MolecularProfileNotFoundException {
 
-        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, false);
+        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, "CATEGORICAL");
 
         Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
             .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
 
-        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets;
-        filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
+        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
 
         List<GenericAssayCategoricalEnrichment> genericAssayCategoricalEnrichments = expressionEnrichmentUtil.getGenericAssayCategoricalEnrichments(molecularProfile,
             filteredMolecularProfileCaseSets, enrichmentType, maItr);
@@ -226,30 +190,24 @@ public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichm
             return enrichmentDatum;
         }).collect(Collectors.toList());
     }
-
-    private MolecularProfile getAndValidateMolecularProfile(String molecularProfileId, boolean isBinary) throws MolecularProfileNotFoundException {
+    
+    private MolecularProfile getAndValidateMolecularProfile(String molecularProfileId, String dataType) throws MolecularProfileNotFoundException {
         MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
-        validateMolecularProfile(molecularProfile, Arrays.asList(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY), isBinary);
+        validateMolecularProfile(molecularProfile, Arrays.asList(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY), dataType);
         return molecularProfile;
     }
 
     private void validateMolecularProfile(MolecularProfile molecularProfile,
                                           List<MolecularProfile.MolecularAlterationType> validMolecularAlterationTypes,
-                                          boolean isBinary) throws MolecularProfileNotFoundException {
+                                          String dataType) throws MolecularProfileNotFoundException {
         if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
             // Check alteration type
             throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
         }
         // Check datatype for binary or categorical
-        if(isBinary) {
-            if(!molecularProfile.getDatatype().equals("BINARY")) {
-                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-            }
-        } else {
-            if(!molecularProfile.getDatatype().equals("CATEGORICAL")) {
-                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-            }
-        }
+        if(molecularProfile.getMolecularAlterationType().equals(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY) &&
+            !molecularProfile.getDatatype().equals(dataType))
+            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
     }
 
     private Map<String, List<MolecularProfileCaseIdentifier>> filterMolecularProfileCaseSets(MolecularProfile molecularProfile, Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets) {u}(j  (bdcd89ed023c4aef02682752739f54409698e083j  Xservice/src/main/java/org/cbioportal/service/impl/GenericAssayEnrichmentServiceImpl.javaj  removedj~  K j  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/e1d28eaaf6fb69301625894ddbd34823e1e46776/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.javaj  https://github.com/cBioPortal/cbioportal/raw/e1d28eaaf6fb69301625894ddbd34823e1e46776/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.java?ref=e1d28eaaf6fb69301625894ddbd34823e1e46776j  X*  @@ -1,188 +0,0 @@
-//package org.cbioportal.service.impl;
-//
-//import org.apache.commons.lang3.BooleanUtils;
-//import org.cbioportal.model.EnrichmentType;
-//import org.cbioportal.model.GenericAssayBinaryEnrichment;
-//import org.cbioportal.model.GenericAssayCategoricalEnrichment;
-//import org.cbioportal.model.GenericAssayMolecularAlteration;
-//import org.cbioportal.model.MolecularProfileCaseIdentifier;
-//import org.cbioportal.model.meta.GenericAssayMeta;
-//import org.cbioportal.model.MolecularProfile;
-//import org.cbioportal.model.Sample;
-//import org.cbioportal.model.GenericAssayEnrichment;
-//import org.cbioportal.persistence.MolecularDataRepository;
-//import org.cbioportal.service.GenericAssayEnrichmentService;
-//import org.cbioportal.service.GenericAssayService;
-//import org.cbioportal.service.MolecularProfileService;
-//import org.cbioportal.service.SampleService;
-//import org.cbioportal.service.exception.MolecularProfileNotFoundException;
-//import org.cbioportal.service.util.ExpressionEnrichmentUtil;
-//import org.cbioportal.service.util.FisherExactTestCalculator;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.stereotype.Service;
-//import org.springframework.transaction.annotation.Transactional;
-//
-//import java.math.BigDecimal;
-//import java.util.*;
-//import java.util.function.Function;
-//import java.util.stream.Collectors;
-//
-//
-//@Service
-//public class GenericAssayEnrichmentServiceImpl implements GenericAssayEnrichmentService {
-//
-//    @Autowired
-//    private MolecularDataRepository molecularDataRepository;
-//
-//    @Autowired
-//    private SampleService sampleService;
-//
-//    @Autowired
-//    private MolecularProfileService molecularProfileService;
-//
-//    @Autowired
-//    private FisherExactTestCalculator fisherExactTestCalculator = new FisherExactTestCalculator();
-//
-//    @Autowired
-//    private ExpressionEnrichmentUtil expressionEnrichmentUtil;
-//    @Autowired
-//    private GenericAssayService genericAssayService;
-//
-//    @Override
-//    @Transactional(readOnly = true)
-//    public List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
-//        String molecularProfileId,
-//        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
-//        throws MolecularProfileNotFoundException {
-//
-//        // Validate and fetch molecular profile
-//        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, true);
-//
-//        // Get the molecular alterations for the provided profile
-//        Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
-//            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
-//
-//        // Filter the case sets based on molecular profile
-//        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
-//
-//        // Obtain binary enrichments from the utility
-//        List<GenericAssayBinaryEnrichment> genericAssayBinaryEnrichments = expressionEnrichmentUtil.getGenericAssayBinaryEnrichments(molecularProfile,
-//            filteredMolecularProfileCaseSets, enrichmentType, maItr);
-//
-//        // Calculate q-values for enrichments
-//        calcQValues(genericAssayBinaryEnrichments);
-//
-//        // Extract stable IDs from binary enrichments
-//        List<String> getGenericAssayStableIds = genericAssayBinaryEnrichments.stream()
-//            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
-//
-//        // Fetch metadata of generic assays by their stable IDs
-//        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
-//
-//        // Assign meta properties to each enrichment
-//        return genericAssayBinaryEnrichments.stream().map(enrichmentDatum -> {
-//            enrichmentDatum.setGenericEntityMetaProperties(
-//                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
-//            return enrichmentDatum;
-//        }).collect(Collectors.toList());
-//    }
-//
-//    @Override
-//    @Transactional(readOnly = true)
-//    public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
-//                                                                                         Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
-//        throws MolecularProfileNotFoundException {
-//
-//        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, false);
-//
-//        Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
-//            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
-//
-//        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets;
-//        filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
-//
-//        List<GenericAssayCategoricalEnrichment> genericAssayCategoricalEnrichments = expressionEnrichmentUtil.getGenericAssayCategoricalEnrichments(molecularProfile,
-//            filteredMolecularProfileCaseSets, enrichmentType, maItr);
-//
-//        calcQValues(genericAssayCategoricalEnrichments);
-//
-//        List<String> getGenericAssayStableIds = genericAssayCategoricalEnrichments.stream()
-//            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
-//        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
-//
-//        return genericAssayCategoricalEnrichments.stream().map(enrichmentDatum -> {
-//            enrichmentDatum.setGenericEntityMetaProperties(
-//                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
-//            return enrichmentDatum;
-//        }).collect(Collectors.toList());
-//    }
-//
-//    private MolecularProfile getAndValidateMolecularProfile(String molecularProfileId, boolean isBinary) throws MolecularProfileNotFoundException {
-//        MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
-//        validateMolecularProfile(molecularProfile, Arrays.asList(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY), isBinary);
-//        return molecularProfile;
-//    }
-//
-//    private void validateMolecularProfile(MolecularProfile molecularProfile,
-//                                          List<MolecularProfile.MolecularAlterationType> validMolecularAlterationTypes, 
-//                                          boolean isBinary) throws MolecularProfileNotFoundException {
-//        if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
-//            // Check alteration type
-//            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-//        }
-//        // Check datatype for binary or categorical
-//        if(isBinary) {
-//            if(!molecularProfile.getDatatype().equals("BINARY")) {
-//                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-//            }            
-//        } else {
-//            if(!molecularProfile.getDatatype().equals("CATEGORICAL")) {
-//                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-//            }            
-//        }
-//    }
-//
-//    private Map<String, List<MolecularProfileCaseIdentifier>> filterMolecularProfileCaseSets(MolecularProfile molecularProfile, Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets) {
-//        if (BooleanUtils.isTrue(molecularProfile.getPatientLevel())) {
-//            // If patient level, filter duplicates by patient id
-//            // For now we only support sample level for samples
-//            List<String> sampleIds = molecularProfileCaseSets.values().stream().flatMap(Collection::stream).map(MolecularProfileCaseIdentifier::getCaseId).collect(Collectors.toList());
-//            List<String> studyIds = Collections.nCopies(sampleIds.size(), molecularProfile.getCancerStudyIdentifier());
-//            List<Sample> samples = sampleService.fetchSamples(studyIds, sampleIds, "ID");
-//            Map<String, Integer> sampleIdToPatientIdMap = samples.stream().collect(Collectors.toMap(Sample::getStableId, Sample::getPatientId));
-//
-//            Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = new HashMap<>();
-//            for (Map.Entry<String, List<MolecularProfileCaseIdentifier>> pair : molecularProfileCaseSets.entrySet()) {
-//                Set<Integer> patientSet = new HashSet<Integer>();
-//                List<MolecularProfileCaseIdentifier> identifierListUniqueByPatientId = new ArrayList<>();
-//                for (MolecularProfileCaseIdentifier caseIdentifier : pair.getValue()) {
-//                    if (!patientSet.contains(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()))) {
-//                        identifierListUniqueByPatientId.add(caseIdentifier);
-//                        patientSet.add(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()));
-//                    }
-//                }
-//                filteredMolecularProfileCaseSets.put(pair.getKey(), identifierListUniqueByPatientId);
-//            }
-//            return filteredMolecularProfileCaseSets;
-//        } else {
-//            return molecularProfileCaseSets;
-//        }
-//    }
-//
-//    private Map<String, GenericAssayMeta> getGenericAssayMetaByStableId(List<String> stableIds, String molecularProfileId) {
-//        return genericAssayService.getGenericAssayMetaByStableIdsAndMolecularIds(stableIds, stableIds.stream().map(sid -> molecularProfileId)
-//            .collect(Collectors.toList()), "SUMMARY").stream()
-//            .collect(Collectors.toMap(GenericAssayMeta::getStableId, Function.identity()));
-//    }
-//
-//    private <T extends GenericAssayEnrichment> void calcQValues(List<T> enrichments) {
-//        // Sort enrichments by pValue
-//        Collections.sort(enrichments, GenericAssayEnrichment::compare);
-//        BigDecimal[] pValues = enrichments.stream().map(T::getpValue).toArray(BigDecimal[]::new);
-//        BigDecimal[] qValues = fisherExactTestCalculator.calcqValue(pValues);
-//        // Assign q-values to enrichments
-//        for (int i = 0; i < enrichments.size(); i++) {
-//            enrichments.get(i).setqValue(qValues[i]);
-//        }
-//    }
-//}u}(j  (a777176e26ad028ead7bdd29894c4d5c16aaed87j  Zservice/src/test/java/org/cbioportal/service/impl/ExpressionEnrichmentServiceImplTest.javaj  modifiedj~  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/55b258c0c0e991d06668fd7942ca4a34d28a2c13/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImplTest.javaj  https://github.com/cBioPortal/cbioportal/raw/55b258c0c0e991d06668fd7942ca4a34d28a2c13/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImplTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImplTest.java?ref=55b258c0c0e991d06668fd7942ca4a34d28a2c13j  XL  @@ -207,7 +207,7 @@ public void getGenomicEnrichments() throws Exception {
     }
 
     @Test
-    public void getGenericAssayEnrichments() throws Exception {
+    public void getGenericAssayNumericalEnrichments() throws Exception {
         geneMolecularProfile.setMolecularAlterationType(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY);
 
         List<GenericAssayMolecularAlteration> molecularDataList = new ArrayList<GenericAssayMolecularAlteration>();
@@ -229,7 +229,7 @@ public void getGenericAssayEnrichments() throws Exception {
                 .thenReturn(Arrays.asList(new GenericAssayMeta(HUGO_GENE_SYMBOL_1),
                         new GenericAssayMeta(HUGO_GENE_SYMBOL_2)));
 
-        List<GenericAssayEnrichment> result = enrichmentServiceImpl.getGenericAssayEnrichments(MOLECULAR_PROFILE_ID,
+        List<GenericAssayEnrichment> result = enrichmentServiceImpl.getGenericAssayNumericalEnrichments(MOLECULAR_PROFILE_ID,
                 molecularProfileCaseSets, EnrichmentType.SAMPLE);
 
         Assert.assertEquals(2, result.size());
@@ -301,7 +301,7 @@ public void getGenericAssayPatientLevelEnrichments() throws Exception {
 
         Mockito.when(sampleService.fetchSamples(Arrays.asList(STUDY_ID, STUDY_ID, STUDY_ID, STUDY_ID, STUDY_ID), Arrays.asList(SAMPLE_ID3, SAMPLE_ID4, SAMPLE_ID5, SAMPLE_ID1, SAMPLE_ID2), "ID")).thenReturn(samples);
 
-        List<GenericAssayEnrichment> result = enrichmentServiceImpl.getGenericAssayEnrichments(MOLECULAR_PROFILE_ID, molecularProfilePatientLevelCaseSets, EnrichmentType.SAMPLE);
+        List<GenericAssayEnrichment> result = enrichmentServiceImpl.getGenericAssayNumericalEnrichments(MOLECULAR_PROFILE_ID, molecularProfilePatientLevelCaseSets, EnrichmentType.SAMPLE);
 
         Assert.assertEquals(2, result.size());
         GenericAssayEnrichment genericAssayEnrichment = result.get(0);u}(j  (4072480eb1360b62043c2de3243ab71fc7d731e2j  Hweb/src/main/java/org/cbioportal/web/ExpressionEnrichmentController.javaj  modifiedj~  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/55b258c0c0e991d06668fd7942ca4a34d28a2c13/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentController.javaj  https://github.com/cBioPortal/cbioportal/raw/55b258c0c0e991d06668fd7942ca4a34d28a2c13/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentController.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentController.java?ref=55b258c0c0e991d06668fd7942ca4a34d28a2c13j  X  @@ -95,7 +95,7 @@ private <S extends ExpressionEnrichment> List<S> fetchExpressionEnrichments(Enri
         }
 
         if (isRequestForGenericAssayEnrichments) {
-            return (List<S>) expressionEnrichmentService.getGenericAssayEnrichments(
+            return (List<S>) expressionEnrichmentService.getGenericAssayNumericalEnrichments(
                     molecularProfileIds.iterator().next(), groupCaseIdentifierSet, enrichmentType);
         }
         u}(j  (0abe4a9e3ca0f467b635dfea91bbfcd5fe91a7d0j  Lweb/src/test/java/org/cbioportal/web/ExpressionEnrichmentControllerTest.javaj  modifiedj~  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/55b258c0c0e991d06668fd7942ca4a34d28a2c13/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentControllerTest.javaj  https://github.com/cBioPortal/cbioportal/raw/55b258c0c0e991d06668fd7942ca4a34d28a2c13/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentControllerTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentControllerTest.java?ref=55b258c0c0e991d06668fd7942ca4a34d28a2c13j  Xt  @@ -186,7 +186,7 @@ public void fetchGenericAssayEnrichments() throws Exception {
         genericAssayEnrichment2.setpValue(TEST_P_VALUE_2);
         genericAssayEnrichments.add(genericAssayEnrichment2);
 
-        Mockito.when(expressionEnrichmentService.getGenericAssayEnrichments(Mockito.anyString(), Mockito.anyMap(),
+        Mockito.when(expressionEnrichmentService.getGenericAssayNumericalEnrichments(Mockito.anyString(), Mockito.anyMap(),
                 Mockito.any(EnrichmentType.class))).thenReturn(genericAssayEnrichments);
 
         mockMvc.perform(MockMvcRequestBuilders.post("/generic-assay-enrichments/fetch")ueu(838557f30e13d1f580806d87b3c32a0c4200e59d}(sha(838557f30e13d1f580806d87b3c32a0c4200e59dnode_idEC_kwDOAe-hB9oAKDgzODU1N2YzMGUxM2QxZjU4MDgwNmQ4N2IzYzMyYTBjNDIwMGU1OWQcommit}(author}(name
Ino de Bruijnemailino@ino.biodate2023-06-02T22:04:46Zu	committer}(j  GitHubj  noreply@github.comj  2023-06-02T22:04:46Zumessagefix release procedure infotree}(j  (e2013083b3602f10566f9f60d29edfb32b420771urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/e2013083b3602f10566f9f60d29edfb32b420771uj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/838557f30e13d1f580806d87b3c32a0c4200e59d
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkemd+CRBK7hj4Ov3rIwAAhJgIABX6Ji/zZ8kD2BHlz3WzfDxR
0W6rRoWb01pw93LYf640UutyYEIk0vjDPoqEWzwgfgiLOQ5D2OSso8Svnnfb+x7B
12Qtxpk2BQw2GHx1G7w5/2cNMhnh5xX94YomloOvaMkAt/wEd8ABa69GBMwbtek9
4OTyz9qJwgLYxjdygw8eUQFfIBQjPkIdEaaQLMh1UIi5Xchnwg6hdhCNN8egYL41
L/vZwcdkupMVG1kbltETCgRoFzfvyXwIP4WIZAP8iDuHCS80YXLpkiK3kRO+ivRt
VA+NVggNPv+BHAlcB32R0P2UsuYy5ky+Wuy7/wqO8sKf2mCDZWPQYNtBFKVJ6Qw=
=WQ5b
-----END PGP SIGNATURE-----
payloadtree e2013083b3602f10566f9f60d29edfb32b420771
parent 09bdc018b1ceae71bec4b1bb46d9544bedd9a7a3
author Ino de Bruijn <ino@ino.bio> 1685743486 -0400
committer GitHub <noreply@github.com> 1685743486 -0400

fix release procedure infouuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/838557f30e13d1f580806d87b3c32a0c4200e59dhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/838557f30e13d1f580806d87b3c32a0c4200e59dcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/838557f30e13d1f580806d87b3c32a0c4200e59d/commentsj  }(logininodbidJZ j  MDQ6VXNlcjEzMzQwMDQ=
avatar_url3https://avatars.githubusercontent.com/u/1334004?v=4gravatar_idh5j  "https://api.github.com/users/inodbj  https://github.com/inodb
followers_url,https://api.github.com/users/inodb/followers
following_url9https://api.github.com/users/inodb/following{/other_user}	gists_url2https://api.github.com/users/inodb/gists{/gist_id}starred_url9https://api.github.com/users/inodb/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/inodb/subscriptionsorganizations_url'https://api.github.com/users/inodb/orgs	repos_url(https://api.github.com/users/inodb/repos
events_url3https://api.github.com/users/inodb/events{/privacy}received_events_url2https://api.github.com/users/inodb/received_eventstypeUser
site_adminuj  }(j  web-flowj  J/j  MDQ6VXNlcjE5ODY0NDQ3j  4https://avatars.githubusercontent.com/u/19864447?v=4j  h5j  %https://api.github.com/users/web-flowj  https://github.com/web-flowj  /https://api.github.com/users/web-flow/followersj  <https://api.github.com/users/web-flow/following{/other_user}j  5https://api.github.com/users/web-flow/gists{/gist_id}j  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j  3https://api.github.com/users/web-flow/subscriptionsj  *https://api.github.com/users/web-flow/orgsj  +https://api.github.com/users/web-flow/reposj  6https://api.github.com/users/web-flow/events{/privacy}j  5https://api.github.com/users/web-flow/received_eventsj	  Userj  uparents]}(j  (09bdc018b1ceae71bec4b1bb46d9544bedd9a7a3j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/09bdc018b1ceae71bec4b1bb46d9544bedd9a7a3j  Xhttps://github.com/cBioPortal/cbioportal/commit/09bdc018b1ceae71bec4b1bb46d9544bedd9a7a3uastats}(totalK	additionsK	deletionsKufiles]}(j  (155e580fde12f43aca050748bc4dbbf1a01e91b1filename%docs/development/Release-Procedure.mdstatusmodifiedj%  Kj&  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/838557f30e13d1f580806d87b3c32a0c4200e59d/docs%2Fdevelopment%2FRelease-Procedure.mdraw_urlhttps://github.com/cBioPortal/cbioportal/raw/838557f30e13d1f580806d87b3c32a0c4200e59d/docs%2Fdevelopment%2FRelease-Procedure.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdevelopment%2FRelease-Procedure.md?ref=838557f30e13d1f580806d87b3c32a0c4200e59dpatchX  @@ -38,7 +38,7 @@ For releases with database migrations, we increase the MINOR number in MAJOR.MIN
 
 ### From pre-release to official release
 
-On the [GitHub Release Page](https://github.com/cBioPortal/cbioportal/releases) you will see that some releases have the pre-release indication whereas others do not. In general we make a new pre-release release every week. We test it out in production (https://cbioportal.org) for one week and if no new critical issues are identified we make it an official release.
+On the [GitHub Release Page](https://github.com/cBioPortal/cbioportal/releases) you will see that some releases have the pre-release indication whereas others do not. In general we make a new pre-release release every week. We test it out in production (https://cbioportal.org) for one month and if no new critical issues are identified we make it an official release.
 
 ### cBioPortal Software Version Numbers
 uau(1768381e64f9e6e8a238e2aec7b775fdafcb2b31}(sha(1768381e64f9e6e8a238e2aec7b775fdafcb2b31node_idEC_kwDOAe-hB9oAKDE3NjgzODFlNjRmOWU2ZThhMjM4ZTJhZWM3Yjc3NWZkYWZjYjJiMzEcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-06-09T14:01:02Zu	committer}(jB  GitHubjD  noreply@github.comjF  2023-06-09T14:01:02ZumessageAdding new features news (#10149)

* Adding new features news from 2022/05 to current

Co-authored-by: Ino de Bruijn <ino@ino.bio>tree}(j:  (033af1efffd2ae8cc9bf7feb8bf17235a45eff13urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/033af1efffd2ae8cc9bf7feb8bf17235a45eff13ujR  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/1768381e64f9e6e8a238e2aec7b775fdafcb2b31
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkgzCeCRBK7hj4Ov3rIwAAGU4IACqKnhyiK3K9JLRnqyMBapnx
vpzXgurrd/3SukmhgHeu2f/UpIdFXynWO9fFpCdB37yqwbg/ggW6heNfvP/Mes74
hpgVTTjP0L9Q77ifgibOZsPciBjKGwSshGyl/ojBdCe8AlDBz7aj4P0DxnIy+Fkx
vKRkXqyeEQJnRTvheza38+WmHl7xyFa7ft4hHhcjCbGSIUUu5T+/UMs9BuPlNboM
tOn4B0ZatnQr/lCAkt6ULZp7bklYITfHXUR1rI0M1PS/JpIPRDt7wvnTxyWZ1fnE
dvkiHIeLEZToT7XjP/cUFfBS9jEL7X1PNP5QSCuOq5bwBNgtzARAd1BE+cFXR0o=
=0V/I
-----END PGP SIGNATURE-----
payloadXm  tree 033af1efffd2ae8cc9bf7feb8bf17235a45eff13
parent ad324a871ab1f221afe88f46a704b59584adbf38
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1686319262 -0600
committer GitHub <noreply@github.com> 1686319262 -0400

Adding new features news (#10149)

* Adding new features news from 2022/05 to current

Co-authored-by: Ino de Bruijn <ino@ino.bio>uujR  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1768381e64f9e6e8a238e2aec7b775fdafcb2b31html_urlXhttps://github.com/cBioPortal/cbioportal/commit/1768381e64f9e6e8a238e2aec7b775fdafcb2b31comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/1768381e64f9e6e8a238e2aec7b775fdafcb2b31/commentsj@  }(login
dippindotsidJtO j<  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5jR  'https://api.github.com/users/dippindotsj`  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminujH  }(je  web-flowjg  J/j<  MDQ6VXNlcjE5ODY0NDQ3ji  4https://avatars.githubusercontent.com/u/19864447?v=4jk  h5jR  %https://api.github.com/users/web-flowj`  https://github.com/web-flowjn  /https://api.github.com/users/web-flow/followersjp  <https://api.github.com/users/web-flow/following{/other_user}     jr  5https://api.github.com/users/web-flow/gists{/gist_id}jt  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jv  3https://api.github.com/users/web-flow/subscriptionsjx  *https://api.github.com/users/web-flow/orgsjz  +https://api.github.com/users/web-flow/reposj|  6https://api.github.com/users/web-flow/events{/privacy}j~  5https://api.github.com/users/web-flow/received_eventsj  Userj  uparents]}(j:  (ad324a871ab1f221afe88f46a704b59584adbf38jR  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ad324a871ab1f221afe88f46a704b59584adbf38j`  Xhttps://github.com/cBioPortal/cbioportal/commit/ad324a871ab1f221afe88f46a704b59584adbf38uastats}(totalK'	additionsK'	deletionsK ufiles]}(j:  (8a74fdd36d44e849e1dbe438aaa90011417c9f24filenamedocs/News.mdstatusmodifiedj  K'j  K changesK'blob_urlehttps://github.com/cBioPortal/cbioportal/blob/1768381e64f9e6e8a238e2aec7b775fdafcb2b31/docs%2FNews.mdraw_urldhttps://github.com/cBioPortal/cbioportal/raw/1768381e64f9e6e8a238e2aec7b775fdafcb2b31/docs%2FNews.mdcontents_urlwhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FNews.md?ref=1768381e64f9e6e8a238e2aec7b775fdafcb2b31patchX  @@ -1,3 +1,12 @@
+## May 2, 2023
+*   **New Feature**: The mutations tab now shows variant annotations from the [repository of Variant with Unexpected Effects (reVUE)](https://www.cancerrevue.org/).
+    <img src="https://user-images.githubusercontent.com/16869603/234271379-6a0876ea-8477-426e-a0e4-5e0b0b66aef9.gif" width="700" />
+
+## Apr 11, 2023
+*   **New Feature**: Disable autocommit and manually commit filters in study view. Manually commit filters can improve cBioPortal performance when query large dataset.
+    <img src="https://user-images.githubusercontent.com/3323006/221857599-1eb6e9a5-55c7-4fb5-bc14-283699be0990.png" width="700" />
+    <img src="https://user-images.githubusercontent.com/3323006/221858244-bf359850-79b5-4f9c-8008-6b5271721854.png" width="700" />
+
 ## Apr 5, 2023
 *   **Added data** consisting of 2,472 samples from 5 studies:
     * [Bladder Cancer (MSK, Cell Reports 2022)](https://www.cbioportal.org/study/summary?id=paired_bladder_2022) *1659 samples*
@@ -9,6 +18,25 @@
 *   **Data Improvement**
    	* Added TERT promoter mutation status to [Melanomas (TCGA, Cell 2015)](https://www.cbioportal.org/study/summary?id=skcm_tcga_pub_2015), [Papillary Thyroid Carcinoma (TCGA, Cell 2014)](https://www.cbioportal.org/study/summary?id=thca_tcga_pub) TCGA studies.
 
+## Apr 4, 2023
+*   **New Feature**: Allow numeric data type for custom data charts.
+    <img src="https://user-images.githubusercontent.com/33220871/222459360-9c251f7f-1005-442f-811d-dd1ee1103161.png" width="700" />
+    <img src="https://user-images.githubusercontent.com/33220871/222460439-ac7007c8-059a-4ecc-816c-90752adff444.png" width="700" />
+
+    This also allows to have numerical custom data after we query based on genes (custom data 2 in the image):
+    <img src="https://user-images.githubusercontent.com/33220871/223729410-03a094f4-7671-453f-b8b8-f7bc10b61c7c.png" width="700" />
+    <img src="https://user-images.githubusercontent.com/33220871/223729522-fd9e19e2-6218-40d4-b9fb-f253c4faa858.png" width="700" />
+
+## Jan 10, 2023
+*   **New Feature**: New Pathways tab on the Group Comparison view. 
+    [Example: Primary vs Metastasis samples in MSK-IMPACT Clinical Sequencing Cohort](https://www.cbioportal.org/comparison/pathways?comparisonId=61791fa92e3200072db9b64e&groupOrder=%5B%22Primary%22%2C%22Metastasis%22%5D)
+    <img src="https://user-images.githubusercontent.com/15748980/235750129-661682f7-6593-4b7e-8873-ebba70eeae32.png" width="700" />
+
+## Dec 13, 2022
+*   **New Feature**: New Mutations tab on the Group Comparison view.
+    [Example: Primary vs Metastasis samples in MSK-IMPACT Clinical Sequencing Cohort](https://www.cbioportal.org/comparison/mutations?comparisonId=61791fa92e3200072db9b64e&groupOrder=%5B%22Primary%22%2C%22Metastasis%22%5D)
+    <img src="https://user-images.githubusercontent.com/15748980/235748831-78652ccd-b3ab-496f-9626-74ceb8c7230d.png" width="700" />
+
 ## Oct 12, 2022
 *   **Added data** consisting of 1,459 samples from 10 studies:
 	* [Hepatocellular Carcinoma (MERiC/Basel, Nat Commun. 2022)](https://www.cbioportal.org/study/summary?id=hcc_meric_2021) *122 samples*
@@ -21,6 +49,13 @@
 	* [Mixed Tumors: Selpercatinib RET Trial (MSK, Nat Commun. 2022)](https://www.cbioportal.org/study/summary?id=mixed_selpercatinib_2020) *188 samples*
 	* [Low-Grade Serous Ovarian Cancer (MSK, Clin Cancer Res 2022)](https://www.cbioportal.org/study/summary?id=lgsoc_mapk_msk_2022) *119 samples*
 	* [Urothelial Carcinoma (BCAN/HCRN 2022)](http://www.cbioportal.org/study/summary?id=blca_bcan_hcrn_2022) *203 samples*
+
+## Sep 6, 2022
+*   **Enhancement**: Oncoprint can now save clinical tracks after login
+    <img src="https://user-images.githubusercontent.com/3323006/188828765-ded10947-7343-49dd-b605-50b58b67a388.png" width="700" />
+
+## Aug 11, 2022
+*   **New Major Release**: **v5.0.0** release drops support for fusions in the mutation data format. Going forward fusions can only be imported in the Structural Variant (SV) format. This is mainly a refactoring effort to simplify the codebase and pave the way for the development of novel structural variant visualizations in the future. For cBioPortal instance maintainer, please reference our [Migration Guide](https://docs.cbioportal.org/migration-guide/#v4---v5) for instruction.
 	
 ## Jul 26, 2022
 *   **Added data** consisting of 6,631 samples from 7 studies:
@@ -32,6 +67,10 @@
     * [Pan-cancer Analysis of Advanced and Metastatic Tumors (BCGSC, Nature Cancer 2020)](https://www.cbioportal.org/study/summary?id=pog570_bcgsc_2020) *570 samples*
     * [Prostate Adenocarcinoma (MSK, Clin Cancer Res. 2022)](https://www.cbioportal.org/study/summary?id=prad_pik3r1_msk_2021) *1,417 samples*
 
+## May 31, 2022
+* **New Feature**: Added Quartiles, Median split and Generate bins options for bar charts on the study view page, where Generate bins allows user to define bin size and min value
+    <img src="https://user-images.githubusercontent.com/53996876/151772297-f0aa55ef-5bb4-4e26-8f9b-b0a2369fff71.png" width="700" />
+
 ## May 12, 2022
 * **New Feature**: Show cohort alteration frequencies in pathways from [NDEx](https://www.ndexbio.org/iquery/) on the _Results View_. [Example: Glioblastoma signaling pathways in MSK-IMPACT (2017) cohort](https://bit.ly/3sE4UqD)
 uau(c41f29e974f86151f9ec4b7a7447cf66c4efbf6d}(sha(c41f29e974f86151f9ec4b7a7447cf66c4efbf6dnode_idEC_kwDOAe-hB9oAKGM0MWYyOWU5NzRmODYxNTFmOWVjNGI3YTc0NDdjZjY2YzRlZmJmNmQcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-05-30T21:41:57Zu	committer}(j  GitHubj  noreply@github.comj  2023-05-30T21:41:57ZumessageFrontend v5.3.9tree}(j  (d17f750d3d99dc820bedb7537487c85215f50239urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/d17f750d3d99dc820bedb7537487c85215f50239uj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/c41f29e974f86151f9ec4b7a7447cf66c4efbf6d
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkdm2lCRBK7hj4Ov3rIwAAAmcIACZBPwEl2BXSCWdrfGSTyguS
5rJoQinOGUncx1kQAXfDyNgTwb7BAAqR8hVW32JbfXaaYzC8C7PiBiNUBgDwY+gf
O5Wcbw0U2qaBsxXmzb9is+PoZZBfgG1U2D+BpBKgj0tiYRIn1gLvmcUi1hjUo3Lk
FHkJM1gHYIWQ8ooBJvssiPBcTF7+nvlbSLDPptC5+9zX9SYqsXdCKFkXjJVQUtda
cMgFH/Qdu3J5i5McUYWA6IoHo2UC1W4ruCgnfplpROZGHIOIweqVan26JGNHrORm
86W2C/T7gCnnJQWAN4tXvh3fogturADBdw+1hzNvjMoAIJU/e7wPq0fhmJNVFzo=
=fytY
-----END PGP SIGNATURE-----
payloadtree d17f750d3d99dc820bedb7537487c85215f50239
parent 9af6061f6a0c46d7fb3b412ca45b38cc0690b14d
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1685482917 -0600
committer GitHub <noreply@github.com> 1685482917 -0600

Frontend v5.3.9uuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/c41f29e974f86151f9ec4b7a7447cf66c4efbf6dhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/c41f29e974f86151f9ec4b7a7447cf66c4efbf6dcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/c41f29e974f86151f9ec4b7a7447cf66c4efbf6d/commentsj  }(login
dippindotsidJtO j  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j  'https://api.github.com/users/dippindotsj  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj  }(j  web-flowj  J/j  MDQ6VXNlcjE5ODY0NDQ3j  4https://avatars.githubusercontent.com/u/19864447?v=4j  h5j  %https://api.github.com/users/web-flowj  https://github.com/web-flowj  /https://api.github.com/users/web-flow/followersj  <https://api.github.com/users/web-flow/following{/other_user}j  5https://api.github.com/users/web-flow/gists{/gist_id}j  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j  3https://api.github.com/users/web-flow/subscriptionsj  *https://api.github.com/users/web-flow/orgsj  +https://api.github.com/users/web-flow/reposj  6https://api.github.com/users/web-flow/events{/privacy}j  5https://api.github.com/users/web-flow/received_eventsj  Userj  uparents]}(j  (9af6061f6a0c46d7fb3b412ca45b38cc0690b14dj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9af6061f6a0c46d7fb3b412ca45b38cc0690b14dj  Xhttps://github.com/cBioPortal/cbioportal/commit/9af6061f6a0c46d7fb3b412ca45b38cc0690b14duastats}(totalK	additionsK	deletionsKufiles]}(j  (7ce339184409827728af2851f52e105c108b6ee6filenamepom.xmlstatusmodifiedj	  Kj	  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/c41f29e974f86151f9ec4b7a7447cf66c4efbf6d/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/c41f29e974f86151f9ec4b7a7447cf66c4efbf6d/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=c41f29e974f86151f9ec4b7a7447cf66c4efbf6dpatchXW  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.8</frontend.version>
+    <frontend.version>v5.3.9</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(8fc7de47b073f85d4138c202a0fc65b2b54882cd}(sha(8fc7de47b073f85d4138c202a0fc65b2b54882cdnode_idEC_kwDOAe-hB9oAKDhmYzdkZTQ3YjA3M2Y4NWQ0MTM4YzIwMmEwZmM2NWIyYjU0ODgyY2Qcommit}(author}(name	Bryan Laiemaillaib1@mskcc.orgdate2023-05-22T19:51:49Zu	committer}(j0	  
Onur Sumerj2	  s.onur.sumer@gmail.comj4	  2023-06-07T18:47:34ZumessageUadd mock data and config for clickhouse testing on filtered samples and mutated genestree}(j(	  (2ff7323404469e8f827498b3c6c3b40dc7cb2ba6urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/2ff7323404469e8f827498b3c6c3b40dc7cb2ba6uj@	  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/8fc7de47b073f85d4138c202a0fc65b2b54882cd
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj@	  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8fc7de47b073f85d4138c202a0fc65b2b54882cdhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/8fc7de47b073f85d4138c202a0fc65b2b54882cdcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/8fc7de47b073f85d4138c202a0fc65b2b54882cd/commentsj.	  Nj6	  }(login	onursumeridJ6 j*	  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5j@	  &https://api.github.com/users/onursumerjL	  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminuparents]}(j(	  (0bf78c91d2b9dab7f3c71f71ada3f0a159b9405fj@	  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/0bf78c91d2b9dab7f3c71f71ada3f0a159b9405fjL	  Xhttps://github.com/cBioPortal/cbioportal/commit/0bf78c91d2b9dab7f3c71f71ada3f0a159b9405fuastats}(totalK	additionsK	deletionsK ufiles](}(j(	  (a67cf376d51c9159302ae95dbf431c935f9d63e6filenamepersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepositoryTest.javastatusaddedjx	  K1jy	  K changesK1blob_urlhttps://github.com/cBioPortal/cbioportal/blob/8fc7de47b073f85d4138c202a0fc65b2b54882cd/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/8fc7de47b073f85d4138c202a0fc65b2b54882cd/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.java?ref=8fc7de47b073f85d4138c202a0fc65b2b54882cdpatchX  @@ -0,0 +1,49 @@
+package org.cbioportal.persistence.mybatiscolumnstore;
+
+import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.Sample;
+import org.cbioportal.webparam.StudyViewFilter;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Configurable;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration("/testContextDatabaseClickhouse.xml")
+@Configurable
+public class StudyViewMyBatisRepositoryTest {
+
+    @Autowired
+    private StudyViewMyBatisRepository studyViewMyBatisRepository;
+
+    @Test
+    public void getFilteredSamples() {
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+
+        List<String> studyIds = new ArrayList<>();
+        studyIds.add("msk_ch_2020");
+        studyViewFilter.setStudyIds(studyIds);
+        
+        List<Sample> samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter);
+        Assert.assertEquals(3, samples.size());
+    }
+
+    @Test
+    public void getMutatedGenes() {
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+
+        List<String> studyIds = new ArrayList<>();
+        studyIds.add("msk_ch_2020");
+        studyViewFilter.setStudyIds(studyIds);
+
+        List<AlterationCountByGene> mutations = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter);
+        Assert.assertEquals(2, mutations.size());
+    }
+
+}
\ No newline at end of fileu}(j(	  (37721f014975e2e1560297baa5c47b836594292ej~	  Gpersistence/persistence-mybatis/src/test/resources/clickhouseSchema.sqlj	  addedjx	  Kyjy	  K j	  Kyj	  https://github.com/cBioPortal/cbioportal/blob/8fc7de47b073f85d4138c202a0fc65b2b54882cd/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseSchema.sqlj	  https://github.com/cBioPortal/cbioportal/raw/8fc7de47b073f85d4138c202a0fc65b2b54882cd/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseSchema.sqlj	  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseSchema.sql?ref=8fc7de47b073f85d4138c202a0fc65b2b54882cdj	  X  @@ -0,0 +1,121 @@
+create table cna_discrete
+(
+    sample_unique_id          varchar(255),
+    alteration                int,
+    hugo_gene_symbol          varchar(255),
+    gene_panel_stable_id      varchar(255),
+    cancer_study_identifier   varchar(255),
+    genetic_profile_stable_id varchar(255),
+    PRIMARY KEY (sample_unique_id, alteration, hugo_gene_symbol, cancer_study_identifier)
+);
+
+create table genetic_profile
+(
+    sample_unique_id        varchar(255),
+    genetic_alteration_type varchar(255),
+    datatype                varchar(255),
+    value                   varchar(255),
+    cancer_study_identifier varchar(255),
+    PRIMARY KEY (sample_unique_id, genetic_alteration_type, datatype, value, cancer_study_identifier)
+);
+
+create table genetic_profile_counts
+(
+    sample_unique_id          varchar(255),
+    profile_name              varchar(255),
+    genetic_profile_stable_id varchar(255),
+    cancer_study_identifier   varchar(255),
+    count                     int
+);
+
+create table genomic_event
+(
+    sample_unique_id          varchar(255),
+    variant                   varchar(255),
+    hugo_gene_symbol          varchar(255),
+    gene_panel_stable_id      varchar(255),
+    cancer_study_identifier   varchar(255),
+    genetic_profile_stable_id varchar(255),
+    PRIMARY KEY (sample_unique_id, variant, hugo_gene_symbol, cancer_study_identifier, genetic_profile_stable_id)
+);
+
+create table mutation
+(
+    sample_unique_id          varchar(255),
+    variant                   varchar(255),
+    hugo_gene_symbol          varchar(255),
+    gene_panel_stable_id      varchar(255),
+    cancer_study_identifier   varchar(255),
+    genetic_profile_stable_id varchar(255),
+    PRIMARY KEY (sample_unique_id, variant, hugo_gene_symbol, cancer_study_identifier)
+);
+
+create table patient_clinical_attribute_categorical
+(
+    patient_unique_id       varchar(255),
+    attribute_name          varchar(255),
+    attribute_value         varchar(255),
+    cancer_study_identifier varchar(255),
+    PRIMARY KEY (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier)
+);
+
+create table patient_clinical_attribute_numeric
+(
+    patient_unique_id       varchar(255),
+    attribute_name          varchar(255),
+    attribute_value         float,
+    cancer_study_identifier varchar(255),
+    PRIMARY KEY (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier)
+);
+
+create table sample
+(
+    sample_unique_id         varchar(255),
+    sample_stable_id         varchar(255),
+    patient_unique_id        varchar(255),
+    patient_stable_id        varchar(255),
+    cancer_study_identifier  varchar(255),
+    sample_unique_id_base64  varchar(255),
+    patient_unique_id_base64 varchar(255),
+    PRIMARY KEY (sample_unique_id, patient_unique_id, cancer_study_identifier)
+);
+
+create table sample_clinical_attribute_categorical
+(
+    patient_unique_id       varchar(255),
+    sample_unique_id        varchar(255),
+    attribute_name          varchar(255),
+    attribute_value         varchar(255),
+    cancer_study_identifier varchar(255),
+    PRIMARY KEY (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier)
+);
+
+create table sample_clinical_attribute_numeric
+(
+    patient_unique_id       varchar(255),
+    sample_unique_id        varchar(255),
+    attribute_name          varchar(255),
+    attribute_value         float,
+    cancer_study_identifier varchar(255),
+    PRIMARY KEY (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier)
+);
+
+create table sample_list
+(
+    sample_unique_id        varchar(255),
+    sample_list_stable_id   varchar(255),
+    name                    varchar(255),
+    cancer_study_identifier varchar(255),
+    PRIMARY KEY (sample_unique_id, sample_list_stable_id, name, cancer_study_identifier)
+);
+
+create table structural_variant
+(
+    sample_unique_id          varchar(255),
+    hugo_symbol_gene1         varchar(255),
+    hugo_symbol_gene2         varchar(255),
+    gene_panel_stable_id      varchar(255),
+    cancer_study_identifier   varchar(255),
+    genetic_profile_stable_id varchar(255),
+    PRIMARY KEY (sample_unique_id, hugo_symbol_gene1, hugo_symbol_gene2, cancer_study_identifier)
+);u}(j(	  (a52d4180198a7f7218882238ef64ffb2deb71b61j~	  Hpersistence/persistence-mybatis/src/test/resources/clickhouseTestSql.sqlj	  addedjx	  Kjy	  K j	  Kj	  https://github.com/cBioPortal/cbioportal/blob/8fc7de47b073f85d4138c202a0fc65b2b54882cd/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseTestSql.sqlj	  https://github.com/cBioPortal/cbioportal/raw/8fc7de47b073f85d4138c202a0fc65b2b54882cd/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseTestSql.sqlj	  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseTestSql.sql?ref=8fc7de47b073f85d4138c202a0fc65b2b54882cdj	  Xi  @@ -0,0 +1,20 @@
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000004', 'AGE', 39.739902, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000004', 'TIME_FROM_DX_TO_SEQ', 991, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000004', 'TIME_TO_BLOOD_DRAW_FROM_TX', 609, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000015', 'AGE', 44.440792, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000015', 'TIME_FROM_DX_TO_SEQ', 2558, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000015', 'TIME_TO_BLOOD_DRAW_FROM_TX', 5, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000023', 'AGE', 61.319645, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000023', 'TIME_FROM_DX_TO_SEQ', 245, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000023', 'TIME_TO_BLOOD_DRAW_FROM_TX', 166, 'msk_ch_2020');
+
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000004-N01', '', 'P-0000004-N01', 'msk_ch_2020_P-0000004', '', 'P-0000004', 'msk_ch_2020');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000015-N01', '', 'P-0000015-N01', 'msk_ch_2020_P-0000015', '', 'P-0000015', 'msk_ch_2020');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000023-N01', '', 'P-0000023-N01', 'msk_ch_2020_P-0000023', '', 'P-0000023', 'msk_ch_2020');
+-- 
+INSERT INTO genomic_event (sample_unique_id, variant, hugo_gene_symbol, gene_panel_stable_id, cancer_study_identifier, genetic_profile_stable_id) VALUES ('msk_ch_2020_P-0000004-N01', 'p.R1051Q', 'KDR', '', 'msk_ch_2020', 'msk_ch_2020_mutations');
+INSERT INTO genomic_event (sample_unique_id, variant, hugo_gene_symbol, gene_panel_stable_id, cancer_study_identifier, genetic_profile_stable_id) VALUES ('msk_ch_2020_P-0000004-N01', 'p.T1884I', 'TET2', '', 'msk_ch_2020', 'msk_ch_2020_mutations');
+
+INSERT INTO mutation (sample_unique_id, variant, hugo_gene_symbol, gene_panel_stable_id, cancer_study_identifier, genetic_profile_stable_id) VALUES ('msk_ch_2020_P-0000004-N01', 'p.R1051Q', 'KDR', '', 'msk_ch_2020', 'msk_ch_2020_mutations');
+INSERT INTO mutation (sample_unique_id, variant, hugo_gene_symbol, gene_panel_stable_id, cancer_study_identifier, genetic_profile_stable_id) VALUES ('msk_ch_2020_P-0000004-N01', 'p.T1884I', 'TET2', '', 'msk_ch_2020', 'msk_ch_2020_mutations');
+u}(j(	  (3a194213978a62553a26a8d27a4fe028abc2996dj~	  Tpersistence/persistence-mybatis/src/test/resources/testContextDatabaseClickhouse.xmlj	  addedjx	  K(jy	  K j	  K(j	  https://github.com/cBioPortal/cbioportal/blob/8fc7de47b073f85d4138c202a0fc65b2b54882cd/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestContextDatabaseClickhouse.xmlj	  https://github.com/cBioPortal/cbioportal/raw/8fc7de47b073f85d4138c202a0fc65b2b54882cd/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestContextDatabaseClickhouse.xmlj	  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestContextDatabaseClickhouse.xml?ref=8fc7de47b073f85d4138c202a0fc65b2b54882cdj	  X  @@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beans
+    xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:util="http://www.springframework.org/schema/util"
+    xmlns:context="http://www.springframework.org/schema/context"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context.xsd
+                      http://www.springframework.org/schema/util
+                      http://www.springframework.org/schema/util/spring-util.xsd">
+    <bean id="dbcpDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
+        <property name="url" value="jdbc:h2:mem:;MODE=MySQL;DATABASE_TO_UPPER=false;INIT=RUNSCRIPT FROM 'classpath:clickhouseSchema.sql'\;RUNSCRIPT FROM 'classpath:clickhouseTestSql.sql'"/>
+        <!-- 
+            Enable this to connect to an actual clickhouse Database instead of a mock one.
+            Note that this is only intended for temporary local use, not for automated CI tests.
+        -->         
+<!--        <property name="url" value="jdbc:ch://localhost:8123/cbioportal"/>-->
+    </bean>
+
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dbcpDataSource"/>
+        <property name="typeAliasesPackage" value="org.mskcc.cbio.portal.model"/>
+        <property name="typeHandlersPackage" value="org.cbioportal.persistence.mybatis.typehandler"/>
+    </bean>
+
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="dbcpDataSource" />
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.cbioportal.persistence.mybatiscolumnstore"/>
+    </bean>
+
+    <context:component-scan base-package="org.cbioportal.persistence.mybatiscolumnstore"/>
+
+</beans>
\ No newline at end of fileueu(7f523c88026c238576852145307d59d23a5395a1}(sha(7f523c88026c238576852145307d59d23a5395a1node_idEC_kwDOAe-hB9oAKDdmNTIzYzg4MDI2YzIzODU3Njg1MjE0NTMwN2Q1OWQyM2E1Mzk1YTEcommit}(author}(name	Karthik Kemailkalletlakarthik@gmail.comdate2023-08-14T14:44:47Zu	committer}(j	  GitHubj	  noreply@github.comj	  2023-08-14T14:44:47ZumessageAdd data access token user role filter feature (#10315)

* Add data access token user role filter feature
* Update and more tests
* Update failing test

---------

Co-authored-by: Jeremy R. Easton-Marks <j.r.eastonmarks@gmail.com>tree}(j	  (c52387e706222910df1b9b19de07c3ed2312279burlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c52387e706222910df1b9b19de07c3ed2312279buj	  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/7f523c88026c238576852145307d59d23a5395a1
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk2j3fCRBK7hj4Ov3rIwAA8cIIAAwkQ+kpj+JEj3CrPVG0KRnu
jz843EpWZLND4S9afdhLPZJbchq80pCRTr8/piK4BiW0GUnq8dbdBbj1DN55Nsjs
PNbnc1tsNbg6OWwrrRi7QoYODINH6SFR3tCc8+hmheH3b3pzhlkbklxCU5fQ9nzR
LTEI2dU1ji8h4Q1qVOuXM5NaXXF0eYjesq67s/0zulG3HLvpOOTLtY76MB51drF1
Fy9gM//CqNdwMLcf9e4LyB1NNDxoYy/Eo7zQG2M7ZGSTwYf1SXrpA6THcg5qcHU3
31Sn12H6qqfCifq3bs6fvXVqteXtl+XXiOLRftT22yLLAJGZbb/Ibxr6pcnm5B4=
=Onup
-----END PGP SIGNATURE-----
payloadX  tree c52387e706222910df1b9b19de07c3ed2312279b
parent 7b2bbe2c40efdd42715c4f337cb3959deeb431b2
author Karthik K <kalletlakarthik@gmail.com> 1692024287 -0400
committer GitHub <noreply@github.com> 1692024287 -0400

Add data access token user role filter feature (#10315)

* Add data access token user role filter feature
* Update and more tests
* Update failing test

---------

Co-authored-by: Jeremy R. Easton-Marks <j.r.eastonmarks@gmail.com>uuj	  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7f523c88026c238576852145307d59d23a5395a1html_urlXhttps://github.com/cBioPortal/cbioportal/commit/7f523c88026c238576852145307d59d23a5395a1comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/7f523c88026c238576852145307d59d23a5395a1/commentsj	  }(login	kalletlakidJƴ j	  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5j	  &https://api.github.com/users/kalletlakj	  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminuj	  }(j	  web-flowj	  J/j	  MDQ6VXNlcjE5ODY0NDQ3j	  4https://avatars.githubusercontent.com/u/19864447?v=4j	  h5j	  %https://api.github.com/users/web-flowj	  https://github.com/web-flowj	  /https://api.github.com/users/web-flow/followersj	  <https://api.github.com/users/web-flow/following{/other_user}j	  5https://api.github.com/users/web-flow/gists{/gist_id}j	  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j	  3https://api.github.com/users/web-flow/subscriptionsj	  *https://api.github.com/users/web-flow/orgsj	  +https://api.github.com/users/web-flow/reposj	  6https://api.github.com/users/web-flow/events{/privacy}j	  5https://api.github.com/users/web-flow/received_eventsj	  Userj	  uparents]}(j	  (7b2bbe2c40efdd42715c4f337cb3959deeb431b2j	  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7b2bbe2c40efdd42715c4f337cb3959deeb431b2j	  Xhttps://github.com/cBioPortal/cbioportal/commit/7b2bbe2c40efdd42715c4f337cb3959deeb431b2uastats}(totalKb	additionsK`	deletionsKufiles](}(j	  (f6905da3aecd9a5efae4893661f5722f45ab8ce6filenameCcore/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.javastatusmodifiedj
  Kj
  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/7f523c88026c238576852145307d59d23a5395a1/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/7f523c88026c238576852145307d59d23a5395a1/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.java?ref=7f523c88026c238576852145307d59d23a5395a1patchX#  @@ -368,6 +368,16 @@ public static String parseUrl(String url)
     @Value("${download_group:}") // default is empty string
     public void setDownloadGroup(String property) { downloadGroup = property; }
 
+    public static final String DEFAULT_DAT_METHOD = "none";
+
+    private static String dataAccessTokenMethod;
+    @Value("${dat.method:none}") // default is empty string
+    public void setDataAccessTokenMethod(String property) { dataAccessTokenMethod = property; }
+    
+    private static String tokenAccessUserRole;
+    @Value("${dat.filter_user_role:}") // default is empty string
+    public void setTokenAccessUserRole(String property) { tokenAccessUserRole = property; }
+    
     private static Logger LOG = LoggerFactory.getLogger(GlobalProperties.class);
     private static ConfigPropertyResolver portalProperties = new ConfigPropertyResolver();
     private static Properties mavenProperties = initializeProperties(MAVEN_PROPERTIES_FILE_NAME);
@@ -1296,4 +1306,15 @@ public static String getDownloadControl() {
             }
         }
     }
+
+    public static String getDataAccessTokenMethod() {
+        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+        
+        if (authentication != null &&
+            StringUtils.isNotEmpty(tokenAccessUserRole)) {
+            return authentication.getAuthorities().contains(new SimpleGrantedAuthority(tokenAccessUserRole)) ? dataAccessTokenMethod : DEFAULT_DAT_METHOD;
+        } else {
+            return dataAccessTokenMethod;
+        }
+    }
 }u}(j	  (8925135b62501db83c02d0517598245c8b9f3473j
  Sdocs/deployment/authorization-and-authentication/Authenticating-Users-via-Tokens.mdj
  modifiedj
  Kj
  K j
  Kj
  https://github.com/cBioPortal/cbioportal/blob/7f523c88026c238576852145307d59d23a5395a1/docs%2Fdeployment%2Fauthorization-and-authentication%2FAuthenticating-Users-via-Tokens.mdj
  https://github.com/cBioPortal/cbioportal/raw/7f523c88026c238576852145307d59d23a5395a1/docs%2Fdeployment%2Fauthorization-and-authentication%2FAuthenticating-Users-via-Tokens.mdj
  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fauthorization-and-authentication%2FAuthenticating-Users-via-Tokens.md?ref=7f523c88026c238576852145307d59d23a5395a1j
  X{  @@ -45,6 +45,12 @@ The following properties must be present in portal.properties in order to allow
 * **Permissible Values**: jwt, uuid, oauth2, none
 * **Default Value**: none
 
+**Property**: dat.filter\_user\_role (optional)
+
+* **Description**: This property determines users access in token generation. If present, this role will be checked in user roles before generating a token.
+* **Permissible Values**: A string value.
+* **Default Value**: none
+
 **Property**: dat.unauth\_users (optional, not used for dat.method = oauth2)
 
 * **Description**: A list of users that should not be allowed to download a data access token.u}(j	  (3e7dc6ec00ffe590ba819f7398f0da3b4158e9c8j
  )portal/src/main/webapp/config_service.jspj
  modifiedj
  Kj
  Kj
  Kj
  https://github.com/cBioPortal/cbioportal/blob/7f523c88026c238576852145307d59d23a5395a1/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj
  https://github.com/cBioPortal/cbioportal/raw/7f523c88026c238576852145307d59d23a5395a1/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj
  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=7f523c88026c238576852145307d59d23a5395a1j
  X_  @@ -31,7 +31,6 @@
         String[] propNameArray = {
             "app.version",
             "app.name",
-            "dat.method",
             "oncoprint.custom_driver_annotation.binary.menu_label",
             "disabled_tabs",
             "civic.url",
@@ -207,6 +206,8 @@
         obj.put("sessionServiceEnabled", !StringUtils.isEmpty(GlobalProperties.getSessionServiceUrl()));
 
         obj.put("skin_hide_download_controls", GlobalProperties.getDownloadControl());
+        
+        obj.put("dat_method", GlobalProperties.getDataAccessTokenMethod());
 
         out.println(obj.toJSONString());
 u}(j	  (49aecf9c4d5027524a907d9ac6feddc19e39183ej
  ,src/main/resources/portal.properties.EXAMPLEj
  modifiedj
  Kj
  K j
  Kj
  https://github.com/cBioPortal/cbioportal/blob/7f523c88026c238576852145307d59d23a5395a1/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj
  https://github.com/cBioPortal/cbioportal/raw/7f523c88026c238576852145307d59d23a5395a1/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj
  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=7f523c88026c238576852145307d59d23a5395a1j
  @@ -171,6 +171,7 @@ dat.method=none
 dat.ttl_seconds=2592000
 dat.uuid.max_number_per_user=1
 dat.jwt.secret_key=
+dat.filter_user_role=
 
 # OAuth2 token data access settings
 #dat.oauth2.clientId=<client-id>u}(j	  (06ddc00f27ea6953d884de6b76256699baec9c38j
  Cweb/src/main/java/org/cbioportal/web/DataAccessTokenController.javaj
  modifiedj
  K
j
  Kj
  Kj
  https://github.com/cBioPortal/cbioportal/blob/7f523c88026c238576852145307d59d23a5395a1/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenController.javaj
  https://github.com/cBioPortal/cbioportal/raw/7f523c88026c238576852145307d59d23a5395a1/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenController.javaj
  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenController.java?ref=7f523c88026c238576852145307d59d23a5395a1j
  X"  @@ -20,7 +20,7 @@
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
-import io.swagger.models.HttpMethod;
+import org.apache.commons.lang3.StringUtils;
 import org.cbioportal.model.DataAccessToken;
 import org.cbioportal.service.DataAccessTokenService;
 import org.cbioportal.service.exception.DataAccessTokenNoUserIdentityException;
@@ -32,6 +32,7 @@
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.client.HttpClientErrorException;
@@ -54,6 +55,10 @@ public class DataAccessTokenController {
     @Value("${dat.unauth_users:anonymousUser}")
     private String[] USERS_WHO_CANNOT_USE_TOKENS;
 
+    private static String userRoleToAccessToken;
+    @Value("${download_group:}") // default is empty string
+    public void setUserRoleToAccessToken(String property) { userRoleToAccessToken = property; }
+
     @Autowired
     private DataAccessTokenService tokenService;
     private Set<String> usersWhoCannotUseTokenSet;
@@ -130,6 +135,10 @@ private String getAuthenticatedUser(Authentication authentication) {
         if (usersWhoCannotUseTokenSet.contains(username)) {
             throw new DataAccessTokenProhibitedUserException();
         }
+        if(StringUtils.isNotEmpty(userRoleToAccessToken) &&
+            !authentication.getAuthorities().contains(new SimpleGrantedAuthority(userRoleToAccessToken))) {
+            throw new DataAccessTokenProhibitedUserException();
+        }
         return username;
     }
 }u}(j	  (1b98a12abbc09460ae98599d036c7caab0612b09j
  Iweb/src/main/java/org/cbioportal/web/OAuth2DataAccessTokenController.javaj
  modifiedj
  Kj
  K j
  Kj
  https://github.com/cBioPortal/cbioportal/blob/7f523c88026c238576852145307d59d23a5395a1/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FOAuth2DataAccessTokenController.javaj
  https://github.com/cBioPortal/cbioportal/raw/7f523c88026c238576852145307d59d23a5395a1/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FOAuth2DataAccessTokenController.javaj
  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FOAuth2DataAccessTokenController.java?ref=7f523c88026c238576852145307d59d23a5395a1j
  X	  @@ -35,8 +35,10 @@
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
+import org.apache.commons.lang3.StringUtils;
 import org.cbioportal.model.DataAccessToken;
 import org.cbioportal.service.DataAccessTokenService;
+import org.cbioportal.service.exception.DataAccessTokenNoUserIdentityException;
 import org.cbioportal.service.exception.DataAccessTokenProhibitedUserException;
 import org.cbioportal.web.config.annotation.InternalApi;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -46,6 +48,7 @@
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.client.HttpClientErrorException;
@@ -76,6 +79,9 @@ public class OAuth2DataAccessTokenController {
     @Value("${dat.oauth2.clientId}")
     private String clientId;
 
+    @Value("${dat.filter_user_role:}") // default is empty string
+    private String userRoleToAccessToken;
+
     @Autowired
     private DataAccessTokenService tokenService;
     private String authorizationUrl;
@@ -98,6 +104,8 @@ public void postConstruct() throws UnsupportedEncodingException {
     public ResponseEntity<String> downloadDataAccessToken(Authentication authentication,
         HttpServletRequest request, HttpServletResponse response) throws IOException {
 
+        isUserAuthorizedToAccess(authentication);
+
         // redirect to authentication endpoint
         HttpHeaders headers = new HttpHeaders();
         headers.add("Location", authorizationUrl);
@@ -156,4 +164,15 @@ public void revokeDataAccessToken(@ApiParam(required = true, value = "token") @P
         throw new UnsupportedOperationException("this endpoint is does not apply to OAuth2 data access token method.");
     }
 
+    private void isUserAuthorizedToAccess(Authentication authentication) {
+        if (authentication == null || !authentication.isAuthenticated()) {
+            throw new DataAccessTokenNoUserIdentityException();
+        }
+
+        if(StringUtils.isNotEmpty(userRoleToAccessToken) &&
+            !authentication.getAuthorities().contains(new SimpleGrantedAuthority(userRoleToAccessToken))) {
+            throw new DataAccessTokenProhibitedUserException();
+        }
+    }
+
 }u}(j	  (b7155e59921e54de4e3abab8db9fddd2ed7e371aj
  Gweb/src/test/java/org/cbioportal/web/DataAccessTokenControllerTest.javaj
  modifiedj
  K%j
  K j
  K%j
  https://github.com/cBioPortal/cbioportal/blob/7f523c88026c238576852145307d59d23a5395a1/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenControllerTest.javaj
  https://github.com/cBioPortal/cbioportal/raw/7f523c88026c238576852145307d59d23a5395a1/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenControllerTest.javaj
  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenControllerTest.java?ref=7f523c88026c238576852145307d59d23a5395a1j
  X  @@ -37,6 +37,7 @@
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 import org.springframework.test.context.web.WebAppConfiguration;
+import org.springframework.test.util.ReflectionTestUtils;
 import org.springframework.test.web.servlet.MockMvc;
 import org.springframework.test.web.servlet.MvcResult;
 import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
@@ -190,6 +191,32 @@ public void createTokenValidUserTest() throws Exception {
             .andReturn();
     }
 
+    @Test
+    public void createTokenValidUserTestWithUserRole() throws Exception {
+        ReflectionTestUtils.setField(DataAccessTokenController.class, "userRoleToAccessToken", "PLACEHOLDER_ROLE");
+        Mockito.when(tokenService.createDataAccessToken(ArgumentMatchers.anyString())).thenReturn(MOCK_TOKEN_INFO);
+        HttpSession session = getSession(MOCK_USER, MOCK_PASSWORD);
+        MvcResult result = mockMvc.perform(MockMvcRequestBuilders.post("/data-access-tokens")
+                .session((MockHttpSession) session)
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON))
+            .andExpect(MockMvcResultMatchers.status().isCreated())
+            .andReturn();
+    }
+
+    @Test
+    public void createTokenUnauthorizedUserTestWithUserRole() throws Exception {
+        ReflectionTestUtils.setField(DataAccessTokenController.class, "userRoleToAccessToken", "TEST");
+        Mockito.when(tokenService.createDataAccessToken(ArgumentMatchers.anyString())).thenReturn(MOCK_TOKEN_INFO);
+        HttpSession session = getSession(MOCK_USER, MOCK_PASSWORD);
+        MvcResult result = mockMvc.perform(MockMvcRequestBuilders.post("/data-access-tokens")
+                .session((MockHttpSession) session)
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON))
+            .andExpect(MockMvcResultMatchers.status().isUnauthorized())
+            .andReturn();
+    }
+
     /* Tests mapping for DELETE /data-access-tokens
      * Checks response status code is 200 success
      * Checks that correct username argument is passed to service class
@@ -241,4 +268,14 @@ public Void answer(InvocationOnMock getAllTokensInvocation) {
             Assert.fail("Unexpected argument passed to service class. Expected argument: " + MOCK_USER + " Received argument: " + receivedArgument);
         }
     }
+
+    @Test
+    public void createTokenNotLoggedIn() throws Exception {
+        Mockito.when(tokenService.createDataAccessToken(ArgumentMatchers.anyString())).thenReturn(MOCK_TOKEN_INFO);
+        MvcResult result = mockMvc.perform(MockMvcRequestBuilders.post("/data-access-tokens")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON))
+            .andExpect(MockMvcResultMatchers.status().isUnauthorized())
+            .andReturn();
+    }
 }ueu(d0b7a1df2962cfc6d762dff57daca0bcdc4684ce}(sha(d0b7a1df2962cfc6d762dff57daca0bcdc4684cenode_idEC_kwDOAe-hB9oAKGQwYjdhMWRmMjk2MmNmYzZkNzYyZGZmNTdkYWNhMGJjZGM0Njg0Y2Ucommit}(author}(nameCharles Haynesemail*33608920+haynescd@users.noreply.github.comdate2023-05-24T21:12:33Zu	committer}(jT
  GitHubjV
  noreply@github.comjX
  2023-05-24T21:12:33ZumessageMerge pull request #10156 from haynescd/feature/10133-Exclude-Clinical-Attributes-with-low-priority

Feature/10133 exclude clinical attributes with low prioritytree}(jL
  (dbb2f1ededd2896a1154ace58b3618d28e13c29eurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/dbb2f1ededd2896a1154ace58b3618d28e13c29eujd
  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/d0b7a1df2962cfc6d762dff57daca0bcdc4684ce
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkbn3BCRBK7hj4Ov3rIwAAezYIACWE5oDjHpZZxuMBURcJayKG
ljLYlvpxX4IC523GB16wSQqLWvRwqYB8uQRIk9JVLjGrbCp+AEisG14CTP4Gcb9F
d4WCOMF5ma3iZ11FZAlulo9+N25ZxKOHaloqInNI6iIPc9JuqmtfLSPPbqfYYmFV
Rm2DItGkNRAMJ5lA7nltC+DrIW20LUPvO46Ng5Q7571tFIk0d9KpHD7ITJfLwMF5
l3JVsfb2pwxJGWv7FUDwp3Oq0ds6Ab6MB5sUPVlaxkK1QQXrnWfPW96XH6whaOee
dz16K5qOEfb1SHyFRGD7RhTuXmQgAAxl+Z+399Y5zU5D/McnsV0msr3/lhzlxMs=
=KYkF
-----END PGP SIGNATURE-----
payloadX  tree dbb2f1ededd2896a1154ace58b3618d28e13c29e
parent 1f162e5067f7f42fa3de433bbf8fc38e3121904a
parent d07e617d801bc7f314e563d8f776f7dd217b5e8a
author Charles Haynes <33608920+haynescd@users.noreply.github.com> 1684962753 -0400
committer GitHub <noreply@github.com> 1684962753 -0400

Merge pull request #10156 from haynescd/feature/10133-Exclude-Clinical-Attributes-with-low-priority

Feature/10133 exclude clinical attributes with low priorityuujd
  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d0b7a1df2962cfc6d762dff57daca0bcdc4684cehtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/d0b7a1df2962cfc6d762dff57daca0bcdc4684cecomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/d0b7a1df2962cfc6d762dff57daca0bcdc4684ce/commentsjR
  }(loginhaynescdidJ jN
  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5jd
  %https://api.github.com/users/haynescdjr
  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminujZ
  }(jw
  web-flowjy
  J/jN
  MDQ6VXNlcjE5ODY0NDQ3j{
  4https://avatars.githubusercontent.com/u/19864447?v=4j}
  h5jd
  %https://api.github.com/users/web-flowjr
  https://github.com/web-flowj
  /https://api.github.com/users/web-flow/followersj
  <https://api.github.com/users/web-flow/following{/other_user}j
  5https://api.github.com/users/web-flow/gists{/gist_id}j
  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j
  3https://api.github.com/users/web-flow/subscriptionsj
  *https://api.github.com/users/web-flow/orgsj
  +https://api.github.com/users/web-flow/reposj
  6https://api.github.com/users/web-flow/events{/privacy}j
  5https://api.github.com/users/web-flow/received_eventsj
  Userj
  uparents](}(jL
  (1f162e5067f7f42fa3de433bbf8fc38e3121904ajd
  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1f162e5067f7f42fa3de433bbf8fc38e3121904ajr
  Xhttps://github.com/cBioPortal/cbioportal/commit/1f162e5067f7f42fa3de433bbf8fc38e3121904au}(jL
  (d07e617d801bc7f314e563d8f776f7dd217b5e8ajd
  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d07e617d801bc7f314e563d8f776f7dd217b5e8ajr
  Xhttps://github.com/cBioPortal/cbioportal/commit/d07e617d801bc7f314e563d8f776f7dd217b5e8auestats}(totalK	additionsK	deletionsKufiles](}(jL
  (097055f5c6d310ea104abb02f968968f3f68121bfilename.core/src/main/scripts/importer/validateData.pystatusmodifiedj
  Kj
  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/d0b7a1df2962cfc6d762dff57daca0bcdc4684ce/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.pyraw_urlhttps://github.com/cBioPortal/cbioportal/raw/d0b7a1df2962cfc6d762dff57daca0bcdc4684ce/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.pycontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.py?ref=d0b7a1df2962cfc6d762dff57daca0bcdc4684cepatchX6  @@ -2600,12 +2600,12 @@ def processTopLines(self, line_list):
                         invalid_values = True
                 elif self.METADATA_LINES[line_index] == 'priority':
                     try:
-                        if int(value) < 0:
+                        if int(value) < -1:
                             raise ValueError()
                     except ValueError:
                         self.logger.error(
                             'Priority definition should be an integer, and should be '
-                            'greater than or equal to zero',
+                            'greater than or equal to -1',
                             extra={'line_number': line_index + 1,
                                    'column_number': col_index + 1,
                                    'cause': value})u}(jL
  (3f86d4b8a1eaaf0c5a15d955fec866ea355c6a3aj
  *docs/deployment/customization/Studyview.mdj
  modifiedj
  Kj
  K j
  Kj
  https://github.com/cBioPortal/cbioportal/blob/d0b7a1df2962cfc6d762dff57daca0bcdc4684ce/docs%2Fdeployment%2Fcustomization%2FStudyview.mdj
  https://github.com/cBioPortal/cbioportal/raw/d0b7a1df2962cfc6d762dff57daca0bcdc4684ce/docs%2Fdeployment%2Fcustomization%2FStudyview.mdj
  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2FStudyview.md?ref=d0b7a1df2962cfc6d762dff57daca0bcdc4684cej
  X  @@ -25,6 +25,8 @@ The higher the score, the higher priority it will be displayed in the study view
 If you want to hide chart, please set the priority to 0.
 For combination chart, as long as one of the clinical attributes has been set to 0, it will be hidden.
 
+To disable the chart, set the priority to -1.(Currently disables charts for single clinical attributes only)
+
 Currently, we preassigned priority to few charts, but as long as you assign a priority in the database except than 1, these preassigned priorities will be overwritten.
 
 | Chart name(clinical attribute ID)                          	| Frontend default priority 	| Additional Info                                   |ueu(f7189e4f180a9c1a5eb385a1f0a8ee9d648d0065}(sha(f7189e4f180a9c1a5eb385a1f0a8ee9d648d0065node_idEC_kwDOAe-hB9oAKGY3MTg5ZTRmMTgwYTljMWE1ZWIzODVhMWYwYThlZTlkNjQ4ZDAwNjUcommit}(author}(namealismanemaillisman.aaron@gmail.comdate2023-06-20T23:40:37Zu	committer}(j
  GitHubj
  noreply@github.comj
  2023-06-20T23:40:37Zumessage@Merge pull request #10234 from alisman/v5.3.12

Frontend v5.3.12tree}(j
  (983735db1539a398ee0051c7e80231afe10f5ebaurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/983735db1539a398ee0051c7e80231afe10f5ebauj
  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/f7189e4f180a9c1a5eb385a1f0a8ee9d648d0065
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkkjj1CRBK7hj4Ov3rIwAAL2gIAFlJFN/0fnE8Etd5mi1NeJJE
HTD2ZTX9eNsMtdfknO87mqYg4inbqdQNpzUcJocVVNs6MClDoBexHmLuzlM8ieJ/
vKYWrT/oT1ASyn3PiCT8OYjmNxaqsgvhk8h58BS7QZMnOnhhmbTT31udotLXKvb5
fznWERKLohbkU6WJVeh2HsfijkfWYrdcMJqbrvMwaXgNCcg7lYXsmm2yPoLl10+9
7jjZindJWbwZ2xV3X2PFkW0KUHqZFs3hyv2fK1bGLW9/5g5UErP0XlvbhYRJk9Dc
tfQZHHcWUqSISB8TWzKQVvNPf4ylAsFVJaxxpf8fqqdTG7+Drd7TbBZMtbL7/G4=
=HAiB
-----END PGP SIGNATURE-----
payloadX?  tree 983735db1539a398ee0051c7e80231afe10f5eba
parent 15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0
parent 69c17d4305f4b4938724d45587549ac493dc3648
author alisman <lisman.aaron@gmail.com> 1687304437 -0400
committer GitHub <noreply@github.com> 1687304437 -0400

Merge pull request #10234 from alisman/v5.3.12

Frontend v5.3.12uuj
  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/f7189e4f180a9c1a5eb385a1f0a8ee9d648d0065html_urlXhttps://github.com/cBioPortal/cbioportal/commit/f7189e4f180a9c1a5eb385a1f0a8ee9d648d0065comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/f7189e4f180a9c1a5eb385a1f0a8ee9d648d0065/commentsj
  }(loginalismanidJ j
  MDQ6VXNlcjE4NjUyMQ==
avatar_url2https://avatars.githubusercontent.com/u/186521?v=4gravatar_idh5j
  $https://api.github.com/users/alismanj
  https://github.com/alisman
followers_url.https://api.github.com/users/alisman/followers
following_url;https://api.github.com/users/alisman/following{/other_user}	gists_url4https://api.github.com/users/alisman/gists{/gist_id}starred_url;https://api.github.com/users/alisman/starred{/owner}{/repo}subscriptions_url2https://api.github.com/users/alisman/subscriptionsorganizations_url)https://api.github.com/users/alisman/orgs	repos_url*https://api.github.com/users/alisman/repos
events_url5https://api.github.com/users/alisman/events{/privacy}received_events_url4https://api.github.com/users/alisman/received_eventstypeUser
site_adminuj
  }(j
  web-flowj
  J/j
  MDQ6VXNlcjE5ODY0NDQ3j
  4https://avatars.githubusercontent.com/u/19864447?v=4j   h5j
  %https://api.github.com/users/web-flowj
  https://github.com/web-flowj  /https://api.github.com/users/web-flow/followersj  <https://api.github.com/users/web-flow/following{/other_user}j  5https://api.github.com/users/web-flow/gists{/gist_id}j	  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j  3https://api.github.com/users/web-flow/subscriptionsj
  *https://api.github.com/users/web-flow/orgsj  +https://api.github.com/users/web-flow/reposj  6https://api.github.com/users/web-flow/events{/privacy}j  5https://api.github.com/users/web-flow/received_eventsj  Userj  uparents](}(j
  (15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0j
  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0j
  Xhttps://github.com/cBioPortal/cbioportal/commit/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0u}(j
  (69c17d4305f4b4938724d45587549ac493dc3648j
  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/69c17d4305f4b4938724d45587549ac493dc3648j
  Xhttps://github.com/cBioPortal/cbioportal/commit/69c17d4305f4b4938724d45587549ac493dc3648uestats}(totalK	additionsK	deletionsKufiles]}(j
  (62d6071956aac00a2aaece743c34938effdb8ef2filenamepom.xmlstatusmodifiedj5  Kj6  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/f7189e4f180a9c1a5eb385a1f0a8ee9d648d0065/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/f7189e4f180a9c1a5eb385a1f0a8ee9d648d0065/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=f7189e4f180a9c1a5eb385a1f0a8ee9d648d0065patchXY  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.11</frontend.version>
+    <frontend.version>v5.3.12</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd}(sha(7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdnode_idEC_kwDOAe-hB9oAKDdhYjYyZDZiZjgyMmU3NWNjYzg2Y2ZiNjcwZjYyMTg5YjhlYWY4Y2Qcommit}(author}(namesbabyanushaemailsatravab@mskcc.orgdate2023-08-18T19:15:13Zu	committer}(jR  sbabyanushajT  satravab@mskcc.orgjV  2023-08-18T19:15:13ZumessageWMerge branch 'master' of github.com:cBioPortal/cbioportal into Aug-15-2023-news-releasetree}(jJ  (c59224782bdc5e815de2e80657cb83a0bab4911eurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c59224782bdc5e815de2e80657cb83a0bab4911eujb  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujb  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/commentsjP  }(loginsbabyanushaidJ`_jL  MDQ6VXNlcjYxNDMxNjQ4
avatar_url4https://avatars.githubusercontent.com/u/61431648?v=4gravatar_idh5jb  (https://api.github.com/users/sbabyanushajn  https://github.com/sbabyanusha
followers_url2https://api.github.com/users/sbabyanusha/followers
following_url?https://api.github.com/users/sbabyanusha/following{/other_user}	gists_url8https://api.github.com/users/sbabyanusha/gists{/gist_id}starred_url?https://api.github.com/users/sbabyanusha/starred{/owner}{/repo}subscriptions_url6https://api.github.com/users/sbabyanusha/subscriptionsorganizations_url-https://api.github.com/users/sbabyanusha/orgs	repos_url.https://api.github.com/users/sbabyanusha/repos
events_url9https://api.github.com/users/sbabyanusha/events{/privacy}received_events_url8https://api.github.com/users/sbabyanusha/received_eventstypeUser
site_adminujX  }(js  sbabyanushaju  J`_jL  MDQ6VXNlcjYxNDMxNjQ4jw  4https://avatars.githubusercontent.com/u/61431648?v=4jy  h5jb  (https://api.github.com/users/sbabyanushajn  https://github.com/sbabyanushaj|  2https://api.github.com/users/sbabyanusha/followersj~  ?https://api.github.com/users/sbabyanusha/following{/other_user}j  8https://api.github.com/users/sbabyanusha/gists{/gist_id}j  ?https://api.github.com/users/sbabyanusha/starred{/owner}{/repo}j  6https://api.github.com/users/sbabyanusha/subscriptionsj  -https://api.github.com/users/sbabyanusha/orgsj  .https://api.github.com/users/sbabyanusha/reposj  9https://api.github.com/users/sbabyanusha/events{/privacy}j  8https://api.github.com/users/sbabyanusha/received_eventsj  Userj  uparents](}(jJ  (f2d60130bf38f014ceece0bf5b4e454b50832669jb  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/f2d60130bf38f014ceece0bf5b4e454b50832669jn  Xhttps://github.com/cBioPortal/cbioportal/commit/f2d60130bf38f014ceece0bf5b4e454b50832669u}(jJ  (901406f5182fcf4926da3388ec49692516b37aadjb  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/901406f5182fcf4926da3388ec49692516b37aadjn  Xhttps://github.com/cBioPortal/cbioportal/commit/901406f5182fcf4926da3388ec49692516b37aaduestats}(totalMl	additionsM[	deletionsMufiles](}(jJ  (4c5f1764094a99125c143ce4b1c684555b19eb8dfilename .github/PULL_REQUEST_TEMPLATE.mdstatusmodifiedj  Kj  K changesKblob_urlyhttps://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/.github%2FPULL_REQUEST_TEMPLATE.mdraw_urlxhttps://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/.github%2FPULL_REQUEST_TEMPLATE.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/.github%2FPULL_REQUEST_TEMPLATE.md?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdpatchX  @@ -9,6 +9,7 @@ Describe changes proposed in this pull request:
 - [ ] Has tests or has a separate issue that describes the types of test that should be created. If no test is included it should explicitly be mentioned in the PR why there is no test.
 - [ ] The commit log is comprehensible. It follows [7 rules of great commit messages](http://chris.beams.io/posts/git-commit/). For most PRs a single commit should suffice, in some cases multiple topical commits can be useful. During review it is ok to see tiny commits (e.g. Fix reviewer comments), but right before the code gets merged to master or rc branch, any such commits should be squashed since they are useless to the other developers. Definitely avoid [merge commits, use rebase instead.](http://nathanleclaire.com/blog/2014/09/14/dont-be-scared-of-git-rebase/)
 - [ ] Is this PR adding logic based on one or more **clinical** attributes? If yes, please make sure validation for this attribute is also present in the data validation / data loading layers (in backend repo) and documented in [File-Formats Clinical data section](https://github.com/cBioPortal/cbioportal/blob/master/docs/File-Formats.md#clinical-data)!
+- [ ] Make sure your PR has one of the labels defined in https://github.com/cBioPortal/cbioportal/blob/master/.github/release-drafter.yml
 
 # Any screenshots or GIFs?
 If this is a new visual feature please add a before/after screenshot or gifu
     }(jJ  (88fbcf4a8efca7addd3afc42448276c2eca47d97j  Ccore/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.javaj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javaj  https://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.java?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj  X  @@ -122,6 +122,7 @@ public class GlobalProperties {
     public static final String SKIN_RIGHT_NAV_SHOW_EXAMPLES = "skin.right_nav.show_examples";
     public static final String SKIN_RIGHT_NAV_SHOW_TESTIMONIALS = "skin.right_nav.show_testimonials";
     public static final String SKIN_RIGHT_NAV_SHOW_WHATS_NEW = "skin.right_nav.show_whats_new";
+    public static final String SKIN_RIGHT_NAV_SHOW_WEB_TOURS = "skin.right_nav.show_web_tours";
     private static String skinAuthorizationMessage;
     @Value("${skin.authorization_message:Access to this portal is only available to authorized users.}")
     public void setSkinAuthorizationMessage(String property) { skinAuthorizationMessage = property; }
@@ -805,6 +806,12 @@ public static boolean showRightNavWhatsNew()
         return showFlag == null || Boolean.parseBoolean(showFlag);
     }
 
+    public static boolean showRightNavWebTours()
+    {
+        String showFlag = portalProperties.getProperty(SKIN_RIGHT_NAV_SHOW_WEB_TOURS);
+        return showFlag == null || Boolean.parseBoolean(showFlag);
+    }
+
     public static String getAuthorizationMessage()
     {
         return skinAuthorizationMessage;u}(jJ  (1f389f4159d5b043d463a79b2fa1c0d26cb72275j  Hdocs/deployment/customization/Customizing-your-instance-of-cBioPortal.mdj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdj  https://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdj  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.md?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj  X  @@ -145,6 +145,12 @@ Below you can find the complete list of all the available skin properties.
 			<td>Text for public cBioPortal.org.</td>
 			<td>Any HTML text</td>
 		</tr>
+        <tr>
+			<td>skin.right_nav.show_web_tours</td>
+			<td>set the "Interactive Tours" section in the right navigation bar</td>
+			<td>true</td>
+			<td>true / false</td>
+		</tr>
 		<tr>
 			<td>skin.show_about_tab</td>
 			<td>show the "ABOUT" tab in the header</td>u}(jJ  (89cadeee479ebc2c7c0dc918d3db918984dcf343j  <docs/deployment/customization/portal.properties-Reference.mdj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdj  https://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdj  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.md?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj  Xx  @@ -100,6 +100,9 @@ skin.right_nav.show_whats_new=
 skin.right_nav.show_twitter=
 ```
 
+#Interactive tours section
+skin.right_nav.show_web_tours=
+
 ### Control the content of specific sections
 
 Setting controlling the blurb: you can add any HTML code here that you want to visualize. This will be shown between the cBioPortal menu and the Query selector in the main page.u}(jJ  (f7ccbc7c3b5e22da61912049dcaf06665eee80ddj  Jmodel/src/main/java/org/cbioportal/model/GenericAssayBinaryEnrichment.javaj  addedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayBinaryEnrichment.javaj  https://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayBinaryEnrichment.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayBinaryEnrichment.java?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj  X  @@ -0,0 +1,19 @@
+package org.cbioportal.model;
+
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+import java.util.List;
+
+public class GenericAssayBinaryEnrichment extends GenericAssayEnrichment {
+    @NotNull
+    private List<GenericAssayCountSummary> counts;
+
+    public List<GenericAssayCountSummary> getCounts() {
+        return counts;
+    }
+
+    public void setCounts(List<GenericAssayCountSummary> counts) {
+        this.counts = counts;
+    }
+    
+}u}(jJ  (2fdb661cf381055a175da7803be81909fca313c5j  Omodel/src/main/java/org/cbioportal/model/GenericAssayCategoricalEnrichment.javaj  addedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayCategoricalEnrichment.javaj  https://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayCategoricalEnrichment.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayCategoricalEnrichment.java?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj  X  @@ -0,0 +1,18 @@
+package org.cbioportal.model;
+
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+
+public class GenericAssayCategoricalEnrichment extends GenericAssayEnrichment {
+    @NotNull
+    private BigDecimal qValue;
+
+    public BigDecimal getqValue() {
+        return qValue;
+    }
+
+    public void setqValue(BigDecimal qValue) {
+        this.qValue = qValue;
+    }
+
+}u}(jJ  (2f24ed760ba89ec5e129f8802876c54ac90efceaj  Fmodel/src/main/java/org/cbioportal/model/GenericAssayCountSummary.javaj  addedj  K&j  K j  K&j  https://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayCountSummary.javaj  https://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayCountSummary.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayCountSummary.java?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj  X  @@ -0,0 +1,38 @@
+package org.cbioportal.model;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+public class GenericAssayCountSummary implements Serializable {
+
+    @NotNull
+    private String name;
+    @NotNull
+    private Integer count;
+    @NotNull
+    private Integer totalCount;
+
+    public Integer getCount() {
+        return count;
+    }
+
+    public void setCount(Integer count) {
+        this.count = count;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Integer getTotalCount() {
+        return totalCount;
+    }
+
+    public void setTotalCount(Integer totalCount) {
+        this.totalCount = totalCount;
+    }
+}u}(jJ  (02491c2221b72744e6336cfd786377839e09b53ej  Dmodel/src/main/java/org/cbioportal/model/GenericAssayEnrichment.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayEnrichment.javaj  https://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayEnrichment.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayEnrichment.java?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj  X  @@ -1,6 +1,7 @@
 package org.cbioportal.model;
 
 import java.io.Serializable;
+import java.math.BigDecimal;
 import java.util.HashMap;
 
 import javax.validation.constraints.NotNull;
@@ -11,6 +12,8 @@ public class GenericAssayEnrichment extends ExpressionEnrichment implements Seri
 	private String stableId;
 	@NotNull
 	private String name;
+    @NotNull
+    private BigDecimal qValue;
 	@NotNull
 	private HashMap<String, String> genericEntityMetaProperties;
 
@@ -37,5 +40,16 @@ public HashMap<String, String> getGenericEntityMetaProperties() {
 	public void setGenericEntityMetaProperties(HashMap<String, String> genericEntityMetaProperties) {
 		this.genericEntityMetaProperties = genericEntityMetaProperties;
 	}
-
+    
+    public BigDecimal getqValue() {
+        return qValue;
+    }
+
+    public void setqValue(BigDecimal qValue) {
+        this.qValue = qValue;
+    }
+    
+    public static int compare(GenericAssayEnrichment c1, GenericAssayEnrichment c2) {
+        return c1.getpValue().compareTo(c2.getpValue());
+    }
 }u}(jJ  (0d20e91ebde0e5440f8a6a740c6ff6c2910ec892j  =portal/src/main/webapp/WEB-INF/jsp/global/frontend_config.jspj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/portal%2Fsrc%2Fmain%2Fwebapp%2FWEB-INF%2Fjsp%2Fglobal%2Ffrontend_config.jspj  https://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/portal%2Fsrc%2Fmain%2Fwebapp%2FWEB-INF%2Fjsp%2Fglobal%2Ffrontend_config.jspj  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2FWEB-INF%2Fjsp%2Fglobal%2Ffrontend_config.jsp?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj  X  @@ -30,6 +30,7 @@ window.legacySupportFrontendConfig = {
     skinRightNavShowExamples : <%=GlobalProperties.showRightNavExamples()%>,
     skinRightNavShowTestimonials : <%=GlobalProperties.showRightNavTestimonials()%>,
     skinRightNavShowWhatsNew : <%=GlobalProperties.showRightNavWhatsNew()%>,
+    skinRightNavShowWebTours: <%=GlobalProperties.showRightNavInteractiveTour()%>,
     skinRightNavExamplesHTML : '<%=GlobalProperties.getExamplesRightColumnHtml()%>',
     skinRightNavExamplesHTML : '<%=GlobalProperties.getExamplesRightColumnHtml()%>',
     skinRightNavWhatsNewBlurb : '<%=GlobalProperties.getRightNavWhatsNewBlurb()%>',u}(jJ  (1fe5079ae3adc05da94f4540043eb101c02d42ddj  )portal/src/main/webapp/config_service.jspj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj  https://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj  X2  @@ -98,6 +98,7 @@
             "skin.right_nav.show_whats_new",
             "skin.right_nav.show_twitter",
             "skin.right_nav.whats_new_blurb",
+            "skin.right_nav.show_web_tours",
             "skin.show_about_tab",
             "skin.show_data_tab",
             "skin.show_faqs_tab",u}(jJ  (d3c2a444bd8ba08264b678a96fce3344bd45fcc7j  Mservice/src/main/java/org/cbioportal/service/ExpressionEnrichmentService.javaj  modifiedj  K
j  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.javaj  https://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.java?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj  X  @@ -7,6 +7,8 @@
 import org.cbioportal.model.GenericAssayEnrichment;
 import org.cbioportal.model.GenomicEnrichment;
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
+import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 
 public interface ExpressionEnrichmentService {
@@ -15,8 +17,18 @@ List<GenomicEnrichment> getGenomicEnrichments(String molecularProfileId,
             Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
             throws MolecularProfileNotFoundException;
 
-    List<GenericAssayEnrichment> getGenericAssayEnrichments(String molecularProfileId,
+    List<GenericAssayEnrichment> getGenericAssayNumericalEnrichments(String molecularProfileId,
             Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
             throws MolecularProfileNotFoundException;
+    List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
+        String molecularProfileId,
+        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
+        EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException;
+
+    List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
+                                                                                  Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
+                                                                                  EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException;
 
 }u}(jJ  (45eb9ae478ec5e52251ea8e073fc58bc5fbc2172j  Vservice/src/main/java/org/cbioportal/service/impl/ExpressionEnrichmentServiceImpl.javaj  modifiedj  Kj  K:j  Kj  https://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.javaj  https://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.java?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj  XL  @@ -1,20 +1,23 @@
 package org.cbioportal.service.impl;
+import java.math.BigDecimal;
 import java.util.*;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 
 import org.apache.commons.lang3.BooleanUtils;
+import org.cbioportal.model.MolecularProfile.MolecularAlterationType;
+import org.cbioportal.model.meta.GenericAssayMeta;
 import org.cbioportal.model.EnrichmentType;
-import org.cbioportal.model.Gene;
-import org.cbioportal.model.GeneMolecularAlteration;
-import org.cbioportal.model.GenericAssayEnrichment;
+import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
 import org.cbioportal.model.GenericAssayMolecularAlteration;
-import org.cbioportal.model.GenomicEnrichment;
-import org.cbioportal.model.MolecularProfile;
-import org.cbioportal.model.MolecularProfile.MolecularAlterationType;
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
+import org.cbioportal.model.MolecularProfile;
 import org.cbioportal.model.Sample;
-import org.cbioportal.model.meta.GenericAssayMeta;
+import org.cbioportal.model.GenericAssayEnrichment;
+import org.cbioportal.model.GenomicEnrichment;
+import org.cbioportal.model.Gene;
+import org.cbioportal.model.GeneMolecularAlteration;
 import org.cbioportal.persistence.MolecularDataRepository;
 import org.cbioportal.service.ExpressionEnrichmentService;
 import org.cbioportal.service.GeneService;
@@ -23,6 +26,7 @@
 import org.cbioportal.service.SampleService;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.util.ExpressionEnrichmentUtil;
+import org.cbioportal.service.util.FisherExactTestCalculator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -42,68 +46,56 @@ public class ExpressionEnrichmentServiceImpl implements ExpressionEnrichmentServ
     private GenericAssayService genericAssayService;
     @Autowired
     private SampleService sampleService;
-
+    @Autowired
+    private FisherExactTestCalculator fisherExactTestCalculator = new FisherExactTestCalculator();
     @Override
     // transaction needs to be setup here in order to return Iterable from
     // molecularDataService in fetchCoExpressions
     @Transactional(readOnly = true)
     public List<GenomicEnrichment> getGenomicEnrichments(String molecularProfileId,
-            Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
-            throws MolecularProfileNotFoundException {
-
+                                                         Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException {
         MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
-
         List<MolecularAlterationType> validGenomicMolecularAlterationTypes = Arrays.asList(
-                MolecularAlterationType.MICRO_RNA_EXPRESSION, MolecularAlterationType.MRNA_EXPRESSION,
-                MolecularAlterationType.MRNA_EXPRESSION_NORMALS, MolecularAlterationType.RNA_EXPRESSION,
-                MolecularAlterationType.METHYLATION, MolecularAlterationType.METHYLATION_BINARY,
-                MolecularAlterationType.PHOSPHORYLATION, MolecularAlterationType.PROTEIN_LEVEL,
-                MolecularAlterationType.PROTEIN_ARRAY_PROTEIN_LEVEL,
-                MolecularAlterationType.PROTEIN_ARRAY_PHOSPHORYLATION);
-
+            MolecularAlterationType.MICRO_RNA_EXPRESSION, MolecularAlterationType.MRNA_EXPRESSION,
+            MolecularAlterationType.MRNA_EXPRESSION_NORMALS, MolecularAlterationType.RNA_EXPRESSION,
+            MolecularAlterationType.METHYLATION, MolecularAlterationType.METHYLATION_BINARY,
+            MolecularAlterationType.PHOSPHORYLATION, MolecularAlterationType.PROTEIN_LEVEL,
+            MolecularAlterationType.PROTEIN_ARRAY_PROTEIN_LEVEL,
+            MolecularAlterationType.PROTEIN_ARRAY_PHOSPHORYLATION);
         validateMolecularProfile(molecularProfile, validGenomicMolecularAlterationTypes);
-
         Iterable<GeneMolecularAlteration> maItr = molecularDataRepository
-                .getGeneMolecularAlterationsIterableFast(molecularProfile.getStableId());
-
+            .getGeneMolecularAlterationsIterableFast(molecularProfile.getStableId());
         List<GenomicEnrichment> expressionEnrichments = expressionEnrichmentUtil.getEnrichments(molecularProfile,
-                molecularProfileCaseSets, enrichmentType, maItr);
-
+            molecularProfileCaseSets, enrichmentType, maItr);
         List<Integer> entrezGeneIds = expressionEnrichments.stream().map(GenomicEnrichment::getEntrezGeneId)
-                .collect(Collectors.toList());
-
+            .collect(Collectors.toList());
         Map<Integer, List<Gene>> geneMapByEntrezId = geneService
-                .fetchGenes(entrezGeneIds.stream().map(Object::toString).collect(Collectors.toList()), "ENTREZ_GENE_ID",
-                        "SUMMARY")
-                .stream().collect(Collectors.groupingBy(Gene::getEntrezGeneId));
-
+            .fetchGenes(entrezGeneIds.stream().map(Object::toString).collect(Collectors.toList()), "ENTREZ_GENE_ID",
+                "SUMMARY")
+            .stream().collect(Collectors.groupingBy(Gene::getEntrezGeneId));
         return expressionEnrichments.stream()
-                // filter Enrichments having no gene reference object(this
-                // happens when multiple
-                // entrez ids map to same hugo gene symbol)
-                .filter(expressionEnrichment -> geneMapByEntrezId.containsKey(expressionEnrichment.getEntrezGeneId()))
-                .map(expressionEnrichment -> {
-                    Gene gene = geneMapByEntrezId.get(expressionEnrichment.getEntrezGeneId()).get(0);
-                    expressionEnrichment.setHugoGeneSymbol(gene.getHugoGeneSymbol());
-                    return expressionEnrichment;
-                }).collect(Collectors.toList());
+            // filter Enrichments having no gene reference object(this
+            // happens when multiple
+            // entrez ids map to same hugo gene symbol)
+            .filter(expressionEnrichment -> geneMapByEntrezId.containsKey(expressionEnrichment.getEntrezGeneId()))
+            .map(expressionEnrichment -> {
+                Gene gene = geneMapByEntrezId.get(expressionEnrichment.getEntrezGeneId()).get(0);
+                expressionEnrichment.setHugoGeneSymbol(gene.getHugoGeneSymbol());
+                return expressionEnrichment;
+            }).collect(Collectors.toList());
     }
-
     @Override
     // transaction needs to be setup here in order to return Iterable from
     // molecularDataRepository in getGenericAssayMolecularAlterationsIterable
     @Transactional(readOnly = true)
-    public List<GenericAssayEnrichment> getGenericAssayEnrichments(String molecularProfileId,
-            Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
-            throws MolecularProfileNotFoundException {
-
+    public List<GenericAssayEnrichment> getGenericAssayNumericalEnrichments(String molecularProfileId,
+                                                                   Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException {
         MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
-
         validateMolecularProfile(molecularProfile, Arrays.asList(MolecularAlterationType.GENERIC_ASSAY));
-
         Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
-                .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
-
+            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
         Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets;
         if (BooleanUtils.isTrue(molecularProfile.getPatientLevel())) {
             // Build sampleIdToPatientIdMap to quick find if a sample has shared patientId with other samples
@@ -125,31 +117,159 @@ public List<GenericAssayEnrichment> getGenericAssayEnrichments(String molecularP
                 filteredMolecularProfileCaseSets.put(pair.getKey(), identifierListUniqueByPatientId);
             }
         } else {
-                filteredMolecularProfileCaseSets = molecularProfileCaseSets;
+            filteredMolecularProfileCaseSets = molecularProfileCaseSets;
         }
         List<GenericAssayEnrichment> genericAssayEnrichments = expressionEnrichmentUtil.getEnrichments(molecularProfile,
-                filteredMolecularProfileCaseSets, enrichmentType, maItr);
+            filteredMolecularProfileCaseSets, enrichmentType, maItr);
         List<String> getGenericAssayStableIds = genericAssayEnrichments.stream()
-                .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
+            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
         Map<String, GenericAssayMeta> genericAssayMetaByStableId = genericAssayService
-                .getGenericAssayMetaByStableIdsAndMolecularIds(getGenericAssayStableIds,
-                        getGenericAssayStableIds.stream().map(stableId -> molecularProfileId)
-                                .collect(Collectors.toList()),
-                        "SUMMARY")
-                .stream().collect(Collectors.toMap(GenericAssayMeta::getStableId, Function.identity()));
+            .getGenericAssayMetaByStableIdsAndMolecularIds(getGenericAssayStableIds,
+                getGenericAssayStableIds.stream().map(stableId -> molecularProfileId)
+                    .collect(Collectors.toList()),
+                "SUMMARY")
+            .stream().collect(Collectors.toMap(GenericAssayMeta::getStableId, Function.identity()));
         return genericAssayEnrichments.stream().map(enrichmentDatum -> {
             enrichmentDatum.setGenericEntityMetaProperties(
-                    genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
+                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
             return enrichmentDatum;
         }).collect(Collectors.toList());
     }
 
+    @Override
+    @Transactional(readOnly = true)
+    public List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
+        String molecularProfileId,
+        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException {
+
+        // Validate and fetch molecular profile
+        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, "BINARY");
+
+        // Get the molecular alterations for the provided profile
+        Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
+            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
+
+        // Filter the case sets based on molecular profile
+        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
+
+        // Obtain binary enrichments from the utility
+        List<GenericAssayBinaryEnrichment> genericAssayBinaryEnrichments = expressionEnrichmentUtil.getGenericAssayBinaryEnrichments(molecularProfile,
+            filteredMolecularProfileCaseSets, enrichmentType, maItr);
+
+        // Calculate q-values for enrichments
+        calcQValues(genericAssayBinaryEnrichments);
+
+        // Extract stable IDs from binary enrichments
+        List<String> getGenericAssayStableIds = genericAssayBinaryEnrichments.stream()
+            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
+
+        // Fetch metadata of generic assays by their stable IDs
+        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
+
+        // Assign meta properties to each enrichment
+        return genericAssayBinaryEnrichments.stream().map(enrichmentDatum -> {
+            enrichmentDatum.setGenericEntityMetaProperties(
+                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
+            return enrichmentDatum;
+        }).collect(Collectors.toList());
+    }
+
+    @Override
+    @Transactional(readOnly = true)
+    public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
+                                                                                         Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException {
+
+        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, "CATEGORICAL");
+
+        Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
+            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
+
+        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
+
+        List<GenericAssayCategoricalEnrichment> genericAssayCategoricalEnrichments = expressionEnrichmentUtil.getGenericAssayCategoricalEnrichments(molecularProfile,
+            filteredMolecularProfileCaseSets, enrichmentType, maItr);
+
+        calcQValues(genericAssayCategoricalEnrichments);
+
+        List<String> getGenericAssayStableIds = genericAssayCategoricalEnrichments.stream()
+            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
+        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
+
+        return genericAssayCategoricalEnrichments.stream().map(enrichmentDatum -> {
+            enrichmentDatum.setGenericEntityMetaProperties(
+                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
+            return enrichmentDatum;
+        }).collect(Collectors.toList());
+    }
+
+    private MolecularProfile getAndValidateMolecularProfile(String molecularProfileId, String dataType) throws MolecularProfileNotFoundException {
+        MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
+        validateMolecularProfile(molecularProfile, Arrays.asList(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY), dataType);
+        return molecularProfile;
+    }
 
     private void validateMolecularProfile(MolecularProfile molecularProfile,
-            List<MolecularAlterationType> validMolecularAlterationTypes) throws MolecularProfileNotFoundException {
+                                          List<MolecularProfile.MolecularAlterationType> validMolecularAlterationTypes,
+                                          String dataType) throws MolecularProfileNotFoundException {
         if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
+            // Check alteration type
             throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
         }
+        // Check datatype for binary or categorical
+        if(molecularProfile.getMolecularAlterationType().equals(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY) &&
+            !molecularProfile.getDatatype().equals(dataType))
+            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+    }
+
+    private Map<String, List<MolecularProfileCaseIdentifier>> filterMolecularProfileCaseSets(MolecularProfile molecularProfile, Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets) {
+        if (BooleanUtils.isTrue(molecularProfile.getPatientLevel())) {
+            // If patient level, filter duplicates by patient id
+            // For now we only support sample level for samples
+            List<String> sampleIds = molecularProfileCaseSets.values().stream().flatMap(Collection::stream).map(MolecularProfileCaseIdentifier::getCaseId).collect(Collectors.toList());
+            List<String> studyIds = Collections.nCopies(sampleIds.size(), molecularProfile.getCancerStudyIdentifier());
+            List<Sample> samples = sampleService.fetchSamples(studyIds, sampleIds, "ID");
+            Map<String, Integer> sampleIdToPatientIdMap = samples.stream().collect(Collectors.toMap(Sample::getStableId, Sample::getPatientId));
+
+            Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = new HashMap<>();
+            for (Map.Entry<String, List<MolecularProfileCaseIdentifier>> pair : molecularProfileCaseSets.entrySet()) {
+                Set<Integer> patientSet = new HashSet<Integer>();
+                List<MolecularProfileCaseIdentifier> identifierListUniqueByPatientId = new ArrayList<>();
+                for (MolecularProfileCaseIdentifier caseIdentifier : pair.getValue()) {
+                    if (!patientSet.contains(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()))) {
+                        identifierListUniqueByPatientId.add(caseIdentifier);
+                        patientSet.add(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()));
+                    }
+                }
+                filteredMolecularProfileCaseSets.put(pair.getKey(), identifierListUniqueByPatientId);
+            }
+            return filteredMolecularProfileCaseSets;
+        } else {
+            return molecularProfileCaseSets;
+        }
+    }
+
+    private Map<String, GenericAssayMeta> getGenericAssayMetaByStableId(List<String> stableIds, String molecularProfileId) {
+        return genericAssayService.getGenericAssayMetaByStableIdsAndMolecularIds(stableIds, stableIds.stream().map(sid -> molecularProfileId)
+                .collect(Collectors.toList()), "SUMMARY").stream()
+            .collect(Collectors.toMap(GenericAssayMeta::getStableId, Function.identity()));
     }
 
+    private <T extends GenericAssayEnrichment> void calcQValues(List<T> enrichments) {
+        // Sort enrichments by pValue
+        Collections.sort(enrichments, GenericAssayEnrichment::compare);
+        BigDecimal[] pValues = enrichments.stream().map(T::getpValue).toArray(BigDecimal[]::new);
+        BigDecimal[] qValues = fisherExactTestCalculator.calcqValue(pValues);
+        // Assign q-values to enrichments
+        for (int i = 0; i < enrichments.size(); i++) {
+            enrichments.get(i).setqValue(qValues[i]);
+        }
+    }
+    private void validateMolecularProfile(MolecularProfile molecularProfile,
+                                          List<MolecularAlterationType> validMolecularAlterationTypes) throws MolecularProfileNotFoundException {
+        if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
+            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+        }
+    }
 }u}(jJ  (79c4ace75a7d37995df135bdbf467389d08608adj  Oservice/src/main/java/org/cbioportal/service/util/ExpressionEnrichmentUtil.javaj  modifiedj  Mzj  Kj  MDj  https://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FExpressionEnrichmentUtil.javaj  https://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FExpressionEnrichmentUtil.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FExpressionEnrichmentUtil.java?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj  X*p  @@ -3,29 +3,36 @@
 import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.List;
+import java.util.HashMap;
 import java.util.Map;
+import java.util.Set;
+import java.util.List;
 import java.util.Map.Entry;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
 
-import org.apache.commons.lang3.math.NumberUtils;
-import org.apache.commons.math3.stat.StatUtils;
-import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
-import org.apache.commons.math3.stat.inference.OneWayAnova;
-import org.apache.commons.math3.stat.inference.TestUtils;
 import org.cbioportal.model.EnrichmentType;
 import org.cbioportal.model.ExpressionEnrichment;
 import org.cbioportal.model.GenericAssayEnrichment;
+import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
 import org.cbioportal.model.GenericAssayMolecularAlteration;
 import org.cbioportal.model.GenomicEnrichment;
 import org.cbioportal.model.GroupStatistics;
+import org.cbioportal.model.GenericAssayCountSummary;
 import org.cbioportal.model.MolecularAlteration;
 import org.cbioportal.model.MolecularProfile;
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
 import org.cbioportal.model.MolecularProfileSamples;
 import org.cbioportal.model.Sample;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.math.NumberUtils;
+import org.apache.commons.math3.stat.StatUtils;
+import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
+import org.apache.commons.math3.stat.inference.ChiSquareTest;
+import org.apache.commons.math3.stat.inference.OneWayAnova;
+import org.apache.commons.math3.stat.inference.TestUtils;
 import org.cbioportal.persistence.MolecularDataRepository;
 import org.cbioportal.service.SampleService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -34,199 +41,368 @@
 @Component
 public class ExpressionEnrichmentUtil {
 
-	@Autowired
-	private SampleService sampleService;
-	@Autowired
-	private MolecularDataRepository molecularDataRepository;
-
-	private static final double LOG2 = Math.log(2);
-	private static final String RNA_SEQ = "rna_seq";
-
-	public <T extends MolecularAlteration, S extends ExpressionEnrichment> List<S> getEnrichments(
-			MolecularProfile molecularProfile,
-			Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType,
-			Iterable<T> maItr) {
-		List<S> expressionEnrichments = new ArrayList<>();
-
-		Map<String, List<Integer>> groupIndicesMap = getGroupIndicesMap(molecularProfileCaseSets, enrichmentType,
-				molecularProfile);
-		for (MolecularAlteration ma : maItr) {
-
-			List<GroupStatistics> groupsStatistics = new ArrayList<GroupStatistics>();
-			// used for p-value calculation
-			List<double[]> groupedValues = new ArrayList<double[]>();
-
-			for (Entry<String, List<Integer>> group : groupIndicesMap.entrySet()) {
-
-				// get expression values to all the indices in the group
-				List<String> molecularDataValues = group.getValue().stream()
-						.map(sampleIndex -> ma.getSplitValues()[sampleIndex])
-						.filter(a -> NumberUtils.isNumber(a))
-						.collect(Collectors.toList());
-
-				// ignore group if there are less than 2 values
-				if (molecularDataValues.size() < 2) {
-					continue;
-				}
-
-				double[] values = getAlterationValues(molecularDataValues, molecularProfile.getStableId());
-
-				GroupStatistics groupStatistics = new GroupStatistics();
-				double alteredMean = StatUtils.mean(values);
-				double alteredStandardDeviation = calculateStandardDeviation(values);
-
-				// ignore if mean or standard deviation are not numbers
-				if (Double.isNaN(alteredMean) || Double.isNaN(alteredStandardDeviation)) {
-					continue;
-				}
-
-				groupedValues.add(values);
-				groupStatistics.setName(group.getKey());
-				groupStatistics.setMeanExpression(BigDecimal.valueOf(alteredMean));
-				groupStatistics.setStandardDeviation(BigDecimal.valueOf(alteredStandardDeviation));
-				groupsStatistics.add(groupStatistics);
-			}
-
-			// calculate p-value and add enrichment if atleast 2 groups have data
-			if (groupsStatistics.size() > 1) {
-				double pValue = calculatePValue(groupedValues);
-				if (Double.isNaN(pValue)) {
-					continue;
-				}
-				S expressionEnrichment = null;
-				if (ma instanceof GenericAssayMolecularAlteration) {
-					GenericAssayEnrichment genericAssayEnrichment = new GenericAssayEnrichment();
-					genericAssayEnrichment.setStableId(ma.getStableId());
-					expressionEnrichment = (S) genericAssayEnrichment;
-				} else {
-					GenomicEnrichment genomicEnrichment = new GenomicEnrichment();
-					genomicEnrichment.setEntrezGeneId(Integer.valueOf(ma.getStableId()));
-					expressionEnrichment = (S) genomicEnrichment;
-				}
-				expressionEnrichment.setpValue(BigDecimal.valueOf(pValue));
-				expressionEnrichment.setGroupsStatistics(groupsStatistics);
-				expressionEnrichments.add(expressionEnrichment);
-			}
-		}
-		return expressionEnrichments;
-	}
-
-	private double[] getAlterationValues(List<String> molecularDataValues, String molecularProfileId) {
-
-		if (molecularProfileId.contains(RNA_SEQ)) {
-			return molecularDataValues.stream().mapToDouble(d -> {
-				double datum = Double.parseDouble(d);
-				// reset to 0 if there are any negative values and then do log1p
-				return Math.log1p(datum < 0 ? 0 : datum) / LOG2;
-			}).toArray();
-		} else {
-			return molecularDataValues.stream().mapToDouble(g -> Double.parseDouble(g)).toArray();
-		}
-	}
-
-	private double calculatePValue(List<double[]> alteredValues) {
-
-		if (alteredValues.size() == 2) {
-			return TestUtils.tTest(alteredValues.get(0), alteredValues.get(1));
-		} else {
-			// calculate Anova statisitcs if there are more than 2 groups
-			OneWayAnova oneWayAnova = new OneWayAnova();
-			return oneWayAnova.anovaPValue(alteredValues);
-		}
-	}
-
-	private double calculateStandardDeviation(double[] values) {
-
-		DescriptiveStatistics descriptiveStatistics = new DescriptiveStatistics();
-		for (double value : values) {
-			descriptiveStatistics.addValue(value);
-		}
-		return descriptiveStatistics.getStandardDeviation();
-	}
-
-	/**
-	 * 
-	 * This method maps valid samples in molecularProfileCaseSets to indices in
-	 * genetic_alteration.VALUES column. Recall this column of the
-	 * genetic_alteration table is a comma separated list of scalar values. Each
-	 * value in this list is associated with a sample at the same position found in
-	 * the genetic_profile_samples.ORDERED_SAMPLE_LIST column.
-	 * 
-	 * @param molecularProfileCaseSets
-	 * @param enrichmentType
-	 * @param molecularProfile
-	 * @return
-	 */
-	private Map<String, List<Integer>> getGroupIndicesMap(
-			Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType,
-			MolecularProfile molecularProfile) {
-
-		MolecularProfileSamples commaSeparatedSampleIdsOfMolecularProfile = molecularDataRepository
-				.getCommaSeparatedSampleIdsOfMolecularProfile(molecularProfile.getStableId());
-
-		List<Integer> internalSampleIds = Arrays.stream(commaSeparatedSampleIdsOfMolecularProfile.getSplitSampleIds())
-				.mapToInt(Integer::parseInt).boxed().collect(Collectors.toList());
-
-		Map<Integer, Integer> internalSampleIdToIndexMap = IntStream.range(0, internalSampleIds.size()).boxed()
-				.collect(Collectors.toMap(internalSampleIds::get, Function.identity()));
-
-		Map<String, List<Integer>> selectedCaseIdToInternalIdsMap = getCaseIdToInternalIdsMap(molecularProfileCaseSets,
-				enrichmentType, molecularProfile);
-
-		// this block map caseIds(sampleIds or patientids) to sampleIndices which
-		// represents the position fount in the
-		// genetic_profile_samples.ORDERED_SAMPLE_LIST column
-		Map<String, List<Integer>> groupIndicesMap = molecularProfileCaseSets.entrySet().stream()
-				.collect(Collectors.toMap(entity -> entity.getKey(), entity -> {
-					List<Integer> sampleIndices = new ArrayList<>();
-					entity.getValue().forEach(molecularProfileCaseIdentifier -> {
-						// consider only valid samples
-						if (selectedCaseIdToInternalIdsMap.containsKey(molecularProfileCaseIdentifier.getCaseId())) {
-							List<Integer> sampleInternalIds = selectedCaseIdToInternalIdsMap
-									.get(molecularProfileCaseIdentifier.getCaseId());
-
-							// only consider samples which are profiled for the give molecular profile id
-							sampleInternalIds.forEach(sampleInternalId -> {
-								if (internalSampleIdToIndexMap.containsKey(sampleInternalId)) {
-									sampleIndices.add(internalSampleIdToIndexMap.get(sampleInternalId));
-								}
-							});
-						}
-					});
-					return sampleIndices;
-				}));
-		return groupIndicesMap;
-	}
-
-	private Map<String, List<Integer>> getCaseIdToInternalIdsMap(
-			Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType,
-			MolecularProfile molecularProfile) {
-
-		if (enrichmentType.equals(EnrichmentType.PATIENT)) {
-			List<String> patientIds = molecularProfileCaseSets.values().stream()
-					.flatMap(molecularProfileCaseSet -> molecularProfileCaseSet.stream()
-							.map(MolecularProfileCaseIdentifier::getCaseId))
-					.collect(Collectors.toList());
-
-			List<Sample> samples = sampleService
-					.getAllSamplesOfPatientsInStudy(molecularProfile.getCancerStudyIdentifier(), patientIds, "SUMMARY");
-
-			return samples.stream().collect(Collectors.groupingBy(Sample::getPatientStableId,
-					Collectors.mapping(Sample::getInternalId, Collectors.toList())));
-		} else {
-			List<String> sampleIds = new ArrayList<>();
-			List<String> studyIds = new ArrayList<>();
-
-			molecularProfileCaseSets.values().forEach(molecularProfileCaseIdentifiers -> {
-				molecularProfileCaseIdentifiers.forEach(molecularProfileCaseIdentifier -> {
-					sampleIds.add(molecularProfileCaseIdentifier.getCaseId());
-					studyIds.add(molecularProfile.getCancerStudyIdentifier());
-				});
-			});
-			List<Sample> samples = sampleService.fetchSamples(studyIds, sampleIds, "ID");
-
-			return samples.stream()
-					.collect(Collectors.toMap(Sample::getStableId, x -> Arrays.asList(x.getInternalId())));
-		}
-	}
-}
+    @Autowired
+    private SampleService sampleService;
+    @Autowired
+    private MolecularDataRepository molecularDataRepository;
+
+    private static final double LOG2 = Math.log(2);
+    private static final String RNA_SEQ = "rna_seq";
+    private static final String POS = "true";
+    private static final String NEG = "false";
+    private static final String ALTERED = "1";
+    private static final String UNALTERED = "0";
+    public <T extends MolecularAlteration, S extends ExpressionEnrichment> List<S> getEnrichments(
+        MolecularProfile molecularProfile,
+        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType,
+        Iterable<T> maItr) {
+        List<S> expressionEnrichments = new ArrayList<>();
+
+        Map<String, List<Integer>> groupIndicesMap = getGroupIndicesMap(molecularProfileCaseSets, enrichmentType,
+            molecularProfile);
+        for (MolecularAlteration ma : maItr) {
+            List<GroupStatistics> groupsStatistics = new ArrayList<GroupStatistics>();
+            // used for p-value calculation
+            List<double[]> groupedValues = new ArrayList<double[]>();
+
+            for (Entry<String, List<Integer>> group : groupIndicesMap.entrySet()) {
+
+                // get expression values to all the indices in the group
+                List<String> molecularDataValues = group.getValue().stream()
+                    .map(sampleIndex -> ma.getSplitValues()[sampleIndex])
+                    .filter(a -> NumberUtils.isNumber(a))
+                    .collect(Collectors.toList());
+
+                // ignore group if there are less than 2 values
+                if (molecularDataValues.size() < 2) {
+                    continue;
+                }
+
+                double[] values = getAlterationValues(molecularDataValues, molecularProfile.getStableId());
+
+                GroupStatistics groupStatistics = new GroupStatistics();
+                double alteredMean = StatUtils.mean(values);
+                double alteredStandardDeviation = calculateStandardDeviation(values);
+
+                // ignore if mean or standard deviation are not numbers
+                if (Double.isNaN(alteredMean) || Double.isNaN(alteredStandardDeviation)) {
+                    continue;
+                }
+
+                groupedValues.add(values);
+                groupStatistics.setName(group.getKey());
+                groupStatistics.setMeanExpression(BigDecimal.valueOf(alteredMean));
+                groupStatistics.setStandardDeviation(BigDecimal.valueOf(alteredStandardDeviation));
+                groupsStatistics.add(groupStatistics);
+            }
+
+            // calculate p-value and add enrichment if atleast 2 groups have data
+            if (groupsStatistics.size() > 1) {
+                double pValue = calculatePValue(groupedValues);
+                if (Double.isNaN(pValue)) {
+                    continue;
+                }
+                S expressionEnrichment = null;
+                if (ma instanceof GenericAssayMolecularAlteration) {
+                    GenericAssayEnrichment genericAssayEnrichment = new GenericAssayEnrichment();
+                    genericAssayEnrichment.setStableId(ma.getStableId());
+                    expressionEnrichment = (S) genericAssayEnrichment;
+                } else {
+                    GenomicEnrichment genomicEnrichment = new GenomicEnrichment();
+                    genomicEnrichment.setEntrezGeneId(Integer.valueOf(ma.getStableId()));
+                    expressionEnrichment = (S) genomicEnrichment;
+                }
+                expressionEnrichment.setpValue(BigDecimal.valueOf(pValue));
+                expressionEnrichment.setGroupsStatistics(groupsStatistics);
+                expressionEnrichments.add(expressionEnrichment);
+            }
+        }
+        return expressionEnrichments;
+    }
+
+    public <T extends MolecularAlteration, S extends ExpressionEnrichment> List<S> getGenericAssayCategoricalEnrichments(
+        MolecularProfile molecularProfile,
+        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType,
+        Iterable<T> maItr) {
+
+        List<S> expressionEnrichments = new ArrayList<>();
+        Map<String, Map<String, Integer>> groupCategoryStatistics = new HashMap<>();
+        Map<String, List<Integer>> groupIndicesMap = getGroupIndicesMap(molecularProfileCaseSets, enrichmentType,
+            molecularProfile);
+
+        for (MolecularAlteration ma : maItr) {
+            List<GroupStatistics> groupsStatistics = new ArrayList<GroupStatistics>();
+            for (Entry<String, List<Integer>> group : groupIndicesMap.entrySet()) {
+                // Get the corresponding split values for the group
+                List<String> groupValues = group.getValue().stream()
+                    .map(sampleIndex -> ma.getSplitValues()[sampleIndex])
+                    .collect(Collectors.toList());
+                // Group and count the split values
+                Map<String, Integer> groupedSplitValues = groupValues.stream()
+                    .collect(Collectors.toMap(Function.identity(), v -> 1, Integer::sum));
+
+                // ignore group if there are less than 2 values
+                if (groupValues.size() < 2) {
+                    continue;
+                }
+
+                GroupStatistics groupStatistics = new GroupStatistics();
+                groupStatistics.setName(group.getKey());
+                groupsStatistics.add(groupStatistics);
+                groupCategoryStatistics.put(group.getKey(), groupedSplitValues);
+            }
+
+            // calculate p-value and add enrichment if atleast 2 groups have data
+
+            if (groupsStatistics.size() > 1) {
+                long[][] array = getCategoricalValues(groupCategoryStatistics);
+                double pValue;
+                if(array[0].length <= 1) {
+                    pValue = 1;
+                } else {
+                    ChiSquareTest chiSquareTest = new ChiSquareTest();
+                    pValue = chiSquareTest.chiSquareTest(array);
+                }
+
+                // set p-value to 1 when the cases in all groups are altered
+                if (Double.isNaN(pValue)) {
+                    pValue = 1;
+                }
+
+                S expressionEnrichment = null;
+                GenericAssayCategoricalEnrichment genericAssayCategoricalEnrichment = new GenericAssayCategoricalEnrichment();
+                genericAssayCategoricalEnrichment.setStableId(ma.getStableId());
+                expressionEnrichment = (S) genericAssayCategoricalEnrichment;
+
+                expressionEnrichment.setpValue(BigDecimal.valueOf(pValue));
+                expressionEnrichment.setGroupsStatistics(groupsStatistics);
+                expressionEnrichments.add(expressionEnrichment);
+            }
+        }
+        return expressionEnrichments;
+    }
+
+    public <T extends MolecularAlteration, S extends ExpressionEnrichment> List<S> getGenericAssayBinaryEnrichments(
+        MolecularProfile molecularProfile,
+        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType,
+        Iterable<T> maItr) {
+        List<S> expressionEnrichments = new ArrayList<>();
+
+        Map<String, List<Integer>> groupIndicesMap = getGroupIndicesMap(molecularProfileCaseSets, enrichmentType,
+            molecularProfile);
+
+        for (MolecularAlteration ma : maItr) {
+            List<GenericAssayCountSummary> genericAssayCountSummaries = new ArrayList<>();
+            List<GroupStatistics> groupsStatistics = new ArrayList<GroupStatistics>();
+            // used for p-value calculation
+            List<double[]> groupedValues = new ArrayList<double[]>();
+
+            for (Entry<String, List<Integer>> group : groupIndicesMap.entrySet()) {
+                GenericAssayCountSummary genericAssayCountSummary = new GenericAssayCountSummary();
+                genericAssayCountSummary.setName(group.getKey());
+
+                // get expression values to all the indices in the group, filter NA and map binary values
+                List<String> molecularDataValues = group.getValue().stream()
+                    .map(sampleIndex -> ma.getSplitValues()[sampleIndex])
+                    .filter(StringUtils::isNotEmpty)
+                    .map(a -> a.equals(POS) ? ALTERED : UNALTERED)
+                    .collect(Collectors.toList());
+
+                // ignore group if there are less than 2 values
+                if (molecularDataValues.size() < 2) {
+                    continue;
+                }
+                genericAssayCountSummary.setTotalCount(molecularDataValues.size());
+
+                double[] values = getAlterationValues(molecularDataValues, molecularProfile.getStableId());
+                genericAssayCountSummary.setCount((int) Arrays.stream(values)
+                    .filter(num -> num == 1)
+                    .count());
+                GroupStatistics groupStatistics = new GroupStatistics();
+                double alteredMean = StatUtils.mean(values);
+                double alteredStandardDeviation = calculateStandardDeviation(values);
+
+                // ignore if mean or standard deviation are not numbers
+                if (Double.isNaN(alteredMean) || Double.isNaN(alteredStandardDeviation)) {
+                    continue;
+                }
+
+                groupedValues.add(values);
+                groupStatistics.setName(group.getKey());
+                groupStatistics.setMeanExpression(BigDecimal.valueOf(alteredMean));
+                groupStatistics.setStandardDeviation(BigDecimal.valueOf(alteredStandardDeviation));
+                groupsStatistics.add(groupStatistics);
+                genericAssayCountSummaries.add(genericAssayCountSummary);
+            }
+
+            // calculate p-value and add enrichment if atleast 2 groups have data
+            if (groupsStatistics.size() > 1) {
+
+                double pValue = calculatePValue(groupedValues);
+                if (Double.isNaN(pValue)) {
+                    continue;
+                }
+                S expressionEnrichment = null;
+                GenericAssayBinaryEnrichment genericAssayBinaryEnrichment = new GenericAssayBinaryEnrichment();
+                genericAssayBinaryEnrichment.setStableId(ma.getStableId());
+                genericAssayBinaryEnrichment.setCounts(genericAssayCountSummaries);
+                expressionEnrichment = (S) genericAssayBinaryEnrichment;
+
+                expressionEnrichment.setpValue(BigDecimal.valueOf(pValue));
+                expressionEnrichment.setGroupsStatistics(groupsStatistics);
+                expressionEnrichments.add(expressionEnrichment);
+            }
+        }
+        return expressionEnrichments;
+    }
+
+    private double[] getAlterationValues(List<String> molecularDataValues, String molecularProfileId) {
+
+        if (molecularProfileId.contains(RNA_SEQ)) {
+            return molecularDataValues.stream().mapToDouble(d -> {
+                double datum = Double.parseDouble(d);
+                // reset to 0 if there are any negative values and then do log1p
+                return Math.log1p(datum < 0 ? 0 : datum) / LOG2;
+            }).toArray();
+        } else {
+            return molecularDataValues.stream().mapToDouble(g -> Double.parseDouble(g)).toArray();
+        }
+    }
+
+    private long[][] getCategoricalValues(Map<String, Map<String, Integer>> groupCategoryStatistics) {
+        // Determine the number of rows and columns
+        int numRows = groupCategoryStatistics.size();
+        Set<String> allCategories = groupCategoryStatistics.values().stream()
+            .flatMap(innerMap -> innerMap.keySet().stream())
+            .collect(Collectors.toSet());
+        int numCols = allCategories.size();
+
+        // Create the 2-dimensional long array
+        long[][] array = new long[numRows][numCols];
+
+        // Iterate over the outer map (group -> categories)
+        List<String> groupKeys = new ArrayList<>(groupCategoryStatistics.keySet());
+        for (int row = 0; row < numRows; row++) {
+            String groupKey = groupKeys.get(row);
+            Map<String, Integer> innerMap = groupCategoryStatistics.get(groupKey);
+
+            // Iterate over all categories
+            List<String> categoryKeys = new ArrayList<>(allCategories);
+            for (int col = 0; col < numCols; col++) {
+                String categoryKey = categoryKeys.get(col);
+
+                // Get the count from the inner map, or set as zero if the category doesn't exist
+                int count = innerMap.getOrDefault(categoryKey, 0);
+                array[row][col] = count;
+            }
+        }
+        return array;
+    }
+
+    private double calculatePValue(List<double[]> alteredValues) {
+
+        if (alteredValues.size() == 2) {
+            return TestUtils.tTest(alteredValues.get(0), alteredValues.get(1));
+        } else {
+            // calculate Anova statisitcs if there are more than 2 groups
+            OneWayAnova oneWayAnova = new OneWayAnova();
+            return oneWayAnova.anovaPValue(alteredValues);
+        }
+    }
+
+    private double calculateStandardDeviation(double[] values) {
+
+        DescriptiveStatistics descriptiveStatistics = new DescriptiveStatistics();
+        for (double value : values) {
+            descriptiveStatistics.addValue(value);
+        }
+        return descriptiveStatistics.getStandardDeviation();
+    }
+
+    /**
+     *
+     * This method maps valid samples in molecularProfileCaseSets to indices in
+     * genetic_alteration.VALUES column. Recall this column of the
+     * genetic_alteration table is a comma separated list of scalar values. Each
+     * value in this list is associated with a sample at the same position found in
+     * the genetic_profile_samples.ORDERED_SAMPLE_LIST column.
+     *
+     * @param molecularProfileCaseSets
+     * @param enrichmentType
+     * @param molecularProfile
+     * @return
+     */
+    private Map<String, List<Integer>> getGroupIndicesMap(
+        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType,
+        MolecularProfile molecularProfile) {
+
+        MolecularProfileSamples commaSeparatedSampleIdsOfMolecularProfile = molecularDataRepository
+            .getCommaSeparatedSampleIdsOfMolecularProfile(molecularProfile.getStableId());
+
+        List<Integer> internalSampleIds = Arrays.stream(commaSeparatedSampleIdsOfMolecularProfile.getSplitSampleIds())
+            .mapToInt(Integer::parseInt).boxed().collect(Collectors.toList());
+
+        Map<Integer, Integer> internalSampleIdToIndexMap = IntStream.range(0, internalSampleIds.size()).boxed()
+            .collect(Collectors.toMap(internalSampleIds::get, Function.identity()));
+
+        Map<String, List<Integer>> selectedCaseIdToInternalIdsMap = getCaseIdToInternalIdsMap(molecularProfileCaseSets,
+            enrichmentType, molecularProfile);
+
+        // this block map caseIds(sampleIds or patientids) to sampleIndices which
+        // represents the position fount in the
+        // genetic_profile_samples.ORDERED_SAMPLE_LIST column
+        Map<String, List<Integer>> groupIndicesMap = molecularProfileCaseSets.entrySet().stream()
+            .collect(Collectors.toMap(entity -> entity.getKey(), entity -> {
+                List<Integer> sampleIndices = new ArrayList<>();
+                entity.getValue().forEach(molecularProfileCaseIdentifier -> {
+                    // consider only valid samples
+                    if (selectedCaseIdToInternalIdsMap.containsKey(molecularProfileCaseIdentifier.getCaseId())) {
+                        List<Integer> sampleInternalIds = selectedCaseIdToInternalIdsMap
+                            .get(molecularProfileCaseIdentifier.getCaseId());
+
+                        // only consider samples which are profiled for the give molecular profile id
+                        sampleInternalIds.forEach(sampleInternalId -> {
+                            if (internalSampleIdToIndexMap.containsKey(sampleInternalId)) {
+                                sampleIndices.add(internalSampleIdToIndexMap.get(sampleInternalId));
+                            }
+                        });
+                    }
+                });
+                return sampleIndices;
+            }));
+        return groupIndicesMap;
+    }
+
+    private Map<String, List<Integer>> getCaseIdToInternalIdsMap(
+        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType,
+        MolecularProfile molecularProfile) {
+
+        if (enrichmentType.equals(EnrichmentType.PATIENT)) {
+            List<String> patientIds = molecularProfileCaseSets.values().stream()
+                .flatMap(molecularProfileCaseSet -> molecularProfileCaseSet.stream()
+                    .map(MolecularProfileCaseIdentifier::getCaseId))
+                .collect(Collectors.toList());
+
+            List<Sample> samples = sampleService
+                .getAllSamplesOfPatientsInStudy(molecularProfile.getCancerStudyIdentifier(), patientIds, "SUMMARY");
+
+            return samples.stream().collect(Collectors.groupingBy(Sample::getPatientStableId,
+                Collectors.mapping(Sample::getInternalId, Collectors.toList())));
+        } else {
+            List<String> sampleIds = new ArrayList<>();
+            List<String> studyIds = new ArrayList<>();
+
+            molecularProfileCaseSets.values().forEach(molecularProfileCaseIdentifiers -> {
+                molecularProfileCaseIdentifiers.forEach(molecularProfileCaseIdentifier -> {
+                    sampleIds.add(molecularProfileCaseIdentifier.getCaseId());
+                    studyIds.add(molecularProfile.getCancerStudyIdentifier());
+                });
+            });
+            List<Sample> samples = sampleService.fetchSamples(studyIds, sampleIds, "ID");
+
+            return samples.stream()
+                .collect(Collectors.toMap(Sample::getStableId, x -> Arrays.asList(x.getInternalId())));
+        }
+    }
+
+}
\ No newline at end of fileu}(jJ  (150fb3701781a7e23cd5884953a72f98c0c6b57aj  Pservice/src/main/java/org/cbioportal/service/util/FisherExactTestCalculator.javaj  modifiedj  K'j  Kj  K,j  https://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javaj  https://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.java?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj  X%  @@ -2,6 +2,8 @@
 
 import org.springframework.stereotype.Component;
 
+import java.math.BigDecimal;
+
 @Component
 public class FisherExactTestCalculator {
 
@@ -40,9 +42,9 @@ public double getCumulativePValue(int a, int b, int c, int d) {
         }
         return p;
     }
-
+    
     public double getTwoTailedPValue(int a, int b, int c, int d) {
-        
+
         int min, i;
         int n = a + b + c + d;
         double p = 0;
@@ -60,10 +62,10 @@ public double getTwoTailedPValue(int a, int b, int c, int d) {
 //         frequencies, of obtaining exactly the frequencies observed and any configuration more extreme.
 //         By "more extreme," we mean any configuration (given observed marginals) with a smaller probability of
 //         occurrence in the same direction (one-tailed) or in both directions (two-tailed).
-        
+
         int initialA = a, initialB = b, initialC = c, initialD = d;
         p += baseP;
-        
+
         min = (c < b) ? c : b;
         for (i = 0; i < min; i++) {
             double tempP = getPValue(++a, --b, --c, ++d, f);
@@ -77,7 +79,7 @@ public double getTwoTailedPValue(int a, int b, int c, int d) {
         b = initialB;
         c = initialC;
         d = initialD;
-        
+
         min = (a < d) ? a : d;
         for (i = 0; i < min; i++) {
             double pTemp = getPValue(--a, ++b, ++c, --d, f);
@@ -87,4 +89,36 @@ public double getTwoTailedPValue(int a, int b, int c, int d) {
         }
         return p;
     }
+    public BigDecimal[] calcqValue(BigDecimal[] pValuesInIncreasingOrder) {
+        BigDecimal cachedElement = BigDecimal.valueOf(0.0);
+        int dataLength = pValuesInIncreasingOrder.length;
+        BigDecimal[]  reversedQValues = new BigDecimal[dataLength];
+
+        reverseValues(dataLength, pValuesInIncreasingOrder);
+
+        for (int i = 0; i < dataLength; i++) {
+            if (i > 0) {
+                BigDecimal calculatedValue = cachedElement.min(
+                    (pValuesInIncreasingOrder[i].multiply(new BigDecimal(dataLength))).divide(new BigDecimal(dataLength - i), BigDecimal.ROUND_HALF_UP)
+                );
+                cachedElement = calculatedValue;
+                reversedQValues[i] = calculatedValue;
+            } else {
+                cachedElement = pValuesInIncreasingOrder[i];
+                reversedQValues[i] = pValuesInIncreasingOrder[i];
+            }
+        }
+
+        reverseValues(dataLength, reversedQValues);
+
+        return reversedQValues;
+    }
+
+    private void reverseValues(int dataLength, BigDecimal[]  reversedQValues) {
+        for (int i = 0; i < dataLength / 2; i++) {
+            BigDecimal temp = reversedQValues[i];
+            reversedQValues[i] = reversedQValues[dataLength - i - 1];
+            reversedQValues[dataLength - i - 1] = temp;
+        }
+    }
 }u      }(jJ  (a777176e26ad028ead7bdd29894c4d5c16aaed87j  Zservice/src/test/java/org/cbioportal/service/impl/ExpressionEnrichmentServiceImplTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImplTest.javaj  https://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImplTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImplTest.java?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj  XL  @@ -207,7 +207,7 @@ public void getGenomicEnrichments() throws Exception {
     }
 
     @Test
-    public void getGenericAssayEnrichments() throws Exception {
+    public void getGenericAssayNumericalEnrichments() throws Exception {
         geneMolecularProfile.setMolecularAlterationType(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY);
 
         List<GenericAssayMolecularAlteration> molecularDataList = new ArrayList<GenericAssayMolecularAlteration>();
@@ -229,7 +229,7 @@ public void getGenericAssayEnrichments() throws Exception {
                 .thenReturn(Arrays.asList(new GenericAssayMeta(HUGO_GENE_SYMBOL_1),
                         new GenericAssayMeta(HUGO_GENE_SYMBOL_2)));
 
-        List<GenericAssayEnrichment> result = enrichmentServiceImpl.getGenericAssayEnrichments(MOLECULAR_PROFILE_ID,
+        List<GenericAssayEnrichment> result = enrichmentServiceImpl.getGenericAssayNumericalEnrichments(MOLECULAR_PROFILE_ID,
                 molecularProfileCaseSets, EnrichmentType.SAMPLE);
 
         Assert.assertEquals(2, result.size());
@@ -301,7 +301,7 @@ public void getGenericAssayPatientLevelEnrichments() throws Exception {
 
         Mockito.when(sampleService.fetchSamples(Arrays.asList(STUDY_ID, STUDY_ID, STUDY_ID, STUDY_ID, STUDY_ID), Arrays.asList(SAMPLE_ID3, SAMPLE_ID4, SAMPLE_ID5, SAMPLE_ID1, SAMPLE_ID2), "ID")).thenReturn(samples);
 
-        List<GenericAssayEnrichment> result = enrichmentServiceImpl.getGenericAssayEnrichments(MOLECULAR_PROFILE_ID, molecularProfilePatientLevelCaseSets, EnrichmentType.SAMPLE);
+        List<GenericAssayEnrichment> result = enrichmentServiceImpl.getGenericAssayNumericalEnrichments(MOLECULAR_PROFILE_ID, molecularProfilePatientLevelCaseSets, EnrichmentType.SAMPLE);
 
         Assert.assertEquals(2, result.size());
         GenericAssayEnrichment genericAssayEnrichment = result.get(0);u}(jJ  (017a5ab005ff8e170b4aa7ce9ab2ec1652d4dba4j  \service/src/test/java/org/cbioportal/service/impl/GenericAssayEnrichmentServiceImplTest.javaj  addedj  Mj  K j  Mj  https://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.javaj  https://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.java?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj  X:  @@ -0,0 +1,272 @@
+package org.cbioportal.service.impl;
+
+import org.cbioportal.model.meta.GenericAssayMeta;
+import org.cbioportal.model.EnrichmentType;
+import org.cbioportal.model.MolecularProfileCaseIdentifier;
+import org.cbioportal.model.MolecularProfile;
+import org.cbioportal.model.MolecularProfileSamples;
+import org.cbioportal.model.CancerStudy;
+import org.cbioportal.model.ReferenceGenome;
+import org.cbioportal.model.Sample;
+import org.cbioportal.model.GenericAssayMolecularAlteration;
+import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
+import org.cbioportal.model.GroupStatistics;
+
+import org.cbioportal.persistence.MolecularDataRepository;
+import org.cbioportal.service.GenericAssayService;
+import org.cbioportal.service.MolecularProfileService;
+import org.cbioportal.service.SampleService;
+import org.cbioportal.service.exception.MolecularProfileNotFoundException;
+import org.cbioportal.service.util.ExpressionEnrichmentUtil;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.Spy;
+import org.mockito.junit.MockitoJUnitRunner;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+
+@RunWith(MockitoJUnitRunner.class)
+public class GenericAssayEnrichmentServiceImplTest extends BaseServiceImplTest{
+    @InjectMocks
+    private ExpressionEnrichmentServiceImpl expressionEnrichmentServiceImpl;
+    @Mock
+    private SampleService sampleService;
+    @Mock
+    private MolecularProfileService molecularProfileService;
+    @Mock
+    private MolecularDataRepository molecularDataRepository;
+
+    @Mock
+    private GenericAssayService genericAssayService;
+
+    @Spy
+    @InjectMocks
+    private ExpressionEnrichmentUtil expressionEnrichmentUtil;
+
+    CancerStudy cancerStudy = new CancerStudy();
+    MolecularProfile geneMolecularProfile = new MolecularProfile();
+    MolecularProfileSamples molecularProfileSamples = new MolecularProfileSamples();
+    List<Sample> samples = new ArrayList<>();
+    Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets = new HashMap<>();
+    Map<String, List<MolecularProfileCaseIdentifier>> molecularProfilePatientLevelCaseSets = new HashMap<>();
+    // patient level only data
+    public static final String SAMPLE_ID5 = "sample_id5";
+
+
+    @Before
+    public void setup() throws MolecularProfileNotFoundException {
+        cancerStudy.setReferenceGenome(ReferenceGenome.HOMO_SAPIENS_DEFAULT_GENOME_NAME);
+        cancerStudy.setCancerStudyIdentifier(STUDY_ID);
+
+        geneMolecularProfile.setCancerStudyIdentifier(STUDY_ID);
+        geneMolecularProfile.setStableId(MOLECULAR_PROFILE_ID);
+
+        geneMolecularProfile.setCancerStudy(cancerStudy);
+
+        molecularProfileSamples.setMolecularProfileId(MOLECULAR_PROFILE_ID);
+        molecularProfileSamples.setCommaSeparatedSampleIds("1,2,3,4");
+
+        Sample sample1 = new Sample();
+        sample1.setStableId(SAMPLE_ID1);
+        sample1.setInternalId(1);
+        sample1.setCancerStudyIdentifier(STUDY_ID);
+        sample1.setPatientId(1);
+        samples.add(sample1);
+        Sample sample2 = new Sample();
+        sample2.setStableId(SAMPLE_ID2);
+        sample2.setInternalId(2);
+        sample2.setCancerStudyIdentifier(STUDY_ID);
+        sample2.setPatientId(2);
+        samples.add(sample2);
+        Sample sample3 = new Sample();
+        sample3.setStableId(SAMPLE_ID3);
+        sample3.setInternalId(3);
+        sample3.setCancerStudyIdentifier(STUDY_ID);
+        sample3.setPatientId(3);
+        samples.add(sample3);
+        Sample sample4 = new Sample();
+        sample4.setStableId(SAMPLE_ID4);
+        sample4.setInternalId(4);
+        sample4.setCancerStudyIdentifier(STUDY_ID);
+        sample4.setPatientId(4);
+        samples.add(sample4);
+
+        List<MolecularProfileCaseIdentifier> alteredSampleIdentifieres = new ArrayList<>();
+        List<MolecularProfileCaseIdentifier> unalteredSampleIdentifieres = new ArrayList<>();
+        List<MolecularProfileCaseIdentifier> unalteredPatientLevelSampleIdentifieres = new ArrayList<>();
+
+        MolecularProfileCaseIdentifier caseIdentifier1 = new MolecularProfileCaseIdentifier();
+        caseIdentifier1.setMolecularProfileId(MOLECULAR_PROFILE_ID);
+        caseIdentifier1.setCaseId(SAMPLE_ID1);
+        alteredSampleIdentifieres.add(caseIdentifier1);
+
+        MolecularProfileCaseIdentifier caseIdentifier2 = new MolecularProfileCaseIdentifier();
+        caseIdentifier2.setMolecularProfileId(MOLECULAR_PROFILE_ID);
+        caseIdentifier2.setCaseId(SAMPLE_ID2);
+        alteredSampleIdentifieres.add(caseIdentifier2);
+
+        MolecularProfileCaseIdentifier caseIdentifier3 = new MolecularProfileCaseIdentifier();
+        caseIdentifier3.setMolecularProfileId(MOLECULAR_PROFILE_ID);
+        caseIdentifier3.setCaseId(SAMPLE_ID3);
+        unalteredSampleIdentifieres.add(caseIdentifier3);
+        unalteredPatientLevelSampleIdentifieres.add(caseIdentifier3);
+
+        MolecularProfileCaseIdentifier caseIdentifier4 = new MolecularProfileCaseIdentifier();
+        caseIdentifier4.setMolecularProfileId(MOLECULAR_PROFILE_ID);
+        caseIdentifier4.setCaseId(SAMPLE_ID4);
+        unalteredSampleIdentifieres.add(caseIdentifier4);
+        unalteredPatientLevelSampleIdentifieres.add(caseIdentifier4);
+
+        // patient level only data
+        MolecularProfileCaseIdentifier caseIdentifier5 = new MolecularProfileCaseIdentifier();
+        caseIdentifier5.setMolecularProfileId(MOLECULAR_PROFILE_ID);
+        caseIdentifier5.setCaseId(SAMPLE_ID5);
+        unalteredPatientLevelSampleIdentifieres.add(caseIdentifier5);
+
+        molecularProfileCaseSets.put("altered samples", alteredSampleIdentifieres);
+        molecularProfileCaseSets.put("unaltered samples", unalteredSampleIdentifieres);
+        molecularProfilePatientLevelCaseSets.put("altered samples", alteredSampleIdentifieres);
+        molecularProfilePatientLevelCaseSets.put("unaltered samples", unalteredPatientLevelSampleIdentifieres);
+
+        Mockito.when(molecularProfileService.getMolecularProfile(MOLECULAR_PROFILE_ID))
+            .thenReturn(geneMolecularProfile);
+
+        Mockito.when(molecularDataRepository.getCommaSeparatedSampleIdsOfMolecularProfile(MOLECULAR_PROFILE_ID))
+            .thenReturn(molecularProfileSamples);
+
+        Mockito.when(sampleService.fetchSamples(Arrays.asList(STUDY_ID, STUDY_ID, STUDY_ID, STUDY_ID),
+            Arrays.asList(SAMPLE_ID3, SAMPLE_ID4, SAMPLE_ID1, SAMPLE_ID2), "ID")).thenReturn(samples);
+    }
+    
+    @Test
+    public void getGenericAssayBinaryEnrichments() throws Exception {
+        geneMolecularProfile.setMolecularAlterationType(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY);
+        geneMolecularProfile.setDatatype("BINARY");
+        List<GenericAssayMolecularAlteration> molecularDataList = new ArrayList<GenericAssayMolecularAlteration>();
+        GenericAssayMolecularAlteration genericAssayMolecularAlteration1 = new GenericAssayMolecularAlteration();
+        genericAssayMolecularAlteration1.setGenericAssayStableId(HUGO_GENE_SYMBOL_1);
+
+        // here are 2 groups
+        genericAssayMolecularAlteration1.setValues("true,true,true,false");
+        molecularDataList.add(genericAssayMolecularAlteration1);
+
+        GenericAssayMolecularAlteration genericAssayMolecularAlteration2 = new GenericAssayMolecularAlteration();
+        genericAssayMolecularAlteration2.setGenericAssayStableId(HUGO_GENE_SYMBOL_2);
+        genericAssayMolecularAlteration2.setValues("true,false,false,true");
+        molecularDataList.add(genericAssayMolecularAlteration2);
+        Mockito.when(molecularDataRepository.getGenericAssayMolecularAlterationsIterable(MOLECULAR_PROFILE_ID, null,
+            "SUMMARY")).thenReturn(molecularDataList);
+
+        Mockito.when(genericAssayService.getGenericAssayMetaByStableIdsAndMolecularIds(
+                Arrays.asList(HUGO_GENE_SYMBOL_1, HUGO_GENE_SYMBOL_2),
+                Arrays.asList(MOLECULAR_PROFILE_ID, MOLECULAR_PROFILE_ID), "SUMMARY"))
+            .thenReturn(Arrays.asList(new GenericAssayMeta(HUGO_GENE_SYMBOL_1),
+                new GenericAssayMeta(HUGO_GENE_SYMBOL_2)));
+
+        List<GenericAssayBinaryEnrichment> result = expressionEnrichmentServiceImpl.getGenericAssayBinaryEnrichments(MOLECULAR_PROFILE_ID,
+            molecularProfileCaseSets, EnrichmentType.SAMPLE);
+
+        Assert.assertEquals(2, result.size());
+        GenericAssayBinaryEnrichment genericAssayBinaryEnrichment = result.get(0);
+        Assert.assertEquals(HUGO_GENE_SYMBOL_1, genericAssayBinaryEnrichment.getStableId());
+        Assert.assertEquals(2, genericAssayBinaryEnrichment.getGroupsStatistics().size());
+
+        GroupStatistics unalteredGroupStats = genericAssayBinaryEnrichment.getGroupsStatistics().get(0);
+        Assert.assertEquals("unaltered samples", unalteredGroupStats.getName());
+        Assert.assertEquals(new BigDecimal("0.5"), unalteredGroupStats.getMeanExpression());
+        Assert.assertEquals(new BigDecimal("0.7071067811865476"), unalteredGroupStats.getStandardDeviation());
+
+        GroupStatistics alteredGroupStats = genericAssayBinaryEnrichment.getGroupsStatistics().get(1);
+        Assert.assertEquals("altered samples", alteredGroupStats.getName());
+        Assert.assertEquals(new BigDecimal("1.0"), alteredGroupStats.getMeanExpression());
+        Assert.assertEquals(new BigDecimal("0.0"), alteredGroupStats.getStandardDeviation());
+
+        Assert.assertEquals(new BigDecimal("0.49999999999999983"), genericAssayBinaryEnrichment.getpValue());
+        Assert.assertEquals(new BigDecimal("0.99999999999999966"), genericAssayBinaryEnrichment.getqValue());
+
+        genericAssayBinaryEnrichment = result.get(1);
+        Assert.assertEquals(HUGO_GENE_SYMBOL_2, genericAssayBinaryEnrichment.getStableId());
+        Assert.assertEquals(2, genericAssayBinaryEnrichment.getGroupsStatistics().size());
+
+        unalteredGroupStats = genericAssayBinaryEnrichment.getGroupsStatistics().get(0);
+        Assert.assertEquals("unaltered samples", unalteredGroupStats.getName());
+        Assert.assertEquals(new BigDecimal("0.5"), unalteredGroupStats.getMeanExpression());
+        Assert.assertEquals(new BigDecimal("0.7071067811865476"), unalteredGroupStats.getStandardDeviation());
+
+        alteredGroupStats = genericAssayBinaryEnrichment.getGroupsStatistics().get(1);
+        Assert.assertEquals("altered samples", alteredGroupStats.getName());
+        Assert.assertEquals(new BigDecimal("0.5"), alteredGroupStats.getMeanExpression());
+        Assert.assertEquals(new BigDecimal("0.7071067811865476"), alteredGroupStats.getStandardDeviation());
+
+        Assert.assertEquals(new BigDecimal("1.0"), genericAssayBinaryEnrichment.getpValue());
+        Assert.assertEquals(new BigDecimal("1.0"), genericAssayBinaryEnrichment.getqValue());
+    }
+
+
+    @Test
+    public void getGenericAssayCategoricalEnrichments() throws MolecularProfileNotFoundException {
+        geneMolecularProfile.setMolecularAlterationType(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY);
+        geneMolecularProfile.setDatatype("CATEGORICAL");
+        List<GenericAssayMolecularAlteration> molecularDataList = new ArrayList<GenericAssayMolecularAlteration>();
+        GenericAssayMolecularAlteration genericAssayMolecularAlteration1 = new GenericAssayMolecularAlteration();
+        genericAssayMolecularAlteration1.setGenericAssayStableId(HUGO_GENE_SYMBOL_1);
+        genericAssayMolecularAlteration1.setValues("category1,category1,category2,category2");
+        molecularDataList.add(genericAssayMolecularAlteration1);
+
+        GenericAssayMolecularAlteration genericAssayMolecularAlteration2 = new GenericAssayMolecularAlteration();
+        genericAssayMolecularAlteration2.setGenericAssayStableId(HUGO_GENE_SYMBOL_2);
+        genericAssayMolecularAlteration2.setValues("category2,category2,category1,category1");
+        molecularDataList.add(genericAssayMolecularAlteration2);
+        Mockito.when(molecularDataRepository.getGenericAssayMolecularAlterationsIterable(MOLECULAR_PROFILE_ID, null,
+            "SUMMARY")).thenReturn(molecularDataList);
+
+        Mockito.when(genericAssayService.getGenericAssayMetaByStableIdsAndMolecularIds(
+                Arrays.asList(HUGO_GENE_SYMBOL_1, HUGO_GENE_SYMBOL_2),
+                Arrays.asList(MOLECULAR_PROFILE_ID, MOLECULAR_PROFILE_ID), "SUMMARY"))
+            .thenReturn(Arrays.asList(new GenericAssayMeta(HUGO_GENE_SYMBOL_1),
+                new GenericAssayMeta(HUGO_GENE_SYMBOL_2)));
+
+        List<GenericAssayCategoricalEnrichment> result = expressionEnrichmentServiceImpl.getGenericAssayCategoricalEnrichments(MOLECULAR_PROFILE_ID,
+            molecularProfileCaseSets, EnrichmentType.SAMPLE);
+
+        Assert.assertEquals(2, result.size());
+        GenericAssayCategoricalEnrichment genericAssayCategoricalEnrichment = result.get(0);
+        Assert.assertEquals(HUGO_GENE_SYMBOL_1, genericAssayCategoricalEnrichment.getStableId());
+        Assert.assertEquals(2, genericAssayCategoricalEnrichment.getGroupsStatistics().size());
+
+        GroupStatistics unalteredGroupStats = genericAssayCategoricalEnrichment.getGroupsStatistics().get(0);
+        Assert.assertEquals("unaltered samples", unalteredGroupStats.getName());
+
+        GroupStatistics alteredGroupStats = genericAssayCategoricalEnrichment.getGroupsStatistics().get(1);
+        Assert.assertEquals("altered samples", alteredGroupStats.getName());
+
+        Assert.assertEquals(new BigDecimal("0.04550026389635764"), genericAssayCategoricalEnrichment.getpValue());
+        Assert.assertEquals(new BigDecimal("0.04550026389635764"), genericAssayCategoricalEnrichment.getqValue());
+
+        genericAssayCategoricalEnrichment = result.get(1);
+        Assert.assertEquals(HUGO_GENE_SYMBOL_2, genericAssayCategoricalEnrichment.getStableId());
+        Assert.assertEquals(2, genericAssayCategoricalEnrichment.getGroupsStatistics().size());
+
+        unalteredGroupStats = genericAssayCategoricalEnrichment.getGroupsStatistics().get(0);
+        Assert.assertEquals("unaltered samples", unalteredGroupStats.getName());
+
+        alteredGroupStats = genericAssayCategoricalEnrichment.getGroupsStatistics().get(1);
+        Assert.assertEquals("altered samples", alteredGroupStats.getName());
+
+        Assert.assertEquals(new BigDecimal("0.04550026389635764"), genericAssayCategoricalEnrichment.getpValue());
+        Assert.assertEquals(new BigDecimal("0.04550026389635764"), genericAssayCategoricalEnrichment.getqValue());
+    }
+
+}u}(jJ  (4072480eb1360b62043c2de3243ab71fc7d731e2j  Hweb/src/main/java/org/cbioportal/web/ExpressionEnrichmentController.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentController.javaj  https://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentController.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentController.java?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj  X  @@ -95,7 +95,7 @@ private <S extends ExpressionEnrichment> List<S> fetchExpressionEnrichments(Enri
         }
 
         if (isRequestForGenericAssayEnrichments) {
-            return (List<S>) expressionEnrichmentService.getGenericAssayEnrichments(
+            return (List<S>) expressionEnrichmentService.getGenericAssayNumericalEnrichments(
                     molecularProfileIds.iterator().next(), groupCaseIdentifierSet, enrichmentType);
         }
         u}(jJ  (294c580582eec4d4b8de8b24d183acbed9b1118fj  Jweb/src/main/java/org/cbioportal/web/GenericAssayEnrichmentController.javaj  addedj  Ktj  K j  Ktj  https://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.javaj  https://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.java?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj  X  @@ -0,0 +1,116 @@
+package org.cbioportal.web;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.cbioportal.model.EnrichmentType;
+import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
+import org.cbioportal.model.MolecularProfileCaseIdentifier;
+import org.cbioportal.service.ExpressionEnrichmentService;
+import org.cbioportal.service.exception.MolecularProfileNotFoundException;
+import org.cbioportal.web.config.annotation.InternalApi;
+import org.cbioportal.web.parameter.MolecularProfileCasesGroupFilter;
+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.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RequestAttribute;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.validation.Valid;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+@InternalApi
+@RestController
+@Validated
+@Api(tags = "Generic Assay Enrichment Data", description = " ")
+public class GenericAssayEnrichmentController {
+    @Autowired
+    private ExpressionEnrichmentService expressionEnrichmentService;
+
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @RequestMapping(value = "/generic-assay-categorical-enrichments/fetch",
+        method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE,
+        produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch generic assay categorical data enrichments in a molecular profile")
+    public ResponseEntity<List<GenericAssayCategoricalEnrichment>> fetchGenericAssayCategoricalDataEnrichmentInMultipleMolecularProfiles(
+        @ApiIgnore
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiParam("Type of the enrichment e.g. SAMPLE or PATIENT")
+        @RequestParam(defaultValue = "SAMPLE") EnrichmentType enrichmentType,
+        @ApiParam(required = true, value = "List of groups containing sample and molecular profile identifiers")
+        @Valid @RequestBody(required = false) List<MolecularProfileCasesGroupFilter> groups,
+        @ApiIgnore
+        @Valid @RequestAttribute(required = false, value = "interceptedMolecularProfileCasesGroupFilters") List<MolecularProfileCasesGroupFilter> interceptedMolecularProfileCasesGroupFilters)
+        throws MolecularProfileNotFoundException, UnsupportedOperationException {
+
+        return new ResponseEntity<>(fetchExpressionEnrichments(enrichmentType, interceptedMolecularProfileCasesGroupFilters),
+            HttpStatus.OK);
+    }
+
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @RequestMapping(value = "/generic-assay-binary-enrichments/fetch",
+        method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE,
+        produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch generic assay binary data enrichments in a molecular profile")
+    public ResponseEntity<List<GenericAssayBinaryEnrichment>> fetchGenericAssayBinaryDataEnrichmentInMultipleMolecularProfiles(
+        @ApiIgnore
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiParam("Type of the enrichment e.g. SAMPLE or PATIENT")
+        @RequestParam(defaultValue = "SAMPLE") EnrichmentType enrichmentType,
+        @ApiParam(required = true, value = "List of groups containing sample and molecular profile identifiers")
+        @Valid @RequestBody(required = false) List<MolecularProfileCasesGroupFilter> groups,
+        @ApiIgnore
+        @Valid @RequestAttribute(required = false, value = "interceptedMolecularProfileCasesGroupFilters") List<MolecularProfileCasesGroupFilter> interceptedMolecularProfileCasesGroupFilters)
+        throws MolecularProfileNotFoundException, UnsupportedOperationException {
+
+        Map<String, List<MolecularProfileCaseIdentifier>> groupCaseIdentifierSet = interceptedMolecularProfileCasesGroupFilters
+            .stream().collect(Collectors.toMap(MolecularProfileCasesGroupFilter::getName,
+                MolecularProfileCasesGroupFilter::getMolecularProfileCaseIdentifiers));
+
+        Set<String> molecularProfileIds = groupCaseIdentifierSet.values().stream()
+            .flatMap(molecularProfileCaseSet -> molecularProfileCaseSet.stream()
+                .map(MolecularProfileCaseIdentifier::getMolecularProfileId))
+            .collect(Collectors.toSet());
+
+        if (molecularProfileIds.size() > 1) {
+            throw new UnsupportedOperationException("Multi-study enrichments is not yet implemented");
+        }
+
+        return new ResponseEntity<>(
+            expressionEnrichmentService.getGenericAssayBinaryEnrichments(
+                molecularProfileIds.iterator().next(), groupCaseIdentifierSet, enrichmentType),
+            HttpStatus.OK);
+    }
+
+    private List<GenericAssayCategoricalEnrichment> fetchExpressionEnrichments(EnrichmentType enrichmentType,
+                                                                               List<MolecularProfileCasesGroupFilter> interceptedMolecularProfileCasesGroupFilters
+    ) throws MolecularProfileNotFoundException {
+        Map<String, List<MolecularProfileCaseIdentifier>> groupCaseIdentifierSet = interceptedMolecularProfileCasesGroupFilters
+            .stream().collect(Collectors.toMap(MolecularProfileCasesGroupFilter::getName,
+                MolecularProfileCasesGroupFilter::getMolecularProfileCaseIdentifiers));
+
+        Set<String> molecularProfileIds = groupCaseIdentifierSet.values().stream()
+            .flatMap(molecularProfileCaseSet -> molecularProfileCaseSet.stream()
+                .map(MolecularProfileCaseIdentifier::getMolecularProfileId))
+            .collect(Collectors.toSet());
+
+        if (molecularProfileIds.size() > 1) {
+            throw new UnsupportedOperationException("Multi-study expression enrichments is not yet implemented");
+        }
+        return expressionEnrichmentService.getGenericAssayCategoricalEnrichments(
+            molecularProfileIds.iterator().next(), groupCaseIdentifierSet, enrichmentType);
+    }
+}u}(jJ  (91720ee1f819695a41680c798e7c320a580a0fcaj  Vweb/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaj  https://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.java?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj  X  @@ -102,6 +102,8 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
     public static final String TREATMENTS_PATIENT_PATH = "/treatments/patient";
     public static final String TREATMENTS_SAMPLE_PATH = "/treatments/sample";
     public static final String GENERIC_ASSAY_ENRICHMENT_FETCH_PATH = "/generic-assay-enrichments/fetch";
+    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";
 
     @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
@@ -151,7 +153,9 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
         } else if (requestPathInfo.equals(MUTATION_ENRICHMENT_FETCH_PATH) ||
         		requestPathInfo.equals(COPY_NUMBER_ENRICHMENT_FETCH_PATH) ||
         		requestPathInfo.equals(EXPRESSION_ENRICHMENT_FETCH_PATH) ||
-        		requestPathInfo.equals(GENERIC_ASSAY_ENRICHMENT_FETCH_PATH)) {
+        		requestPathInfo.equals(GENERIC_ASSAY_ENRICHMENT_FETCH_PATH) ||
+                requestPathInfo.equals(GENERIC_ASSAY_CATEGORICAL_ENRICHMENT_FETCH_PATH) ||
+                requestPathInfo.equals(GENERIC_ASSAY_BINARY_ENRICHMENT_FETCH_PATH)) {
             return extractAttributesFromMolecularProfileCasesGroups(request);
         } else if (requestPathInfo.equals(ALTERATION_ENRICHMENT_FETCH_PATH)) {
             return extractAttributesFromMolecularProfileCasesGroupsAndAlterationTypes(request);u}(jJ  (0abe4a9e3ca0f467b635dfea91bbfcd5fe91a7d0j  Lweb/src/test/java/org/cbioportal/web/ExpressionEnrichmentControllerTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentControllerTest.javaj  https://github.com/cBioPortal/cbioportal/raw/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cd/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentControllerTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentControllerTest.java?ref=7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj  Xt  @@ -186,7 +186,7 @@ public void fetchGenericAssayEnrichments() throws Exception {
         genericAssayEnrichment2.setpValue(TEST_P_VALUE_2);
         genericAssayEnrichments.add(genericAssayEnrichment2);
 
-        Mockito.when(expressionEnrichmentService.getGenericAssayEnrichments(Mockito.anyString(), Mockito.anyMap(),
+        Mockito.when(expressionEnrichmentService.getGenericAssayNumericalEnrichments(Mockito.anyString(), Mockito.anyMap(),
                 Mockito.any(EnrichmentType.class))).thenReturn(genericAssayEnrichments);
 
         mockMvc.perform(MockMvcRequestBuilders.post("/generic-assay-enrichments/fetch")ueu(19a11426c67a6c265f96a9ada1b58b6c55d2994f}(sha(19a11426c67a6c265f96a9ada1b58b6c55d2994fnode_idEC_kwDOAe-hB9oAKDE5YTExNDI2YzY3YTZjMjY1Zjk2YTlhZGExYjU4YjZjNTVkMjk5NGYcommit}(author}(name
Bas Leenknegtemailbasleenknegt@thehyve.nldate2023-07-05T11:29:22Zu	committer}(jc  
Bas Leenknegtje  basleenknegt@thehyve.nljg  2023-07-05T11:43:25ZumessageGAllow ProfiledCasesCounter to add counts to empty alteration count listtree}(j[  (707e6f5865c56071465f12e808aa8091805628c4urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/707e6f5865c56071465f12e808aa8091805628c4ujs  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/19a11426c67a6c265f96a9ada1b58b6c55d2994f
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujs  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/19a11426c67a6c265f96a9ada1b58b6c55d2994fhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/19a11426c67a6c265f96a9ada1b58b6c55d2994fcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/19a11426c67a6c265f96a9ada1b58b6c55d2994f/commentsja  }(loginBasLeeidJ~2 j]  MDQ6VXNlcjMzMjMwMDY=
avatar_url3https://avatars.githubusercontent.com/u/3323006?v=4gravatar_idh5js  #https://api.github.com/users/BasLeej  https://github.com/BasLee
followers_url-https://api.github.com/users/BasLee/followers
following_url:https://api.github.com/users/BasLee/following{/other_user}	gists_url3https://api.github.com/users/BasLee/gists{/gist_id}starred_url:https://api.github.com/users/BasLee/starred{/owner}{/repo}subscriptions_url1https://api.github.com/users/BasLee/subscriptionsorganizations_url(https://api.github.com/users/BasLee/orgs	repos_url)https://api.github.com/users/BasLee/repos
events_url4https://api.github.com/users/BasLee/events{/privacy}received_events_url3https://api.github.com/users/BasLee/received_eventstypeUser
site_adminuji  }(j  BasLeej  J~2 j]  MDQ6VXNlcjMzMjMwMDY=j  3https://avatars.githubusercontent.com/u/3323006?v=4j  h5js  #https://api.github.com/users/BasLeej  https://github.com/BasLeej  -https://api.github.com/users/BasLee/followersj  :https://api.github.com/users/BasLee/following{/other_user}j  3https://api.github.com/users/BasLee/gists{/gist_id}j  :https://api.github.com/users/BasLee/starred{/owner}{/repo}j  1https://api.github.com/users/BasLee/subscriptionsj  (https://api.github.com/users/BasLee/orgsj  )https://api.github.com/users/BasLee/reposj  4https://api.github.com/users/BasLee/events{/privacy}j  3https://api.github.com/users/BasLee/received_eventsj  Userj  uparents]}(j[  (49adca078e192f8bfde71270b47f6d4db3894e4djs  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/49adca078e192f8bfde71270b47f6d4db3894e4dj  Xhttps://github.com/cBioPortal/cbioportal/commit/49adca078e192f8bfde71270b47f6d4db3894e4duastats}(totalK	additionsK	deletionsKufiles]}(j[  (a48b6476b5962ff48696ee69a77638f37dee96d0filenameqpersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/AlterationMyBatisRepository.javastatusmodifiedj  Kj  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/19a11426c67a6c265f96a9ada1b58b6c55d2994f/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepository.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/19a11426c67a6c265f96a9ada1b58b6c55d2994f/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepository.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepository.java?ref=19a11426c67a6c265f96a9ada1b58b6c55d2994fpatchX  @@ -36,8 +36,10 @@ public List<AlterationCountByGene> getSampleAlterationGeneCounts(Set<MolecularPr
             || (molecularProfileCaseIdentifiers == null || molecularProfileCaseIdentifiers.isEmpty())
             || allAlterationsExcludedDriverAnnotation(alterationFilter)
             || allAlterationsExcludedMutationStatus(alterationFilter)
-            || allAlterationsExcludedDriverTierAnnotation(alterationFilter)) {
-            return Collections.emptyList();
+            || allAlterationsExcludedDriverTierAnnotation(alterationFilter)
+        ) {
+            // We want a mutable empty list:
+            return new ArrayList<>();
         }
 
         Set<String> molecularProfileIds = molecularProfileCaseIdentifiers.stream()uau(8acd3df44484464f15a25f7d12f88b4b75f48265}(sha(8acd3df44484464f15a25f7d12f88b4b75f48265node_idEC_kwDOAe-hB9oAKDhhY2QzZGY0NDQ4NDQ2NGYxNWEyNWY3ZDEyZjg4YjRiNzVmNDgyNjUcommit}(author}(name
Ino de Bruijnemailino@ino.biodate2023-07-07T18:02:42Zu	committer}(j  GitHubj  noreply@github.comj  2023-07-07T18:02:42ZumessageAdd Java 11 as requirementtree}(j  (7e2a666d2dc2fbbc30f64fae7231d67a095a0969urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/7e2a666d2dc2fbbc30f64fae7231d67a095a0969uj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/8acd3df44484464f15a25f7d12f88b4b75f48265
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkqFNCCRBK7hj4Ov3rIwAAVc8IABs3/BEFDSYMAPrhyp2f4zC4
pjtmgfPpMs41azZuAm6reQZMr/weNhwOZ3xzdV4ib2QClwXaXbzFlDc0hanAfbcj
0LhOd9/di4Z5UDNE+cSeDB+y/bt8YvqVpH3BV+gmCsO7RJxH/IiZ6BOu7KmmfqM5
1jcwJuMFaochm8h8N21X/xH3y591e/mYtEwGLuSxpL8QhLrA0CCSuzHtT2zWVwQ1
xHBliUDGIoQ6NUbrFswuuW4ARSELFX35ldY+g7ILM7XRV1Fy2tFqAqtKYoJbrxEk
YpEBy/oRJEWDPnKXD68ch4bDKR59zKEpmpYz64qPDELyE10qS4nmzsRBW2KLgF8=
=9LZW
-----END PGP SIGNATURE-----
payloadtree 7e2a666d2dc2fbbc30f64fae7231d67a095a0969
parent 2d79405d9e241719c0bc171bbb094d7f6d07559d
author Ino de Bruijn <ino@ino.bio> 1688752962 -0400
committer GitHub <noreply@github.com> 1688752962 -0400

Add Java 11 as requirementuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8acd3df44484464f15a25f7d12f88b4b75f48265html_urlXhttps://github.com/cBioPortal/cbioportal/commit/8acd3df44484464f15a25f7d12f88b4b75f48265comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/8acd3df44484464f15a25f7d12f88b4b75f48265/commentsj  }(logininodbidJZ j  MDQ6VXNlcjEzMzQwMDQ=
avatar_url3https://avatars.githubusercontent.com/u/1334004?v=4gravatar_idh5j  "https://api.github.com/users/inodbj  https://github.com/inodb
followers_url,https://api.github.com/users/inodb/followers
following_url9https://api.github.com/users/inodb/following{/other_user}	gists_url2https://api.github.com/users/inodb/gists{/gist_id}starred_url9https://api.github.com/users/inodb/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/inodb/subscriptionsorganizations_url'https://api.github.com/users/inodb/orgs	repos_url(https://api.github.com/users/inodb/repos
events_url3https://api.github.com/users/inodb/events{/privacy}received_events_url2https://api.github.com/users/inodb/received_eventstypeUser
site_adminuj  }(j  web-flowj  J/j  MDQ6VXNlcjE5ODY0NDQ3j  4https://avatars.githubusercontent.com/u/19864447?v=4j
  h5j  %https://api.github.com/users/web-flowj  https://github.com/web-flowj
  /https://api.github.com/users/web-flow/followersj
  <https://api.github.com/users/web-flow/following{/other_user}j
  5https://api.github.com/users/web-flow/gists{/gist_id}j

  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j
  3https://api.github.com/users/web-flow/subscriptionsj
  *https://api.github.com/users/web-flow/orgsj
  +https://api.github.com/users/web-flow/reposj
  6https://api.github.com/users/web-flow/events{/privacy}j
  5https://api.github.com/users/web-flow/received_eventsj
  Userj
  uparents]}(j  (2d79405d9e241719c0bc171bbb094d7f6d07559dj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2d79405d9e241719c0bc171bbb094d7f6d07559dj  Xhttps://github.com/cBioPortal/cbioportal/commit/2d79405d9e241719c0bc171bbb094d7f6d07559duastats}(totalK	additionsK	deletionsKufiles]}(j  (d6b2fed8815f142f956f0b55758708a7505d23a6filename>docs/deployment/deploy-without-docker/Software-Requirements.mdstatusmodifiedj2
  Kj3
  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/8acd3df44484464f15a25f7d12f88b4b75f48265/docs%2Fdeployment%2Fdeploy-without-docker%2FSoftware-Requirements.mdraw_urlhttps://github.com/cBioPortal/cbioportal/raw/8acd3df44484464f15a25f7d12f88b4b75f48265/docs%2Fdeployment%2Fdeploy-without-docker%2FSoftware-Requirements.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fdeploy-without-docker%2FSoftware-Requirements.md?ref=8acd3df44484464f15a25f7d12f88b4b75f48265patchX.  @@ -16,7 +16,7 @@ The session service uses MongoDB 3.6.6
 
 ## Java
 
-As of this writing, the cBioPortal can be compiled and run from Java 8.0 and above.  The software can be found and download from the [Oracle](https://www.oracle.com/us/technologies/java/overview/index.html) website.
+As of this writing, the cBioPortal can be compiled and run from Java 11 and above.  The software can be found and download from the [Oracle](https://www.oracle.com/us/technologies/java/overview/index.html) website.
 
 On Ubuntu:  ```sudo apt-get install default-jdk```
 uau(07136cda35240bf9ccf035ae45a762a7c62139f0}(sha(07136cda35240bf9ccf035ae45a762a7c62139f0node_idEC_kwDOAe-hB9oAKDA3MTM2Y2RhMzUyNDBiZjljY2YwMzVhZTQ1YTc2MmE3YzYyMTM5ZjAcommit}(author}(name	Bryan Laiemaillaib1@mskcc.orgdate2023-07-19T20:48:03Zu	committer}(jO
  	Bryan LaijQ
  laib1@mskcc.orgjS
  2023-07-19T20:48:03Zumessage)update one-sided fisher test to two-sidedtree}(jG
  (8f51563c3d6f8d794bdd8e2ef8922faf4f53e203urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/8f51563c3d6f8d794bdd8e2ef8922faf4f53e203uj_
  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/07136cda35240bf9ccf035ae45a762a7c62139f0
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj_
  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/07136cda35240bf9ccf035ae45a762a7c62139f0html_urlXhttps://github.com/cBioPortal/cbioportal/commit/07136cda35240bf9ccf035ae45a762a7c62139f0comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/07136cda35240bf9ccf035ae45a762a7c62139f0/commentsjM
  NjU
  Nparents]}(jG
  (9e90a2ab3e943f9840acbd6e607ca3912a45f210j_
  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9e90a2ab3e943f9840acbd6e607ca3912a45f210jk
  Xhttps://github.com/cBioPortal/cbioportal/commit/9e90a2ab3e943f9840acbd6e607ca3912a45f210uastats}(totalKK	additionsK=	deletionsKufiles](}(jG
  (16073e48ff0caa8feab78e54ecfb5919ca20eb91filenameIcore/src/main/java/org/mskcc/cbio/portal/servlet/CalcFisherExactTest.javastatusmodifiedjx
  Kjy
  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/07136cda35240bf9ccf035ae45a762a7c62139f0/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/07136cda35240bf9ccf035ae45a762a7c62139f0/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.java?ref=07136cda35240bf9ccf035ae45a762a7c62139f0patchX'  @@ -44,13 +44,13 @@
 import org.mskcc.cbio.portal.stats.FisherExact;
 
 /**
- * Calculate the cumulative (one-tail) p-value out of fisher exact test
+ * Calculate the cumulative (two-tail) p-value out of fisher exact test
  * 
  * @param a a, b, c, d are the four cells in a 2x2 matrix
  * @param b
  * @param c
  * @param d
- * @return one-tailed P-value (right or left, whichever is smallest)
+ * @return two-tailed P-value (right or left, whichever is smallest)
  * 
  */
 public class CalcFisherExactTest extends HttpServlet  {
@@ -86,7 +86,7 @@ protected void doPost(HttpServletRequest httpServletRequest,
                 int c = Integer.parseInt(dataSet.split(" ")[2]);
                 int d = Integer.parseInt(dataSet.split(" ")[3]);    
                 FisherExact fisher = new FisherExact(a + b + c + d);
-                double pValue = fisher.getCumlativeP(a, b, c, d);
+                double pValue = fisher.getTwoTailedP(a, b, c, d);
                 result = result.concat(String.valueOf(pValue) + " ");                
             }
         }u}(jG
  (92f8f83955924145d906564446465c5750ab3d2fj~
  =core/src/main/java/org/mskcc/cbio/portal/stats/OddsRatio.javaj
  modifiedjx
  Kjy
  Kj
  Kj
  https://github.com/cBioPortal/cbioportal/blob/07136cda35240bf9ccf035ae45a762a7c62139f0/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.javaj
  https://github.com/cBioPortal/cbioportal/raw/07136cda35240bf9ccf035ae45a762a7c62139f0/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.javaj
  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.java?ref=07136cda35240bf9ccf035ae45a762a7c62139f0j
  X  @@ -87,7 +87,7 @@ public OddsRatio(ProfileDataSummary pDataSummary, String geneA, String geneB) {
 
         oddsRatio = ((double) (a * d)) / ((double) (b * c));
         FisherExact fisher = new FisherExact(a + b + c + d);
-        pValue = fisher.getCumlativeP(a, b, c, d);
+        pValue = fisher.getTwoTailedP(a, b, c, d);
         lowerConfidenceInterval = Math.exp(Math.log(oddsRatio) - 1.96 * (Math.sqrt(1 / (double) a
                 + 1 / (double) b + 1 / (double) c + 1 / (double) d)));
         upperConfidenceInterval = Math.exp(Math.log(oddsRatio) + 1.96 * (Math.sqrt(1 / (double) a
@@ -103,7 +103,7 @@ public double getOddsRatio() {
         return oddsRatio;
     }
 
-    public double getCumulativeP() {
+    public double getTwoTailedP() {
         return pValue;
     }
 u}(jG
  (c1c4adac53791a81208af5b00182bdaa40e6f0fej~
  Jcore/src/main/java/org/mskcc/cbio/portal/util/EnrichmentsAnalysisUtil.javaj
  modifiedjx
  Kjy
  Kj
  Kj
  https://github.com/cBioPortal/cbioportal/blob/07136cda35240bf9ccf035ae45a762a7c62139f0/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FEnrichmentsAnalysisUtil.javaj
  https://github.com/cBioPortal/cbioportal/raw/07136cda35240bf9ccf035ae45a762a7c62139f0/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FEnrichmentsAnalysisUtil.javaj
  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FEnrichmentsAnalysisUtil.java?ref=07136cda35240bf9ccf035ae45a762a7c62139f0j
  X  @@ -652,7 +652,7 @@ private double runFisherExactTest(HashMap<Integer, String> singleGeneCaseValueMa
             }
         }
         FisherExact fisher = new FisherExact(a + b + c + d);
-        return fisher.getCumlativeP(a, b, c, d);
+        return fisher.getTwoTailedP(a, b, c, d);
     }
 
     private String getCytoband(int geneticEntityId, String geneticProfileStableId) {u}(jG
  (06377765dfed89750dc17672a9cb7f4cfefca759j~
  Ccore/src/test/java/org/mskcc/cbio/portal/stats/TestFisherExact.javaj
  modifiedjx
  Kjy
  Kj
  Kj
  https://github.com/cBioPortal/cbioportal/blob/07136cda35240bf9ccf035ae45a762a7c62139f0/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestFisherExact.javaj
  https://github.com/cBioPortal/cbioportal/raw/07136cda35240bf9ccf035ae45a762a7c62139f0/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestFisherExact.javaj
  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestFisherExact.java?ref=07136cda35240bf9ccf035ae45a762a7c62139f0j
  XO  @@ -39,7 +39,7 @@ public class TestFisherExact extends TestCase {
 
     public void testFisherExact() {
         FisherExact fisher = new FisherExact(43 + 2 + 17 + 7);
-        double p = fisher.getCumlativeP(43, 2, 17, 7);
+        double p = fisher.getTwoTailedP(43, 2, 17, 7);
         assertEquals(0.006653, p, 0.00001);
     }
 }u}(jG
  (75c20f31b5a3246825d14802b12fe2a248db2c91j~
  Acore/src/test/java/org/mskcc/cbio/portal/stats/TestOddsRatio.javaj
  modifiedjx
  Kjy
  Kj
  Kj
  https://github.com/cBioPortal/cbioportal/blob/07136cda35240bf9ccf035ae45a762a7c62139f0/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.javaj
  https://github.com/cBioPortal/cbioportal/raw/07136cda35240bf9ccf035ae45a762a7c62139f0/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.javaj
  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.java?ref=07136cda35240bf9ccf035ae45a762a7c62139f0j
  X  @@ -70,7 +70,7 @@ public void testFisherExact() throws IOException {
 
         OddsRatio oddsRatio = new OddsRatio(pDataSummary, "BRCA1", "BRCA2");
         double oddsRatioValue = oddsRatio.getOddsRatio();
-        double p = oddsRatio.getCumulativeP();
+        double p = oddsRatio.getTwoTailedP();
         assertEquals(0.16666, oddsRatioValue, 0.0001);
         assertEquals(0.0849, p, 0.0001);
         //System.out.println (oddsRatio.getRCommand());u}(jG
  (ea7d3d653e00ae80f179717fa6f02d7409dfba19j~
  docs/user-guide/faq.mdj
  modifiedjx
  Kjy
  Kj
  Kj
  qhttps://github.com/cBioPortal/cbioportal/blob/07136cda35240bf9ccf035ae45a762a7c62139f0/docs%2Fuser-guide%2Ffaq.mdj
  phttps://github.com/cBioPortal/cbioportal/raw/07136cda35240bf9ccf035ae45a762a7c62139f0/docs%2Fuser-guide%2Ffaq.mdj
  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fuser-guide%2Ffaq.md?ref=07136cda35240bf9ccf035ae45a762a7c62139f0j
  X  @@ -146,7 +146,7 @@ Group Comparison is a suite of analysis features which allows a user to compare
 - Other tabs
     - 2 groups
         - Continuous data: one-sided t-test
-        - Categorical data: one-sided Fisher's exact test
+        - Categorical data: two-sided Fisher's exact test
     - 3 or more groups
         - Continuous data: one-way ANOVA
         - Categorical data: Chi-squared testu}(jG
  (3ea53acf77ec5c9fdaefb19fc9864e431e4b655ej~
  upersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/AlterationMyBatisRepositoryTest.javaj
  modifiedjx
  Kjy
  Kj
  Kj
  https://github.com/cBioPortal/cbioportal/blob/07136cda35240bf9ccf035ae45a762a7c62139f0/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.javaj
  https://github.com/cBioPortal/cbioportal/raw/07136cda35240bf9ccf035ae45a762a7c62139f0/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.javaj
  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.java?ref=07136cda35240bf9ccf035ae45a762a7c62139f0j
  X  @@ -1034,7 +1034,7 @@ public void getPatientStructuralVariantCountIncludeCustomDriverAnnotationsInclud
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        alterationFilter.setSelectedTiers(Select.byValues(List.of("Class 2")));
+        alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Class 2")));
         alterationFilter.setIncludeUnknownTier(true);
         List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,
@@ -1049,7 +1049,7 @@ public void getPatientStructuralVariantCountIncludeCustomDriverAnnotationsExclud
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        alterationFilter.setSelectedTiers(Select.byValues(List.of("Class 2")));
+        alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Class 2")));
         alterationFilter.setIncludeUnknownTier(false);
         List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,u}(jG
  (8113cc63f7380d8cff4cb9026990fc7050114c95j~
  Oservice/src/main/java/org/cbioportal/service/util/AlterationEnrichmentUtil.javaj
  modifiedjx
  Kjy
  Kj
  Kj
  https://github.com/cBioPortal/cbioportal/blob/07136cda35240bf9ccf035ae45a762a7c62139f0/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javaj
  https://github.com/cBioPortal/cbioportal/raw/07136cda35240bf9ccf035ae45a762a7c62139f0/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javaj
  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.java?ref=07136cda35240bf9ccf035ae45a762a7c62139f0j
  X  @@ -132,7 +132,7 @@ public List<AlterationEnrichment> createAlterationEnrichments(Map<String, Pair<L
                         int alteredOnlyInQueryGenesCount = counts.get(0).getProfiledCount()
                             - counts.get(0).getAlteredCount();
 
-                        pValue = fisherExactTestCalculator.getCumulativePValue(alteredInNoneCount,
+                        pValue = fisherExactTestCalculator.getTwoTailedPValue(alteredInNoneCount,
                             counts.get(1).getAlteredCount(), alteredOnlyInQueryGenesCount,
                             counts.get(0).getAlteredCount());
                     } else {u}(jG
  (ed94cad2b5bfc09610d8c17eae97a74684a109ddj~
  Pservice/src/main/java/org/cbioportal/service/util/FisherExactTestCalculator.javaj
  modifiedjx
  K/jy
  K j
  K/j
  https://github.com/cBioPortal/cbioportal/blob/07136cda35240bf9ccf035ae45a762a7c62139f0/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javaj
  https://github.com/cBioPortal/cbioportal/raw/07136cda35240bf9ccf035ae45a762a7c62139f0/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javaj
  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.java?ref=07136cda35240bf9ccf035ae45a762a7c62139f0j
  X(  @@ -40,4 +40,51 @@ public double getCumulativePValue(int a, int b, int c, int d) {
         }
         return p;
     }
+
+    public double getTwoTailedPValue(int a, int b, int c, int d) {
+        
+        int min, i;
+        int n = a + b + c + d;
+        double p = 0;
+        double[] f = new double[n + 1];
+        f[0] = 0.0;
+
+        for (int j = 1; j <= n; j++) {
+            f[j] = f[j - 1] + Math.log(j);
+        }
+
+        double baseP = getPValue(a, b, c, d, f);
+//         in order for a table under consideration to have its p-value included
+//         in the final result, it must have a p-value less than the baseP, i.e.
+//         Fisher's exact test computes the probability, given the observed marginal
+//         frequencies, of obtaining exactly the frequencies observed and any configuration more extreme.
+//         By "more extreme," we mean any configuration (given observed marginals) with a smaller probability of
+//         occurrence in the same direction (one-tailed) or in both directions (two-tailed).
+        
+        int initialA = a, initialB = b, initialC = c, initialD = d;
+        p += baseP;
+        
+        min = (c < b) ? c : b;
+        for (i = 0; i < min; i++) {
+            double tempP = getPValue(++a, --b, --c, ++d, f);
+            if (tempP <= baseP) {
+                p += tempP;
+            }
+        }
+
+        // reset the values to their original so we can repeat this process for the other side
+        a = initialA;
+        b = initialB;
+        c = initialC;
+        d = initialD;
+        
+        min = (a < d) ? a : d;
+        for (i = 0; i < min; i++) {
+            double pTemp = getPValue(--a, ++b, ++c, --d, f);
+            if (pTemp <= baseP) {
+                p += pTemp;
+            }
+        }
+        return p;
+    }
 }u}(jG
  (7020d01ef0eaf51b229e44889e165bd1a5b7955bj~
  Sservice/src/test/java/org/cbioportal/service/util/AlterationEnrichmentUtilTest.javaj
  modifiedjx
  Kjy
  Kj
  Kj
  https://github.com/cBioPortal/cbioportal/blob/07136cda35240bf9ccf035ae45a762a7c62139f0/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.javaj
  https://github.com/cBioPortal/cbioportal/raw/07136cda35240bf9ccf035ae45a762a7c62139f0/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.javaj
  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.java?ref=07136cda35240bf9ccf035ae45a762a7c62139f0j
  X  @@ -101,8 +101,8 @@ public void createAlterationEnrichments() throws Exception {
 
         // START: for 2 groups
 
-        Mockito.when(fisherExactTestCalculator.getCumulativePValue(1, 1, 2, 0)).thenReturn(1.0);
-        Mockito.when(fisherExactTestCalculator.getCumulativePValue(2, 0, 0, 2)).thenReturn(0.3);
+        Mockito.when(fisherExactTestCalculator.getTwoTailedPValue(1, 1, 2, 0)).thenReturn(1.0);
+        Mockito.when(fisherExactTestCalculator.getTwoTailedPValue(2, 0, 0, 2)).thenReturn(0.3);
 
         List<AlterationEnrichment> result = alterationEnrichmentUtil.createAlterationEnrichments(
                 mutationCountsbyEntrezGeneIdAndGroup);ueu(793d2dcebc544303e97b77f03fa5f7bfd5db6d7c}(sha(793d2dcebc544303e97b77f03fa5f7bfd5db6d7cnode_idEC_kwDOAe-hB9oAKDc5M2QyZGNlYmM1NDQzMDNlOTdiNzdmMDNmYTVmN2JmZDVkYjZkN2Mcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-05-24T15:20:48Zu	committer}(j
  GitHubj
  noreply@github.comj
  2023-05-24T15:20:48ZumessageFix integration testtree}(j
  (902489a5dbf72158299782a0404055ef8cedcd59urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/902489a5dbf72158299782a0404055ef8cedcd59uj
  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/793d2dcebc544303e97b77f03fa5f7bfd5db6d7c
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkbitQCRBK7hj4Ov3rIwAAqNUIAEBUnz4y31KOnK5oLyYl8a3L
SLtsdWLA0Zle7PNN5+Gvh0f8JXjNuBVkug0mXXY5Y3TTAnXeIJV4vUnC6njkbpUp
xeJOzGT36O8LAf3wDMAnbUbL9yxcxqL5hR+v30GmsWx1CyBX2g/SBMAD0ZBGTo4l
J8z8e9ApZwvg4F8lweBwMy7/3wvymbpF3UzwjEYTNHISY+q6Rj+nxG2IzCP5ZlF4
Ul8F4Ar8SMsLWPczz+eXwO5hPcnD0PXOzc82NXcsfoZmwo9NXjrTYSlEHxJw5WTw
Ybas3n3uo0fG6bPO4yYOaH5fnxpILJVkijO2miVQMU6rf0XLbUwngp34R283pzQ=
=9vgQ
-----END PGP SIGNATURE-----
payloadtree 902489a5dbf72158299782a0404055ef8cedcd59
parent 16da69be4c385ae3d8098baee347fbaf3913c591
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1684941648 -0600
committer GitHub <noreply@github.com> 1684941648 -0600

Fix integration testuuj
  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/793d2dcebc544303e97b77f03fa5f7bfd5db6d7chtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/793d2dcebc544303e97b77f03fa5f7bfd5db6d7ccomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/793d2dcebc544303e97b77f03fa5f7bfd5db6d7c/commentsj
  }(login
dippindotsidJtO j
  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j
  'https://api.github.com/users/dippindotsj
  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj
  }(j   web-flowj  J/j
  MDQ6VXNlcjE5ODY0NDQ3j  4https://avatars.githubusercontent.com/u/19864447?v=4j  h5j
  %https://api.github.com/users/web-flowj
  https://github.com/web-flowj	  /https://api.github.com/users/web-flow/followersj  <https://api.github.com/users/web-flow/following{/other_user}j
  5https://api.github.com/users/web-flow/gists{/gist_id}j  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j  3https://api.github.com/users/web-flow/subscriptionsj  *https://api.github.com/users/web-flow/orgsj  +https://api.github.com/users/web-flow/reposj  6https://api.github.com/users/web-flow/events{/privacy}j  5https://api.github.com/users/web-flow/received_eventsj  Userj  uparents]}(j
  (16da69be4c385ae3d8098baee347fbaf3913c591j
  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/16da69be4c385ae3d8098baee347fbaf3913c591j
  Xhttps://github.com/cBioPortal/cbioportal/commit/16da69be4c385ae3d8098baee347fbaf3913c591uastats}(totalK	additionsK	deletionsK ufiles]}(j
  (3b97d7291ccb4695bca4ba74bc2f28505bace9e3filename#test/integration/test_load_study.shstatusmodifiedj7  Kj8  K changesKblob_url~https://github.com/cBioPortal/cbioportal/blob/793d2dcebc544303e97b77f03fa5f7bfd5db6d7c/test%2Fintegration%2Ftest_load_study.shraw_url}https://github.com/cBioPortal/cbioportal/raw/793d2dcebc544303e97b77f03fa5f7bfd5db6d7c/test%2Fintegration%2Ftest_load_study.shcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/test%2Fintegration%2Ftest_load_study.sh?ref=793d2dcebc544303e97b77f03fa5f7bfd5db6d7cpatchX  @@ -17,6 +17,8 @@ run_in_service cbioportal "cd /cbioportal/core/src/main/scripts/ && perl importG
                           /cbioportal/core/src/test/scripts/test_data/study_es_0/data_gene_panel_testpanel1.txt"
 run_in_service cbioportal "cd /cbioportal/core/src/main/scripts/ && perl importGenePanel.pl --data \
                           /cbioportal/core/src/test/scripts/test_data/study_es_0/data_gene_panel_testpanel2.txt"
+run_in_service cbioportal "cd /cbioportal/core/src/main/scripts/ && ./importGenesetData.pl --data /cbioportal/core/src/test/resources/genesets/study_es_0_genesets.gmt --new-version msigdb_7.5.1 --supp /cbioportal/core/src/test/resources/genesets/study_es_0_supp-genesets.txt"
+run_in_service cbioportal "cd /cbioportal/core/src/main/scripts/ && ./importGenesetHierarchy.pl --data /cbioportal/core/src/test/resources/genesets/study_es_0_tree.yaml"
 
 # dump portal info
 echo "Testing the dump of local portal info directory..."uau(62360dba5a5ce4b227b8dd0a5b4fd11f9b58160c}(sha(62360dba5a5ce4b227b8dd0a5b4fd11f9b58160cnode_idEC_kwDOAe-hB9oAKDYyMzYwZGJhNWE1Y2U0YjIyN2I4ZGQwYTViNGZkMTFmOWI1ODE2MGMcommit}(author}(namealismanemaillisman.aaron@gmail.comdate2023-07-06T15:46:20Zu	committer}(jT  alismanjV  lisman.aaron@gmail.comjX  2023-07-06T15:49:22ZumessageFix multiple gene filtertree}(jL  (77092513dfed2555e10fdd04ab936da71c308e63urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/77092513dfed2555e10fdd04ab936da71c308e63ujd  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/62360dba5a5ce4b227b8dd0a5b4fd11f9b58160c
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujd  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/62360dba5a5ce4b227b8dd0a5b4fd11f9b58160chtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/62360dba5a5ce4b227b8dd0a5b4fd11f9b58160ccomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/62360dba5a5ce4b227b8dd0a5b4fd11f9b58160c/commentsjR  }(loginalismanidJ jN  MDQ6VXNlcjE4NjUyMQ==
avatar_url2https://avatars.githubusercontent.com/u/186521?v=4gravatar_idh5jd  $https://api.github.com/users/alismanjp  https://github.com/alisman
followers_url.https://api.github.com/users/alisman/followers
following_url;https://api.github.com/users/alisman/following{/other_user}	gists_url4https://api.github.com/users/alisman/gists{/gist_id}starred_url;https://api.github.com/users/alisman/starred{/owner}{/repo}subscriptions_url2https://api.github.com/users/alisman/subscriptionsorganizations_url)https://api.github.com/users/alisman/orgs	repos_url*https://api.github.com/users/alisman/repos
events_url5https://api.github.com/users/alisman/events{/privacy}received_events_url4https://api.github.com/users/alisman/received_eventstypeUser
site_adminujZ  }(ju  alisman     jw  J jN  MDQ6VXNlcjE4NjUyMQ==jy  2https://avatars.githubusercontent.com/u/186521?v=4j{  h5jd  $https://api.github.com/users/alismanjp  https://github.com/alismanj~  .https://api.github.com/users/alisman/followersj  ;https://api.github.com/users/alisman/following{/other_user}j  4https://api.github.com/users/alisman/gists{/gist_id}j  ;https://api.github.com/users/alisman/starred{/owner}{/repo}j  2https://api.github.com/users/alisman/subscriptionsj  )https://api.github.com/users/alisman/orgsj  *https://api.github.com/users/alisman/reposj  5https://api.github.com/users/alisman/events{/privacy}j  4https://api.github.com/users/alisman/received_eventsj  Userj  uparents]}(jL  (34425b0c0b48de8ca46fa0ac6072656054308da0jd  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/34425b0c0b48de8ca46fa0ac6072656054308da0jp  Xhttps://github.com/cBioPortal/cbioportal/commit/34425b0c0b48de8ca46fa0ac6072656054308da0uastats}(totalKD	additionsK:	deletionsK
ufiles](}(jL  (e16ee120811499bece7190c473ce31aac5cc8696filenametpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmlstatusmodifiedj  Kj  KchangesK	blob_urlhttps://github.com/cBioPortal/cbioportal/blob/62360dba5a5ce4b227b8dd0a5b4fd11f9b58160c/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/62360dba5a5ce4b227b8dd0a5b4fd11f9b58160c/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=62360dba5a5ce4b227b8dd0a5b4fd11f9b58160cpatchX*  @@ -126,7 +126,7 @@
                     #{sampleIdentifier.getStudyId()}_#{sampleIdentifier.getSampleId()}
                 </foreach>
             </if>
-            <if test="studyViewFilter.geneFilters != null and !geneFilters.isEmpty()">
+            <if test="studyViewFilter.geneFilters != null and !studyViewFilter.geneFilters.isEmpty()">
                 INTERSECT
                 SELECT sample_unique_id
                 FROM genomic_event
@@ -137,12 +137,13 @@
                             <foreach item="molecularProfileId" collection="profileGroup.getMolecularProfileIds()" open="(" separator="," close=")">
                                 #{molecularProfileId}
                             </foreach>
-                            AND hugo_gene_symbol IN
-                            <foreach item="geneFilterQueryList" collection="profileGroup.getGeneQueries()">
-                                <foreach item="geneFilterQuery" collection="geneFilterQueryList" open="(" separator="," close=")">
+                            AND hugo_gene_symbol IN (
+                            <foreach item="geneFilterQueryList" collection="profileGroup.getGeneQueries()" separator=",">
+                                <foreach item="geneFilterQuery" collection="geneFilterQueryList" separator=",">
                                     #{geneFilterQuery.hugoGeneSymbol}
                                 </foreach>
                             </foreach>
+                            )
                         </foreach>
                     </trim>
                 </where>u}(jL  (fe72ed27380dc45cf56f07c11cc0fce91da7cd43j  persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepositoryTest.javaj  modifiedj  K5j  Kj  K;j  https://github.com/cBioPortal/cbioportal/blob/62360dba5a5ce4b227b8dd0a5b4fd11f9b58160c/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaj  https://github.com/cBioPortal/cbioportal/raw/62360dba5a5ce4b227b8dd0a5b4fd11f9b58160c/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.java?ref=62360dba5a5ce4b227b8dd0a5b4fd11f9b58160cj  X:  @@ -3,12 +3,10 @@
 import org.cbioportal.model.AlterationCountByGene;
 import org.cbioportal.model.ClinicalDataCount;
 import org.cbioportal.model.Sample;
+import org.cbioportal.model.util.Select;
 import org.cbioportal.persistence.enums.ClinicalAttributeDataSource;
 import org.cbioportal.persistence.enums.ClinicalAttributeDataType;
-import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
-import org.cbioportal.webparam.ClinicalDataFilter;
-import org.cbioportal.webparam.DataFilterValue;
-import org.cbioportal.webparam.StudyViewFilter;
+import org.cbioportal.webparam.*;
 import org.junit.Assert;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -19,13 +17,12 @@
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 import java.math.BigDecimal;
+import java.util.*;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.function.Function;
 import java.util.stream.Collectors;
-import java.util.ArrayList;
-import java.util.List;
 
 @RunWith(SpringJUnit4ClassRunner.class)
 @ContextConfiguration("/testContextDatabaseClickhouse.xml")
@@ -63,6 +60,24 @@ public void getMutatedGenes() {
         Assert.assertEquals(2, mutations.size());
     }
     
+    @Test
+    public void getMutatedGenesFiltered() {
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(new String[]{"msk_impact_2017"}, null);
+
+        List<StudyViewGeneFilter> studyViewGeneFilters = new ArrayList<>();
+        StudyViewGeneFilter mutationStudyViewGeneFilter = new StudyViewGeneFilter();
+        mutationStudyViewGeneFilter.setMolecularProfileIds(new HashSet<>(Arrays.asList("msk_impact_2017_mutations")));
+        
+        mutationStudyViewGeneFilter.setGeneQueries(getFilters.apply("moo"));
+
+        studyViewGeneFilters.add(mutationStudyViewGeneFilter);
+        
+        studyViewFilter.setGeneFilters(studyViewGeneFilters);
+        
+        List<AlterationCountByGene> mutations = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build());
+        Assert.assertEquals(414, mutations.size());
+    }
+    
     private StudyViewFilter generateStudyViewFilter(
         String[] studyIds,
         List<ClinicalDataFilter> clinicalDataFilters
@@ -98,6 +113,38 @@ private ClinicalDataFilter generateClinicalDataFilter(String attributeId, String
         return dataFilterValue;
     };
     
+    private final Function<String,List<List<GeneFilterQuery>>> getFilters = v -> {
+
+        boolean includeDriver = true;
+        boolean includeVUS = true;
+        boolean includeUnknownOncogenicity = true;
+        boolean includeGermline = true;
+        boolean includeSomatic = true;
+        boolean includeUnknownStatus = true;
+        Select<String> selectedTiers = Select.none();
+        boolean includeUnknownTier = true;
+
+        GeneFilterQuery geneFilterQuery1 = new GeneFilterQuery("SMARCD1", null,
+            null, includeDriver, includeVUS, includeUnknownOncogenicity,  selectedTiers, includeUnknownTier,
+            includeGermline, includeSomatic, includeUnknownStatus);
+
+        GeneFilterQuery geneFilterQuery2 = new GeneFilterQuery("TP53", null,
+            null, includeDriver, includeVUS, includeUnknownOncogenicity,  selectedTiers, includeUnknownTier,
+            includeGermline, includeSomatic, includeUnknownStatus);
+
+        List<List<GeneFilterQuery>> q1 = new ArrayList<>();
+        List<GeneFilterQuery> q2 = new ArrayList<>();
+        List<GeneFilterQuery> q3 = new ArrayList<>();
+        
+        q2.add(geneFilterQuery1);
+        q3.add(geneFilterQuery2);
+        q1.add(q2);
+        q1.add(q3);
+        return q1;
+        
+    };
+    
+    
     private final Function<String, DataFilterValue> mapNumericalValues = v -> {
         DataFilterValue dataFilterValue = new DataFilterValue();
 ueu(9e90a2ab3e943f9840acbd6e607ca3912a45f210}(sha(9e90a2ab3e943f9840acbd6e607ca3912a45f210node_idEC_kwDOAe-hB9oAKDllOTBhMmFiM2U5NDNmOTg0MGFjYmQ2ZTYwN2NhMzkxMmE0NWYyMTAcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-07-18T14:35:24Zu	committer}(j  GitHubj  noreply@github.comj  2023-07-18T14:35:24ZumessageMerge pull request #10267 from jagnathan/fix10221-403-authorized-studies-2

fix 10221 - 403 issue; authentication object is obtained from Security Context.tree}(j  (6aba383c63c4cb688b925e1add592c5635239a16urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/6aba383c63c4cb688b925e1add592c5635239a16uj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/9e90a2ab3e943f9840acbd6e607ca3912a45f210
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJktqMsCRBK7hj4Ov3rIwAAd1YIAEY3e2aNVllR++3O8BCoE07i
2slmQKl30ir6/53C4DLXPSN447VD4w3Cm5cJZX4w92G43cRMOsEms1i24x2Ne33f
kYWQrQ+UEzDZ2UiUKsoBcIzHVtWsJD6oqS5NF4SDs8gosg2f7XUKTJ7yegtbSdgE
ctRxRKaQTg3VNxm+zpA2ZHn5X3L9PolCV7pkqyIrh8tBSaq+TCSkBfI4Qc3f2fOI
NSnqU+k3SdlrkQblGb0qhgNJAV25ltUDlWCxjPre/oD/JfkD+uYfJ6r6yA5l6l3H
3Gsa00dQNlbAUtFIVlr8N2iqtLkBzuVg/LDBG2dASLt/H5uZD1SLquR3Ym5w4Ik=
=1OKS
-----END PGP SIGNATURE-----
payloadX  tree 6aba383c63c4cb688b925e1add592c5635239a16
parent b3400e6aa562d5b7c093300cc94398e5ad0e9e84
parent 660ed0a308629da004c8d44b8cd2ad013ee557e7
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1689690924 -0400
committer GitHub <noreply@github.com> 1689690924 -0400

Merge pull request #10267 from jagnathan/fix10221-403-authorized-studies-2

fix 10221 - 403 issue; authentication object is obtained from Security Context.uuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9e90a2ab3e943f9840acbd6e607ca3912a45f210html_urlXhttps://github.com/cBioPortal/cbioportal/commit/9e90a2ab3e943f9840acbd6e607ca3912a45f210comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/9e90a2ab3e943f9840acbd6e607ca3912a45f210/commentsj  }(login
dippindotsidJtO j  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j  'https://api.github.com/users/dippindotsj  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj  }(j  web-flowj  J/j  MDQ6VXNlcjE5ODY0NDQ3j  4https://avatars.githubusercontent.com/u/19864447?v=4j  h5j  %https://api.github.com/users/web-flowj  https://github.com/web-flowj  /https://api.github.com/users/web-flow/followersj  <https://api.github.com/users/web-flow/following{/other_user}j  5https://api.github.com/users/web-flow/gists{/gist_id}j  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j  3https://api.github.com/users/web-flow/subscriptionsj  *https://api.github.com/users/web-flow/orgsj	  +https://api.github.com/users/web-flow/reposj  6https://api.github.com/users/web-flow/events{/privacy}j
  5https://api.github.com/users/web-flow/received_eventsj  Userj  uparents](}(j  (b3400e6aa562d5b7c093300cc94398e5ad0e9e84j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b3400e6aa562d5b7c093300cc94398e5ad0e9e84j  Xhttps://github.com/cBioPortal/cbioportal/commit/b3400e6aa562d5b7c093300cc94398e5ad0e9e84u}(j  (660ed0a308629da004c8d44b8cd2ad013ee557e7j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/660ed0a308629da004c8d44b8cd2ad013ee557e7j  Xhttps://github.com/cBioPortal/cbioportal/commit/660ed0a308629da004c8d44b8cd2ad013ee557e7uestats}(totalK	additionsK	deletionsKufiles]}(j  (faf514f645f75d2626941d290883336abf1f1352filename9web/src/main/java/org/cbioportal/web/StudyController.javastatusmodifiedj/  Kj0  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/9e90a2ab3e943f9840acbd6e607ca3912a45f210/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/9e90a2ab3e943f9840acbd6e607ca3912a45f210/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.java?ref=9e90a2ab3e943f9840acbd6e607ca3912a45f210patchXb  @@ -23,6 +23,7 @@
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -98,10 +99,10 @@ public ResponseEntity<List<CancerStudy>> getAllStudies(
         @ApiParam("Name of the property that the result list is sorted by")
         @RequestParam(required = false) StudySortBy sortBy,
         @ApiParam("Direction of the sort")
-        @RequestParam(defaultValue = "ASC") Direction direction,
-        @ApiParam(hidden = true, required = false)
-        @RequestParam(required = false) Authentication authentication) {
-        
+        @RequestParam(defaultValue = "ASC") Direction direction)
+        {
+
+        Authentication authentication = null;    
         // Only use this feature on the public portal and make sure it is never used
         // on portals using auth, as in auth setting, different users will have different
         // results.
@@ -115,6 +116,8 @@ public ResponseEntity<List<CancerStudy>> getAllStudies(
                 && direction == Direction.ASC) {
             return new ResponseEntity<>(defaultResponse, HttpStatus.OK);
         }
+        else
+            authentication = SecurityContextHolder.getContext().getAuthentication();
 
         if (projection == Projection.META) {
             HttpHeaders responseHeaders = new HttpHeaders();uau(e1d28eaaf6fb69301625894ddbd34823e1e46776}(sha(e1d28eaaf6fb69301625894ddbd34823e1e46776node_idEC_kwDOAe-hB9oAKGUxZDI4ZWFhZjZmYjY5MzAxNjI1ODk0ZGRiZDM0ODIzZTFlNDY3NzYcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-11T17:59:20Zu	committer}(jL  Djokovic0311jN  .55948986+Djokovic0311@users.noreply.github.comjP  2023-08-11T17:59:20Zumessage1Update GenericAssayEnrichmentServiceImplTest.javatree}(jD  (bf442642fbb40b1ce4d114dcb551a869733a92fburlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/bf442642fbb40b1ce4d114dcb551a869733a92fbuj\  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/e1d28eaaf6fb69301625894ddbd34823e1e46776
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj\  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/e1d28eaaf6fb69301625894ddbd34823e1e46776html_urlXhttps://github.com/cBioPortal/cbioportal/commit/e1d28eaaf6fb69301625894ddbd34823e1e46776comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/e1d28eaaf6fb69301625894ddbd34823e1e46776/commentsjJ  }(loginDjokovic0311idJUjF  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5j\  )https://api.github.com/users/Djokovic0311jh  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminujR  }(jm  Djokovic0311jo  JUjF  MDQ6VXNlcjU1OTQ4OTg2jq  4https://avatars.githubusercontent.com/u/55948986?v=4js  h5j\  )https://api.github.com/users/Djokovic0311jh  https://github.com/Djokovic0311jv  3https://api.github.com/users/Djokovic0311/followersjx  @https://api.github.com/users/Djokovic0311/following{/other_user}jz  9https://api.github.com/users/Djokovic0311/gists{/gist_id}j|  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}j~  7https://api.github.com/users/Djokovic0311/subscriptionsj  .https://api.github.com/users/Djokovic0311/orgsj  /https://api.github.com/users/Djokovic0311/reposj  :https://api.github.com/users/Djokovic0311/events{/privacy}j  9https://api.github.com/users/Djokovic0311/received_eventsj  Userj  uparents]}(jD  (3c91d6c5a7e9a140bdf99bb301e7401fdca11e4cj\  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/3c91d6c5a7e9a140bdf99bb301e7401fdca11e4cjh  Xhttps://github.com/cBioPortal/cbioportal/commit/3c91d6c5a7e9a140bdf99bb301e7401fdca11e4cuastats}(totalK	additionsK	deletionsKufiles]}(jD  (0adf6f5d5562f4ae61784b9d2a953214342295f7filename\service/src/test/java/org/cbioportal/service/impl/GenericAssayEnrichmentServiceImplTest.javastatusmodifiedj  Kj  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/e1d28eaaf6fb69301625894ddbd34823e1e46776/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/e1d28eaaf6fb69301625894ddbd34823e1e46776/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.java?ref=e1d28eaaf6fb69301625894ddbd34823e1e46776patchX}  @@ -29,7 +29,7 @@
 @RunWith(MockitoJUnitRunner.class)
 public class GenericAssayEnrichmentServiceImplTest extends BaseServiceImplTest{
     @InjectMocks
-    private GenericAssayEnrichmentServiceImpl genericAssayEnrichmentServiceImpl;
+    private ExpressionEnrichmentServiceImpl expressionEnrichmentServiceImpl;
     @Mock
     private SampleService sampleService;
     @Mock
@@ -164,7 +164,7 @@ public void getGenericAssayBinaryEnrichments() throws Exception {
             .thenReturn(Arrays.asList(new GenericAssayMeta(HUGO_GENE_SYMBOL_1),
                 new GenericAssayMeta(HUGO_GENE_SYMBOL_2)));
 
-        List<GenericAssayBinaryEnrichment> result = genericAssayEnrichmentServiceImpl.getGenericAssayBinaryEnrichments(MOLECULAR_PROFILE_ID,
+        List<GenericAssayBinaryEnrichment> result = expressionEnrichmentServiceImpl.getGenericAssayBinaryEnrichments(MOLECULAR_PROFILE_ID,
             molecularProfileCaseSets, EnrichmentType.SAMPLE);
 
         Assert.assertEquals(2, result.size());
@@ -227,7 +227,7 @@ public void getGenericAssayCategoricalEnrichments() throws MolecularProfileNotFo
             .thenReturn(Arrays.asList(new GenericAssayMeta(HUGO_GENE_SYMBOL_1),
                 new GenericAssayMeta(HUGO_GENE_SYMBOL_2)));
 
-        List<GenericAssayCategoricalEnrichment> result = genericAssayEnrichmentServiceImpl.getGenericAssayCategoricalEnrichments(MOLECULAR_PROFILE_ID,
+        List<GenericAssayCategoricalEnrichment> result = expressionEnrichmentServiceImpl.getGenericAssayCategoricalEnrichments(MOLECULAR_PROFILE_ID,
             molecularProfileCaseSets, EnrichmentType.SAMPLE);
 
         Assert.assertEquals(2, result.size());uau(13ea407aa949d414021db8e13264db9f7e7b7764}(sha(13ea407aa949d414021db8e13264db9f7e7b7764node_idEC_kwDOAe-hB9oAKDEzZWE0MDdhYTk0OWQ0MTQwMjFkYjhlMTMyNjRkYjlmN2U3Yjc3NjQcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-16T16:54:41Zu	committer}(j  
Jiahang Lij  .55948986+Djokovic0311@users.noreply.github.comj  2023-08-16T17:40:56Zumessagemodify importstree}(j  (46d31f860124eab7b0e900532f16c689654979bcurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/46d31f860124eab7b0e900532f16c689654979bcuj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/13ea407aa949d414021db8e13264db9f7e7b7764
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/13ea407aa949d414021db8e13264db9f7e7b7764html_urlXhttps://github.com/cBioPortal/cbioportal/commit/13ea407aa949d414021db8e13264db9f7e7b7764comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/13ea407aa949d414021db8e13264db9f7e7b7764/commentsj  }(loginDjokovic0311idJUj  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5j  )https://api.github.com/users/Djokovic0311j  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminuj  }(j  Djokovic0311j  JUj  MDQ6VXNlcjU1OTQ4OTg2j  4https://avatars.githubusercontent.com/u/55948986?v=4j  h5j  )https://api.github.com/users/Djokovic0311j  https://github.com/Djokovic0311j  3https://api.github.com/users/Djokovic0311/followersj  @https://api.github.com/users/Djokovic0311/following{/other_user}j  9https://api.github.com/users/Djokovic0311/gists{/gist_id}j  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}j  7https://api.github.com/users/Djokovic0311/subscriptionsj  .https://api.github.com/users/Djokovic0311/orgsj  /https://api.github.com/users/Djokovic0311/reposj  :https://api.github.com/users/Djokovic0311/events{/privacy}j  9https://api.github.com/users/Djokovic0311/received_eventsj  Userj  uparents]}(j  (ab597023c81aa72ceaf935063a40be9dc65053abj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ab597023c81aa72ceaf935063a40be9dc65053abj  Xhttps://github.com/cBioPortal/cbioportal/commit/ab597023c81aa72ceaf935063a40be9dc65053abuastats}(totalK	additionsK	deletionsKufiles]}(j  (79c4ace75a7d37995df135bdbf467389d08608adfilenameOservice/src/main/java/org/cbioportal/service/util/ExpressionEnrichmentUtil.javastatusmodifiedj  Kj  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/13ea407aa949d414021db8e13264db9f7e7b7764/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FExpressionEnrichmentUtil.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/13ea407aa949d414021db8e13264db9f7e7b7764/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FExpressionEnrichmentUtil.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FExpressionEnrichmentUtil.java?ref=13ea407aa949d414021db8e13264db9f7e7b7764patchX  @@ -1,21 +1,38 @@
 package org.cbioportal.service.util;
 
 import java.math.BigDecimal;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.List;
 import java.util.Map.Entry;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
 
-import io.swagger.models.auth.In;
+import org.cbioportal.model.EnrichmentType;
+import org.cbioportal.model.ExpressionEnrichment;
+import org.cbioportal.model.GenericAssayEnrichment;
+import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
+import org.cbioportal.model.GenericAssayMolecularAlteration;
+import org.cbioportal.model.GenomicEnrichment;
+import org.cbioportal.model.GroupStatistics;
+import org.cbioportal.model.GenericAssayCountSummary;
+import org.cbioportal.model.MolecularAlteration;
+import org.cbioportal.model.MolecularProfile;
+import org.cbioportal.model.MolecularProfileCaseIdentifier;
+import org.cbioportal.model.MolecularProfileSamples;
+import org.cbioportal.model.Sample;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.math.NumberUtils;
 import org.apache.commons.math3.stat.StatUtils;
 import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
 import org.apache.commons.math3.stat.inference.ChiSquareTest;
 import org.apache.commons.math3.stat.inference.OneWayAnova;
 import org.apache.commons.math3.stat.inference.TestUtils;
-import org.cbioportal.model.*;
 import org.cbioportal.persistence.MolecularDataRepository;
 import org.cbioportal.service.SampleService;
 import org.springframework.beans.factory.annotation.Autowired;uau(9af1b9927d16ccbd8582a6fb586fb0f589d01fab}(sha(9af1b9927d16ccbd8582a6fb586fb0f589d01fabnode_idEC_kwDOAe-hB9oAKDlhZjFiOTkyN2QxNmNjYmQ4NTgyYTZmYjU4NmZiMGY1ODlkMDFmYWIcommit}(author}(namePrasanna Kumar Jagannathanemail+37613906+jagnathan@users.noreply.github.comdate2023-07-11T17:10:08Zu	committer}(j6  Prasanna Kumar Jagannathanj8  +37613906+jagnathan@users.noreply.github.comj:  2023-07-11T17:10:08Zumessage~Merge branch 'fix10221-403-authorized-studies' of https://github.com/jagnathan/cbioportal into fix10221-403-authorized-studiestree}(j.  (c3246c6519effb74ae7ea54c6eb83abcf5bdd657urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c3246c6519effb74ae7ea54c6eb83abcf5bdd657ujF  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/9af1b9927d16ccbd8582a6fb586fb0f589d01fab
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujF  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9af1b9927d16ccbd8582a6fb586fb0f589d01fabhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/9af1b9927d16ccbd8582a6fb586fb0f589d01fabcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/9af1b9927d16ccbd8582a6fb586fb0f589d01fab/commentsj4  }(login	jagnathanidJR=j0  MDQ6VXNlcjM3NjEzOTA2
avatar_url4https://avatars.githubusercontent.com/u/37613906?v=4gravatar_idh5jF  &https://api.github.com/users/jagnathanjR  https://github.com/jagnathan
followers_url0https://api.github.com/users/jagnathan/followers
following_url=https://api.github.com/users/jagnathan/following{/other_user}	gists_url6https://api.github.com/users/jagnathan/gists{/gist_id}starred_url=https://api.github.com/users/jagnathan/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/jagnathan/subscriptionsorganizations_url+https://api.github.com/users/jagnathan/orgs	repos_url,https://api.github.com/users/jagnathan/repos
events_url7https://api.github.com/users/jagnathan/events{/privacy}received_events_url6https://api.github.com/users/jagnathan/received_eventstypeUser
site_adminuj<  }(jW  	jagnathanjY  JR=j0  MDQ6VXNlcjM3NjEzOTA2j[  4https://avatars.githubusercontent.com/u/37613906?v=4j]  h5jF  &https://api.github.com/users/jagnathanjR  https://github.com/jagnathanj`  0https://api.github.com/users/jagnathan/followersjb  =https://api.github.com/users/jagnathan/following{/other_user}jd  6https://api.github.com/users/jagnathan/gists{/gist_id}jf  =https://api.github.com/users/jagnathan/starred{/owner}{/repo}jh  4https://api.github.com/users/jagnathan/subscriptionsjj  +https://api.github.com/users/jagnathan/orgsjl  ,https://api.github.com/users/jagnathan/reposjn  7https://api.github.com/users/jagnathan/events{/privacy}jp  6https://api.github.com/users/jagnathan/received_eventsjr  Userjt  uparents](}(j.  (8ebab1ae246b01595e6efd5e61eeb5d1c7e4fb00jF  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8ebab1ae246b01595e6efd5e61eeb5d1c7e4fb00jR  Xhttps://github.com/cBioPortal/cbioportal/commit/8ebab1ae246b01595e6efd5e61eeb5d1c7e4fb00u}(j.  (9836b22885675de6b753f141a08f14fcaeb85277jF  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9836b22885675de6b753f141a08f14fcaeb85277jR  Xhttps://github.com/cBioPortal/cbioportal/commit/9836b22885675de6b753f141a08f14fcaeb85277uestats}(totalK 	additionsK 	deletionsK ufiles]u(2b728705436ea9011fb936793a584b14c121d757}(sha(2b728705436ea9011fb936793a584b14c121d757node_idEC_kwDOAe-hB9oAKDJiNzI4NzA1NDM2ZWE5MDExZmI5MzY3OTNhNTg0YjE0YzEyMWQ3NTccommit}(author}(namehaynescdemailhaynescd@chop.edudate2023-07-06T13:17:32Zu	committer}(j  haynescdj  haynescd@chop.eduj  2023-07-06T13:17:32Zumessage!Add test for clinicalDataCount fntree}(j  (68bc32cadb27839dbbdb9efe69d55fcb707c5886urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/68bc32cadb27839dbbdb9efe69d55fcb707c5886uj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/2b728705436ea9011fb936793a584b14c121d757
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2b728705436ea9011fb936793a584b14c121d757html_urlXhttps://github.com/cBioPortal/cbioportal/commit/2b728705436ea9011fb936793a584b14c121d757comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/2b728705436ea9011fb936793a584b14c121d757/commentsj  }(loginhaynescdidJ j  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5j  %https://api.github.com/users/haynescdj  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminuj  }(j  haynescdj  J j  MDQ6VXNlcjMzNjA4OTIwj  4https://avatars.githubusercontent.com/u/33608920?v=4j  h5j  %https://api.github.com/users/haynescdj  https://github.com/haynescdj  /https://api.github.com/users/haynescd/followersj  <https://api.github.com/users/haynescd/following{/other_user}j  5https://api.github.com/users/haynescd/gists{/gist_id}j  <https://api.github.com/users/haynescd/starred{/owner}{/repo}j  3https://api.github.com/users/haynescd/subscriptionsj  *https://api.github.com/users/haynescd/orgsj  +https://api.github.com/users/haynescd/reposj  6https://api.github.com/users/haynescd/events{/privacy}j  5https://api.github.com/users/haynescd/received_eventsj  Userj  uparents]}(j  (24ee286ffaaf7efb9759ff8f822b202ba96d3b44j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/24ee286ffaaf7efb9759ff8f822b202ba96d3b44j  Xhttps://github.com/cBioPortal/cbioportal/commit/24ee286ffaaf7efb9759ff8f822b202ba96d3b44uastats}(totalK	additionsK	deletionsKufiles]}(j  (cfa82a84a4a983f5978fea23901d77878f52f4c6filenamepersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepositoryTest.javastatusmodifiedj  Kj  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/2b728705436ea9011fb936793a584b14c121d757/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/2b728705436ea9011fb936793a584b14c121d757/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.java?ref=2b728705436ea9011fb936793a584b14c121d757patchXa	  @@ -1,6 +1,7 @@
 package org.cbioportal.persistence.mybatiscolumnstore;
 
 import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.ClinicalDataCount;
 import org.cbioportal.model.Sample;
 import org.cbioportal.persistence.enums.ClinicalAttributeDataSource;
 import org.cbioportal.persistence.enums.ClinicalAttributeDataType;
@@ -20,6 +21,7 @@
 import java.math.BigDecimal;
 import java.util.Arrays;
 import java.util.Collections;
+import java.util.Comparator;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 import java.util.ArrayList;
@@ -139,13 +141,13 @@ public void getFilterSamplesWithClinicalDataFilter() {
     }
     
     @Test
-    @Ignore
+    //@Ignore
     public void getFilterSamplesWithCategoricalSampleClinicalDataFilter() {
         StudyViewFilter studyViewFilter = generateStudyViewFilter(
             new String[]{"msk_ch_2020"},null
         );
         CategorizedClinicalDataCountFilter clincalDataCountFilters = CategorizedClinicalDataCountFilter.getBuilder()
-            .setSampleCategoricalClinicalDataFilters(Arrays.asList(generateCategoricalClinicalDataFilter("CANCER_TYPE", new String[]{"Bladder Cancer", "Cancer of Unknown Primary"})))
+            .setSampleCategoricalClinicalDataFilters(Arrays.asList(generateCategoricalClinicalDataFilter("CANCER_TYPE", new String[]{"Bladder Cancer", "Breast Cancer"})))
             .build();
         
         List<Sample> filteredSamples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, clincalDataCountFilters);
@@ -211,4 +213,19 @@ public void getMutatedGenesWithPatientClinicalDataFilterAndSampleClinicalDataFil
         List<AlterationCountByGene> mutatedGenes = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter, clincalDataCountFilters);
         Assert.assertEquals(16, mutatedGenes.size());
     }
+    
+    @Test
+    @Ignore
+    public void getClinicalDataCounts() {
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(
+            new String[]{"msk_ch_2020"},null
+        ); 
+        
+        List<ClinicalDataCount> counts = studyViewMyBatisRepository.getClinicalDataCounts(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build(),
+            List.of("CANCER_TYPE"));
+        
+        Assert.assertEquals(counts.size(), 50);
+        
+        
+    }
 }
\ No newline at end of fileuau(8532fe353fee85e14efc25f5862297f5bdaadb36}(sha(8532fe353fee85e14efc25f5862297f5bdaadb36node_idEC_kwDOAe-hB9oAKDg1MzJmZTM1M2ZlZTg1ZTE0ZWZjMjVmNTg2MjI5N2Y1YmRhYWRiMzYcommit}(author}(name
Ino de Bruijnemailino@ino.biodate2023-06-02T21:55:55Zu	committer}(j  GitHubj  noreply@github.comj  2023-06-02T21:55:55Zumessage fix contact email in dev sectiontree}(j
  (4f040aab4330343d67a886760acd834328e6f1d9urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/4f040aab4330343d67a886760acd834328e6f1d9uj%  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/8532fe353fee85e14efc25f5862297f5bdaadb36
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkemVrCRBK7hj4Ov3rIwAA3NoIAHY5J8ESZjzTVrZY32cqm2KB
KsZKviBYj3q2fNGUKXOchiLPVaf8tuqwpqdmcGXaK6OWUJ7hGArfieiMGvyVZxY1
X2CkaVceCX96rRH/g/+MyFKpoc026cVypjqyGtS7/y8DS92G6Kaq7MwkpTFj01UA
HsHg1DJDEoA05IC3o/cxYyoIrZ5/6d/rzKLI6UN7sNNTUS2MJTjgVaVLzw+1btfd
cWwPrBv45AOmQd5iPa0km0x6s8B53a5Z+y59ova9mmn9QlO3sORbPOL1sGDfEpXp
9ZtT1727Hhuu7KTnImiN14SrLQHOLRdCF0G8BAXM88sgMKoSqQRG6H//Crxyfe4=
=2xUI
-----END PGP SIGNATURE-----
payloadtree 4f040aab4330343d67a886760acd834328e6f1d9
parent 566da57cbc90cb639dd5f63a42a376a397a00e28
author Ino de Bruijn <ino@ino.bio> 1685742955 -0400
committer GitHub <noreply@github.com> 1685742955 -0400

fix contact email in dev sectionuuj%  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8532fe353fee85e14efc25f5862297f5bdaadb36html_urlXhttps://github.com/cBioPortal/cbioportal/commit/8532fe353fee85e14efc25f5862297f5bdaadb36comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/8532fe353fee85e14efc25f5862297f5bdaadb36/commentsj  }(logininodbidJZ j  MDQ6VXNlcjEzMzQwMDQ=
avatar_url3https://avatars.githubusercontent.com/u/1334004?v=4gravatar_idh5j%  "https://api.github.com/users/inodbj3  https://github.com/inodb
followers_url,https://api.github.com/users/inodb/followers
following_url9https://api.github.com/users/inodb/following{/other_user}	gists_url2https://api.github.com/users/inodb/gists{/gist_id}starred_url9https://api.github.com/users/inodb/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/inodb/subscriptionsorganizations_url'https://api.github.com/users/inodb/orgs	repos_url(https://api.github.com/users/inodb/repos
events_url3https://api.github.com/users/inodb/events{/privacy}received_events_url2https://api.github.com/users/inodb/received_eventstypeUser
site_adminuj  }(j8  web-flowj:  J/j  MDQ6VXNlcjE5ODY0NDQ3j<  4https://avatars.githubusercontent.com/u/19864447?v=4j>  h5j%  %https://api.github.com/users/web-flowj3  https://github.com/web-flowjA  /https://api.github.com/users/web-flow/followersjC  <https://api.github.com/users/web-flow/following{/other_user}jE  5https://api.github.com/users/web-flow/gists{/gist_id}jG  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jI  3https://api.github.com/users/web-flow/subscriptionsjK  *https://api.github.com/users/web-flow/orgsjM  +https://api.github.com/users/web-flow/reposjO  6https://api.github.com/users/web-flow/events{/privacy}jQ  5https://api.github.com/users/web-flow/received_eventsjS  UserjU  uparents]}(j
  (566da57cbc90cb639dd5f63a42a376a397a00e28j%  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/566da57cbc90cb639dd5f63a42a376a397a00e28j3  Xhttps://github.com/cBioPortal/cbioportal/commit/566da57cbc90cb639dd5f63a42a376a397a00e28uastats}(totalK	additionsK	deletionsKufiles]}(j
  (4b87d00b1e19cded2708111ccd3b2d293f7d5606filenamedocs/development/README.mdstatusmodifiedjo  Kjp  KchangesKblob_urluhttps://github.com/cBioPortal/cbioportal/blob/8532fe353fee85e14efc25f5862297f5bdaadb36/docs%2Fdevelopment%2FREADME.mdraw_urlthttps://github.com/cBioPortal/cbioportal/raw/8532fe353fee85e14efc25f5862297f5bdaadb36/docs%2Fdevelopment%2FREADME.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdevelopment%2FREADME.md?ref=8532fe353fee85e14efc25f5862297f5bdaadb36patchX  @@ -12,4 +12,4 @@ Note that cBioPortal is split into a backend project (api) and a frontend projec
 - [Backend](http://www.github.com/cbioportal/cbioportal)
   (Java, Spring, MySQL, MongoDB)
 
-If you are interested in coordinating the development of new features, please contact cbioportal@cbio.mskcc.org or reach out on https://slack.cbioportal.org.
\ No newline at end of file
+If you are interested in coordinating the development of new features, please contact cbioportal@cbioportal.org or reach out on https://slack.cbioportal.org.uau(4ac327bf13f47d36dd9a393dcece5583aa1896e4}(sha(4ac327bf13f47d36dd9a393dcece5583aa1896e4node_idEC_kwDOAe-hB9oAKDRhYzMyN2JmMTNmNDdkMzZkZDlhMzkzZGNlY2U1NTgzYWExODk2ZTQcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-07-25T19:38:55Zu	committer}(j  GitHubj  noreply@github.comj  2023-07-25T19:38:55ZumessageLMerge pull request #10297 from cBioPortal/frontend-v5.3.15

Frontend v5.3.15tree}(j  (640b0e453fe6d503451e1d75f681a0dfeb6211d4urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/640b0e453fe6d503451e1d75f681a0dfeb6211d4uj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/4ac327bf13f47d36dd9a393dcece5583aa1896e4
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkwCTPCRBK7hj4Ov3rIwAAzMkIACowitZ+maFe/lRBP9qh6SCI
vr2y66u9UbDIn4qp7NMwJ0f5bMcReNDl2f83gEYrYwdOTqqSSZ1h8ECSXGpv9CMp
k3OFbuubWwOihz8NEkR83rpV+H2T5ZwVOTS7p/hG8F1I+cBxVJ//SLWCPUqmzuQe
SIYrq6+yslUyyAr4OnHnRf3o9k6OD7FqSKgcl8mBy6A9F8CtWKfp4Jnm9KZoxGQz
h/jr1Xcwth9r9JAHtwYtoZX+kHSlBZJBDQHiZzUW7lcLSDPLxfg41OWXxamTS8P8
6U3ptSVxBWcWEadfr5Yw+eR5zB3+YUQU9S8MmDXnFCVrtUuQREOQRYAb+p5gHsQ=
=6RnE
-----END PGP SIGNATURE-----
payloadXe  tree 640b0e453fe6d503451e1d75f681a0dfeb6211d4
parent 7339191fc545e3a3626aaf96cc2e6e7f63bc2292
parent 8412f5e0fefbebea45ef73fb9d9e2f85b641cd37
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1690313935 -0400
committer GitHub <noreply@github.com> 1690313935 -0400

Merge pull request #10297 from cBioPortal/frontend-v5.3.15

Frontend v5.3.15uuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4ac327bf13f47d36dd9a393dcece5583aa1896e4html_urlXhttps://github.com/cBioPortal/cbioportal/commit/4ac327bf13f47d36dd9a393dcece5583aa1896e4comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/4ac327bf13f47d36dd9a393dcece5583aa1896e4/commentsj  }(login
dippindotsidJtO j  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j  'https://api.github.com/users/dippindotsj  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj  }(j  web-flowj  J/j  MDQ6VXNlcjE5ODY0NDQ3j  4https://avatars.githubusercontent.com/u/19864447?v=4j  h5j  %https://api.github.com/users/web-flowj  https://github.com/web-flowj  /https://api.github.com/users/web-flow/followersj  <https://api.github.com/users/web-flow/following{/other_user}j  5https://api.github.com/users/web-flow/gists{/gist_id}j  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j  3https://api.github.com/users/web-flow/subscriptionsj  *https://api.github.com/users/web-flow/orgsj  +https://api.github.com/users/web-flow/reposj  6https://api.github.com/users/web-flow/events{/privacy}j  5https://api.github.com/users/web-flow/received_eventsj  Userj  uparents](}(j  (7339191fc545e3a3626aaf96cc2e6e7f63bc2292j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7339191fc545e3a3626aaf96cc2e6e7f63bc2292j  Xhttps://github.com/cBioPortal/cbioportal/commit/7339191fc545e3a3626aaf96cc2e6e7f63bc2292u}(j  (8412f5e0fefbebea45ef73fb9d9e2f85b641cd37j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8412f5e0fefbebea45ef73fb9d9e2f85b641cd37j  Xhttps://github.com/cBioPortal/cbioportal/commit/8412f5e0fefbebea45ef73fb9d9e2f85b641cd37uestats}(totalK	additionsK	deletionsKufiles]}(j  (f4eaa8507bf6b2ec0641df47e213b6ce70cff134filenamepom.xmlstatusmodifiedj  Kj  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/4ac327bf13f47d36dd9a393dcece5583aa1896e4/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/4ac327bf13f47d36dd9a393dcece5583aa1896e4/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=4ac327bf13f47d36dd9a393dcece5583aa1896e4patchXY  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.14</frontend.version>
+    <frontend.version>v5.3.15</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(1a115f6c28261e2273e844aa5251f6aad6be90f7}(sha(1a115f6c28261e2273e844aa5251f6aad6be90f7node_idEC_kwDOAe-hB9oAKDFhMTE1ZjZjMjgyNjFlMjI3M2U4NDRhYTUyNTFmNmFhZDZiZTkwZjccommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-07-18T16:24:54Zu	committer}(j  Gaofei Zhaoj	  ,15748980+dippindots@users.noreply.github.comj  2023-07-18T19:43:36ZumessageFrontend v5.3.14tree}(j  (80a6dcc1ebeb04b65464effa596b77ac1b7daf0curlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/80a6dcc1ebeb04b65464effa596b77ac1b7daf0cuj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/1a115f6c28261e2273e844aa5251f6aad6be90f7
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1a115f6c28261e2273e844aa5251f6aad6be90f7html_urlXhttps://github.com/cBioPortal/cbioportal/commit/1a115f6c28261e2273e844aa5251f6aad6be90f7comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/1a115f6c28261e2273e844aa5251f6aad6be90f7/commentsj  }(login
dippindotsidJtO j  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j  'https://api.github.com/users/dippindotsj#  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj
  }(j(  
dippindotsj*  JtO j  MDQ6VXNlcjE1NzQ4OTgwj,  4https://avatars.githubusercontent.com/u/15748980?v=4j.  h5j  'https://api.github.com/users/dippindotsj#  https://github.com/dippindotsj1  1https://api.github.com/users/dippindots/followersj3  >https://api.github.com/users/dippindots/following{/other_user}j5  7https://api.github.com/users/dippindots/gists{/gist_id}j7  >https://api.github.com/users/dippindots/starred{/owner}{/repo}j9  5https://api.github.com/users/dippindots/subscriptionsj;  ,https://api.github.com/users/dippindots/orgsj=  -https://api.github.com/users/dippindots/reposj?  8https://api.github.com/users/dippindots/events{/privacy}jA  7https://api.github.com/users/dippindots/received_eventsjC  UserjE  uparents]}(j  (78dbe9eb8dd58dc5bf3f89c8edc36ea1c920c581j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/78dbe9eb8dd58dc5bf3f89c8edc36ea1c920c581j#  Xhttps://github.com/cBioPortal/cbioportal/commit/78dbe9eb8dd58dc5bf3f89c8edc36ea1c920c581uastats}(totalK	additionsK	deletionsKufiles]}(j  (7e4f1b32518ea8c65e2325854dd92b65564f558cfilenamepom.xmlstatusmodifiedj_  Kj`  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/1a115f6c28261e2273e844aa5251f6aad6be90f7/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/1a115f6c28261e2273e844aa5251f6aad6be90f7/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=1a115f6c28261e2273e844aa5251f6aad6be90f7patchXY  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.13</frontend.version>
+    <frontend.version>v5.3.14</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(ae160c6a3a72faee2afcebed8895392f3281b3d2}(sha(ae160c6a3a72faee2afcebed8895392f3281b3d2node_idEC_kwDOAe-hB9oAKGFlMTYwYzZhM2E3MmZhZWUyYWZjZWJlZDg4OTUzOTJmMzI4MWIzZDIcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-14T20:40:44Zu	committer}(j|  GitHubj~  noreply@github.comj  2023-08-14T20:40:44Zumessage/Merge branch 'master' into ritikakundra-patch-2tree}(jt  (0cc758a07669bc35713c792afbbc825d00f2981curlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/0cc758a07669bc35713c792afbbc825d00f2981cuj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/ae160c6a3a72faee2afcebed8895392f3281b3d2
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk2pFMCRBK7hj4Ov3rIwAAfRgIABNNxoiSmf8frUWtheMzWBUp
QPknlV1DD8HmvHJQL/0dU1p/AETEljJzL9FDRLv3ohDPRXm8L4TUZYujPltSZj0w
A2Ca0ihdigOlmBRtItH1+iZKZ0syE//0njsgqXFc0PJb3FVGaQi52kAYDjy67OGm
6NrTlyUWKjUpgrOdsoc2G5FP0T8BU/sjaV0mtl8g4q1XcONdwxtftbjulObqsjki
e2nQACJt5F/dBYpVOFuAWFYEm1cXQ0YQH2l3w6UQsx/4UrBiKXbp34lkS0K0ImMe
Eh4xuXsOuGQamn/qm9n4Z+qkTkdMwoRG74Gf/6H9XqTEMty+SPAzB1OpS2tcKu0=
=cEK/
-----END PGP SIGNATURE-----
payloadXH  tree 0cc758a07669bc35713c792afbbc825d00f2981c
parent 4eea1583ac540192cc4eae440fd1e5cead3b6b96
parent 7f523c88026c238576852145307d59d23a5395a1
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1692045644 -0400
committer GitHub <noreply@github.com> 1692045644 -0400

Merge branch 'master' into ritikakundra-patch-2uuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ae160c6a3a72faee2afcebed8895392f3281b3d2html_urlXhttps://github.com/cBioPortal/cbioportal/commit/ae160c6a3a72faee2afcebed8895392f3281b3d2comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/ae160c6a3a72faee2afcebed8895392f3281b3d2/commentsjz  }(login
dippindotsidJtO jv  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j  'https://api.github.com/users/dippindotsj  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj  }(j  web-flowj  J/jv  MDQ6VXNlcjE5ODY0NDQ3j  4https://avatars.githubusercontent.com/u/19864447?v=4j  h5j  %https://api.github.com/users/web-flowj  https://github.com/web-flowj  /https://api.github.com/users/web-flow/followersj  <https://api.github.com/users/web-flow/following{/other_user}j  5https://api.github.com/users/web-flow/gists{/gist_id}j  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j  3https://api.github.com/users/web-flow/subscriptionsj  *https://api.github.com/users/web-flow/orgsj  +https://api.github.com/users/web-flow/reposj  6https://api.github.com/users/web-flow/events{/privacy}j  5https://api.github.com/users/web-flow/received_eventsj  Userj  uparents](}(jt  (4eea1583ac540192cc4eae440fd1e5cead3b6b96j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4eea1583ac540192cc4eae440fd1e5cead3b6b96j  Xhttps://github.com/cBioPortal/cbioportal/commit/4eea1583ac540192cc4eae440fd1e5cead3b6b96u}(jt  (7f523c88026c238576852145307d59d23a5395a1j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7f523c88026c238576852145307d59d23a5395a1j  Xhttps://github.com/cBioPortal/cbioportal/commit/7f523c88026c238576852145307d59d23a5395a1uestats}(totalM	additionsMR	deletionsMgufiles](}(jt  (7bf80ceff714bc032f95041c2b15d0b2d4ebd249filename.github/release-drafter.ymlstatusmodifiedj  Kj  KchangesKblob_urlthttps://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/.github%2Frelease-drafter.ymlraw_urlshttps://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/.github%2Frelease-drafter.ymlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/.github%2Frelease-drafter.yml?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2patchXk  @@ -83,4 +83,4 @@ template: |
   - Frontend: https://github.com/cBioPortal/cbioportal-frontend/compare/$PREVIOUS_TAG...v$NEXT_PATCH_VERSION
   
   ## 🏷Notes on versioning and release procedure
-  https://docs.cbioportal.org/4.-development/release-procedure#a-note-on-versioning
+  https://docs.cbioportal.org/development/release-procedure/#a-note-on-versioningu}(jt  (16073e48ff0caa8feab78e54ecfb5919ca20eb91j  Icore/src/main/java/org/mskcc/cbio/portal/servlet/CalcFisherExactTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X'  @@ -44,13 +44,13 @@
 import org.mskcc.cbio.portal.stats.FisherExact;
 
 /**
- * Calculate the cumulative (one-tail) p-value out of fisher exact test
+ * Calculate the cumulative (two-tail) p-value out of fisher exact test
  * 
  * @param a a, b, c, d are the four cells in a 2x2 matrix
  * @param b
  * @param c
  * @param d
- * @return one-tailed P-value (right or left, whichever is smallest)
+ * @return two-tailed P-value (right or left, whichever is smallest)
  * 
  */
 public class CalcFisherExactTest extends HttpServlet  {
@@ -86,7 +86,7 @@ protected void doPost(HttpServletRequest httpServletRequest,
                 int c = Integer.parseInt(dataSet.split(" ")[2]);
                 int d = Integer.parseInt(dataSet.split(" ")[3]);    
                 FisherExact fisher = new FisherExact(a + b + c + d);
-                double pValue = fisher.getCumlativeP(a, b, c, d);
+                double pValue = fisher.getTwoTailedP(a, b, c, d);
                 result = result.concat(String.valueOf(pValue) + " ");                
             }
         }u}(jt  (92f8f83955924145d906564446465c5750ab3d2fj  =core/src/main/java/org/mskcc/cbio/portal/stats/OddsRatio.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -87,7 +87,7 @@ public OddsRatio(ProfileDataSummary pDataSummary, String geneA, String geneB) {
 
         oddsRatio = ((double) (a * d)) / ((double) (b * c));
         FisherExact fisher = new FisherExact(a + b + c + d);
-        pValue = fisher.getCumlativeP(a, b, c, d);
+        pValue = fisher.getTwoTailedP(a, b, c, d);
         lowerConfidenceInterval = Math.exp(Math.log(oddsRatio) - 1.96 * (Math.sqrt(1 / (double) a
                 + 1 / (double) b + 1 / (double) c + 1 / (double) d)));
         upperConfidenceInterval = Math.exp(Math.log(oddsRatio) + 1.96 * (Math.sqrt(1 / (double) a
@@ -103,7 +103,7 @@ public double getOddsRatio() {
         return oddsRatio;
     }
 
-    public double getCumulativeP() {
+    public double getTwoTailedP() {
         return pValue;
     }
 u}(jt  (c1c4adac53791a81208af5b00182bdaa40e6f0fej  Jcore/src/main/java/org/mskcc/cbio/portal/util/EnrichmentsAnalysisUtil.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FEnrichmentsAnalysisUtil.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FEnrichmentsAnalysisUtil.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FEnrichmentsAnalysisUtil.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -652,7 +652,7 @@ private double runFisherExactTest(HashMap<Integer, String> singleGeneCaseValueMa
             }
         }
         FisherExact fisher = new FisherExact(a + b + c + d);
-        return fisher.getCumlativeP(a, b, c, d);
+        return fisher.getTwoTailedP(a, b, c, d);
     }
 
     private String getCytoband(int geneticEntityId, String geneticProfileStableId) {u}(jt  (f6905da3aecd9a5efae4893661f5722f45ab8ce6j  Ccore/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.javaj  modifiedj  K7j  K j  K7j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -50,11 +50,13 @@
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.commons.lang.StringUtils;
 import org.cbioportal.security.spring.authentication.PortalUserDetails;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Component;
 import org.springframework.util.ResourceUtils;
@@ -362,6 +364,20 @@ public static String parseUrl(String url)
     @Value("${frontend.url.runtime:}") 
     public void setFrontendUrlRuntime(String property) { frontendUrlRuntime = property; }
 
+    private static String downloadGroup;
+    @Value("${download_group:}") // default is empty string
+    public void setDownloadGroup(String property) { downloadGroup = property; }
+
+    public static final String DEFAULT_DAT_METHOD = "none";
+
+    private static String dataAccessTokenMethod;
+    @Value("${dat.method:none}") // default is empty string
+    public void setDataAccessTokenMethod(String property) { dataAccessTokenMethod = property; }
+    
+    private static String tokenAccessUserRole;
+    @Value("${dat.filter_user_role:}") // default is empty string
+    public void setTokenAccessUserRole(String property) { tokenAccessUserRole = property; }
+    
     private static Logger LOG = LoggerFactory.getLogger(GlobalProperties.class);
     private static ConfigPropertyResolver portalProperties = new ConfigPropertyResolver();
     private static Properties mavenProperties = initializeProperties(MAVEN_PROPERTIES_FILE_NAME);
@@ -1262,4 +1278,43 @@ public static String getReferenceGenomeName() {
     public static String getOncoKbToken()  {
         return portalProperties.getProperty(ONCOKB_TOKEN, null);
     }
+
+    public static String getDownloadControl() {
+        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+
+        if (authentication != null &&
+            StringUtils.isNotEmpty(downloadGroup) &&
+            authentication.getAuthorities().contains(new SimpleGrantedAuthority(downloadGroup))) {
+            return "show";
+        } else {
+            String downloadControlOption = getProperty("skin.hide_download_controls");
+            /*
+                skin.hide_download_controls   return_value
+                        true                    hide
+                        false                   show
+                        data                    data
+                        null/empty              show
+             */
+            switch ((downloadControlOption != null) ? downloadControlOption.trim().toLowerCase() : "false") {
+                case "true":
+                    return "hide";
+                case "data":
+                    return "data";
+                case "false":
+                default:
+                    return "show";
+            }
+        }
+    }
+
+    public static String getDataAccessTokenMethod() {
+        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+        
+        if (authentication != null &&
+            StringUtils.isNotEmpty(tokenAccessUserRole)) {
+            return authentication.getAuthorities().contains(new SimpleGrantedAuthority(tokenAccessUserRole)) ? dataAccessTokenMethod : DEFAULT_DAT_METHOD;
+        } else {
+            return dataAccessTokenMethod;
+        }
+    }
 }u}(jt  (28d2d07b4292906aa5f5c5a7745074960a37f3d2j  .core/src/main/scripts/importer/validateData.pyj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.pyj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.pyj  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.py?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -3270,12 +3270,12 @@ def checkSVstatus(sv_status):
                     'No Entrez gene id or gene symbol provided for site 1 and site 2',
                     extra={'line_number': self.line_number})
         elif site1_gene is None and site2_gene is not None:
-            self.logger.warning(
+            self.logger.info(
                 'No Entrez gene id or gene symbol provided for site 1. '
                 'Assuming either the intragenic, deletion, duplication, translocation or inversion variant',
                 extra={'line_number': self.line_number})
         elif site2_gene is None and site1_gene is not None:
-            self.logger.warning(
+            self.logger.info(
                 'No Entrez gene id or gene symbol provided for site 2. '
                 'Assuming either the intragenic, deletion, duplication, translocation or inversion variant',
                 extra={'line_number': self.line_number})u"     }(jt  (06377765dfed89750dc17672a9cb7f4cfefca759j  Ccore/src/test/java/org/mskcc/cbio/portal/stats/TestFisherExact.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestFisherExact.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestFisherExact.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestFisherExact.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  XO  @@ -39,7 +39,7 @@ public class TestFisherExact extends TestCase {
 
     public void testFisherExact() {
         FisherExact fisher = new FisherExact(43 + 2 + 17 + 7);
-        double p = fisher.getCumlativeP(43, 2, 17, 7);
+        double p = fisher.getTwoTailedP(43, 2, 17, 7);
         assertEquals(0.006653, p, 0.00001);
     }
 }u}(jt  (108fdb5785e60048a79f3c23d5bfb4f01dc550e2j  Acore/src/test/java/org/mskcc/cbio/portal/stats/TestOddsRatio.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -70,9 +70,9 @@ public void testFisherExact() throws IOException {
 
         OddsRatio oddsRatio = new OddsRatio(pDataSummary, "BRCA1", "BRCA2");
         double oddsRatioValue = oddsRatio.getOddsRatio();
-        double p = oddsRatio.getCumulativeP();
+        double p = oddsRatio.getTwoTailedP();
         assertEquals(0.16666, oddsRatioValue, 0.0001);
-        assertEquals(0.0849, p, 0.0001);
+        assertEquals(0.1698, p, 0.0001);
         //System.out.println (oddsRatio.getRCommand());
     }
 }u}(jt  (91de51fb7356906110944cdd27eaf3761097919dj  Gcore/src/test/scripts/test_data/study_es_0/data_structural_variants.txtj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fdata_structural_variants.txtj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fdata_structural_variants.txtj  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fdata_structural_variants.txt?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -45,3 +45,5 @@ TCGA-A2-A04Q-01	NA	SND1	ENST00000354725	10	1	10000000	EXON	SND1_BRAF_CUSTOMHYVE_
 TCGA-A2-A0SX-01	NA	MKRN1	ENST00000255977	4	1	10000000	EXON	MKRN1_BRAF_CUSTOMHYVE_1	NA	BRAF	ENST00000288602	11	1	10000000		EXON	MKRN1_BRAF_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	MKRN1_BRAF_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			
 TCGA-AO-A0JL-01	NA	MKRN1	ENST00000255977	4	1	10000000	EXON	MKRN1_BRAF_CUSTOMHYVE_1	NA	BRAF	ENST00000288602	11	1	10000000		EXON	MKRN1_BRAF_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	MKRN1_BRAF_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			
 TCGA-AO-A0JL-01	NA	BRAF	ENST00000288602	6	1	10000000	EXON	BRAF_TTN_CUSTOMHYVE_1	NA	TTN	ENST00000589042	2	1	111111111		EXON	BRAF_TTN_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	BRAF_TTN_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			
+TCGA-AO-A0JL-01	NA	BRAF	ENST00000288602	6	1	10000000	EXON	BRAF_NULL_CUSTOMHYVE_1	NA			2	1	111111111		EXON	BRAF_NULL_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	BRAF_NULL_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			
+TCGA-AO-A0JL-01	NA			6	1	10000000	EXON	NULL_TTN_CUSTOMHYVE_1	NA	TTN	ENST00000589042	2	1	111111111		EXON	NULL_TTN_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	NULL_TTN_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			u}(jt  (8a39412f12d159a96b8ad548010704f8baa3a118j  =core/src/test/scripts/test_data/study_es_0/result_report.htmlj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.htmlj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.htmlj  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.html?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X	  @@ -1742,7 +1742,7 @@ <h4 class="panel-title">data_resource_study.txt</h4>
           <a role="button" data-toggle="collapse" aria-expanded="true"
              href="#collapse_ZGF0YV9zdHJ1Y3R1cmFsX3ZhcmlhbnRzLnR4dA",
              aria-controls="collapse_ZGF0YV9zdHJ1Y3R1cmFsX3ZhcmlhbnRzLnR4dA">
-            <span class="badge">3</span>
+            <span class="badge">5</span>
             <h4 class="panel-title">data_structural_variants.txt</h4>
           </a>
         </div>
@@ -1770,6 +1770,22 @@ <h4 class="panel-title">data_structural_variants.txt</h4>
                 <td>&ndash;</td>
                 <td></td>
               </tr>
+              <tr class="success">
+                <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
+                <td>48</td>
+                <td>&ndash;</td>
+                <td>No Entrez gene id or gene symbol provided for site 2. Assuming either the intragenic, deletion, duplication, translocation or inversion variant</td>
+                <td>&ndash;</td>
+                <td></td>
+              </tr>
+              <tr class="success">
+                <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
+                <td>49</td>
+                <td>&ndash;</td>
+                <td>No Entrez gene id or gene symbol provided for site 1. Assuming either the intragenic, deletion, duplication, translocation or inversion variant</td>
+                <td>&ndash;</td>
+                <td></td>
+              </tr>
               <tr class="success">
                 <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
                 <td>&ndash;</td>
@@ -1782,7 +1798,7 @@ <h4 class="panel-title">data_structural_variants.txt</h4>
                 <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
                 <td>&ndash;</td>
                 <td>&ndash;</td>
-                <td>Read 47 lines. Lines with warning: 0. Lines with error: 0</td>
+                <td>Read 49 lines. Lines with warning: 0. Lines with error: 0</td>
                 <td>&ndash;</td>
                 <td></td>
               </tr>u}(jt  (2971b3d1be6774b44ec9f00955ceec64e0585d89j  &db-scripts/src/main/resources/cgds.sqlj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/db-scripts%2Fsrc%2Fmain%2Fresources%2Fcgds.sqlj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/db-scripts%2Fsrc%2Fmain%2Fresources%2Fcgds.sqlj  https://api.github.com/repos/cBioPortal/cbioportal/contents/db-scripts%2Fsrc%2Fmain%2Fresources%2Fcgds.sql?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  @@ -755,5 +755,5 @@ CREATE TABLE `resource_study` (
 );
 
 -- THIS MUST BE KEPT IN SYNC WITH db.version PROPERTY IN pom.xml
-INSERT INTO info VALUES ('2.13.0', NULL);
+INSERT INTO info VALUES ('2.13.1', NULL);
 u}(jt  (78c0d25ea145313cff22c9e578cdf84f8c3be307j  +db-scripts/src/main/resources/migration.sqlj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/db-scripts%2Fsrc%2Fmain%2Fresources%2Fmigration.sqlj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/db-scripts%2Fsrc%2Fmain%2Fresources%2Fmigration.sqlj  https://api.github.com/repos/cBioPortal/cbioportal/contents/db-scripts%2Fsrc%2Fmain%2Fresources%2Fmigration.sql?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  Xz  @@ -1021,3 +1021,10 @@ ALTER TABLE `mutation_event` CHANGE COLUMN `ONCOTATOR_PROTEIN_POS_START` `PROTEI
 ALTER TABLE `mutation_event` CHANGE COLUMN `ONCOTATOR_PROTEIN_POS_END` `PROTEIN_POS_END` int(11);
 UPDATE `info` SET `DB_SCHEMA_VERSION`="2.13.0";
 
+
+##version: 2.13.1
+ALTER TABLE `clinical_event_data` MODIFY COLUMN `VALUE` varchar(3000) NOT NULL;
+CREATE INDEX idx_clinical_event_key ON clinical_event_data (`KEY`);
+CREATE INDEX idx_clinical_event_value ON clinical_event_data (`VALUE`);
+CREATE INDEX idx_sample_stable_id ON sample (`STABLE_ID`);
+UPDATE `info` SET `DB_SCHEMA_VERSION`="2.13.1";
\ No newline at end of fileu}(jt  (95305cece3a37e8af06999c4b039ef4b516240c1j  docs/About-Us.mdj  modifiedj  Kj  Kj  K	j  ihttps://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2FAbout-Us.mdj  hhttps://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2FAbout-Us.mdj  {https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FAbout-Us.md?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -14,6 +14,8 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 * Ramyasree Madupuri
 * Gaofei Zhao
 * Xiang Li
+* Bryan Lai
+* Calla Chennault
 * Anusha Satravada
 * Rima AlHamad
 * Nikolaus Schultz
@@ -41,6 +43,7 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 ## Caris Life Sciences
 * Jianjiong Gao
 * Priti Kumari
+* Karthik Kalletla
 
 ## The Hyve
 * Oleguer Plantalech
@@ -60,9 +63,10 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 
 ## Bilkent University
 * Ugur Dogrusoz
-* Yusuf Ziya Sengul
+* Yusuf Ziya Ozgul
 
 ## Alumni
+* Adam Abeshouse
 * B Arman Aksoy
 * M Salih Altun
 * Istemi Bahceci
@@ -80,10 +84,10 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 * Zachary Heins
 * Michael Heuer
 * Anders Jacobsen
-* Karthik Kalletla
 * Peter Kok
 * Erik Larsson
 * Dong Li
+* Divya Madala
 * Tamba Monrose
 * Irina Pulyakhina
 * Pichai Raman
@@ -92,6 +96,7 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 * Alexandros Sigaras
 * Luke Sikina
 * Jing Su
+* Yichao Sun
 * Sander Tan
 * Jiaojiao Wang
 * Stuart Wattu}(jt  (325eefbde62c4ea297fcc028c2db7b5d92f4f1b0j  docs/File-Formats.mdj  modifiedj  Kj  K j  Kj  mhttps://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2FFile-Formats.mdj  lhttps://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2FFile-Formats.mdj  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FFile-Formats.md?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -21,6 +21,7 @@
     * [Study Tags file](#study-tags-file)
     * [Generic Assay](#generic-assay)
         * [Arm Level CNA Data](#arm-level-cna-data)
+        * [Mutational Signature Data](#mutational-signature-data)
     * [Resource Data](#resource-data)
     * [Custom namespace columns](#custom-namespace-columns)
 
@@ -1599,6 +1600,32 @@ Allowed values for Arm-level copy-number data are `Loss`, `Gain`, and `Unchanged
 
 Please find example file format here: [Meta file example](https://github.com/cBioPortal/cbioportal-frontend/blob/master/end-to-end-test/local/studies/lgg_ucsf_2014_test_generic_assay/meta_armlevel_CNA.txt) and [Data file example](https://github.com/cBioPortal/cbioportal-frontend/blob/master/end-to-end-test/local/studies/lgg_ucsf_2014_test_generic_assay/data_armlevel_CNA.txt)
 
+### Mutational Signature Data
+Mutational Signature data is a predefined subtype of Generic Assay Data. Setting `generic_assay_type: MUTATIONAL_SIGNATURE` 
+in the meta file will make cBioPortal interpret the data as Mutational Signature data.
+
+#### Mutational Signature meta files
+The mutational signature meta files follow the same convention as the [Generic Assay Meta file](#generic-assay-meta-file),
+however there are some key differences:
+- `genetic_assay_type` should be set to `MUTATIONAL_SIGNATURE`
+- `datatype` should be set to `LIMIT_VALUE`
+- `stable_id` values should end with: `_{filetype}_{identifier}`, where:
+  - `filetype` is either `contribution`, `pvalue` or `counts`
+  - `identifier` is consistent between files belonging to the same analysis
+  - Multiple signatures can be added to a single study, as long as they have different identifiers in their stable id (e.g., `contribution_SBS` and `contribution_DBS`)
+- In `generic_entity_meta_properties` the `NAME` value is required. The `DESCRIPTION` and `URL` values can be added 
+  to display more information and link to external resources in the mutational signatures tab.
+
+#### Mutational Signature data files
+The mutational signature data files follow the same convention as the [Generic Assay Data file](#generic-assay-data-file).
+Each collection of mutational signatures can consist of up to three different data files, each with an accompanying meta file.
+- Signature _contribution_ file (**required**)
+  - Data file containing the contribution of each signature-sample pair. Values are expected to be 0 ≥ x ≥ 1.
+- Signature _pvalue_ file (optional)
+  - Data file containing p-values for each signature-sample pair. Values below 0.05 will be shown as significant.
+- Mutational _counts_ matrix file (optional)
+  - Data file containing nucleotide changes of a sample. cBioPortal has specific visualization options for single-base substitutions (96 channels), double-base substitutions (72 channels) and insertion/deletions (83 channels), following the signatures defined by [COSMIC](https://cancer.sanger.ac.uk/signatures/). But other channels can also be used. Values are expected to be positive integers.
+
 ## Resource Data
 
 The resource data is used to capture resource data in patients, samples and studies. The resources will be represented by URLs with meta data. The types of resources include:u}(jt  (257defa35dd967cc83d1841e8d9765e215f70e65j  docs/News.mdj  modifiedj  K2j  K j  K2j  ehttps://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2FNews.mdj  dhttps://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2FNews.mdj  whttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FNews.md?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -1,3 +1,23 @@
+## Aug 1, 2023
+*   **Enhancement**: One-sided Fisher's exact tests were changed to be two-sided. The affected pages are:
+    *    Results View Page - Mutual Exclusivity Tab
+    *    Results View Page - Comparison Tab - Genomic Alterations Tab
+    *    Comparison Page - Genomic Alterations Tab
+    *    Comparison Page - Mutations Tab
+    
+    Please note that the Mutations tab on the Comparison page is a recent feature and was introduced with the two-sided Fisher's exact test already implemented.
+
+    Several users pointed out that using a one-sided test was incorrect for these comparisons. Please see discussions [here](https://github.com/cBioPortal/cbioportal/issues/9943) for more information.
+
+## May 2, 2023
+*   **New Feature**: The mutations tab now shows variant annotations from the [repository of Variant with Unexpected Effects (reVUE)](https://www.cancerrevue.org/).
+    <img src="https://user-images.githubusercontent.com/16869603/234271379-6a0876ea-8477-426e-a0e4-5e0b0b66aef9.gif" width="700" />
+
+## Apr 11, 2023
+*   **New Feature**: Disable autocommit and manually commit filters in study view. Manually commit filters can improve cBioPortal performance when query large dataset.
+    <img src="https://user-images.githubusercontent.com/3323006/221857599-1eb6e9a5-55c7-4fb5-bc14-283699be0990.png" width="700" />
+    <img src="https://user-images.githubusercontent.com/3323006/221858244-bf359850-79b5-4f9c-8008-6b5271721854.png" width="700" />
+
 ## Apr 5, 2023
 *   **Added data** consisting of 2,472 samples from 5 studies:
     * [Bladder Cancer (MSK, Cell Reports 2022)](https://www.cbioportal.org/study/summary?id=paired_bladder_2022) *1659 samples*
@@ -9,6 +29,25 @@
 *   **Data Improvement**
    	* Added TERT promoter mutation status to [Melanomas (TCGA, Cell 2015)](https://www.cbioportal.org/study/summary?id=skcm_tcga_pub_2015), [Papillary Thyroid Carcinoma (TCGA, Cell 2014)](https://www.cbioportal.org/study/summary?id=thca_tcga_pub) TCGA studies.
 
+## Apr 4, 2023
+*   **New Feature**: Allow numeric data type for custom data charts.
+    <img src="https://user-images.githubusercontent.com/33220871/222459360-9c251f7f-1005-442f-811d-dd1ee1103161.png" width="700" />
+    <img src="https://user-images.githubusercontent.com/33220871/222460439-ac7007c8-059a-4ecc-816c-90752adff444.png" width="700" />
+
+    This also allows to have numerical custom data after we query based on genes (custom data 2 in the image):
+    <img src="https://user-images.githubusercontent.com/33220871/223729410-03a094f4-7671-453f-b8b8-f7bc10b61c7c.png" width="700" />
+    <img src="https://user-images.githubusercontent.com/33220871/223729522-fd9e19e2-6218-40d4-b9fb-f253c4faa858.png" width="700" />
+
+## Jan 10, 2023
+*   **New Feature**: New Pathways tab on the Group Comparison view. 
+    [Example: Primary vs Metastasis samples in MSK-IMPACT Clinical Sequencing Cohort](https://www.cbioportal.org/comparison/pathways?comparisonId=61791fa92e3200072db9b64e&groupOrder=%5B%22Primary%22%2C%22Metastasis%22%5D)
+    <img src="https://user-images.githubusercontent.com/15748980/235750129-661682f7-6593-4b7e-8873-ebba70eeae32.png" width="700" />
+
+## Dec 13, 2022
+*   **New Feature**: New Mutations tab on the Group Comparison view.
+    [Example: Primary vs Metastasis samples in MSK-IMPACT Clinical Sequencing Cohort](https://www.cbioportal.org/comparison/mutations?comparisonId=61791fa92e3200072db9b64e&groupOrder=%5B%22Primary%22%2C%22Metastasis%22%5D)
+    <img src="https://user-images.githubusercontent.com/15748980/235748831-78652ccd-b3ab-496f-9626-74ceb8c7230d.png" width="700" />
+
 ## Oct 12, 2022
 *   **Added data** consisting of 1,459 samples from 10 studies:
 	* [Hepatocellular Carcinoma (MERiC/Basel, Nat Commun. 2022)](https://www.cbioportal.org/study/summary?id=hcc_meric_2021) *122 samples*
@@ -21,6 +60,13 @@
 	* [Mixed Tumors: Selpercatinib RET Trial (MSK, Nat Commun. 2022)](https://www.cbioportal.org/study/summary?id=mixed_selpercatinib_2020) *188 samples*
 	* [Low-Grade Serous Ovarian Cancer (MSK, Clin Cancer Res 2022)](https://www.cbioportal.org/study/summary?id=lgsoc_mapk_msk_2022) *119 samples*
 	* [Urothelial Carcinoma (BCAN/HCRN 2022)](http://www.cbioportal.org/study/summary?id=blca_bcan_hcrn_2022) *203 samples*
+
+## Sep 6, 2022
+*   **Enhancement**: Oncoprint can now save clinical tracks after login
+    <img src="https://user-images.githubusercontent.com/3323006/188828765-ded10947-7343-49dd-b605-50b58b67a388.png" width="700" />
+
+## Aug 11, 2022
+*   **New Major Release**: **v5.0.0** release drops support for fusions in the mutation data format. Going forward fusions can only be imported in the Structural Variant (SV) format. This is mainly a refactoring effort to simplify the codebase and pave the way for the development of novel structural variant visualizations in the future. For cBioPortal instance maintainer, please reference our [Migration Guide](https://docs.cbioportal.org/migration-guide/#v4---v5) for instruction.
 	
 ## Jul 26, 2022
 *   **Added data** consisting of 6,631 samples from 7 studies:
@@ -32,6 +78,10 @@
     * [Pan-cancer Analysis of Advanced and Metastatic Tumors (BCGSC, Nature Cancer 2020)](https://www.cbioportal.org/study/summary?id=pog570_bcgsc_2020) *570 samples*
     * [Prostate Adenocarcinoma (MSK, Clin Cancer Res. 2022)](https://www.cbioportal.org/study/summary?id=prad_pik3r1_msk_2021) *1,417 samples*
 
+## May 31, 2022
+* **New Feature**: Added Quartiles, Median split and Generate bins options for bar charts on the study view page, where Generate bins allows user to define bin size and min value
+    <img src="https://user-images.githubusercontent.com/53996876/151772297-f0aa55ef-5bb4-4e26-8f9b-b0a2369fff71.png" width="700" />
+
 ## May 12, 2022
 * **New Feature**: Show cohort alteration frequencies in pathways from [NDEx](https://www.ndexbio.org/iquery/) on the _Results View_. [Example: Glioblastoma signaling pathways in MSK-IMPACT (2017) cohort](https://bit.ly/3sE4UqD)
 u}(jt  (8925135b62501db83c02d0517598245c8b9f3473j  Sdocs/deployment/authorization-and-authentication/Authenticating-Users-via-Tokens.mdj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fdeployment%2Fauthorization-and-authentication%2FAuthenticating-Users-via-Tokens.mdj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fdeployment%2Fauthorization-and-authentication%2FAuthenticating-Users-via-Tokens.mdj  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fauthorization-and-authentication%2FAuthenticating-Users-via-Tokens.md?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X{  @@ -45,6 +45,12 @@ The following properties must be present in portal.properties in order to allow
 * **Permissible Values**: jwt, uuid, oauth2, none
 * **Default Value**: none
 
+**Property**: dat.filter\_user\_role (optional)
+
+* **Description**: This property determines users access in token generation. If present, this role will be checked in user roles before generating a token.
+* **Permissible Values**: A string value.
+* **Default Value**: none
+
 **Property**: dat.unauth\_users (optional, not used for dat.method = oauth2)
 
 * **Description**: A list of users that should not be allowed to download a data access token.u}(jt  (7575ad635078b9f00b139a0c52ec234c01eba5c0j  Hdocs/deployment/customization/Customizing-your-instance-of-cBioPortal.mdj  modifiedj  K	j  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdj  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.md?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -243,9 +243,16 @@ Below you can find the complete list of all the available skin properties.
         </tr>
 		<tr>
             <td>skin.hide_download_controls</td>
-            <td>removes all download and copy-to-clipboard options.</td>
+            <td>controls download options in UI. **true**: hides all download options. **false**:  shows all download options. **data**: disable data download but not figure download</td>
             <td>false</td>
-            <td>true / false</td>
+            <td>true / false / data</td>
+        </tr>
+		<tr>
+            <td>download_group</td>
+            <td>controls download options in UI for each user. If present and user is authenticated, this value is checked against user roles.
+If the download_group is present in user groups then download options are shown in UI, else it fallback to **skin.hide_download_controls**</td>
+            <td></td>
+            <td>text</td>
         </tr>
         <tr>
             <td>skin.show_settings_menu</td>u}(jt  (5eca5c5988b006a97d11dcb98c8c0462d401182bj  <docs/deployment/customization/portal.properties-Reference.mdj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdj  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.md?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -153,6 +153,13 @@ Different samples of a patient may have been analyzed with different gene panels
 skin.patientview.filter_genes_profiled_all_samples=
 ```
 
+### Control default settings of the VAF line chart in the genomic evolution tab of patient view
+If you want to enable log scale and sequential mode by default, set this property to `true`:
+```
+vaf.log_scale.default=true|false
+vaf.sequential_mode.default=true|false
+```
+
 ### Control unauthorized studies to be displayed on the home page
 
 By default, on an authenticated portal the home page will only show studies for which the current user is authorized. By setting the _skin.home\_page.show\_unauthorized\_studies_ property to _true_ the home page will also show unauthorized studies. The unauthorized studies will appear greyed out and cannot be selected for downstream analysis in Results View or Study View.
@@ -167,6 +174,13 @@ If _show\_unauthorized\_studies_ feature has been enabled, a message (template)
 skin.home_page.unauthorized_studies_global_message=
 ```
 
+### Show badge with reference genome
+In instances with hg19 and hg38 studies you can show the reference genome in the home page next to the number of samples. This can be done setting this property to `true` (`false` by default):
+
+```
+skin.home_page.show_reference_genome=
+```
+
 ### Control the appearance of the settings menu in study view and group comparison that controls custom annotation-based filtering
 
 A settings menu that allows the user to filter alterations in study view and group comparison may be used when [custom driver annotations](/File-Formats.md#custom-driver-annotations) were loaded for the study or studies displayed in these sections. This menu will only appear, when setting the property _skin.show\_settings\_menu_ to _true_.
@@ -429,6 +443,11 @@ oncoprint.oncokb.default=true|false
 oncoprint.hotspots.default=true|false
 ```
 
+If you want to enable oncoprint heatmap clustering by default, set this property to `true`:
+```
+oncoprint.clustered.default=true|false
+```
+
 **Automatic hiding of variants of unknown significance (VUS)**
 
 By default, the selection box to hide VUS mutations is unchecked. If you want to automatically hide VUS, set this property to `true`. Default is `false`.u}(jt  (d6b2fed8815f142f956f0b55758708a7505d23a6j  >docs/deployment/deploy-without-docker/Software-Requirements.mdj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fdeployment%2Fdeploy-without-docker%2FSoftware-Requirements.mdj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fdeployment%2Fdeploy-without-docker%2FSoftware-Requirements.mdj  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fdeploy-without-docker%2FSoftware-Requirements.md?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X.  @@ -16,7 +16,7 @@ The session service uses MongoDB 3.6.6
 
 ## Java
 
-As of this writing, the cBioPortal can be compiled and run from Java 8.0 and above.  The software can be found and download from the [Oracle](https://www.oracle.com/us/technologies/java/overview/index.html) website.
+As of this writing, the cBioPortal can be compiled and run from Java 11 and above.  The software can be found and download from the [Oracle](https://www.oracle.com/us/technologies/java/overview/index.html) website.
 
 On Ubuntu:  ```sudo apt-get install default-jdk```
 u}(jt  (384b27423f43625763df0a7423dd9598241def33j   docs/deployment/docker/README.mdj  modifiedj  Kj  Kj  Kj  }https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fdeployment%2Fdocker%2FREADME.mdj  |https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fdeployment%2Fdocker%2FREADME.mdj  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fdocker%2FREADME.md?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X+  @@ -18,15 +18,15 @@ In this example we use [Docker Compose](https://docs.docker.com/compose/) to spi
 git clone https://github.com/cBioPortal/cbioportal-docker-compose.git
 cd cbioportal-docker-compose
 ./init.sh
-docker-compose up
+docker compose up
 ```
 
 You should now be able to see the cBioPortal website at http://localhost:8080
 
 Import studies with:
 
 ```
-docker-compose run cbioportal metaImport.py -u http://cbioportal:8080 -s study/lgg_ucsf_2014/ -o
+docker compose run cbioportal metaImport.py -u http://cbioportal:8080 -s study/lgg_ucsf_2014/ -o
 ```
 
 Clear persistent data volumes with:
@@ -54,7 +54,7 @@ Then download all necessary files (seed data, example config and example study f
 Then run:
 
 ```
-docker-compose up
+docker compose up
 ```
 
 This will start all four containers (services) defined [here](https://github.com/cBioPortal/cbioportal-docker-compose/blob/master/docker-compose.yml). That is:
@@ -76,7 +76,7 @@ Go to the next step to see how to import studies.
 If you prefer to run the services in detached mode (i.e. not logging everything to your terminal), you can run
 
 ```
-docker-compose up -d
+docker compose up -d
 ```
 
 In this mode, you'll have to check the logs of each container manually using e.g.:
@@ -95,12 +95,12 @@ docker ps -a
 To import studies you can run:
 
 ```
-docker-compose run cbioportal metaImport.py -u http://cbioportal:8080 -s study/lgg_ucsf_2014/ -o
+docker compose run cbioportal metaImport.py -u http://cbioportal:8080 -s study/lgg_ucsf_2014/ -o
 ```
 This will import the [lgg_ucsf_2014 study](https://www.cbioportal.org/patient?studyId=lgg_ucsf_2014) into your local database. It will take a few minutes to import. After importing, restart the cbioportal web container:
 
 ```
-docker-compose restart cbioportal
+docker compose restart cbioportal
 ```
 
 or u}(jt  (4b87d00b1e19cded2708111ccd3b2d293f7d5606j  docs/development/README.mdj  modifiedj  Kj  Kj  Kj  uhttps://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fdevelopment%2FREADME.mdj  thttps://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fdevelopment%2FREADME.mdj  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdevelopment%2FREADME.md?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -12,4 +12,4 @@ Note that cBioPortal is split into a backend project (api) and a frontend projec
 - [Backend](http://www.github.com/cbioportal/cbioportal)
   (Java, Spring, MySQL, MongoDB)
 
-If you are interested in coordinating the development of new features, please contact cbioportal@cbio.mskcc.org or reach out on https://slack.cbioportal.org.
\ No newline at end of file
+If you are interested in coordinating the development of new features, please contact cbioportal@cbioportal.org or reach out on https://slack.cbioportal.org.u}(jt  (cec9d32f48ad1f26180744cbded5df30a55d75bdj  %docs/development/Release-Procedure.mdj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fdevelopment%2FRelease-Procedure.mdj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fdevelopment%2FRelease-Procedure.mdj  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdevelopment%2FRelease-Procedure.md?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X!  @@ -38,7 +38,7 @@ For releases with database migrations, we increase the MINOR number in MAJOR.MIN
 
 ### From pre-release to official release
 
-On the [GitHub Release Page](https://github.com/cBioPortal/cbioportal/releases) you will see that some releases have the pre-release indication whereas others do not. In general we make a new pre-release release every week. We test it out in production (https://cbioportal.org) for one week and if no new critical issues are identified we make it an official release.
+On the [GitHub Release Page](https://github.com/cBioPortal/cbioportal/releases) you will see that some releases have the pre-release indication whereas others do not. In general we make a new pre-release release every week. We test it out in production (https://cbioportal.org) for one month and if no new critical issues are identified we make it an official release. Occasionally we make a new official release in less than a month's time if we identify a critical issue in the previous release.
 
 ### cBioPortal Software Version Numbers
 u}(jt  (ea7d3d653e00ae80f179717fa6f02d7409dfba19j  docs/user-guide/faq.mdj  modifiedj  K
j  Kj  Kj  qhttps://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fuser-guide%2Ffaq.mdj  phttps://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fuser-guide%2Ffaq.mdj  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fuser-guide%2Ffaq.md?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -20,6 +20,7 @@
     * [What is a Virtual Study?](/user-guide/faq.md#what-is-a-virtual-study)
     * [Is it necessary to log in to use virtual studies? If I do log in, what additional functionality do I gain?](/user-guide/faq.md#is-it-necessary-to-log-in-to-use-virtual-studies-if-i-do-log-in-what-additional-functionality-do-i-gain)
     * [What is Group Comparison?](/user-guide/faq.md#what-is-group-comparison)
+    * [What are the statistical significance tests in Group Comparison?](/user-guide/faq.md#what-are-the-statistical-significance-tests-in-group-comparison)
 * [Data Questions](/user-guide/faq.md#data-questions)
     * [General Data](/user-guide/faq.md#general-data)
         * [Does the portal contain cancer study X?](/user-guide/faq.md#does-the-portal-contain-cancer-study-x)
@@ -137,7 +138,18 @@ No. A user that has not logged in can create virtual studies and run queries in
 If you log in, you gain the ability to save your virtual study to the list of existing studies on the homepage. This makes a virtual study functionally the same as any other study: you can access your virtual studies in the query builder and you can combine an existing virtual study with any other study to create a new virtual study.
 #### What is Group Comparison?
 Group Comparison is a suite of analysis features which allows a user to compare clinical or genomic features of user-defined groups of samples. These groups can be defined based on any clinical or genomic features. For an overview, see [our tutorial on group comparison](https://www.cbioportal.org/tutorials).
-
+#### What are the statistical significance tests in Group Comparison?
+- Survival tab: Log-rank test
+- Clinical tab:
+    - Continuous data: Chi-squared test
+    - Categorical data: Kruskal Wallis test
+- Other tabs
+    - 2 groups
+        - Continuous data: one-sided t-test
+        - Categorical data: two-sided Fisher's exact test
+    - 3 or more groups
+        - Continuous data: one-way ANOVA
+        - Categorical data: Chi-squared test
 
 ## Data Questions
 ### General Datau}(jt  (ae18a16339e01dd259c822005bb4b29dc1ba5734j  docs/user-guide/overview.mdj  modifiedj  Kj  K j  Kj  vhttps://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fuser-guide%2Foverview.mdj  uhttps://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fuser-guide%2Foverview.mdj  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fuser-guide%2Foverview.md?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  Xg  @@ -28,6 +28,7 @@ Short videos that show how to perform specific analyses or how to use specific p
 6. How to explore the data in a study [youtube.com](https://www.youtube.com/watch?v=N8ffDgkqDWc)
 7. How to run a query for genes of interest [youtube.com](https://www.youtube.com/watch?v=MH-kY5usA70)
 8. How to download data [youtube.com](https://www.youtube.com/watch?v=JId304dp3tc)
+9. Navigating AACR GENIE - Biopharma Collaborative (BPC) dataset [youtube.com](https://www.youtube.com/playlist?list=PLE2tjlUyHL8Gn4ythnuvf2BxWJVpAxkMM)
 
 ### Documentation
 * Frequently Asked Questions [FAQ](/user-guide/faq.md)u}(jt  (762f0da3649ff6bd3338410bc824a1a72457395aj  docs/web-API-and-Clients.mdj  modifiedj  Kj  Kj  Kj  thttps://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fweb-API-and-Clients.mdj  shttps://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/docs%2Fweb-API-and-Clients.mdj  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fweb-API-and-Clients.md?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X
  @@ -8,9 +8,9 @@ Please see the full reference documentation for the API [here](https://www.cbiop
 
 The cBioPortal REST API is described using Swagger/OpenAPI, which allows one to generate a client in most programming languages. One can use the command line tool `curl` for dowloading data on the command line or use another language such as `Python` or `R` to make visualizations. We list some common examples below, but if your language is not listed, there is likely a client generator available elsewhere (see e.g. https://swagger.io/tools/swagger-codegen/). Do reach out if you'd like us to add a language.
 
-### R client
+### R clients
 
-There are multiple ways to access the API using R. The recommended way is to use `cBioPortalData`.
+There are multiple ways to access the API using R. Below are two recommended R packages to access cBioPortal data.
 
 #### cBioPortalData (recommended)
 
@@ -34,9 +34,22 @@ cBioPortal(
 )
 ```
 
+#### cbioportalR (recommended)
+
+cbioportalR offers easy-to-use functions that allow users to browse and pull data from public or institutional cBioPortal sites without knowledge of web service or Bioconductor infrastructures. The package is tidyverse-compatible. Key package features include:
+
+1. Comprehensive documentation aimed at helping clinical researchers understand the underlying structure of cBioPortal data
+2. [Tutorials]([https://www.karissawhiting.com/cbioportalR/articles/overview-of-workflow.html]) for quick API authentication and set up
+3. Functions to pull complete clinical and genomic data by study ID, molecular profile ID, sample list IDs or individual sample ID (e.g. `get_genetics_by_study()`, `get_genetics_by_sample()`)
+4. Functions to navigate and identify patient IDs, sample IDs or study IDs as needed, or infer necessary ID information for queries when not supplied by user.
+5. Helper functions to pull information on gene panels (`get_gene_panel()`), or lookup entrez ID (`get_entrez_id()`), Hugo Symbol (`get_hugo_symbol()`) or common gene aliases (`get_alias()`) of genes
+6. Capability to query multiple sample IDs from different studies concurrently
+
+For a detailed tutorial on `cbioportalR`, see the package website: https://www.karissawhiting.com/cbioportalR/articles/overview-of-workflow.html
+
 #### rapiclient
 
-Although we recommend to use [cBioPortalData](/#cbioportaldata-recommended) for most use cases, it is possible to connect to the API directly using [rapiclient](https://github.com/bergant/rapiclient):
+Although we recommend [cBioPortalData](/#cbioportaldata-recommended) or [cbioportalR](/#cbioportalR-recommended) for most use cases, it is possible to connect to the API directly using [rapiclient](https://github.com/bergant/rapiclient):
 
 ```
 library(rapiclient)u}(jt  (cbe797905633ff28d7a8789d5e57940fad804014j  Amodel/src/main/java/org/cbioportal/model/AlterationCountBase.javaj  addedj  K3j  K j  K3j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FAlterationCountBase.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FAlterationCountBase.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FAlterationCountBase.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -0,0 +1,51 @@
+package org.cbioportal.model;
+
+import java.io.Serializable;
+import java.util.Set;
+
+public abstract class AlterationCountBase implements Serializable {
+
+    private Integer numberOfAlteredCases;
+    private Integer totalCount;
+    private Integer numberOfProfiledCases;
+    private Set<String> matchingGenePanelIds;
+
+    public Integer getNumberOfAlteredCases() {
+        return numberOfAlteredCases;
+    }
+
+    public void setNumberOfAlteredCases(Integer numberOfAlteredCases) {
+        this.numberOfAlteredCases = numberOfAlteredCases;
+    }
+
+    public Integer getTotalCount() {
+        return totalCount;
+    }
+
+    public void setTotalCount(Integer totalCount) {
+        this.totalCount = totalCount;
+    }
+    
+    public Integer getNumberOfProfiledCases() {
+        return numberOfProfiledCases;
+    }
+
+    public void setNumberOfProfiledCases(Integer numberOfProfiledCases) {
+        this.numberOfProfiledCases = numberOfProfiledCases;
+    }
+
+    public Set<String> getMatchingGenePanelIds() {
+        return matchingGenePanelIds;
+    }
+
+    public void setMatchingGenePanelIds(Set<String> matchingGenePanelIds) {
+        this.matchingGenePanelIds = matchingGenePanelIds;
+    }
+    
+    public abstract String getUniqueEventKey();
+    
+    public abstract String[] getHugoGeneSymbols();
+    
+    public abstract Integer[] getEntrezGeneIds();
+
+}u}(jt  (d3a6ecf3d62c551d991dbe8cdac44088b7be31f6j  Cmodel/src/main/java/org/cbioportal/model/AlterationCountByGene.javaj  modifiedj  K
j  Kj  K'j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FAlterationCountByGene.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FAlterationCountByGene.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FAlterationCountByGene.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  Xs  @@ -1,18 +1,13 @@
 package org.cbioportal.model;
 
-import java.io.Serializable;
 import java.math.BigDecimal;
-import java.util.Set;
 
-public class AlterationCountByGene implements Serializable {
+public class AlterationCountByGene extends AlterationCountBase {
 
     private Integer entrezGeneId;
     private String hugoGeneSymbol;
     private Integer numberOfAlteredCases;
-    private Integer totalCount;
-    private Integer numberOfProfiledCases;
     private BigDecimal qValue;
-    private Set<String> matchingGenePanelIds;
 
     public Integer getEntrezGeneId() {
         return entrezGeneId;
@@ -38,22 +33,6 @@ public void setNumberOfAlteredCases(Integer numberOfAlteredCases) {
         this.numberOfAlteredCases = numberOfAlteredCases;
     }
 
-    public Integer getTotalCount() {
-        return totalCount;
-    }
-
-    public void setTotalCount(Integer totalCount) {
-        this.totalCount = totalCount;
-    }
-    
-    public Integer getNumberOfProfiledCases() {
-        return numberOfProfiledCases;
-    }
-
-    public void setNumberOfProfiledCases(Integer numberOfProfiledCases) {
-        this.numberOfProfiledCases = numberOfProfiledCases;
-    }
-
     public BigDecimal getqValue() {
         return qValue;
     }
@@ -62,11 +41,19 @@ public void setqValue(BigDecimal qValue) {
         this.qValue = qValue;
     }
 
-    public Set<String> getMatchingGenePanelIds() {
-        return matchingGenePanelIds;
+    @Override
+    public String getUniqueEventKey() {
+        return hugoGeneSymbol;
     }
 
-    public void setMatchingGenePanelIds(Set<String> matchingGenePanelIds) {
-        this.matchingGenePanelIds = matchingGenePanelIds;
+    @Override
+    public String[] getHugoGeneSymbols() {
+        return new String[]{hugoGeneSymbol};
     }
+
+    @Override
+    public Integer[] getEntrezGeneIds() {
+        return new Integer[]{entrezGeneId};
+    }
+
 }u}(jt  (88800d1f84f8a8d70e521140f0755f7573f7e2e6j  Pmodel/src/main/java/org/cbioportal/model/AlterationCountByStructuralVariant.javaj  addedj  K8j  K j  K8j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FAlterationCountByStructuralVariant.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FAlterationCountByStructuralVariant.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FAlterationCountByStructuralVariant.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X?  @@ -0,0 +1,56 @@
+package org.cbioportal.model;
+
+public class AlterationCountByStructuralVariant extends AlterationCountBase {
+
+    private Integer gene1EntrezGeneId;
+    private String gene1HugoGeneSymbol; 
+    private Integer gene2EntrezGeneId;
+    private String gene2HugoGeneSymbol;
+    
+    public Integer getGene1EntrezGeneId() {
+        return gene1EntrezGeneId;
+    }
+
+    public void setGene1EntrezGeneId(Integer gene1EntrezGeneId) {
+        this.gene1EntrezGeneId = gene1EntrezGeneId;
+    }
+
+    public String getGene1HugoGeneSymbol() {
+        return gene1HugoGeneSymbol;
+    }
+
+    public void setGene1HugoGeneSymbol(String gene1HugoGeneSymbol) {
+        this.gene1HugoGeneSymbol = gene1HugoGeneSymbol;
+    }
+
+    public Integer getGene2EntrezGeneId() {
+        return gene2EntrezGeneId;
+    }
+
+    public void setGene2EntrezGeneId(Integer gene2EntrezGeneId) {
+        this.gene2EntrezGeneId = gene2EntrezGeneId;
+    }
+
+    public String getGene2HugoGeneSymbol() {
+        return gene2HugoGeneSymbol;
+    }
+
+    public void setGene2HugoGeneSymbol(String gene2HugoGeneSymbol) {
+        this.gene2HugoGeneSymbol = gene2HugoGeneSymbol;
+    }
+
+    @Override
+    public String getUniqueEventKey() {
+        return gene1HugoGeneSymbol + "::" + gene2HugoGeneSymbol;
+    }
+
+    @Override
+    public String[] getHugoGeneSymbols() {
+        return new String[]{gene1HugoGeneSymbol, gene2HugoGeneSymbol};
+    }
+
+    @Override
+    public Integer[] getEntrezGeneIds() {
+        return new Integer[]{gene1EntrezGeneId, gene2EntrezGeneId};
+    }
+}u}(jt  (a1ed029ef223af2dede18066a4589d1d6c5cc628j  Dmodel/src/main/java/org/cbioportal/model/ClinicalDataCollection.javaj  modifiedj  Kj  Kj  K	j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FClinicalDataCollection.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FClinicalDataCollection.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FClinicalDataCollection.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -5,9 +5,16 @@
 
 public class ClinicalDataCollection {
 
+    /**
+     * Paginated resource
+     */
     private List<ClinicalData> sampleClinicalData = new ArrayList<>();
-    private List<ClinicalData> patientClinicalData = new ArrayList<>();
 
+    /**
+     * Patient info associated with paginated samples
+     */
+    private List<ClinicalData> patientClinicalData = new ArrayList<>();
+    
     public List<ClinicalData> getSampleClinicalData() {
         return sampleClinicalData;
     }u}(jt  (ef1143066e785074681a8996e9bf59a9c1271b8ej  Cmodel/src/main/java/org/cbioportal/model/CopyNumberCountByGene.javaj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FCopyNumberCountByGene.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FCopyNumberCountByGene.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FCopyNumberCountByGene.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -22,4 +22,9 @@ public String getCytoband() {
 	public void setCytoband(String cytoband) {
 		this.cytoband = cytoband;
 	}
+
+    @Override
+    public String getUniqueEventKey() {
+        return getEntrezGeneId().toString() + getAlteration().toString();
+    }
 }u}(jt  (bd9ae14cdaf137a97c116177c885b70a16bf7d34j  Bmodel/src/main/java/org/cbioportal/model/GenomicDataCountItem.javaj  addedj  K#j  K j  K#j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenomicDataCountItem.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenomicDataCountItem.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenomicDataCountItem.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  XL  @@ -0,0 +1,35 @@
+package org.cbioportal.model;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class GenomicDataCountItem implements Serializable {
+
+    private String hugoGeneSymbol;
+    private String profileType;
+    private List<GenomicDataCount> counts;
+
+    public String getHugoGeneSymbol() {
+        return hugoGeneSymbol;
+    }
+
+    public void setHugoGeneSymbol(String hugoGeneSymbol) {
+        this.hugoGeneSymbol = hugoGeneSymbol;
+    }
+
+    public String getProfileType() {
+        return profileType;
+    }
+
+    public void setProfileType(String profileType) {
+        this.profileType = profileType;
+    }
+
+    public List<GenomicDataCount> getCounts() {
+        return counts;
+    }
+
+    public void setCounts(List<GenomicDataCount> counts) {
+        this.counts = counts;
+    }
+}u}(jt  (0b857f2367a25249e10cd617d73894bf7a53d800j  Jmodel/src/main/java/org/cbioportal/model/StructuralVariantFilterQuery.javaj  addedj  K0j  K j  K0j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantFilterQuery.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantFilterQuery.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantFilterQuery.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X
  @@ -0,0 +1,48 @@
+package org.cbioportal.model;
+
+import org.cbioportal.model.util.Select;
+import org.springframework.lang.Nullable;
+
+import java.io.Serializable;
+
+public class StructuralVariantFilterQuery extends BaseAlterationFilter implements Serializable {
+    
+    private StructuralVariantGeneSubQuery gene1Query;
+    private StructuralVariantGeneSubQuery gene2Query;
+    
+    public StructuralVariantFilterQuery() {}
+
+    public StructuralVariantFilterQuery(String gene1HugoSymbol,
+                                        @Nullable Integer gene1EntrezId,
+                                        String gene2HugoSymbol,
+                                        @Nullable Integer gene2EntrezId,
+                                        boolean includeDriver,
+                                        boolean includeVUS,
+                                        boolean includeUnknownOncogenicity,
+                                        Select<String> tiersSelect,
+                                        boolean includeUnknownTier,
+                                        boolean includeGermline,
+                                        boolean includeSomatic,
+                                        boolean includeUnknownStatus) {
+        super(includeDriver, includeVUS, includeUnknownOncogenicity, includeGermline, includeSomatic, includeUnknownStatus, tiersSelect, includeUnknownTier);
+        this.gene1Query = new StructuralVariantGeneSubQuery(gene1HugoSymbol, gene1EntrezId);
+        this.gene2Query = new StructuralVariantGeneSubQuery(gene2HugoSymbol, gene2EntrezId);
+    }
+
+    public StructuralVariantGeneSubQuery getGene1Query() {
+        return gene1Query;
+    }
+
+    public void setGene1Query(StructuralVariantGeneSubQuery gene1Query) {
+        this.gene1Query = gene1Query;
+    }
+
+    public StructuralVariantGeneSubQuery getGene2Query() {
+        return gene2Query;
+    }
+
+    public void setGene2Query(StructuralVariantGeneSubQuery gene2Query) {
+        this.gene2Query = gene2Query;
+    }
+    
+}u}(jt  (e393e0c2d584440dc0fe2432fd2506071f60efcej  Kmodel/src/main/java/org/cbioportal/model/StructuralVariantGeneSubQuery.javaj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantGeneSubQuery.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantGeneSubQuery.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantGeneSubQuery.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -49,6 +49,10 @@ public StructuralVariantGeneSubQuery(StructuralVariantSpecialValue specialValue)
 
     public StructuralVariantGeneSubQuery(String hugoSymbol, Integer entrezId) {
         this.entrezId = entrezId;
+        this.hugoSymbol = hugoSymbol;
+        if (hugoSymbol == null && entrezId == null) {
+            this.specialValue = StructuralVariantSpecialValue.NO_GENE;
+        }
     }
 
     @Nullableu}(jt  (84584fb7a595ab211c423ef9830a999429241f7cj  Nmodel/src/main/java/org/cbioportal/model/StudyViewStructuralVariantFilter.javaj  addedj  K?j  K j  K?j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStudyViewStructuralVariantFilter.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStudyViewStructuralVariantFilter.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStudyViewStructuralVariantFilter.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X	  @@ -0,0 +1,63 @@
+package org.cbioportal.model;
+
+import javax.validation.constraints.AssertTrue;
+import java.io.Serializable;
+import java.util.List;
+import java.util.Set;
+
+public class StudyViewStructuralVariantFilter implements Serializable {
+
+    private Set<String> molecularProfileIds;
+    private List<List<StructuralVariantFilterQuery>> structVarQueries;
+
+    @AssertTrue(message = "'specialValue' field of gene1/gene2 StructVarGeneSubQueries cannot be both ANY_GENE or NO_GENE.")
+    private boolean isGeneQueriesSpecialValueCorrect() {
+        return structVarQueries.stream()
+            .flatMap(queryList -> queryList.stream())
+            .filter(structVarFilterQuery -> structVarFilterQuery.getGene1Query().getSpecialValue() != null
+                && structVarFilterQuery.getGene2Query().getSpecialValue() != null
+            )
+            .noneMatch(structVarFilterQuery -> 
+                structVarFilterQuery.getGene1Query().getSpecialValue() == 
+                structVarFilterQuery.getGene2Query().getSpecialValue()
+            );
+    }
+
+    @AssertTrue(message = "'geneId' field of gene1/gene2 StructVarGeneSubQueries cannot be both null.")
+    private boolean isGeneQueriesGeneIdCorrect() {
+        return structVarQueries.stream()
+            .flatMap(queryList -> queryList.stream())
+            .noneMatch(structVarFilterQuery -> 
+                structVarFilterQuery.getGene1Query().getHugoSymbol() == null &&
+                structVarFilterQuery.getGene2Query().getHugoSymbol() == null
+            );
+    }
+                
+    @AssertTrue(message = "'geneId' field of gene1/gene2 StructVarGeneSubQueries cannot be null when no specialValue set.")
+    private boolean isGeneQueriesHasGeneIdWhenSpecialValueNull() {
+        return structVarQueries.stream()
+            .flatMap(queryList -> queryList.stream())
+            .noneMatch(structVarFilterQuery ->
+                (structVarFilterQuery.getGene1Query().getHugoSymbol() == null &&
+                structVarFilterQuery.getGene1Query().getSpecialValue() == null)
+                || (structVarFilterQuery.getGene2Query().getHugoSymbol() == null &&
+                    structVarFilterQuery.getGene2Query().getSpecialValue() == null)
+            );
+    }
+
+    public Set<String> getMolecularProfileIds() {
+        return molecularProfileIds;
+    }
+
+    public void setMolecularProfileIds(Set<String> molecularProfileIds) {
+        this.molecularProfileIds = molecularProfileIds;
+    }
+
+    public List<List<StructuralVariantFilterQuery>> getStructVarQueries() {
+        return structVarQueries;
+    }
+
+    public void setStructVarQueries(List<List<StructuralVariantFilterQuery>> structVarQueries) {
+        this.structVarQueries = structVarQueries;
+    }
+}
\ No newline at end of fileu}(jt  (b8f436eea09c9068e3beb6f2bf6c8e697117375bj  ^persistence/persistence-api/src/main/java/org/cbioportal/persistence/AlterationRepository.javaj  modifiedj  Kj  Kj  K j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FAlterationRepository.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FAlterationRepository.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FAlterationRepository.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -10,23 +10,31 @@
 public interface AlterationRepository {
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    List<AlterationCountByGene> getSampleAlterationCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                          Select<Integer> entrezGeneIds,
-                                                          AlterationFilter alterationFilter);
+    List<AlterationCountByGene> getSampleAlterationGeneCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                              Select<Integer> entrezGeneIds,
+                                                              AlterationFilter alterationFilter);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    List<AlterationCountByGene> getPatientAlterationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                           Select<Integer> entrezGeneIds,
-                                                           AlterationFilter alterationFilter);
+    List<AlterationCountByGene> getPatientAlterationGeneCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                               Select<Integer> entrezGeneIds,
+                                                               AlterationFilter alterationFilter);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    List<CopyNumberCountByGene> getSampleCnaCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                   Select<Integer> entrezGeneIds,
-                                                   AlterationFilter alterationFilter);
+    List<CopyNumberCountByGene> getSampleCnaGeneCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                       Select<Integer> entrezGeneIds,
+                                                       AlterationFilter alterationFilter);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    List<CopyNumberCountByGene> getPatientCnaCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                    Select<Integer> entrezGeneIds,
-                                                    AlterationFilter alterationFilter);
+    List<CopyNumberCountByGene> getPatientCnaGeneCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                        Select<Integer> entrezGeneIds,
+                                                        AlterationFilter alterationFilter);
+
+    @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
+    List<AlterationCountByStructuralVariant> getSampleStructuralVariantCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                              AlterationFilter alterationFilter);
+
+    @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
+    List<AlterationCountByStructuralVariant> getPatientStructuralVariantCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                               AlterationFilter alterationFilter);
     
 }u}(jt  (2ff7c09087f076874a8b964d260f8f340f4e79d7j  `persistence/persistence-api/src/main/java/org/cbioportal/persistence/ClinicalDataRepository.javaj  modifiedj  Kj  Kj  K
j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FClinicalDataRepository.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FClinicalDataRepository.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FClinicalDataRepository.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -47,9 +47,13 @@ BaseMeta fetchMetaClinicalDataInStudy(String studyId, List<String> ids, List<Str
     List<ClinicalData> fetchClinicalData(List<String> studyIds, List<String> ids, List<String> attributeIds,
                                          String clinicalDataType, String projection);
 
-    List<ClinicalData> fetchSampleClinicalDataClinicalTable(List<String> studyIds, List<String> ids,
-                                                            Integer pageSize, Integer pageNumber, String searchTerm,
-                                                            String sortBy, String direction);
+    List<ClinicalData> fetchSampleClinicalTable(List<String> studyIds, List<String> ids,
+                                                Integer pageSize, Integer pageNumber, String searchTerm,
+                                                String sortBy, String direction);
+
+    @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
+    Integer fetchSampleClinicalTableCount(List<String> studyIds, List<String> ids, String searchTerm,
+                                          String sortBy, String direction);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
     BaseMeta fetchMetaClinicalData(List<String> studyIds, List<String> ids, List<String> attributeIds,u     }(jt  (8818779e19301d18a688c354ba820e0d87ff7022j  epersistence/persistence-api/src/main/java/org/cbioportal/persistence/StructuralVariantRepository.javaj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStructuralVariantRepository.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStructuralVariantRepository.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStructuralVariantRepository.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X`  @@ -3,6 +3,7 @@
 import java.util.List;
 
 import org.cbioportal.model.GeneFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 import org.springframework.cache.annotation.Cacheable;
@@ -20,4 +21,9 @@ List<StructuralVariant> fetchStructuralVariants(List<String> molecularProfileIds
     List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String> molecularProfileIds,
                                                                  List<String> sampleIds,
                                                                  List<GeneFilterQuery> geneQueries);
+
+    @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
+    List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
+                                                             List<String> sampleIds,
+                                                             List<StructuralVariantFilterQuery> structVarQueries);
 }u}(jt  (bc2e0705b16aced08aedf3ca718aa898c0f66540j  ]persistence/persistence-api/src/main/java/org/cbioportal/persistence/TreatmentRepository.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FTreatmentRepository.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FTreatmentRepository.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FTreatmentRepository.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -14,20 +14,18 @@ public interface TreatmentRepository {
     public Map<String, List<Treatment>> getTreatmentsByPatientId(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    public Map<String, List<ClinicalEventSample>> getSamplesByPatientId(List<String> sampleIds, List<String> studyIds);
+    public List<Treatment> getTreatments(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    public Map<String, List<ClinicalEventSample>> getShallowSamplesByPatientId(List<String> sampleIds, List<String> studyIds);
+    public Map<String, List<ClinicalEventSample>> getSamplesByPatientId(List<String> sampleIds, List<String> studyIds);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    public Set<String> getAllUniqueTreatments(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key);
+    public Map<String, List<ClinicalEventSample>> getShallowSamplesByPatientId(List<String> sampleIds, List<String> studyIds);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    public Integer getTreatmentCount(List<String> studies, String key);
+    public Boolean hasTreatmentData(List<String> studies, ClinicalEventKeyCode key);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    public Integer getSampleCount(List<String> studies);
+    public Boolean hasSampleTimelineData(List<String> studies);
 
-    @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    public Boolean studyIdHasTreatments(String studyId, ClinicalEventKeyCode key);
 }u}(jt  (2da81e8787c9c0aa846a08dfa3d2fa80a233ee13j  \persistence/persistence-api/src/main/java/org/cbioportal/persistence/config/RedisConfig.javaj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fconfig%2FRedisConfig.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fconfig%2FRedisConfig.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fconfig%2FRedisConfig.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -2,14 +2,17 @@
 
 import org.cbioportal.persistence.util.CustomKeyGenerator;
 import org.cbioportal.persistence.util.CustomRedisCachingProvider;
+import org.cbioportal.persistence.util.LoggingCacheErrorHandler;
 import org.cbioportal.utils.config.annotation.ConditionalOnProperty;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cache.CacheManager;
 import org.springframework.cache.annotation.CachingConfigurerSupport;
 import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.cache.interceptor.CacheErrorHandler;
 import org.springframework.cache.interceptor.CacheResolver;
 import org.springframework.cache.interceptor.KeyGenerator;
 import org.springframework.cache.interceptor.NamedCacheResolver;
+
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 
@@ -29,6 +32,11 @@ public CacheManager cacheManager() {
         );
     }
 
+    @Override
+    public CacheErrorHandler errorHandler() {
+        return new LoggingCacheErrorHandler();
+    }
+
     @Bean
     @Override
     public KeyGenerator keyGenerator() {u}(jt  (a682c568dca5e0286e1f79b19b80f118f35d3316j  gpersistence/persistence-api/src/main/java/org/cbioportal/persistence/util/LoggingCacheErrorHandler.javaj  addedj  K+j  K j  K+j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Futil%2FLoggingCacheErrorHandler.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Futil%2FLoggingCacheErrorHandler.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Futil%2FLoggingCacheErrorHandler.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -0,0 +1,43 @@
+package org.cbioportal.persistence.util;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.cache.Cache;
+import org.springframework.cache.interceptor.CacheErrorHandler;
+
+/**
+ * Implementation of org.springframework.cache.interceptor.CacheErrorHandler
+ * that logs the error messages when performing Redis operations.
+ * Redis will throw a RuntimeException causing our APIs to return HTTP 500 responses, so we defined
+ * this class to just log the errors and allow our app fallback to the non-cached version.
+ */
+
+public class LoggingCacheErrorHandler implements CacheErrorHandler {
+
+    private static final Logger LOG = LoggerFactory.getLogger(LoggingCacheErrorHandler.class);
+
+    @Override
+    public void handleCacheGetError(RuntimeException exception, Cache cache, Object key) {
+        LOG.error(String.format("Cache '%s' failed to get entry with key '%s'", cache.getName(), key), exception);
+        LOG.error(String.format("Cache error message: '%s'", exception.getMessage()));
+    }
+
+    @Override
+    public void handleCachePutError(RuntimeException exception, Cache cache, Object key, Object value) {
+        LOG.error(String.format("Cache '%s' failed to put entry with key '%s'", cache.getName(), key), exception);
+        LOG.error(String.format("Cache error message: '%s'", exception.getMessage()));
+    }
+
+    @Override
+    public void handleCacheEvictError(RuntimeException exception, Cache cache, Object key) {
+        LOG.error(String.format("Cache '%s' failed to evict entry with key '%s'", cache.getName(), key), exception);
+        LOG.error(String.format("Cache error message: '%s'", exception.getMessage()));
+    }
+
+    @Override
+    public void handleCacheClearError(RuntimeException exception, Cache cache) {
+        LOG.error(String.format("Cache '%s' failed to clear entries", cache.getName()), exception);
+        LOG.error(String.format("Cache error message: '%s'", exception.getMessage()));
+    }
+
+}u}(jt  (4b1461cdbb8916fab5303917adc7ccd706d8c15dj  lpersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/AlterationCountsMapper.javaj  modifiedj  K1j  Kj  K7j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationCountsMapper.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationCountsMapper.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationCountsMapper.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X$  @@ -1,6 +1,7 @@
 package org.cbioportal.persistence.mybatis;
 
 import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.AlterationCountByStructuralVariant;
 import org.cbioportal.model.CopyNumberCountByGene;
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
 import org.cbioportal.model.util.Select;
@@ -10,7 +11,7 @@
 public interface AlterationCountsMapper {
 
     /**
-     * Calculate sample-level counts of mutation and discrete CNA alteration events.
+     * Calculate sample-level counts of mutation and discrete CNA alteration events in genes.
      * @param entrezGeneIds  Gene ids to get counts for.
      * @param mutationTypes  Types of mutations to include in alteration counts. 
      * @param cnaTypes  Types of discrete copy number alteration types to include in alteration counts.
@@ -23,7 +24,7 @@ public interface AlterationCountsMapper {
      * @param includeSomatic  Include somatic mutations in alteration counts
      * @return  Gene-level counts of (1) the total number of alterations and (2) the number of altered samples.
      */
-    List<AlterationCountByGene> getSampleAlterationCounts(List<MolecularProfileCaseIdentifier> mutationMolecularProfileCaseIdentifiers,
+    List<AlterationCountByGene> getSampleAlterationGeneCounts(List<MolecularProfileCaseIdentifier> mutationMolecularProfileCaseIdentifiers,
                                                           List<MolecularProfileCaseIdentifier> cnaMolecularProfileCaseIdentifiers,
                                                           List<MolecularProfileCaseIdentifier> structuralVariantMolecularProfileCaseIdentifiers,
                                                           Select<Integer> entrezGeneIds,
@@ -38,7 +39,7 @@ List<AlterationCountByGene> getSampleAlterationCounts(List<MolecularProfileCaseI
                                                           boolean includeUnknownStatus);
 
     /**
-     * Calculate patient-level counts of mutation and discrete CNA alteration events.
+     * Calculate patient-level counts of mutation and discrete CNA alteration events in genes.
      * @param entrezGeneIds  Gene ids to get counts for.
      * @param mutationTypes  Types of mutations to include in alteration counts.
      * @param cnaTypes  Types of discrete copy number alteration types to include in alteration counts.
@@ -52,7 +53,7 @@ List<AlterationCountByGene> getSampleAlterationCounts(List<MolecularProfileCaseI
      * @param includeUnknownStatus  Include mutations that have mutation status 'unknown' in alteration counts
      * @return  Gene-level counts of (1) the total number of alterations and (2) the number of altered patients.
      */
-    List<AlterationCountByGene> getPatientAlterationCounts(List<MolecularProfileCaseIdentifier> mutationMolecularProfileCaseIdentifiers,
+    List<AlterationCountByGene> getPatientAlterationGeneCounts(List<MolecularProfileCaseIdentifier> mutationMolecularProfileCaseIdentifiers,
                                                            List<MolecularProfileCaseIdentifier> cnaMolecularProfileCaseIdentifiers,
                                                            List<MolecularProfileCaseIdentifier> structuralVariantMolecularProfileCaseIdentifiers,
                                                            Select<Integer> entrezGeneIds,
@@ -68,7 +69,7 @@ List<AlterationCountByGene> getPatientAlterationCounts(List<MolecularProfileCase
                                                            boolean includeUnknownStatus);
 
     // legacy method that returns CopyNumberCountByGene
-    List<CopyNumberCountByGene> getSampleCnaCounts(List<MolecularProfileCaseIdentifier> cnaMolecularProfileCaseIdentifiers,
+    List<CopyNumberCountByGene> getSampleCnaGeneCounts(List<MolecularProfileCaseIdentifier> cnaMolecularProfileCaseIdentifiers,
                                                    Select<Integer> entrezGeneIds,
                                                    Select<Short> cnaTypes,
                                                    boolean includeDriver,
@@ -78,7 +79,7 @@ List<CopyNumberCountByGene> getSampleCnaCounts(List<MolecularProfileCaseIdentifi
                                                    boolean includeUnknownTier);
 
     // legacy method that returns CopyNumberCountByGene
-    List<CopyNumberCountByGene> getPatientCnaCounts(List<MolecularProfileCaseIdentifier> cnaMolecularProfileCaseIdentifiers,
+    List<CopyNumberCountByGene> getPatientCnaGeneCounts(List<MolecularProfileCaseIdentifier> cnaMolecularProfileCaseIdentifiers,
                                                     Select<Integer> entrezGeneIds,
                                                     Select<Short> cnaTypes,
                                                     boolean includeDriver,
@@ -88,4 +89,46 @@ List<CopyNumberCountByGene> getPatientCnaCounts(List<MolecularProfileCaseIdentif
                                                     boolean includeUnknownTier);
 
     List<MolecularProfileCaseIdentifier> getMolecularProfileCaseInternalIdentifier(List<MolecularProfileCaseIdentifier> molecularProfileSampleIdentifiers, String caseType);
+
+    /**
+     * Calculate sample-level counts of structural variant events.
+     * @param includeDriver Include Variants of Unknown significance. Uses annotations loaded as 'custom driver annotations'.
+     * @param includeVUS  Include Variants of Unknown significance. Uses annotations loaded as 'custom driver annotations'.
+     * @param includeUnknownOncogenicity  Include variants that are not annotated as driver or VUS. Uses annotations loaded as 'custom driver annotations'.
+     * @param selectedTiers  Force alterations assigned to a tier to be interpreted as driver events. Uses tier annotations loaded as 'custom driver annotation tiers'.
+     * @param includeUnknownTier Include mutations that have unspecified tier, or tiers with '', 'NA' or 'unknown' in alteration counts
+     * @param includeGermline  Include germline mutations in alteration counts
+     * @param includeSomatic  Include somatic mutations in alteration counts
+     * @return  StructVar-level counts (GeneA::GeneB) of (1) the total number of alterations and (2) the number of altered samples.
+     */
+    List<AlterationCountByStructuralVariant> getSampleStructuralVariantCounts(List<MolecularProfileCaseIdentifier> structuralVariantMolecularProfileCaseIdentifiers,
+                                                                              boolean includeDriver,
+                                                                              boolean includeVUS,
+                                                                              boolean includeUnknownOncogenicity,
+                                                                              Select<String> selectedTiers,
+                                                                              boolean includeUnknownTier,
+                                                                              boolean includeGermline,
+                                                                              boolean includeSomatic,
+                                                                              boolean includeUnknownStatus);
+    /**
+     * Calculate patient-level counts of structural variant events.
+     * @param includeDriver Include Variants of Unknown significance. Uses annotations loaded as 'custom driver annotations'.
+     * @param includeVUS  Include Variants of Unknown significance. Uses annotations loaded as 'custom driver annotations'.
+     * @param includeUnknownOncogenicity  Include variants that are not annotated as driver or VUS. Uses annotations loaded as 'custom driver annotations'.
+     * @param selectedTiers  Force alterations assigned to a tier to be interpreted as driver events. Uses tier annotations loaded as 'custom driver annotation tiers'.
+     * @param includeUnknownTier Include mutations that have unspecified tier, or tiers with '', 'NA' or 'unknown' in alteration counts
+     * @param includeGermline  Include germline mutations in alteration counts
+     * @param includeSomatic  Include somatic mutations in alteration counts
+     * @return  StructVar-level counts (GeneA::GeneB) of (1) the total number of alterations and (2) the number of altered patients.
+     */
+    List<AlterationCountByStructuralVariant> getPatientStructuralVariantCounts(List<MolecularProfileCaseIdentifier> structuralVariantMolecularProfileCaseIdentifiers,
+                                                                              boolean includeDriver,
+                                                                              boolean includeVUS,
+                                                                              boolean includeUnknownOncogenicity,
+                                                                              Select<String> selectedTiers,
+                                                                              boolean includeUnknownTier,
+                                                                              boolean includeGermline,
+                                                                              boolean includeSomatic,
+                                                                              boolean includeUnknownStatus);
+    
 }u}(jt  (a48b6476b5962ff48696ee69a77638f37dee96d0j  qpersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/AlterationMyBatisRepository.javaj  modifiedj  KCj  Kj  KWj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepository.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepository.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepository.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X:*  @@ -1,6 +1,7 @@
 package org.cbioportal.persistence.mybatis;
 
 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;
@@ -26,17 +27,19 @@ public class AlterationMyBatisRepository implements AlterationRepository {
     private MolecularProfileRepository molecularProfileRepository;
 
     @Override
-    public List<AlterationCountByGene> getSampleAlterationCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                 Select<Integer> entrezGeneIds,
-                                                                 AlterationFilter alterationFilter) {
+    public List<AlterationCountByGene> getSampleAlterationGeneCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                     Select<Integer> entrezGeneIds,
+                                                                     AlterationFilter alterationFilter) {
 
         if ((alterationFilter.getMutationTypeSelect().hasNone() && alterationFilter.getCNAEventTypeSelect().hasNone()
                   && !alterationFilter.getStructuralVariants())
             || (molecularProfileCaseIdentifiers == null || molecularProfileCaseIdentifiers.isEmpty())
             || allAlterationsExcludedDriverAnnotation(alterationFilter)
             || allAlterationsExcludedMutationStatus(alterationFilter)
-            || allAlterationsExcludedDriverTierAnnotation(alterationFilter)) {
-            return Collections.emptyList();
+            || allAlterationsExcludedDriverTierAnnotation(alterationFilter)
+        ) {
+            // We want a mutable empty list:
+            return new ArrayList<>();
         }
 
         Set<String> molecularProfileIds = molecularProfileCaseIdentifiers.stream()
@@ -50,7 +53,7 @@ public List<AlterationCountByGene> getSampleAlterationCounts(Set<MolecularProfil
             alterationCountsMapper.getMolecularProfileCaseInternalIdentifier(new ArrayList<>(molecularProfileCaseIdentifiers), "SAMPLE_ID")
             .stream()
             .collect(Collectors.groupingBy(e -> profileTypeByProfileId.getOrDefault(e.getMolecularProfileId(), null)));
-        return alterationCountsMapper.getSampleAlterationCounts(
+        return alterationCountsMapper.getSampleAlterationGeneCounts(
             groupedIdentifiersByProfileType.get(MolecularAlterationType.MUTATION_EXTENDED),
             groupedIdentifiersByProfileType.get(MolecularAlterationType.COPY_NUMBER_ALTERATION),
             groupedIdentifiersByProfileType.get(MolecularAlterationType.STRUCTURAL_VARIANT),
@@ -68,9 +71,9 @@ public List<AlterationCountByGene> getSampleAlterationCounts(Set<MolecularProfil
     }
 
     @Override
-    public List<AlterationCountByGene> getPatientAlterationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                  Select<Integer> entrezGeneIds,
-                                                                  AlterationFilter alterationFilter) {
+    public List<AlterationCountByGene> getPatientAlterationGeneCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                      Select<Integer> entrezGeneIds,
+                                                                      AlterationFilter alterationFilter) {
 
         if ((alterationFilter.getMutationTypeSelect().hasNone() && alterationFilter.getCNAEventTypeSelect().hasNone()
             && !alterationFilter.getStructuralVariants())
@@ -91,12 +94,12 @@ public List<AlterationCountByGene> getPatientAlterationCounts(List<MolecularProf
             .collect(Collectors.toMap(datum -> datum.getMolecularProfileId().toString(), MolecularProfile::getMolecularAlterationType));
 
         Map<MolecularAlterationType, List<MolecularProfileCaseIdentifier>> groupedIdentifiersByProfileType =
-            alterationCountsMapper.getMolecularProfileCaseInternalIdentifier(molecularProfileCaseIdentifiers, "PATIENT_ID")
+            alterationCountsMapper.getMolecularProfileCaseInternalIdentifier(new ArrayList<>(molecularProfileCaseIdentifiers), "PATIENT_ID")
             .stream()
             .collect(Collectors.groupingBy(e -> profileTypeByProfileId.getOrDefault(e.getMolecularProfileId(), null)));
 
 
-        return alterationCountsMapper.getPatientAlterationCounts(
+        return alterationCountsMapper.getPatientAlterationGeneCounts(
             groupedIdentifiersByProfileType.get(MolecularAlterationType.MUTATION_EXTENDED),
             groupedIdentifiersByProfileType.get(MolecularAlterationType.COPY_NUMBER_ALTERATION),
             groupedIdentifiersByProfileType.get(MolecularAlterationType.STRUCTURAL_VARIANT),
@@ -115,9 +118,9 @@ public List<AlterationCountByGene> getPatientAlterationCounts(List<MolecularProf
     }
 
     @Override
-    public List<CopyNumberCountByGene> getSampleCnaCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                          Select<Integer> entrezGeneIds,
-                                                          AlterationFilter alterationFilter) {
+    public List<CopyNumberCountByGene> getSampleCnaGeneCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                              Select<Integer> entrezGeneIds,
+                                                              AlterationFilter alterationFilter) {
 
         if (alterationFilter.getCNAEventTypeSelect().hasNone() || molecularProfileCaseIdentifiers == null
             || allAlterationsExcludedDriverAnnotation(alterationFilter)
@@ -128,7 +131,7 @@ public List<CopyNumberCountByGene> getSampleCnaCounts(Set<MolecularProfileCaseId
         List<MolecularProfileCaseIdentifier> molecularProfileCaseInternalIdentifiers =
             alterationCountsMapper.getMolecularProfileCaseInternalIdentifier(new ArrayList<>(molecularProfileCaseIdentifiers), "SAMPLE_ID");
 
-        return alterationCountsMapper.getSampleCnaCounts(
+        return alterationCountsMapper.getSampleCnaGeneCounts(
             molecularProfileCaseInternalIdentifiers,
             entrezGeneIds,
             createCnaTypeList(alterationFilter),
@@ -140,19 +143,19 @@ public List<CopyNumberCountByGene> getSampleCnaCounts(Set<MolecularProfileCaseId
     }
 
     @Override
-    public List<CopyNumberCountByGene> getPatientCnaCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                           Select<Integer> entrezGeneIds,
-                                                           AlterationFilter alterationFilter) {
+    public List<CopyNumberCountByGene> getPatientCnaGeneCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                               Select<Integer> entrezGeneIds,
+                                                               AlterationFilter alterationFilter) {
 
         if (alterationFilter.getCNAEventTypeSelect().hasNone() || molecularProfileCaseIdentifiers == null
             || allAlterationsExcludedDriverAnnotation(alterationFilter)
             || allAlterationsExcludedDriverTierAnnotation(alterationFilter)) {
             return Collections.emptyList();
         }
         List<MolecularProfileCaseIdentifier> molecularProfileCaseInternalIdentifiers =
-            alterationCountsMapper.getMolecularProfileCaseInternalIdentifier(molecularProfileCaseIdentifiers, "PATIENT_ID");
+            alterationCountsMapper.getMolecularProfileCaseInternalIdentifier(new ArrayList<>(molecularProfileCaseIdentifiers), "PATIENT_ID");
 
-        return alterationCountsMapper.getPatientCnaCounts(
+        return alterationCountsMapper.getPatientCnaGeneCounts(
             molecularProfileCaseInternalIdentifiers,
             entrezGeneIds,
             createCnaTypeList(alterationFilter),
@@ -163,6 +166,50 @@ public List<CopyNumberCountByGene> getPatientCnaCounts(List<MolecularProfileCase
             alterationFilter.getIncludeUnknownTier());
     }
 
+    @Override
+    public List<AlterationCountByStructuralVariant> getSampleStructuralVariantCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                     AlterationFilter alterationFilter) {
+
+        if (molecularProfileCaseIdentifiers == null
+            || molecularProfileCaseIdentifiers.isEmpty()
+            || allAlterationsExcludedMutationStatus(alterationFilter)) {
+            return Collections.emptyList();
+        }
+
+        return alterationCountsMapper.getSampleStructuralVariantCounts(
+            new ArrayList<>(molecularProfileCaseIdentifiers),
+            alterationFilter.getIncludeDriver(),
+            alterationFilter.getIncludeVUS(),
+            alterationFilter.getIncludeUnknownOncogenicity(),
+            alterationFilter.getSelectedTiers(),
+            alterationFilter.getIncludeUnknownTier(),
+            alterationFilter.getIncludeGermline(),
+            alterationFilter.getIncludeSomatic(),
+            alterationFilter.getIncludeUnknownStatus());
+    }
+
+    @Override
+    public List<AlterationCountByStructuralVariant> getPatientStructuralVariantCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                     AlterationFilter alterationFilter) {
+
+        if (molecularProfileCaseIdentifiers == null
+            || molecularProfileCaseIdentifiers.isEmpty()
+            || allAlterationsExcludedMutationStatus(alterationFilter)) {
+            return Collections.emptyList();
+        }
+
+        return alterationCountsMapper.getPatientStructuralVariantCounts(
+            new ArrayList<>(molecularProfileCaseIdentifiers),
+            alterationFilter.getIncludeDriver(),
+            alterationFilter.getIncludeVUS(),
+            alterationFilter.getIncludeUnknownOncogenicity(),
+            alterationFilter.getSelectedTiers(),
+            alterationFilter.getIncludeUnknownTier(),
+            alterationFilter.getIncludeGermline(),
+            alterationFilter.getIncludeSomatic(),
+            alterationFilter.getIncludeUnknownStatus());
+    }
+    
     private Select<Short> createCnaTypeList(final AlterationFilter alterationFilter) {
         if (alterationFilter.getCNAEventTypeSelect().hasNone())
             return Select.none();u}(jt  (1f4209deffbd08bf72a2d44f3a41ed8187320620j  hpersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/ClinicalDataMapper.javaj  modifiedj  Kj  Kj  K
j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -18,9 +18,12 @@ List<ClinicalData> getPatientClinicalData(List<String> studyIds, List<String> pa
                                               String projection, Integer limit, Integer offset, String sortby,
                                               String direction);
 
-    List<ClinicalData> getSampleClinicalDataClinicalTable(List<String> studyIds, List<String> sampleIds, String projection, 
-                                                          Integer limit, Integer offset, String searchTerm,
-                                                          String sortBy, String direction);
+    List<ClinicalData> getSampleClinicalTable(List<String> studyIds, List<String> sampleIds, String projection,
+                                              Integer limit, Integer offset, String searchTerm,
+                                              String sortBy, String direction);
+
+    Integer getSampleClinicalTableCount(List<String> studyIds, List<String> sampleIds, String projection,
+                                        String searchTerm, String sortBy, String direction);
 
     BaseMeta getMetaPatientClinicalData(List<String> studyIds, List<String> patientIds, List<String> attributeIds);
 
@@ -33,5 +36,4 @@ List<ClinicalDataCount> fetchPatientClinicalDataCounts(List<String> studyIds, Li
     List<ClinicalData> getPatientClinicalDataDetailedToSample(List<String> studyIds, List<String> patientIds,
                                                               List<String> attributeIds, String projection, Integer limit,
                                                               Integer offset, String sortBy, String direction);
-
 }u}(jt  (15c692f84bcb017c9f83f2c6fc3ff25ffccf7f51j  spersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/ClinicalDataMyBatisRepository.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMyBatisRepository.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMyBatisRepository.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMyBatisRepository.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -138,17 +138,24 @@ public List<ClinicalData> fetchClinicalData(List<String> studyIds, List<String>
     }
 
     @Override
-    public List<ClinicalData> fetchSampleClinicalDataClinicalTable(List<String> studyIds, List<String> ids,
-                                                                   Integer pageSize, Integer pageNumber, String searchTerm,
-                                                                   String sortBy, String direction) {
+    public List<ClinicalData> fetchSampleClinicalTable(List<String> studyIds, List<String> ids,
+                                                       Integer pageSize, Integer pageNumber, String searchTerm,
+                                                       String sortBy, String direction) {
         if (ids.isEmpty()) {
             return new ArrayList<>();
         }
         int offset = offsetCalculator.calculate(pageSize, pageNumber);
-        return clinicalDataMapper.getSampleClinicalDataClinicalTable(studyIds, ids,"SUMMARY", pageSize,
+        return clinicalDataMapper.getSampleClinicalTable(studyIds, ids,"SUMMARY", pageSize,
             offset, searchTerm, sortBy, direction);
     }
 
+    @Override
+    public Integer fetchSampleClinicalTableCount(List<String> studyIds, List<String> sampleIds,
+                                                 String searchTerm, String sortBy, String direction) {
+        return clinicalDataMapper.getSampleClinicalTableCount(studyIds, sampleIds,"SUMMARY", 
+            searchTerm, sortBy, direction);
+    }
+
     @Override
     public BaseMeta fetchMetaClinicalData(List<String> studyIds, List<String> ids, List<String> attributeIds,
                                           String clinicalDataType) {u}(jt  (2a24f753b0d705cad523959bd9c7d946721489c1j  mpersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/StructuralVariantMapper.javaj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -26,6 +26,7 @@
 import java.util.List;
 
 import org.cbioportal.model.GeneFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 
@@ -39,4 +40,8 @@ List<StructuralVariant> fetchStructuralVariants(List<String> molecularProfileIds
     List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String> molecularProfileIds,
                                                                  List<String> sampleIds,
                                                                  List<GeneFilterQuery> geneQueries);
+
+    List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
+                                                                      List<String> sampleIds,
+                                                                      List<StructuralVariantFilterQuery> structVarQueries);
 }u}(jt  (f03d42130dab8f88ac125c31cc6da20f1255fd83j  xpersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/StructuralVariantMyBatisRepository.javaj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepository.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepository.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepository.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -24,6 +24,7 @@
 package org.cbioportal.persistence.mybatis;
 
 import org.cbioportal.model.GeneFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 import org.cbioportal.persistence.StructuralVariantRepository;
@@ -73,6 +74,21 @@ public List<StructuralVariant> fetchStructuralVariants(List<String> molecularPro
     public List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String>  molecularProfileIds,
                                                                         List<String> sampleIds,
                                                                         List<GeneFilterQuery> geneQueries) {
+        if (geneQueries == null || geneQueries.isEmpty()
+            || molecularProfileIds == null || molecularProfileIds.isEmpty()) {
+            return new ArrayList<>();
+        }
         return structuralVariantMapper.fetchStructuralVariantsByGeneQueries(molecularProfileIds, sampleIds, geneQueries);
     }
+
+    @Override
+    public List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
+                                                                             List<String> sampleIds,
+                                                                             List<StructuralVariantFilterQuery> structVarQueries) {
+        if (structVarQueries == null || structVarQueries.isEmpty()
+            || molecularProfileIds == null || molecularProfileIds.isEmpty()) {
+            return new ArrayList<>();
+        }
+        return structuralVariantMapper.fetchStructuralVariantsByStructVarQueries(molecularProfileIds, sampleIds, structVarQueries);
+    }
 }u}(jt  (44e4f8560796675a7d390a369d10fb581e91e38aj  epersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/TreatmentMapper.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -13,11 +13,7 @@ public interface TreatmentMapper {
     
     List<ClinicalEventSample> getAllShallowSamples(List<String> sampleIds, List<String> studyIds);
 
-    Set<String> getAllUniqueTreatments(List<String> sampleIds, List<String> studyIds, String key);
+    Boolean hasTreatmentData(List<String> sampleIds, List<String> studyIds, String key);
 
-    Integer getTreatmentCount(List<String> sampleIds, List<String> studyIds, String key);
-
-    Integer getSampleCount(List<String> sampleIds, List<String> studyIds);
-
-    Boolean studyIdHasTreatments(String studyId, String key);
+    Boolean hasSampleTimelineData(List<String> sampleIds, List<String> studyIds);
 }u}(jt  (d44bdfc808a4d8e643815463b763592a624dd61bj  ppersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/TreatmentMyBatisRepository.javaj  modifiedj  Kj  Kj  K&j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepository.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepository.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepository.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X	  @@ -18,12 +18,17 @@ public class TreatmentMyBatisRepository implements TreatmentRepository {
     
     @Override
     public Map<String, List<Treatment>> getTreatmentsByPatientId(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key) {
+        return getTreatments(sampleIds, studyIds, key)
+            .stream()
+            .collect(groupingBy(Treatment::getPatientId));
+    }
+
+    @Override
+    public List<Treatment> getTreatments(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key) {
         return treatmentMapper.getAllTreatments(sampleIds, studyIds, key.getKey())
             .stream()
             .flatMap(treatment -> splitIfDelimited(treatment, key))
-            .collect(groupingBy(Treatment::getPatientId));
-        
-        
+            .collect(Collectors.toList());
     }
 
     private Stream<Treatment> splitIfDelimited(Treatment unsplitTreatment, ClinicalEventKeyCode key) {
@@ -61,31 +66,12 @@ public Map<String, List<ClinicalEventSample>> getShallowSamplesByPatientId(List<
     }
 
     @Override
-    public Set<String> getAllUniqueTreatments(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key) {
-        return treatmentMapper.getAllUniqueTreatments(sampleIds, studyIds, key.getKey())
-            .stream()
-            .flatMap(treatment -> {
-                if (key.isDelimited()) {
-                    return Arrays.stream(treatment.split(key.getDelimiter()));
-                } else {
-                    return Stream.of(treatment);
-                }
-            })
-            .collect(Collectors.toSet());
-    }
-
-    @Override
-    public Integer getTreatmentCount(List<String> studies, String key) {
-        return treatmentMapper.getTreatmentCount(null, studies, key);
-    }
-
-    @Override
-    public Integer getSampleCount(List<String> studies) {
-        return treatmentMapper.getSampleCount(null, studies);
+    public Boolean hasTreatmentData(List<String> studies, ClinicalEventKeyCode key) {
+        return treatmentMapper.hasTreatmentData(null, studies, key.getKey());
     }
 
     @Override
-    public Boolean studyIdHasTreatments(String studyId, ClinicalEventKeyCode key) {
-        return treatmentMapper.studyIdHasTreatments(studyId, key.getKey());
+    public Boolean hasSampleTimelineData(List<String> studies) {
+        return treatmentMapper.hasSampleTimelineData(null, studies);
     }
 }u}(jt  (01ed5f7bae7167941c488b34592e51cba881fbdej  ppersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatis/AlterationCountsMapper.xmlj  modifiedj  K?j  K	j  KHj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationCountsMapper.xmlj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationCountsMapper.xmlj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationCountsMapper.xml?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X+  @@ -3,7 +3,7 @@
 
 <mapper namespace="org.cbioportal.persistence.mybatis.AlterationCountsMapper">
 
-    <select id="getSampleAlterationCounts" resultType="org.cbioportal.model.AlterationCountByGene">
+    <select id="getSampleAlterationGeneCounts" resultType="org.cbioportal.model.AlterationCountByGene">
         SELECT 
             ENTREZ_GENE_ID AS entrezGeneId,
             HUGO_GENE_SYMBOL AS hugoGeneSymbol,
@@ -37,7 +37,7 @@
         GROUP BY ENTREZ_GENE_ID, HUGO_GENE_SYMBOL;
     </select>
 
-    <select id="getPatientAlterationCounts" resultType="org.cbioportal.model.AlterationCountByGene">
+    <select id="getPatientAlterationGeneCounts" resultType="org.cbioportal.model.AlterationCountByGene">
         SELECT
             ENTREZ_GENE_ID AS entrezGeneId,
             HUGO_GENE_SYMBOL AS hugoGeneSymbol,
@@ -71,7 +71,7 @@
         GROUP BY ENTREZ_GENE_ID, HUGO_GENE_SYMBOL;
     </select>
 
-    <select id="getSampleCnaCounts" resultType="org.cbioportal.model.CopyNumberCountByGene">
+    <select id="getSampleCnaGeneCounts" resultType="org.cbioportal.model.CopyNumberCountByGene">
         SELECT
             cna_event.ENTREZ_GENE_ID AS entrezGeneId,
             gene.HUGO_GENE_SYMBOL AS hugoGeneSymbol,
@@ -111,7 +111,7 @@
         GROUP BY cna_event.ENTREZ_GENE_ID, cna_event.ALTERATION, reference_genome_gene.CYTOBAND, gene.HUGO_GENE_SYMBOL
     </select>
 
-    <select id="getPatientCnaCounts" resultType="org.cbioportal.model.CopyNumberCountByGene">
+    <select id="getPatientCnaGeneCounts" resultType="org.cbioportal.model.CopyNumberCountByGene">
         SELECT
             cna_event.ENTREZ_GENE_ID AS entrezGeneId,
             gene.HUGO_GENE_SYMBOL AS hugoGeneSymbol,
@@ -147,6 +147,60 @@
         </where>
         GROUP BY cna_event.ENTREZ_GENE_ID, cna_event.ALTERATION, gene.HUGO_GENE_SYMBOL
     </select>
+    
+    <select id="getSampleStructuralVariantCounts" resultType="org.cbioportal.model.AlterationCountByStructuralVariant">
+        SELECT
+            gene1.ENTREZ_GENE_ID AS gene1EntrezGeneId,
+            gene1.HUGO_GENE_SYMBOL AS gene1HugoGeneSymbol,
+            gene2.ENTREZ_GENE_ID AS gene2EntrezGeneId,
+            gene2.HUGO_GENE_SYMBOL AS gene2HugoGeneSymbol,
+            COUNT(*) AS totalCount,
+            COUNT(DISTINCT(sample.INTERNAL_ID)) AS numberOfAlteredCases
+        FROM structural_variant
+            INNER JOIN genetic_profile ON structural_variant.GENETIC_PROFILE_ID = genetic_profile.GENETIC_PROFILE_ID
+            <include refid="fromIncludeCustomAnnotationsSV" />
+            INNER JOIN sample ON structural_variant.SAMPLE_ID = sample.INTERNAL_ID
+            INNER JOIN patient ON sample.PATIENT_ID = patient.INTERNAL_ID
+            LEFT JOIN gene as gene1 ON structural_variant.SITE1_ENTREZ_GENE_ID = gene1.ENTREZ_GENE_ID
+            LEFT JOIN gene as gene2 ON structural_variant.SITE2_ENTREZ_GENE_ID = gene2.ENTREZ_GENE_ID
+        <where>
+            <include refid="whereCustomAnnotations"/>
+            <include refid="whereSVStatus" />
+            <include refid="caseFilter">
+                <property name="case_type" value="'SAMPLE_ID'"/>
+                <property name="identifiers" value="structuralVariantMolecularProfileCaseIdentifiers" />
+                <property name="geneticProfileIdentifier" value="genetic_profile.STABLE_ID" />
+                <property name="caseStableIdentifier" value="caseStableIdentifier" />
+            </include>
+        </where>
+        GROUP BY gene1.ENTREZ_GENE_ID, gene2.ENTREZ_GENE_ID
+    </select>
+    
+    <select id="getPatientStructuralVariantCounts" resultType="org.cbioportal.model.AlterationCountByStructuralVariant">
+        SELECT
+            gene1.ENTREZ_GENE_ID AS gene1EntrezGeneId,
+            gene1.HUGO_GENE_SYMBOL AS gene1HugoGeneSymbol,
+            gene2.ENTREZ_GENE_ID AS gene2EntrezGeneId,
+            gene2.HUGO_GENE_SYMBOL AS gene2HugoGeneSymbol,
+            COUNT(*) AS totalCount,
+            COUNT(DISTINCT(patient.INTERNAL_ID)) AS numberOfAlteredCases
+        FROM structural_variant
+            INNER JOIN genetic_profile ON structural_variant.GENETIC_PROFILE_ID = genetic_profile.GENETIC_PROFILE_ID
+            INNER JOIN sample ON structural_variant.SAMPLE_ID = sample.INTERNAL_ID
+            INNER JOIN patient ON sample.PATIENT_ID = patient.INTERNAL_ID
+            INNER JOIN gene as gene1 ON structural_variant.SITE1_ENTREZ_GENE_ID = gene1.ENTREZ_GENE_ID
+            INNER JOIN gene as gene2 ON structural_variant.SITE2_ENTREZ_GENE_ID = gene2.ENTREZ_GENE_ID
+        <where>
+            <include refid="whereSVStatus" />
+            <include refid="caseFilter">
+                <property name="case_type" value="'PATIENT_ID'"/>
+                <property name="identifiers" value="structuralVariantMolecularProfileCaseIdentifiers" />
+                <property name="geneticProfileIdentifier" value="genetic_profile.STABLE_ID" />
+                <property name="caseStableIdentifier" value="caseStableIdentifier" />
+            </include>
+        </where>
+        GROUP BY gene1.ENTREZ_GENE_ID, gene2.ENTREZ_GENE_ID
+    </select>
 
     <sql id="fromIncludeCustomAnnotationsMutation">
         <!--For better performance, only join in the alteration_driver_annotation table when we need to filter on it.-->
@@ -291,15 +345,15 @@
                 <trim prefix="AND (" suffix=")" prefixOverrides="OR">
                     <if test="includeGermline">
                         OR
-                        LOWER(combinedResults.SV_STATUS) = 'germline'
+                        LOWER(SV_STATUS) = 'germline'
                     </if>
                     <if test="includeSomatic">
                         OR
-                        LOWER(combinedResults.SV_STATUS) = 'somatic'
+                        LOWER(SV_STATUS) = 'somatic'
                     </if>
                     <if test="includeUnknownStatus">
                         OR
-                        LOWER(combinedResults.SV_STATUS) NOT IN ('germline', 'somatic')
+                        LOWER(SV_STATUS) NOT IN ('germline', 'somatic')
                     </if>
                 </trim>
             </when>
@@ -427,7 +481,7 @@
                 <include refid="caseUniqueIdentifier" /> as caseUniqueId,
                 <include refid="caseStableIdentifier" /> as caseStableId,
                 genetic_profile.GENETIC_PROFILE_ID as geneticProfileId,
-                structural_variant.SV_STATUS
+                structural_variant.SV_STATUS as SV_STATUS
             FROM
                 structural_variant
             INNER JOIN genetic_profile ON structural_variant.GENETIC_PROFILE_ID = genetic_profile.GENETIC_PROFILE_ID
@@ -447,7 +501,7 @@
                 <include refid="caseUniqueIdentifier" /> as caseUniqueId,
                 <include refid="caseStableIdentifier" /> as caseStableId,
                 genetic_profile.GENETIC_PROFILE_ID as geneticProfileId,
-                structural_variant.SV_STATUS
+                structural_variant.SV_STATUS as SV_STATUS
             FROM
                 structural_variant
             INNER JOIN genetic_profile ON structural_variant.GENETIC_PROFILE_ID = genetic_profile.GENETIC_PROFILE_IDu}(jt  (29e6cd536c59c8a5a75ed8b29ab4ec8f3edde60fj  lpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatis/ClinicalDataMapper.xmlj  modifiedj  K+j  Kj  K6j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.xmlj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.xmlj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.xml?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -47,6 +47,11 @@
         INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
     </sql>
 
+    <sql id="fromSampleAndClinicalPatient">
+        <include refid="fromSample"/>
+        LEFT JOIN clinical_patient ON clinical_patient.INTERNAL_ID = patient.INTERNAL_ID
+    </sql>
+
     <sql id="fromPatient">
         FROM clinical_patient
         INNER JOIN patient ON clinical_patient.INTERNAL_ID = patient.INTERNAL_ID
@@ -221,7 +226,7 @@
         GROUP BY clinical_patient.ATTR_ID, clinical_patient.ATTR_VALUE
     </select>
 
-    <select id="getSampleClinicalDataClinicalTable" resultType="org.cbioportal.model.ClinicalData">
+    <select id="getSampleClinicalTable" resultType="org.cbioportal.model.ClinicalData">
         SELECT
         <include refid="selectSample">
             <property name="prefix" value=""/>
@@ -230,28 +235,55 @@
         <include refid="whereSampleSearchAndPagination"/>
     </select>
 
+    <select id="getSampleClinicalTableCount" resultType="Integer">
+        SELECT count(DISTINCT clinical_sample.INTERNAL_ID)
+        <include refid="fromSample"/>
+        <include refid="whereSampleSearchAndPagination"/>
+    </select>
+    
     <sql id="whereSampleSearchAndPagination">
-        INNER JOIN
-        (SELECT DISTINCT clinical_sample.INTERNAL_ID
+        INNER JOIN (
+            SELECT DISTINCT clinical_sample.INTERNAL_ID
             <if test="_parameter.containsKey('sortBy') and sortBy != null">
-                , clinical_sample.ATTR_ID, clinical_sample.ATTR_VALUE
+                <if test="sortBy == 'sampleId'">
+                  , sample.STABLE_ID AS SORT_BY
+                </if>
+                <if test="sortBy == 'patientId'">
+                  , patient.STABLE_ID AS SORT_BY
+                </if>
+                <!-- else: -->
+                <if test="sortBy != 'sampleId' and sortBy != 'patientId'">
+                  <!-- Mark samples without the sort attribute as NULL: -->
+                  , CASE 
+                        WHEN clinical_sample.ATTR_ID = #{sortBy} THEN clinical_sample.ATTR_VALUE 
+                        WHEN clinical_patient.ATTR_ID = #{sortBy} THEN clinical_patient.ATTR_VALUE 
+                        ELSE NULL 
+                    END AS SORT_BY
+                </if>
             </if>
-            <include refid="fromSample"/>
+            <include refid="fromSampleAndClinicalPatient"/>
             <include refid="whereSample"/>
             <if test="_parameter.containsKey('searchTerm') and searchTerm != null and not searchTerm.isBlank()">
                 AND
-                clinical_sample.ATTR_VALUE LIKE CONCAT('%','${searchTerm}', '%')
+                clinical_sample.ATTR_VALUE LIKE CONCAT('%', #{searchTerm}, '%')
             </if>
             <if test="_parameter.containsKey('sortBy') and sortBy != null">
-                AND 
-                clinical_sample.ATTR_ID = '${sortBy}'
-                ORDER BY clinical_sample.ATTR_VALUE ${direction}
+                <!-- Put 'NULL samples' last: -->
+                <choose>
+                    <when test="_databaseId == 'mysql'">
+                        ORDER BY ISNULL(SORT_BY), SORT_BY ${direction}
+                    </when>
+                    <when test="_databaseId == 'h2'">
+                        ORDER BY SORT_BY ${direction} NULLS LAST
+                    </when>
+                </choose>
             </if>
+            
             <if test="_parameter.containsKey('limit') and limit != null and limit != 0">
                 LIMIT #{limit} OFFSET #{offset}
             </if>
-        ) as sample_id_subquery
-        ON clinical_sample.INTERNAL_ID = sample_id_subquery.INTERNAL_ID
+        ) AS sample_id_subquery
+          ON clinical_sample.INTERNAL_ID = sample_id_subquery.INTERNAL_ID
     </sql>
     
 </mapper>u}(jt  (0fe8bbe89551d679b2fcefd12196b917508e7556j  qpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatis/StructuralVariantMapper.xmlj  modifiedj  Kj  K.j  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.xmlj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.xmlj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.xml?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X/  @@ -82,13 +82,67 @@
 
     <sql id="whereWithGeneQueries">
         AND
-        <foreach item="geneFilterQuery" collection="geneQueries" open="(" separator=" OR " close=")">
-            (( structural_variant.SITE1_ENTREZ_GENE_ID = '${geneFilterQuery.getEntrezGeneId()}'
-            OR structural_variant.SITE2_ENTREZ_GENE_ID = '${geneFilterQuery.getEntrezGeneId()}')
-            <bind name="allDriverAnnotationsSelected" value="geneFilterQuery.getIncludeDriver() and geneFilterQuery.getIncludeVUS() and geneFilterQuery.getIncludeUnknownOncogenicity()" />
-            <bind name="noDriverAnnotationsSelected" value="not geneFilterQuery.getIncludeDriver() and not geneFilterQuery.getIncludeVUS() and not geneFilterQuery.getIncludeUnknownOncogenicity()" />
-            <choose>
-                <when test="not allDriverAnnotationsSelected and not noDriverAnnotationsSelected">
+        <foreach item="geneFilterQuery" collection="${queries}" open="(" separator=" OR " close=")">
+        (
+        <choose>
+            <when test="${singleGeneMode}">
+                (structural_variant.SITE1_ENTREZ_GENE_ID = ${geneFilterQuery.getEntrezGeneId()}
+                OR structural_variant.SITE2_ENTREZ_GENE_ID = ${geneFilterQuery.getEntrezGeneId()})
+            </when>
+            <otherwise>
+                <trim prefix="" prefixOverrides="AND">
+                     <choose>
+                        <when test="geneFilterQuery.getGene1Query().getSpecialValue() == @org.cbioportal.model.StructuralVariantSpecialValue@NO_GENE">
+                            AND structural_variant.SITE1_ENTREZ_GENE_ID IS NULL
+                        </when>
+                        <when test="geneFilterQuery.getGene1Query().getSpecialValue() == @org.cbioportal.model.StructuralVariantSpecialValue@ANY_GENE" />
+                        <otherwise>
+                            AND structural_variant.SITE1_ENTREZ_GENE_ID = ${geneFilterQuery.getGene1Query().getEntrezId()}
+                        </otherwise>
+                    </choose>
+                    <choose>
+                        <when test="geneFilterQuery.getGene2Query().getSpecialValue() == @org.cbioportal.model.StructuralVariantSpecialValue@NO_GENE">
+                            AND
+                            structural_variant.SITE2_ENTREZ_GENE_ID IS NULL
+                        </when>
+                        <when test="geneFilterQuery.getGene2Query().getSpecialValue() == @org.cbioportal.model.StructuralVariantSpecialValue@ANY_GENE" />
+                        <otherwise>
+                            AND
+                            structural_variant.SITE2_ENTREZ_GENE_ID = ${geneFilterQuery.getGene2Query().getEntrezId()}
+                        </otherwise>
+                    </choose>
+                </trim>       
+            </otherwise>
+        </choose>
+        <bind name="allStructVarStatusSelected" value="geneFilterQuery.getIncludeGermline() and geneFilterQuery.getIncludeSomatic() and geneFilterQuery.getIncludeUnknownStatus()" />
+        <bind name="noStructVarStatusSelected" value="not geneFilterQuery.getIncludeGermline() and not geneFilterQuery.getIncludeSomatic() and not geneFilterQuery.getIncludeUnknownStatus()" />
+        <choose>
+            <when test="not allStructVarStatusSelected and not noStructVarStatusSelected">
+                <trim prefix="AND (" prefixOverrides="OR">
+                    <if test="geneFilterQuery.getIncludeGermline()">
+                        OR LOWER(structural_variant.SV_STATUS) = 'germline'
+                    </if>
+                    <if test="geneFilterQuery.getIncludeSomatic()">
+                        OR LOWER(structural_variant.SV_STATUS) = 'somatic'
+                    </if>
+                    <if test="geneFilterQuery.getIncludeUnknownStatus()">
+                        OR LOWER(structural_variant.SV_STATUS) NOT IN ('somatic', 'germline')
+                    </if>
+                </trim>
+                )
+            </when>
+            <when test="noStructVarStatusSelected">
+                AND NULL
+            </when>
+            <otherwise>
+                <!--when allStructVarStatusSelected do not filter-->
+            </otherwise>
+        </choose>
+        <bind name="allDriverAnnotationsSelected" value="geneFilterQuery.getIncludeDriver() and geneFilterQuery.getIncludeVUS() and geneFilterQuery.getIncludeUnknownOncogenicity()" />
+        <bind name="noDriverAnnotationsSelected" value="not geneFilterQuery.getIncludeDriver() and not geneFilterQuery.getIncludeVUS() and not geneFilterQuery.getIncludeUnknownOncogenicity()" />
+        <choose>
+            <when test="not allDriverAnnotationsSelected and not noDriverAnnotationsSelected">
+                <trim prefix="" prefixOverrides="AND ( )">
                     <trim prefix="AND (" suffix=")" prefixOverrides="OR">
                         <if test="geneFilterQuery.getIncludeDriver()">
                             OR LOWER(alteration_driver_annotation.DRIVER_FILTER) = 'putative_driver'
@@ -101,44 +155,45 @@
                             OR LOWER(alteration_driver_annotation.DRIVER_FILTER) IN ('unknown', 'na', '')
                         </if>
                     </trim>
-                </when>
-                <when test="noDriverAnnotationsSelected">
-                    AND NULL
-                </when>
-                <otherwise>
-                    <!--when allDriverAnnotationsSelected do not filter-->
-                </otherwise>
-            </choose>
-            <bind name="allTierOptionsSelected" value="(geneFilterQuery.getSelectedTiers() != null and geneFilterQuery.getSelectedTiers().hasAll()) and geneFilterQuery.getIncludeUnknownTier()" />
-            <bind name="noTierOptionsSelected" value="(geneFilterQuery.getSelectedTiers() == null or geneFilterQuery.getSelectedTiers().hasNone()) and not geneFilterQuery.getIncludeUnknownTier()" />
-            <bind name="allExceptUnknownTierOptionsSelected" value="(geneFilterQuery.getSelectedTiers() != null and geneFilterQuery.getSelectedTiers().hasAll()) and not geneFilterQuery.getIncludeUnknownTier()" />
-            <choose>
-                <when test="allExceptUnknownTierOptionsSelected">
-                    AND NOT alteration_driver_annotation.DRIVER_TIERS_FILTER IS NULL
-                    AND NOT LOWER(alteration_driver_annotation.DRIVER_TIERS_FILTER) IN ('', 'na', 'unknown')
-                </when>
-                <when test="not allTierOptionsSelected and not noTierOptionsSelected">
-                    <trim prefix="AND (" suffix=")" prefixOverrides="OR">
-                        <if test="geneFilterQuery.getSelectedTiers() != null and geneFilterQuery.getSelectedTiers().hasValues()">
-                            OR alteration_driver_annotation.DRIVER_TIERS_FILTER IN
-                            <foreach item="item" collection="geneFilterQuery.getSelectedTiers()" open="(" separator="," close=")">
-                                #{item}
-                            </foreach>
-                        </if>
-                        <if test="geneFilterQuery.getIncludeUnknownTier()">
-                            OR alteration_driver_annotation.DRIVER_TIERS_FILTER IS NULL
-                            OR LOWER(alteration_driver_annotation.DRIVER_TIERS_FILTER) IN ('', 'na', 'unknown')
-                        </if>
-                    </trim>
-                </when>
-                <when test="noTierOptionsSelected">
-                    AND NULL
-                </when>
-                <otherwise>
-                    <!--when allTierOptionsSelected do not filter-->
-                </otherwise>
-            </choose>
-            )
+                </trim>
+            </when>
+            <when test="noDriverAnnotationsSelected">
+                AND NULL
+            </when>
+            <otherwise>
+                <!--when allDriverAnnotationsSelected do not filter-->
+            </otherwise>
+        </choose>
+        <bind name="allTierOptionsSelected" value="(geneFilterQuery.getSelectedTiers() != null and geneFilterQuery.getSelectedTiers().hasAll()) and geneFilterQuery.getIncludeUnknownTier()" />
+        <bind name="noTierOptionsSelected" value="(geneFilterQuery.getSelectedTiers() == null or geneFilterQuery.getSelectedTiers().hasNone()) and not geneFilterQuery.getIncludeUnknownTier()" />
+        <bind name="allExceptUnknownTierOptionsSelected" value="(geneFilterQuery.getSelectedTiers() != null and geneFilterQuery.getSelectedTiers().hasAll()) and not geneFilterQuery.getIncludeUnknownTier()" />
+        <choose>
+            <when test="allExceptUnknownTierOptionsSelected">
+                AND NOT alteration_driver_annotation.DRIVER_TIERS_FILTER IS NULL
+                AND NOT LOWER(alteration_driver_annotation.DRIVER_TIERS_FILTER) IN ('', 'na', 'unknown')
+            </when>
+            <when test="not allTierOptionsSelected and not noTierOptionsSelected">
+                <trim prefix="AND (" suffix=")" prefixOverrides="OR">
+                    <if test="geneFilterQuery.getSelectedTiers() != null and geneFilterQuery.getSelectedTiers().hasValues()">
+                        OR alteration_driver_annotation.DRIVER_TIERS_FILTER IN
+                        <foreach item="item" collection="geneFilterQuery.getSelectedTiers()" open="(" separator="," close=")">
+                            #{item}
+                        </foreach>
+                    </if>
+                    <if test="geneFilterQuery.getIncludeUnknownTier()">
+                        OR alteration_driver_annotation.DRIVER_TIERS_FILTER IS NULL
+                        OR LOWER(alteration_driver_annotation.DRIVER_TIERS_FILTER) IN ('', 'na', 'unknown')
+                    </if>
+                </trim>
+            </when>
+            <when test="noTierOptionsSelected">
+                AND NULL
+            </when>
+            <otherwise>
+                <!--when allTierOptionsSelected do not filter-->
+            </otherwise>
+        </choose>
+        )
         </foreach>
     </sql>
     
@@ -232,7 +287,36 @@
         and structural_variant.INTERNAL_ID = alteration_driver_annotation.ALTERATION_EVENT_ID
         <where>
             <include refid="whereInMultipleMolecularProfiles" />
-            <include refid="whereWithGeneQueries" />
+            <include refid="whereWithGeneQueries">
+                <property name="singleGeneMode" value="true" />
+                <property name="queries" value="geneQueries" />
+            </include>
+        </where>
+        ORDER BY gene1.HUGO_GENE_SYMBOL, gene2.HUGO_GENE_SYMBOL
+    </select>
+    
+    <select id="fetchStructuralVariantsByStructVarQueries" resultType="org.cbioportal.model.StructuralVariant">
+        SELECT
+        <include refid="select">
+            <property name="prefix" value=""/>
+        </include>
+        FROM structural_variant
+        JOIN genetic_profile ON structural_variant.GENETIC_PROFILE_ID = genetic_profile.GENETIC_PROFILE_ID
+        LEFT JOIN gene gene1 ON structural_variant.SITE1_ENTREZ_GENE_ID = gene1.ENTREZ_GENE_ID
+        LEFT JOIN gene gene2 ON structural_variant.SITE2_ENTREZ_GENE_ID = gene2.ENTREZ_GENE_ID
+        JOIN sample ON structural_variant.SAMPLE_ID = sample.INTERNAL_ID
+        JOIN patient ON sample.PATIENT_ID = patient.INTERNAL_ID
+        JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID AND genetic_profile.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
+        LEFT JOIN alteration_driver_annotation ON
+        structural_variant.GENETIC_PROFILE_ID = alteration_driver_annotation.GENETIC_PROFILE_ID
+        AND structural_variant.SAMPLE_ID = alteration_driver_annotation.SAMPLE_ID
+        AND structural_variant.INTERNAL_ID = alteration_driver_annotation.ALTERATION_EVENT_ID
+        <where>
+            <include refid="whereInMultipleMolecularProfiles" />
+            <include refid="whereWithGeneQueries">
+                <property name="singleGeneMode" value="false" />
+                <property name="queries" value="structVarQueries" />
+            </include>
         </where>
         ORDER BY gene1.HUGO_GENE_SYMBOL, gene2.HUGO_GENE_SYMBOL
     </select>u	     }(jt  (de633ab7f55b0f7c85a4ddf6d633ec17c43e9158j  ipersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatis/TreatmentMapper.xmlj  modifiedj  Kj  K"j  K-j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.xmlj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.xmlj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.xml?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X
  @@ -16,6 +16,7 @@
             INNER JOIN sample ON patient.INTERNAL_ID = sample.PATIENT_ID
             INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
         <include refid="where"/>
+        AND clinical_event.EVENT_TYPE = 'TREATMENT'
         AND clinical_event_data.KEY = #{key}
     </select>
 
@@ -48,35 +49,24 @@
         <include refid="where"/>
     </select>
 
-    <select id="getAllUniqueTreatments" resultType="java.lang.String">
-        SELECT 
-            DISTINCT clinical_event_data.VALUE
+    <select id="hasTreatmentData" resultType="java.lang.Boolean">
+        SELECT EXISTS(SELECT
+            *
         FROM
             clinical_event
             INNER JOIN clinical_event_data ON clinical_event.CLINICAL_EVENT_ID = clinical_event_data.CLINICAL_EVENT_ID
             INNER JOIN patient ON clinical_event.PATIENT_ID = patient.INTERNAL_ID
             INNER JOIN sample ON patient.INTERNAL_ID = sample.PATIENT_ID
             INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
         <include refid="where"/>
-            AND clinical_event_data.KEY = #{key}
+            AND clinical_event.EVENT_TYPE = 'TREATMENT'
+            AND clinical_event_data.KEY = #{key} LIMIT 1
+        )
     </select>
 
-    <select id="getTreatmentCount" resultType="java.lang.Integer">
-        SELECT
-            COUNT(clinical_event.PATIENT_ID)
-        FROM
-            clinical_event
-            INNER JOIN clinical_event_data ON clinical_event.CLINICAL_EVENT_ID = clinical_event_data.CLINICAL_EVENT_ID
-            INNER JOIN patient ON clinical_event.PATIENT_ID = patient.INTERNAL_ID
-            INNER JOIN sample ON patient.INTERNAL_ID = sample.PATIENT_ID
-            INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
-        <include refid="where"/>
-            AND clinical_event_data.KEY = #{key}
-    </select>
-
-    <select id="getSampleCount" resultType="java.lang.Integer">
-        SELECT
-            COUNT(sample.STABLE_ID)
+    <select id="hasSampleTimelineData" resultType="java.lang.Boolean">
+        SELECT EXISTS(SELECT
+            *
         FROM
             clinical_event
             INNER JOIN clinical_event_data ON clinical_event.CLINICAL_EVENT_ID = clinical_event_data.CLINICAL_EVENT_ID
@@ -85,20 +75,7 @@
             INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
         <include refid="where"/>
             AND clinical_event_data.KEY = 'SAMPLE_ID'
-            AND (clinical_event.EVENT_TYPE LIKE 'Sample Acquisition' OR clinical_event.EVENT_TYPE LIKE 'SPECIMEN')
-    </select>
-    
-    <select id="studyIdHasTreatments" resultType="java.lang.Boolean">
-        SELECT
-            count(cancer_study.CANCER_STUDY_IDENTIFIER) > 0
-        FROM
-            clinical_event
-            INNER JOIN clinical_event_data ON clinical_event.CLINICAL_EVENT_ID = clinical_event_data.CLINICAL_EVENT_ID
-            INNER JOIN patient ON clinical_event.PATIENT_ID = patient.INTERNAL_ID
-            INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
-        WHERE
-            clinical_event_data.KEY = #{key}
-            AND cancer_study.CANCER_STUDY_IDENTIFIER = #{studyId}
+            AND (clinical_event.EVENT_TYPE LIKE 'Sample Acquisition' OR clinical_event.EVENT_TYPE LIKE 'SPECIMEN') LIMIT 1)
     </select>
 
     <sql id="where">u}(jt  (3ea53acf77ec5c9fdaefb19fc9864e431e4b655ej  upersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/AlterationMyBatisRepositoryTest.javaj  modifiedj  M)j  Kj  Mj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  XD  @@ -1,7 +1,6 @@
 package org.cbioportal.persistence.mybatis;
 
 import org.cbioportal.model.*;
-import org.cbioportal.model.QueryElement;
 import org.cbioportal.model.util.Select;
 import org.junit.Assert;
 import org.junit.Before;
@@ -12,7 +11,6 @@
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
-import java.sql.ResultSet;
 import java.util.*;
 
 @RunWith(SpringJUnit4ClassRunner.class)
@@ -21,7 +19,7 @@
 public class AlterationMyBatisRepositoryTest {
 
     //    mutation and cna events in testSql.sql
-    //        SAMPLE_ID,    ENTREZ_GENE_ID, HUGO_GENE_SYMBOL, GENETIC_PROFILE_ID, TYPE, MUTATION_TYPE, DRIVER_FILTER, DRIVER_TIERS_FILTER, PATIENT_ID, MUTATION_TYPE
+    //        SAMPLE_ID,    ENTREZ_GENE_ID, HUGO_GENE_SYMBOL, GENETIC_PROFILE_ID, TYPE, MUTATIONio_TYPE, DRIVER_FILTER, DRIVER_TIERS_FILTER, PATIENT_ID, MUTATION_TYPE
     //        1	    207	    AKT1	2	CNA         -2	                Putative_Driver	    Tier 1  TCGA-A1-A0SB    germline
     //        2	    207	    AKT1	2	CNA         2	                Putative_Passenger	Tier 2  TCGA-A1-A0SD    germline
     //        1	    207	    AKT1	6	MUTATION    Nonsense_Mutation	Putative_Driver	    Tier 1  TCGA-A1-A0SB    germline
@@ -44,7 +42,8 @@ public class AlterationMyBatisRepositoryTest {
     //       15     57670-673   KIAA..-BRAF 13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
     //        1     8031-5979   NCOA4-RET   7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
     //       15     8031-5979   NCOA4-RET   13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
-    //        1     7113-2078   TMPRSS2-ERG 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     7113-2078   TMPRSS2-ERG 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-       NCOA4-      13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
 
     @Autowired
     private AlterationMyBatisRepository alterationMyBatisRepository;
@@ -58,15 +57,13 @@ public class AlterationMyBatisRepositoryTest {
         CNA.AMP,
         CNA.HOMDEL
     ));
-    List<MolecularProfileCaseIdentifier> sampleIdToProfileId = new ArrayList<>();
-    List<MolecularProfileCaseIdentifier> patientIdToProfileId = new ArrayList<>();
-
-    List<MolecularProfileCaseIdentifier> svSampleIdToProfileId = new ArrayList<>();
-    List<MolecularProfileCaseIdentifier> svPatientIdToProfileId = new ArrayList<>();
+    Set<MolecularProfileCaseIdentifier> sampleIdToProfileId = new TreeSet<>();
+    Set<MolecularProfileCaseIdentifier> svSampleIdToProfileId = new TreeSet<>();
+    Set<MolecularProfileCaseIdentifier> patientIdToProfileId = new TreeSet<>();
+    Set<MolecularProfileCaseIdentifier> svPatientIdToProfileId = new TreeSet<>();
     AlterationFilter alterationFilter;
     
     Select<Integer> entrezGeneIds;
-
     Select<Integer> svEntrezGeneIds;
 
     @Before
@@ -83,6 +80,7 @@ public void setup() {
         sampleIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SD-01", "study_tcga_pub_gistic"));
         svSampleIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SB-01", "study_tcga_pub_sv"));
         svSampleIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SD-01", "study_tcga_pub_sv"));
+        svSampleIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-B0SO-01", "acc_tcga_sv"));
 
         patientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SB", "study_tcga_pub_mutations"));
         patientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SE", "study_tcga_pub_mutations"));
@@ -95,6 +93,7 @@ public void setup() {
         patientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SD", "study_tcga_pub_gistic"));
         svPatientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SB", "study_tcga_pub_sv"));
         svPatientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SD", "study_tcga_pub_sv"));
+        svPatientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-B0SO", "acc_tcga_sv"));
 
         entrezGeneIds = Select.byValues(Arrays.asList(207, 208, 672, 2064));
         svEntrezGeneIds = Select.byValues(Arrays.asList(57670, 8031, 27436, 7113));
@@ -113,60 +112,60 @@ public void setup() {
     }
 
     @Test
-    public void getSampleMutationCountAllDriverAnnotationsExcluded() throws Exception {
+    public void getSampleMutationGeneCountAllDriverAnnotationsExcluded() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeVUS(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new HashSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getSampleMutationCountAllDriverTiersExcluded() throws Exception {
+    public void getSampleMutationGeneCountAllDriverTiersExcluded() throws Exception {
         alterationFilter.setSelectedTiers(Select.none());
         alterationFilter.setIncludeUnknownTier(false);
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
             new TreeSet<>(sampleIdToProfileId),
             entrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getSampleMutationCountAllDriverTiersExcludedWithNullSelect() throws Exception {
+    public void getSampleMutationGeneCountAllDriverTiersExcludedWithNullSelect() throws Exception {
         alterationFilter.setSelectedTiers(null);
         alterationFilter.setIncludeUnknownTier(false);
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getSampleMutationCountAllMutationStatusExcluded() throws Exception {
+    public void getSampleMutationGeneCountAllMutationStatusExcluded() throws Exception {
         alterationFilter.setIncludeSomatic(false);
         alterationFilter.setIncludeGermline(false);
         alterationFilter.setIncludeUnknownStatus(false);
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getSampleMutationCount() throws Exception {
+    public void getSampleMutationGeneCount() throws Exception {
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
@@ -183,10 +182,10 @@ public void getSampleMutationCount() throws Exception {
     }
 
     @Test
-    public void getSampleCnaCount() throws Exception {
+    public void getSampleCnaGeneCount() throws Exception {
         alterationFilter.setMutationTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
@@ -200,9 +199,9 @@ public void getSampleCnaCount() throws Exception {
     }
 
     @Test
-    public void getSampleMutationAndCnaCount() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+    public void getSampleMutationAndCnaGeneCount() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
@@ -221,58 +220,58 @@ public void getSampleMutationAndCnaCount() throws Exception {
     @Test
     public void whenSampleNotProfiledForCNA() throws Exception {
 
-        List<MolecularProfileCaseIdentifier> sampleIdToProfileId = new ArrayList<>();
+        Set<MolecularProfileCaseIdentifier> sampleIdToProfileId = new TreeSet<>();
         // Sample is not profiled for mutations and not cna
         sampleIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SE-01", "study_tcga_pub_gistic"));
 
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getPatientCnaCountAllDriverAnnotationsExcluded() throws Exception {
+    public void getPatientCnaGeneCountAllDriverAnnotationsExcluded() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeVUS(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
         alterationFilter.setMutationTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getPatientCnaCountAllDriverTiersExcluded() throws Exception {
+    public void getPatientCnaGeneCountAllDriverTiersExcluded() throws Exception {
         alterationFilter.setSelectedTiers(Select.none());
         alterationFilter.setIncludeUnknownTier(false);
         alterationFilter.setMutationTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getPatientCnaCountAllDriverTiersExcludedNullSelect() throws Exception {
+    public void getPatientCnaGeneCountAllDriverTiersExcludedNullSelect() throws Exception {
         alterationFilter.setSelectedTiers(null);
         alterationFilter.setIncludeUnknownTier(false);
         alterationFilter.setMutationTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
     }
     
     @Test
-    public void getPatientCnaCount() throws Exception {
+    public void getPatientCnaGeneCount() throws Exception {
         alterationFilter.setMutationTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,    
             alterationFilter);
@@ -289,14 +288,14 @@ public void getPatientCnaCount() throws Exception {
     }
 
     @Test
-    public void getSampleCnaCountLegacy() throws Exception {
+    public void getSampleCnaGeneCountLegacy() throws Exception {
 
         // FIXME: the CnaCountLegacy endpoint is different from the AlterationCount endpoint
         // because it returns a single additional value 'cytoband'. It would make sense to 
         // harmonize these endpoints (both or none return 'cytoband') and use the AlterationCount
         // endpoint for all counts. Let's discuss...
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(
-            new TreeSet<>(sampleIdToProfileId), 
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(
+            sampleIdToProfileId, 
             entrezGeneIds,
             alterationFilter);
 
@@ -310,13 +309,13 @@ public void getSampleCnaCountLegacy() throws Exception {
     }
     
     @Test
-    public void getPatientCnaCountLegacy() throws Exception {
+    public void getPatientCnaGeneCountLegacy() throws Exception {
 
         // FIXME: the CnaCountLegacy endpoint is different from the AlterationCount endpoint
         // because it returns a single additional value 'cytoband'. It would make sense to 
         // harmonize these endpoints (both or none return 'cytoband') and use the AlterationCount
         // endpoint for all counts. Let's discuss...
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -333,57 +332,57 @@ public void getPatientCnaCountLegacy() throws Exception {
     }
 
     @Test
-    public void getSampleAlterationCountsReturnsZeroForMutationsAndCnaSelectorsInNone() {
+    public void getSampleAlterationGeneCountsReturnsZeroForMutationsAndCnaSelectorsInNone() {
         alterationFilter.setCnaTypeSelect(Select.none());
         alterationFilter.setMutationTypeSelect(Select.none());
 	alterationFilter.setStructuralVariants(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getSampleAlterationCountsReturnsAllForMutationsAndCnaSelectorsInAll() {
+    public void getSampleAlterationGeneCountsReturnsAllForMutationsAndCnaSelectorsInAll() {
         alterationFilter.setCnaTypeSelect(Select.all());
         alterationFilter.setMutationTypeSelect(Select.all());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
         Assert.assertEquals(3, result.size());
     }
 
     @Test
-    public void getSampleCountNullIds() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
+    public void getSampleGeneCountNullIds() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
             null, entrezGeneIds, new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getPatientCountNullIds() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+    public void getPatientGeneCountNullIds() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             null, entrezGeneIds, new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getSampleCnaCountNullIds() throws Exception {
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(
+    public void getSampleCnaGeneCountNullIds() throws Exception {
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(
             null, entrezGeneIds, new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getSampleCountIncludeOnlyDriver() throws Exception {
+    public void getSampleGeneCountIncludeOnlyDriver() throws Exception {
         alterationFilter.setIncludeVUS(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
@@ -397,11 +396,11 @@ public void getSampleCountIncludeOnlyDriver() throws Exception {
     }
 
     @Test
-    public void getSampleCountIncludeOnlyVus() throws Exception {
+    public void getSampleGeneCountIncludeOnlyVus() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
@@ -418,11 +417,11 @@ public void getSampleCountIncludeOnlyVus() throws Exception {
     }
 
     @Test
-    public void getSampleCountIncludeOnlyUnknownOncogenicity() throws Exception {
+    public void getSampleGeneCountIncludeOnlyUnknownOncogenicity() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeVUS(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
@@ -433,12 +432,12 @@ public void getSampleCountIncludeOnlyUnknownOncogenicity() throws Exception {
     }
 
     @Test
-    public void getSampleCountIncludeOnlyTiers() throws Exception {
+    public void getSampleGeneCountIncludeOnlyTiers() throws Exception {
         // All 'Tier 2' tiers are forced to be interpreted as driver events
         alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Tier 2")));
         alterationFilter.setIncludeUnknownTier(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
@@ -452,10 +451,10 @@ public void getSampleCountIncludeOnlyTiers() throws Exception {
     }
 
     @Test
-    public void getSampleCountIncludeUnknownTier() throws Exception {
+    public void getSampleGeneCountIncludeUnknownTier() throws Exception {
         alterationFilter.setSelectedTiers(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
@@ -466,8 +465,8 @@ public void getSampleCountIncludeUnknownTier() throws Exception {
     }
 
     @Test
-    public void getPatientMutationAndCnaCount() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+    public void getPatientMutationAndCnaGeneCount() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -487,11 +486,11 @@ public void getPatientMutationAndCnaCount() throws Exception {
     }
 
     @Test
-    public void getPatientMutationCountIncludeOnlyGermline() throws Exception {
+    public void getPatientMutationGeneCountIncludeOnlyGermline() throws Exception {
         alterationFilter.setIncludeSomatic(false);
         alterationFilter.setIncludeUnknownStatus(false);
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -509,11 +508,11 @@ public void getPatientMutationCountIncludeOnlyGermline() throws Exception {
     }
 
     @Test
-    public void getPatientMutationCountIncludeOnlySomatic() throws Exception {
+    public void getPatientMutationGeneCountIncludeOnlySomatic() throws Exception {
         alterationFilter.setIncludeGermline(false);
         alterationFilter.setIncludeUnknownStatus(false);
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -522,11 +521,11 @@ public void getPatientMutationCountIncludeOnlySomatic() throws Exception {
     }
 
     @Test
-    public void getPatientMutationCountIncludeOnlyUnknownStatus() throws Exception {
+    public void getPatientMutationGeneCountIncludeOnlyUnknownStatus() throws Exception {
         alterationFilter.setIncludeGermline(false);
         alterationFilter.setIncludeSomatic(false);
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -535,10 +534,10 @@ public void getPatientMutationCountIncludeOnlyUnknownStatus() throws Exception {
     }
 
     @Test
-    public void getPatientCountIncludeOnlyDriver() throws Exception {
+    public void getPatientGeneCountIncludeOnlyDriver() throws Exception {
         alterationFilter.setIncludeVUS(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -553,10 +552,10 @@ public void getPatientCountIncludeOnlyDriver() throws Exception {
     }
 
     @Test
-    public void getPatientCountIncludeOnlyVUS() throws Exception {
+    public void getPatientGeneCountIncludeOnlyVUS() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -574,10 +573,10 @@ public void getPatientCountIncludeOnlyVUS() throws Exception {
     }
     
     @Test
-    public void getPatientCountIncludeOnlyUnknownOncogenicity() throws Exception {
+    public void getPatientGeneCountIncludeOnlyUnknownOncogenicity() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeVUS(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -589,11 +588,11 @@ public void getPatientCountIncludeOnlyUnknownOncogenicity() throws Exception {
     }
 
     @Test
-    public void getPatientCountIncludeOnlyTiers() throws Exception {
+    public void getPatientGeneCountIncludeOnlyTiers() throws Exception {
         // All 'Tier 2' tiers are forced to be interpreted as driver events
         alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Tier 2")));
         alterationFilter.setIncludeUnknownTier(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -608,9 +607,9 @@ public void getPatientCountIncludeOnlyTiers() throws Exception {
     }
 
     @Test
-    public void getPatientCountIncludeUnknownTier() throws Exception {
+    public void getPatientGeneCountIncludeUnknownTier() throws Exception {
         alterationFilter.setSelectedTiers(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -622,10 +621,10 @@ public void getPatientCountIncludeUnknownTier() throws Exception {
     }
 
     @Test
-    public void getSampleCnaCountLegacyOnlyDriver() throws Exception {
+    public void getSampleCnaGeneCountLegacyOnlyDriver() throws Exception {
         alterationFilter.setIncludeVUS(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(new TreeSet<>(sampleIdToProfileId), entrezGeneIds, alterationFilter);
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(sampleIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
         AlterationCountByGene result207 = result.stream().filter(r -> r.getEntrezGeneId() == 207).findFirst().get();
@@ -634,10 +633,10 @@ public void getSampleCnaCountLegacyOnlyDriver() throws Exception {
     }
 
     @Test
-    public void getSampleCnaCountLegacyOnlyVUS() throws Exception {
+    public void getSampleCnaGeneCountLegacyOnlyVUS() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(new TreeSet<>(sampleIdToProfileId), entrezGeneIds, alterationFilter);
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(sampleIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
         AlterationCountByGene result207 = result.stream().filter(r -> r.getEntrezGeneId() == 207).findFirst().get();
@@ -646,11 +645,11 @@ public void getSampleCnaCountLegacyOnlyVUS() throws Exception {
     }
 
     @Test
-    public void getSampleCnaCountLegacyOnlyUnknownOncogenicity() throws Exception {
+    public void getSampleCnaGeneCountLegacyOnlyUnknownOncogenicity() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeVUS(false);
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(
-            new TreeSet<>(sampleIdToProfileId), entrezGeneIds, alterationFilter);
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(
+            sampleIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
         AlterationCountByGene result208 = result.stream().filter(r -> r.getEntrezGeneId() == 208).findFirst().get();
@@ -659,10 +658,10 @@ public void getSampleCnaCountLegacyOnlyUnknownOncogenicity() throws Exception {
     }
 
     @Test
-    public void getSampleCnaCountLegacyOnlyUnknownTier() throws Exception {
+    public void getSampleCnaGeneCountLegacyOnlyUnknownTier() throws Exception {
         alterationFilter.setSelectedTiers(Select.none());
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(
-            new TreeSet<>(sampleIdToProfileId), entrezGeneIds, alterationFilter);
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(
+            sampleIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
         AlterationCountByGene result208 = result.stream().filter(r -> r.getEntrezGeneId() == 208).findFirst().get();
@@ -671,12 +670,12 @@ public void getSampleCnaCountLegacyOnlyUnknownTier() throws Exception {
     }
 
     @Test
-    public void getSampleCnaCountLegacyOnlyTier2() throws Exception {
+    public void getSampleCnaGeneCountLegacyOnlyTier2() throws Exception {
         // All 'Tier 2' tiers are forced to be interpreted as driver events
         alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Tier 2")));
         alterationFilter.setIncludeUnknownTier(false);
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(
-            new TreeSet<>(sampleIdToProfileId), entrezGeneIds, alterationFilter);
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(
+            sampleIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
         AlterationCountByGene result207 = result.stream().filter(r -> r.getEntrezGeneId() == 207).findFirst().get();
@@ -685,10 +684,10 @@ public void getSampleCnaCountLegacyOnlyTier2() throws Exception {
     }
 
     @Test
-    public void getPatientCnaCountLegacyOnlyDriver() throws Exception {
+    public void getPatientCnaGeneCountLegacyOnlyDriver() throws Exception {
         alterationFilter.setIncludeVUS(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             patientIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
@@ -698,10 +697,10 @@ public void getPatientCnaCountLegacyOnlyDriver() throws Exception {
     }
 
     @Test
-    public void getPatientCnaCountLegacyOnlyVUS() throws Exception {
+    public void getPatientCnaGeneCountLegacyOnlyVUS() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             patientIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
@@ -711,10 +710,10 @@ public void getPatientCnaCountLegacyOnlyVUS() throws Exception {
     }
 
     @Test
-    public void getPatientCnaCountLegacyOnlyUnknownOncogenicity() throws Exception {
+    public void getPatientCnaGeneCountLegacyOnlyUnknownOncogenicity() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeVUS(false);
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             patientIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
@@ -724,9 +723,9 @@ public void getPatientCnaCountLegacyOnlyUnknownOncogenicity() throws Exception {
     }
 
     @Test
-    public void getPatientCnaCountLegacyOnlyUnknownTier() throws Exception {
+    public void getPatientCnaGeneCountLegacyOnlyUnknownTier() throws Exception {
         alterationFilter.setSelectedTiers(Select.none());
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             patientIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
@@ -736,12 +735,12 @@ public void getPatientCnaCountLegacyOnlyUnknownTier() throws Exception {
     }
 
     @Test
-    public void getPatientCnaCountLegacyOnlyTier2() throws Exception {
+    public void getPatientCnaGeneCountLegacyOnlyTier2() throws Exception {
         // All 'Tier 2' tiers are forced to be interpreted as driver events
         alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Tier 2")));
         alterationFilter.setIncludeUnknownTier(false);
         alterationFilter.setSelectedTiers( Select.byValues(Arrays.asList("Tier 2")));
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             patientIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
@@ -752,92 +751,92 @@ public void getPatientCnaCountLegacyOnlyTier2() throws Exception {
 
 
     @Test
-    public void getPatientCnaCountNullIds() throws Exception {
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+    public void getPatientCnaGeneCountNullIds() throws Exception {
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             null, entrezGeneIds, new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
     
     @Test
-    public void getSampleCountNullEntrezGeneIds() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId), null, new AlterationFilter());
+    public void getSampleGeneCountNullEntrezGeneIds() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId, null, new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
     
     @Test
-    public void getSampleCountEmptyEntrezGeneIds() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId), Select.none(), new AlterationFilter());
+    public void getSampleGeneCountEmptyEntrezGeneIds() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId, Select.none(), new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
     
     @Test
-    public void getSampleCountAllEntrezGeneIds() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId), Select.all(), new AlterationFilter());
+    public void getSampleGeneCountAllEntrezGeneIds() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId, Select.all(), new AlterationFilter());
         Assert.assertEquals(3, result.size());
     }
 
     @Test
-    public void getPatientCountNullEntrezGeneIds() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+    public void getPatientGeneCountNullEntrezGeneIds() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId, null, new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getPatientCountEmptyEntrezGeneIds() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+    public void getPatientGeneCountEmptyEntrezGeneIds() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId, Select.none(), new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getPatientCountAllEntrezGeneIds() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+    public void getPatientGeneCountAllEntrezGeneIds() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId, Select.all(), new AlterationFilter());
         Assert.assertEquals(3, result.size());
     }
 
     @Test
-    public void getSampleCnaCountNullEntrezGeneIds() throws Exception {
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(
-            new TreeSet<>(sampleIdToProfileId), null, new AlterationFilter());
+    public void getSampleCnaGeneCountNullEntrezGeneIds() throws Exception {
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(
+            sampleIdToProfileId, null, new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getSampleCnaCountEmptyEntrezGeneIds() throws Exception {
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(
-            new TreeSet<>(sampleIdToProfileId), Select.none(), new AlterationFilter());
+    public void getSampleCnaGeneCountEmptyEntrezGeneIds() throws Exception {
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(
+            sampleIdToProfileId, Select.none(), new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getSampleCnaCountAllEntrezGeneIds() throws Exception {
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(
-            new TreeSet<>(sampleIdToProfileId), Select.all(), new AlterationFilter());
+    public void getSampleCnaGeneCountAllEntrezGeneIds() throws Exception {
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(
+            sampleIdToProfileId, Select.all(), new AlterationFilter());
         Assert.assertEquals(3, result.size());
     }
 
     @Test
-    public void getPatientCnaCountNullEntrezGeneIds() throws Exception {
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+    public void getPatientCnaGeneCountNullEntrezGeneIds() throws Exception {
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             patientIdToProfileId, null, new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getPatientCnaCountEmptyEntrezGeneIds() throws Exception {
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+    public void getPatientCnaGeneCountEmptyEntrezGeneIds() throws Exception {
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             patientIdToProfileId, Select.none(), new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getPatientCnaCountAllEntrezGeneIds() throws Exception {
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+    public void getPatientCnaGeneCountAllEntrezGeneIds() throws Exception {
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             patientIdToProfileId, Select.all(), new AlterationFilter());
         Assert.assertEquals(3, result.size());
     }
@@ -851,8 +850,8 @@ public void getSampleStructuralVariantCountAllStructuralVariantStatusExcluded()
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(svSampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            svSampleIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
@@ -863,8 +862,8 @@ public void getSampleStructuralVariantCountAllStructuralVariantStatusIncluded()
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(svSampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            svSampleIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
         Assert.assertEquals(4, result.size());
@@ -877,19 +876,22 @@ public void getSampleStructuralVariantCountIncludeOnlyGermline() throws Exceptio
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(svSampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            svSampleIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
         // two structural variants in testSql.sql are germline mutations
 
         AlterationCountByGene result57670 = result.stream().filter(r -> r.getEntrezGeneId() == 57670).findFirst().get();
         AlterationCountByGene result27436 = result.stream().filter(r -> r.getEntrezGeneId() == 27436).findFirst().get();
-        Assert.assertEquals(2, result.size());
+        AlterationCountByGene result7113 = result.stream().filter(r -> r.getEntrezGeneId() == 7113).findFirst().get();
+        Assert.assertEquals(3, result.size());
         Assert.assertEquals((Integer) 1, result57670.getTotalCount());
         Assert.assertEquals((Integer) 1, result57670.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result27436.getTotalCount());
         Assert.assertEquals((Integer) 1, result27436.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, result7113.getTotalCount());
+        Assert.assertEquals((Integer) 1, result7113.getNumberOfAlteredCases());
     }
 
     @Test
@@ -899,8 +901,8 @@ public void getSampleStructuralVariantCountIncludeOnlySomatic() throws Exception
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(svSampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            svSampleIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
         Assert.assertEquals(4, result.size());
@@ -909,10 +911,10 @@ public void getSampleStructuralVariantCountIncludeOnlySomatic() throws Exception
         AlterationCountByGene result8031 = result.stream().filter(r -> r.getEntrezGeneId() == 8031).findFirst().get();
         AlterationCountByGene result27436 = result.stream().filter(r -> r.getEntrezGeneId() == 27436).findFirst().get();
         AlterationCountByGene result7113 = result.stream().filter(r -> r.getEntrezGeneId() == 7113).findFirst().get();
-        Assert.assertEquals((Integer) 2, result57670.getTotalCount());
-        Assert.assertEquals((Integer) 2, result57670.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 1, result8031.getTotalCount());
-        Assert.assertEquals((Integer) 1, result8031.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, result57670.getTotalCount());
+        Assert.assertEquals((Integer) 3, result57670.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, result8031.getTotalCount());
+        Assert.assertEquals((Integer) 2, result8031.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result27436.getTotalCount());
         Assert.assertEquals((Integer) 1, result27436.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result7113.getTotalCount());
@@ -926,8 +928,8 @@ public void getSampleStructuralVariantCountIncludeOnlyUnknownStatus() throws Exc
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(svSampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            svSampleIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
@@ -942,7 +944,7 @@ public void getPatientStructuralVariantCountAllStructuralVariantStatusExcluded()
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
@@ -954,7 +956,7 @@ public void getPatientStructuralVariantCountAllStructuralVariantStatusIncluded()
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
@@ -968,19 +970,22 @@ public void getPatientStructuralVariantCountIncludeOnlyGermline() throws Excepti
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
         // two structural variants in testSql.sql are germline mutations
-        Assert.assertEquals(2, result.size());
+        Assert.assertEquals(3, result.size());
 
         AlterationCountByGene result57670 = result.stream().filter(r -> r.getEntrezGeneId() == 57670).findFirst().get();
         AlterationCountByGene result27436 = result.stream().filter(r -> r.getEntrezGeneId() == 27436).findFirst().get();
+        AlterationCountByGene result7113 = result.stream().filter(r -> r.getEntrezGeneId() == 7113).findFirst().get();
         Assert.assertEquals((Integer) 1, result57670.getTotalCount());
         Assert.assertEquals((Integer) 1, result57670.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result27436.getTotalCount());
         Assert.assertEquals((Integer) 1, result27436.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, result7113.getTotalCount());
+        Assert.assertEquals((Integer) 1, result7113.getNumberOfAlteredCases());
     }
 
     @Test
@@ -990,7 +995,7 @@ public void getPatientStructuralVariantCountIncludeOnlySomatic() throws Exceptio
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
@@ -1000,10 +1005,10 @@ public void getPatientStructuralVariantCountIncludeOnlySomatic() throws Exceptio
         AlterationCountByGene result8031 = result.stream().filter(r -> r.getEntrezGeneId() == 8031).findFirst().get();
         AlterationCountByGene result27436 = result.stream().filter(r -> r.getEntrezGeneId() == 27436).findFirst().get();
         AlterationCountByGene result7113 = result.stream().filter(r -> r.getEntrezGeneId() == 7113).findFirst().get();
-        Assert.assertEquals((Integer) 2, result57670.getTotalCount());
-        Assert.assertEquals((Integer) 2, result57670.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 1, result8031.getTotalCount());
-        Assert.assertEquals((Integer) 1, result8031.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, result57670.getTotalCount());
+        Assert.assertEquals((Integer) 3, result57670.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, result8031.getTotalCount());
+        Assert.assertEquals((Integer) 2, result8031.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result27436.getTotalCount());
         Assert.assertEquals((Integer) 1, result27436.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result7113.getTotalCount());
@@ -1017,7 +1022,7 @@ public void getPatientStructuralVariantCountIncludeOnlyUnknownStatus() throws Ex
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
@@ -1029,9 +1034,9 @@ public void getPatientStructuralVariantCountIncludeCustomDriverAnnotationsInclud
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        alterationFilter.setSelectedTiers(Select.byValues(List.of("Class 2")));
+        alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Class 2")));
         alterationFilter.setIncludeUnknownTier(true);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,
             svEntrezGeneIds,
             alterationFilter
@@ -1044,14 +1049,131 @@ public void getPatientStructuralVariantCountIncludeCustomDriverAnnotationsExclud
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        alterationFilter.setSelectedTiers(Select.byValues(List.of("Class 2")));
+        alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Class 2")));
         alterationFilter.setIncludeUnknownTier(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,
             svEntrezGeneIds,
             alterationFilter
         );
         Assert.assertEquals(1, result.size());
     }
+    @Test
+    public void getSampleStructuralVariantCount() throws Exception {
+        List<AlterationCountByStructuralVariant> result = alterationMyBatisRepository.getSampleStructuralVariantCounts(
+            svSampleIdToProfileId,
+            alterationFilter);
+
+        // Should be one KIAA154-BRAF, one NCOA4-RET and one NCOA4-null
+        Assert.assertEquals(5, result.size());
+        AlterationCountByStructuralVariant resultEmlAlk = findStructVarCount("EML4", "ALK", result);
+        AlterationCountByStructuralVariant resultKiaaBraf= findStructVarCount("KIAA1549", "BRAF", result);
+        AlterationCountByStructuralVariant resultTmprsErg = findStructVarCount("TMPRSS2", "ERG", result);
+        AlterationCountByStructuralVariant resultNcoRet = findStructVarCount("NCOA4", "RET", result);
+        AlterationCountByStructuralVariant resultNcoNull = findStructVarCount("NCOA4", null, result);
+        Assert.assertEquals((Integer) 2, resultEmlAlk.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultEmlAlk.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 4, resultKiaaBraf.getTotalCount());
+        Assert.assertEquals((Integer) 3, resultKiaaBraf.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, resultNcoNull.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultNcoNull.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultTmprsErg.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultTmprsErg.getNumberOfAlteredCases());
+    }
+
+    @Test
+    public void getSampleStructuralVariantCountAllSvStatusExcluded() throws Exception {
+    
+        // Note: 'NA' for SV status is not allowed as per file-formats.md
+        alterationFilter.setIncludeSomatic(false);
+        alterationFilter.setIncludeGermline(false);
+        alterationFilter.setIncludeUnknownStatus(false);
+        List<AlterationCountByStructuralVariant> result = alterationMyBatisRepository.getSampleStructuralVariantCounts(
+            sampleIdToProfileId,
+            alterationFilter);
+
+        Assert.assertEquals(0, result.size());
+    }
+
+    @Test
+    public void getSampleStructuralVariantCountSomaticSvStatusExcluded() throws Exception {
+
+        // Note: 'NA' for SV status is not allowed as per file-formats.md
+        alterationFilter.setIncludeSomatic(false);
+        alterationFilter.setIncludeUnknownStatus(false);
+        List<AlterationCountByStructuralVariant> result = alterationMyBatisRepository.getSampleStructuralVariantCounts(
+            svSampleIdToProfileId,
+            alterationFilter);
+
+        Assert.assertEquals(3, result.size());
+        AlterationCountByStructuralVariant resultKiaaBraf= findStructVarCount("KIAA1549", "BRAF", result);
+        AlterationCountByStructuralVariant resultEmlAlk = findStructVarCount("EML4", "ALK", result);
+        AlterationCountByStructuralVariant resultTmprsErg = findStructVarCount("TMPRSS2", "ERG", result);
+        Assert.assertEquals((Integer) 1, resultKiaaBraf.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultKiaaBraf.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, resultEmlAlk.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultEmlAlk.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, resultTmprsErg.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultTmprsErg.getNumberOfAlteredCases());
+    }
+
+    @Test
+    public void getSampleStructuralVariantCountGermlineSvStatusExcluded() throws Exception {
+        // Note: 'NA' for SV status is not allowed as per file-formats.md
+        alterationFilter.setIncludeGermline(false);
+        alterationFilter.setIncludeUnknownStatus(false);
+        List<AlterationCountByStructuralVariant> result = alterationMyBatisRepository.getSampleStructuralVariantCounts(
+            svSampleIdToProfileId,
+            alterationFilter);
+
+        Assert.assertEquals(5, result.size());
+        AlterationCountByStructuralVariant resultEmlAlk = findStructVarCount("EML4", "ALK", result);
+        AlterationCountByStructuralVariant resultKiaaBraf= findStructVarCount("KIAA1549", "BRAF", result);
+        AlterationCountByStructuralVariant resultTmprsErg = findStructVarCount("TMPRSS2", "ERG", result);
+        AlterationCountByStructuralVariant resultNcoRet = findStructVarCount("NCOA4", "RET", result);
+        AlterationCountByStructuralVariant resultNcoNull = findStructVarCount("NCOA4", null, result);
+        Assert.assertEquals((Integer) 1, resultEmlAlk.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultEmlAlk.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, resultKiaaBraf.getTotalCount());
+        Assert.assertEquals((Integer) 3, resultKiaaBraf.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, resultNcoNull.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultNcoNull.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, resultTmprsErg.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultTmprsErg.getNumberOfAlteredCases());
+    }
+
+    @Test
+    public void getPatientStructuralVariantCount() throws Exception {
+        List<AlterationCountByStructuralVariant> result = alterationMyBatisRepository.getPatientStructuralVariantCounts(
+            svPatientIdToProfileId,
+            alterationFilter);
+
+        Assert.assertEquals(4, result.size());
+        AlterationCountByStructuralVariant resultEmlAlk = findStructVarCount("EML4", "ALK", result);
+        AlterationCountByStructuralVariant resultKiaaBraf= findStructVarCount("KIAA1549", "BRAF", result);
+        AlterationCountByStructuralVariant resultTmprsErg = findStructVarCount("TMPRSS2", "ERG", result);
+        AlterationCountByStructuralVariant resultNcoRet = findStructVarCount("NCOA4", "RET", result);
+        Assert.assertEquals((Integer) 2, resultEmlAlk.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultEmlAlk.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 4, resultKiaaBraf.getTotalCount());
+        Assert.assertEquals((Integer) 3, resultKiaaBraf.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultTmprsErg.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultTmprsErg.getNumberOfAlteredCases());
+    }
+
+    private AlterationCountByStructuralVariant findStructVarCount(String gene1HugoSymbol,
+                                                                  String gene2HugoSymbol,
+                                                                  List<AlterationCountByStructuralVariant> counts) {
+        return counts.stream().filter(
+            c -> ((c.getGene1HugoGeneSymbol() == null && gene1HugoSymbol == null) || (c.getGene1HugoGeneSymbol() != null && c.getGene1HugoGeneSymbol().equals(gene1HugoSymbol)))
+              && ((c.getGene2HugoGeneSymbol() == null && gene2HugoSymbol == null) || (c.getGene2HugoGeneSymbol() != null && c.getGene2HugoGeneSymbol().equals(gene2HugoSymbol)))
+            ).findFirst().get();
+    }
     
 }u     }(jt  (406e830c8fb8db33c04c693951f4c689ad814cdbj  wpersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/ClinicalDataMyBatisRepositoryTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMyBatisRepositoryTest.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMyBatisRepositoryTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMyBatisRepositoryTest.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -354,9 +354,9 @@ public void fetchClinicalDataNullAttributeSummaryProjection() {
     @Test
     public void fetchClinicalSampleDataClinicalTabPagingSuccess() {
 
-        List<ClinicalData> resultFirstPage = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(studyIds,
+        List<ClinicalData> resultFirstPage = clinicalDataMyBatisRepository.fetchSampleClinicalTable(studyIds,
             sampleIds, 1, 0, noSearch, noSort, "DESC");
-        List<ClinicalData> resultSecondPage = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(studyIds,
+        List<ClinicalData> resultSecondPage = clinicalDataMyBatisRepository.fetchSampleClinicalTable(studyIds,
             sampleIds, 1, 1, noSearch, noSort, "DESC");
 
         Assert.assertEquals(4, resultFirstPage.size());
@@ -380,7 +380,7 @@ public void fetchClinicalSampleDataClinicalTabPagingSuccess() {
     public void fetchClinicalSampleDataClinicalTablePagingHandleNoneExistingPage() {
 
         // There are only two patients in total. The second page (index 1) with pageSize 2 does not refer to any records.
-        List<ClinicalData> resultNonExistingPage = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(
+        List<ClinicalData> resultNonExistingPage = clinicalDataMyBatisRepository.fetchSampleClinicalTable(
             studyIds, sampleIds, 2, 1, noSearch, noSort, "DESC");
 
         Assert.assertEquals(0, resultNonExistingPage.size());
@@ -389,15 +389,15 @@ public void fetchClinicalSampleDataClinicalTablePagingHandleNoneExistingPage() {
     @Test
     public void fetchClinicalSampleDataClinicalTabSearchTermSuccess() {
 
-        List<ClinicalData> resultSample1 = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(
+        List<ClinicalData> resultSample1 = clinicalDataMyBatisRepository.fetchSampleClinicalTable(
             studyIds, sampleIds, noPaging, noPaging, "5C631CE8", noSort, "DESC");
             
         Assert.assertEquals(4, resultSample1.size());
         List<String> observedSampleIds = resultSample1.stream().map(s -> s.getSampleId()).distinct().collect(Collectors.toList());
         Assert.assertEquals(1, observedSampleIds.size());
         Assert.assertEquals("TCGA-A1-A0SB-01", observedSampleIds.get(0));
 
-        List<ClinicalData> resultSample2 = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(
+        List<ClinicalData> resultSample2 = clinicalDataMyBatisRepository.fetchSampleClinicalTable(
             studyIds, sampleIds, noPaging, noPaging, "F3408556-9259", noSort, "DESC");
 
         Assert.assertEquals(4, resultSample2.size());
@@ -409,7 +409,7 @@ public void fetchClinicalSampleDataClinicalTabSearchTermSuccess() {
     @Test
     public void fetchClinicalSampleDataEClinicalTabEmptyStringSearchTerm() {
 
-        List<ClinicalData> result = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(
+        List<ClinicalData> result = clinicalDataMyBatisRepository.fetchSampleClinicalTable(
             studyIds, sampleIds, noPaging, noPaging, "", noSort, "DESC");
             
         Assert.assertEquals(8, result.size());
@@ -418,9 +418,9 @@ public void fetchClinicalSampleDataEClinicalTabEmptyStringSearchTerm() {
     @Test
     public void fetchClinicalSampleDataClinicalTabSortSuccess() {
 
-        List<ClinicalData> resultSortAsc = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(studyIds,
+        List<ClinicalData> resultSortAsc = clinicalDataMyBatisRepository.fetchSampleClinicalTable(studyIds,
             sampleIds, 1, 0, noSearch, "SAMPLE_TYPE", "ASC");
-        List<ClinicalData> resultSortDesc = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(studyIds,
+        List<ClinicalData> resultSortDesc = clinicalDataMyBatisRepository.fetchSampleClinicalTable(studyIds,
             sampleIds, 1, 0, noSearch, "SAMPLE_TYPE", "DESC");
 
         Assert.assertEquals(4, resultSortAsc.size());u}(jt  (89a3fe0dbbfdf72c6fb2617258eb3872a46999a0j  }persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/DiscreteCopyNumberMyBatisRepositoryTest.javaj  modifiedj  Kj  Kj  K
j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FDiscreteCopyNumberMyBatisRepositoryTest.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FDiscreteCopyNumberMyBatisRepositoryTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FDiscreteCopyNumberMyBatisRepositoryTest.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X	  @@ -27,7 +27,7 @@
 @Configurable
 public class DiscreteCopyNumberMyBatisRepositoryTest {
 
-    //    mutation and cna events in testSql.sql
+    //    mutation, cna and struct var events in testSql.sql
     //        SAMPLE_ID, ENTREZ_GENE_ID, HUGO_GENE_SYMBOL, GENETIC_PROFILE_ID, TYPE, MUTATION_TYPE, DRIVER_FILTER, DRIVER_TIERS_FILTER, PATIENT_ID, MUTATION_TYPE
     //        1	    207	AKT1	2	CNA         -2	                Putative_Driver	    Tier 1  TCGA-A1-A0SB    germline
     //        2	    207	AKT1	2	CNA         2	                Putative_Passenger	Tier 2  TCGA-A1-A0SD    germline
@@ -40,6 +40,17 @@ public class DiscreteCopyNumberMyBatisRepositoryTest {
     //        7	    672	BRCA1	6	MUTATION    Nonsense_Mutation	Putative_Driver	    Tier 2  TCGA-A1-A0SI    germline
     //        12	672	BRCA1	6	MUTATION    Splice_Site	        Putative_Passenger	Tier 1  TCGA-A1-A0SO    germline
     //        13	672	BRCA1	6	MUTATION    Splice_Site	        Putative_Driver	    Tier 1  TCGA-A1-A0SP    germline
+    //        1     27436-238   EML4-ALK    7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    germline
+    //        2     27436-238   EML4-ALK    7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //        1     57670-673   KIAA..-BRAF 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //        2     57670-673   KIAA..-BRAF 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    germline
+    //        2     57670-673   KIAA..-BRAF 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //       15     57670-673   KIAA..-BRAF 13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //        1     8031-5979   NCOA4-RET   7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-5979   NCOA4-RET   13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //        1     7113-2078   TMPRSS2-ERG 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-NULL   NCOA4-      13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+
 
     @Autowired
     private DiscreteCopyNumberMyBatisRepository discreteCopyNumberMyBatisRepository;u}(jt  (6f13f7b9ff35d712fd1618a14be019e844f6526aj  spersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/MutationMyBatisRepositoryTest.javaj  modifiedj  Kj  Kj  K
j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FMutationMyBatisRepositoryTest.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FMutationMyBatisRepositoryTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FMutationMyBatisRepositoryTest.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  Xl	  @@ -25,7 +25,7 @@
 @Configurable
 public class MutationMyBatisRepositoryTest {
 
-    //    mutation and cna events in testSql.sql
+    //    mutation, cna and struct var events in testSql.sql
     //        SAMPLE_ID, ENTREZ_GENE_ID, HUGO_GENE_SYMBOL, GENETIC_PROFILE_ID, TYPE, MUTATION_TYPE, DRIVER_FILTER, DRIVER_TIERS_FILTER, PATIENT_ID, MUTATION_TYPE
     //        1	    207	AKT1	2	CNA         -2	                Putative_Driver	    Tier 1  TCGA-A1-A0SB    germline
     //        2	    207	AKT1	2	CNA         2	                Putative_Passenger	Tier 2  TCGA-A1-A0SD    germline
@@ -38,6 +38,17 @@ public class MutationMyBatisRepositoryTest {
     //        7	    672	BRCA1	6	MUTATION    Nonsense_Mutation	Putative_Driver	    Tier 2  TCGA-A1-A0SI    germline
     //        12	672	BRCA1	6	MUTATION    Splice_Site	        Putative_Passenger	Tier 1  TCGA-A1-A0SO    germline
     //        13	672	BRCA1	6	MUTATION    Splice_Site	        Putative_Driver	    Tier 1  TCGA-A1-A0SP    germline
+    //        1     27436-238   EML4-ALK    7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    germline
+    //        2     27436-238   EML4-ALK    7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //        1     57670-673   KIAA..-BRAF 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //        2     57670-673   KIAA..-BRAF 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    germline
+    //        2     57670-673   KIAA..-BRAF 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //       15     57670-673   KIAA..-BRAF 13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //        1     8031-5979   NCOA4-RET   7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-5979   NCOA4-RET   13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //        1     7113-2078   TMPRSS2-ERG 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-NULL   NCOA4-      13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+
 
     @Autowired
     private MutationMyBatisRepository mutationMyBatisRepository;u}(jt  (72f882290e4f3c6fff0045368c39bc13bc7b0d4cj  |persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/StructuralVariantMyBatisRepositoryTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepositoryTest.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepositoryTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepositoryTest.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X9  @@ -24,10 +24,11 @@
 package org.cbioportal.persistence.mybatis;
 
 import org.cbioportal.model.GeneFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
-import org.cbioportal.model.StructuralVariantSpecialValue;
 import org.cbioportal.model.StructuralVariantGeneSubQuery;
 import org.cbioportal.model.StructuralVariantQuery;
+import org.cbioportal.model.StructuralVariantSpecialValue;
 import org.cbioportal.model.util.Select;
 import org.junit.Assert;
 import org.junit.Before;
@@ -50,6 +51,20 @@
 @Configurable
 public class StructuralVariantMyBatisRepositoryTest {
 
+    //    struct var events in testSql.sql
+    //        SAMPLE_ID,        ENTREZ_GENE_ID, HUGO_GENE_SYMBOL, GENETIC_PROFILE_ID, GENETIC PRODFILE, TYPE, MUTATION_TYPE, DRIVER_FILTER, DRIVER_TIERS_FILTER, PATIENT_ID, MUTATION_TYPE
+    //        1     27436-238   EML4-ALK    7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    germline
+    //        2     27436-238   EML4-ALK    7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //        1     57670-673   KIAA..-BRAF 7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //        2     57670-673   KIAA..-BRAF 7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    germline
+    //        2     57670-673   KIAA..-BRAF 7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //       15     57670-673   KIAA..-BRAF 13  acc_tcga_sv         SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //        1     8031-5979   NCOA4-RET   7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-5979   NCOA4-RET   13  acc_tcga_sv         SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //        1     7113-2078   TMPRSS2-ERG 7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-NULL   NCOA4-      13  acc_tcga_sv        SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+
+
     @Autowired
     StructuralVariantMyBatisRepository structuralVariantMyBatisRepository;
 
@@ -82,6 +97,12 @@ public void init() {
             includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
         geneQueries =  Arrays.asList(geneFilterQuery1, geneFilterQuery2, geneFilterQuery3, geneFilterQuery4);
 
+        // Only search for the KIAA1549-BRAF and EML4-ALK fusions.
+        structVarFilterQuery1 = new StructuralVariantFilterQuery("KIAA1549", 57670, "BRAF", 673, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
+        structVarFilterQuery2 = new StructuralVariantFilterQuery("EML4", 27436, "ALK", 238, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
+        structVarQueries = Arrays.asList(structVarFilterQuery1, structVarFilterQuery2);
+        structVarFilterQueryNullGene1 = new StructuralVariantFilterQuery(null, null, "BRAF", 673, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
+        structVarFilterQueryNullGene2 = new StructuralVariantFilterQuery("NCOA4", 8031, null, null, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
     }
 
     List<String> molecularProfileIds = new ArrayList<>();
@@ -95,7 +116,13 @@ public void init() {
     boolean includeSomatic;
     boolean includeUnknownStatus;
     private List<GeneFilterQuery> geneQueries;
-    List<StructuralVariantQuery> noStructVars = Collections.emptyList();
+    List<Integer> noEntrezIds = Collections.emptyList();
+    private List<StructuralVariantQuery> noStructVars = Collections.emptyList();
+    private List<StructuralVariantFilterQuery> structVarQueries;
+    private StructuralVariantFilterQuery structVarFilterQuery1;
+    private StructuralVariantFilterQuery structVarFilterQuery2;
+    private StructuralVariantFilterQuery structVarFilterQueryNullGene1;
+    private StructuralVariantFilterQuery structVarFilterQueryNullGene2;
 
     @Test
     public void fetchStructuralVariantsNoSampleIdentifiers() {
@@ -298,18 +325,16 @@ public void fetchStructuralVariantsMultiStudyWithSampleIdentifiers() throws Exce
     @Test
     public void fetchStructuralVariantsMultiStudyNoGeneIdentifiers() throws Exception {
 
-        List<Integer> noEntrezGeneIds = new ArrayList<>();
         List<String> molecularProfileIds = new ArrayList<>();
         List<String> sampleIds = new ArrayList<>();
-
         molecularProfileIds.add("study_tcga_pub_sv");
         sampleIds.add("TCGA-A1-A0SB-01");
         molecularProfileIds.add("acc_tcga_sv");
         sampleIds.add("TCGA-A1-B0SO-01");
 
         List<StructuralVariant> result =
             structuralVariantMyBatisRepository.fetchStructuralVariants(molecularProfileIds,
-                sampleIds, noEntrezGeneIds, noStructVars);
+                sampleIds, noEntrezIds, noStructVars);
 
         Assert.assertEquals(8,  result.size());
     }
@@ -368,7 +393,7 @@ public void fetchStructuralVariantsMultiStudyByGeneQueriesWithSampleIdentifiersE
     @Test
     public void fetchStructuralVariantsMultiStudyByGeneQueriesWithSampleIdentifiersSelectUnknownOncogenicity() throws Exception {
 
-        // There is one passenger event in 'study_tcga_pub_sv', the rest is unannotated
+        // There is one passenger event in 'study_tcga_pub_sv', the rest is unannotatedd
         geneQueries.stream().forEach(
             q -> {
                 q.setIncludeDriver(false);
@@ -396,7 +421,7 @@ public void fetchStructuralVariantsMultiStudyByGeneQueriesWithSampleIdentifiersS
     }
 
     @Test
-    public void fetchStructuralVariantsMultiStudyByGeneQueriesWithSampleIdentifiersSelectPassenger() throws Exception {
+    public void fetchStructuralVariantsMultiStudyByGeneQueriesWithSampleIdentifiersExcludeUnknownOncogenicity() throws Exception {
 
         // There is one passenger event in 'study_tcga_pub_sv', the rest is unannotated
 
@@ -489,8 +514,6 @@ public void fetchStructuralVariantsWithSingleStructuralVariantQueries() throws E
             new StructuralVariantGeneSubQuery(238)
         ));
         
-        List<Integer> noEntrezIds = Collections.emptyList();
-        
         List<StructuralVariant> result = 
                 structuralVariantMyBatisRepository.fetchStructuralVariants(
                     molecularProfileIds,
@@ -521,8 +544,6 @@ public void fetchStructuralVariantsWithStructuralVariantQueryAndGeneId() throws
             new StructuralVariantGeneSubQuery(238)
         ));
 
-        List<Integer> noEntrezIds = Collections.emptyList();
-
         List<StructuralVariant> result =
             structuralVariantMyBatisRepository.fetchStructuralVariants(
                 molecularProfileIds,
@@ -550,7 +571,6 @@ public void fetchStructuralVariantsWithMultipleStructuralVariantQueries() throws
             new StructuralVariantGeneSubQuery(57670),
             new StructuralVariantGeneSubQuery(673)
         ));
-        List<Integer> noEntrezIds = Collections.emptyList();
         
         List<StructuralVariant> result = 
                 structuralVariantMyBatisRepository.fetchStructuralVariants(molecularProfileIds,
@@ -593,8 +613,6 @@ public void fetchStructuralVariantsWithMultipleStructuralVariantIdentifierWildca
         );
         structVarQueries.add(svId2);
         
-        List<Integer> noEntrezIds = Collections.emptyList();
-
         List<StructuralVariant> result = 
                 structuralVariantMyBatisRepository.fetchStructuralVariants(molecularProfileIds,
                     sampleIds, noEntrezIds, structVarQueries
@@ -628,7 +646,6 @@ public void fetchStructuralVariantsWithMultipleStructuralVariantQueryNullQueryVa
             new StructuralVariantGeneSubQuery(StructuralVariantSpecialValue.NO_GENE)
         );
         structVarQueries.add(structVarWithNull);
-        List<Integer> noEntrezIds = Collections.emptyList();
 
         List<StructuralVariant> result = 
                 structuralVariantMyBatisRepository.fetchStructuralVariants(molecularProfileIds,
@@ -640,5 +657,125 @@ public void fetchStructuralVariantsWithMultipleStructuralVariantQueryNullQueryVa
         Assert.assertEquals("ENST00000340058_NULL",  result.get(0).getSite2EnsemblTranscriptId());
     }
 
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesAll() throws Exception {
+
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, structVarQueries);
+
+        Assert.assertEquals(6,  result.size());
+
+        List<String> resultTcgaPubVariants = result.stream()
+            .filter(s -> "study_tcga_pub_sv".equals(s.getMolecularProfileId()))
+            .map(StructuralVariant::getAnnotation)
+            .collect(Collectors.toList());
+        List<String> resultTcgaVariants = result.stream()
+            .filter(s -> "acc_tcga_sv".equals(s.getMolecularProfileId()))
+            .map(StructuralVariant::getAnnotation)
+            .collect(Collectors.toList());
+
+        Assert.assertArrayEquals(new String[] {"EML4-ALK.E6bA20.AB374362", "EML4-ALK.E6bA20.AB374362-2", "KIAA1549-BRAF.K16B10.COSF509", "KIAA1549-BRAF.K16B10.COSF509", "KIAA1549-BRAF.K16B10.COSF509"}, resultTcgaPubVariants.toArray());
+        Assert.assertArrayEquals(new String[] {"KIAA1549-BRAF.K16B10.COSF509"}, resultTcgaVariants.toArray());
+    }
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesNoGermline() throws Exception {
+
+        structVarFilterQuery1.setIncludeGermline(false);
+        structVarFilterQuery2.setIncludeGermline(false);
+        
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, structVarQueries);
+
+        Assert.assertEquals(4,  result.size());
+
+        List<String> resultTcgaPubVariants = result.stream()
+            .filter(s -> "study_tcga_pub_sv".equals(s.getMolecularProfileId()))
+            .map(StructuralVariant::getAnnotation)
+            .collect(Collectors.toList());
+        List<String> resultTcgaVariants = result.stream()
+            .filter(s -> "acc_tcga_sv".equals(s.getMolecularProfileId()))
+            .map(StructuralVariant::getAnnotation)
+            .collect(Collectors.toList());
+
+        Assert.assertArrayEquals(new String[] {"EML4-ALK.E6bA20.AB374362-2", "KIAA1549-BRAF.K16B10.COSF509", "KIAA1549-BRAF.K16B10.COSF509"}, resultTcgaPubVariants.toArray());
+        Assert.assertArrayEquals(new String[] {"KIAA1549-BRAF.K16B10.COSF509"}, resultTcgaVariants.toArray());
+    }
+
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesNoSomatic() throws Exception {
+
+        structVarFilterQuery1.setIncludeSomatic(false);
+        structVarFilterQuery2.setIncludeSomatic(false);
+        
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, structVarQueries);
+
+        Assert.assertEquals(2,  result.size());
+
+        List<String> resultTcgaPubVariants = result.stream()
+            .filter(s -> "study_tcga_pub_sv".equals(s.getMolecularProfileId()))
+            .map(StructuralVariant::getAnnotation)
+            .collect(Collectors.toList());
+        List<String> resultTcgaVariants = result.stream()
+            .filter(s -> "acc_tcga_sv".equals(s.getMolecularProfileId()))
+            .map(StructuralVariant::getAnnotation)
+            .collect(Collectors.toList());
+
+        Assert.assertArrayEquals(new String[] {"EML4-ALK.E6bA20.AB374362", "KIAA1549-BRAF.K16B10.COSF509"}, resultTcgaPubVariants.toArray());
+        Assert.assertEquals(0, resultTcgaVariants.size());
+    }
+
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesAnyGene1() throws Exception {
+
+        structVarFilterQuery1.getGene1Query()
+            .setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        structVarFilterQuery2.getGene1Query()
+            .setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, structVarQueries);
+
+        Assert.assertEquals(6,  result.size());
+    }
+
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesAnyGene2() throws Exception {
+
+        structVarFilterQuery1.getGene2Query()
+            .setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        structVarFilterQuery2.getGene2Query()
+            .setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, structVarQueries);
+
+        Assert.assertEquals(6,  result.size());
+    }
+    
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesNullGene1() throws Exception {
+
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, Arrays.asList(structVarFilterQueryNullGene1));
+
+        Assert.assertEquals(0,  result.size());
+    }
+    
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesNullGene2() throws Exception {
+
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, Arrays.asList(structVarFilterQueryNullGene2));
+
+        Assert.assertEquals(1,  result.size());
+    }
 
 }u}(jt  (e61e23cb8074ac5fdf46548fa33505965d089f72j  tpersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/TreatmentMyBatisRepositoryTest.javaj  modifiedj  K
j  Kj  K j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepositoryTest.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepositoryTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepositoryTest.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -134,32 +134,20 @@ public void getShallowSamplesByPatientId() {
     }
 
     @Test
-    public void getAllUniqueTreatments() {
-        HashSet<String> expected = new HashSet<>(Collections.singletonList("Madeupanib"));
-        
-        Set<String> actual = treatmentRepository.getAllUniqueTreatments(
-            Collections.singletonList("TCGA-A1-A0SD-01"),
-            Collections.singletonList("study_tcga_pub"),
-            ClinicalEventKeyCode.Agent
-        );
-        
-        Assert.assertEquals(actual, expected);
-    }
+    public void hasTreatmentData() {
+
+        Assert.assertEquals(true, treatmentRepository.hasTreatmentData(Collections.singletonList("study_tcga_pub"), ClinicalEventKeyCode.Agent));
+
+        Assert.assertEquals(false, treatmentRepository.hasTreatmentData(Collections.singletonList("acc_tcga"), ClinicalEventKeyCode.Agent));
 
-    @Test
-    public void getTreatmentCount() {
-        Integer expected = 1;
-        Integer actual = treatmentRepository.getTreatmentCount(Collections.singletonList("study_tcga_pub"), ClinicalEventKeyCode.Agent.getKey());
-        
-        Assert.assertEquals(actual, expected);
     }
 
     @Test
-    public void getSampleCount() {
-        Integer expected = 2;
-        Integer actual = treatmentRepository.getSampleCount(Collections.singletonList("study_tcga_pub"));
-        
-        Assert.assertEquals(actual, expected);
+    public void hasSampleTimelineData() {
+
+        Assert.assertEquals(true, treatmentRepository.hasSampleTimelineData(Collections.singletonList("study_tcga_pub")));
+
+        Assert.assertEquals(false, treatmentRepository.hasSampleTimelineData(Collections.singletonList("acc_tcga")));
     }
     
 }
\ No newline at end of fileu}(jt  (f7047bdbdf707cd4c932acac690cbad2f787a7cdj  >persistence/persistence-mybatis/src/test/resources/testSql.sqlj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestSql.sqlj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestSql.sqlj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestSql.sql?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X
  @@ -140,6 +140,7 @@ INSERT INTO alteration_driver_annotation (ALTERATION_EVENT_ID,GENETIC_PROFILE_ID
 INSERT INTO alteration_driver_annotation (ALTERATION_EVENT_ID,GENETIC_PROFILE_ID,SAMPLE_ID, DRIVER_FILTER, DRIVER_FILTER_ANNOTATION, DRIVER_TIERS_FILTER, DRIVER_TIERS_FILTER_ANNOTATION) VALUES (2040,6,1, 'Putative_Driver', 'Pathogenic', 'Tier 1', 'Highly Actionable');
 INSERT INTO alteration_driver_annotation (ALTERATION_EVENT_ID,GENETIC_PROFILE_ID,SAMPLE_ID, DRIVER_FILTER, DRIVER_FILTER_ANNOTATION, DRIVER_TIERS_FILTER, DRIVER_TIERS_FILTER_ANNOTATION) VALUES (2041,6,2, 'Putative_Passenger', 'Pathogenic', 'Tier 2', 'Potentially Actionable');
 INSERT INTO alteration_driver_annotation (ALTERATION_EVENT_ID,GENETIC_PROFILE_ID,SAMPLE_ID, DRIVER_FILTER, DRIVER_FILTER_ANNOTATION, DRIVER_TIERS_FILTER, DRIVER_TIERS_FILTER_ANNOTATION) VALUES (2042,6,3, 'Putative_Passenger', 'Pathogenic', 'Tier 1', 'Highly Actionable');
+INSERT INTO alteration_driver_annotation (ALTERATION_EVENT_ID,GENETIC_PROFILE_ID,SAMPLE_ID, DRIVER_FILTER, DRIVER_FILTER_ANNOTATION, DRIVER_TIERS_FILTER, DRIVER_TIERS_FILTER_ANNOTATION) VALUES (2042,8,15, 'Putative_Driver', 'Pathogenic', 'Tier 1', 'Highly Actionable');
 
 INSERT INTO mutation (MUTATION_EVENT_ID,GENETIC_PROFILE_ID,SAMPLE_ID,ENTREZ_GENE_ID,CENTER,SEQUENCER,MUTATION_STATUS,VALIDATION_STATUS,TUMOR_SEQ_ALLELE1,TUMOR_SEQ_ALLELE2,MATCHED_NORM_SAMPLE_BARCODE,MATCH_NORM_SEQ_ALLELE1,MATCH_NORM_SEQ_ALLELE2,TUMOR_VALIDATION_ALLELE1,TUMOR_VALIDATION_ALLELE2,MATCH_NORM_VALIDATION_ALLELE1,MATCH_NORM_VALIDATION_ALLELE2,VERIFICATION_STATUS,SEQUENCING_PHASE,SEQUENCE_SOURCE,VALIDATION_METHOD,SCORE,BAM_FILE,TUMOR_ALT_COUNT,TUMOR_REF_COUNT,NORMAL_ALT_COUNT,NORMAL_REF_COUNT,AMINO_ACID_CHANGE,ANNOTATION_JSON) VALUES (2038,6,6,672,'genome.wustl.edu','IlluminaGAIIx','NA','Unknown','G','A','TCGA-A1-A0SH-10A-03D-A099-09','G','A','NA','NA','NA','NA','Unknown','Phase_IV','Capture','NA','1','dbGAP',1,0,-1,-1,'cyclases/Protein','{"zygosity":{"status": "heterozygous"}}');
 INSERT INTO mutation (MUTATION_EVENT_ID,GENETIC_PROFILE_ID,SAMPLE_ID,ENTREZ_GENE_ID,CENTER,SEQUENCER,MUTATION_STATUS,VALIDATION_STATUS,TUMOR_SEQ_ALLELE1,TUMOR_SEQ_ALLELE2,MATCHED_NORM_SAMPLE_BARCODE,MATCH_NORM_SEQ_ALLELE1,MATCH_NORM_SEQ_ALLELE2,TUMOR_VALIDATION_ALLELE1,TUMOR_VALIDATION_ALLELE2,MATCH_NORM_VALIDATION_ALLELE1,MATCH_NORM_VALIDATION_ALLELE2,VERIFICATION_STATUS,SEQUENCING_PHASE,SEQUENCE_SOURCE,VALIDATION_METHOD,SCORE,BAM_FILE,TUMOR_ALT_COUNT,TUMOR_REF_COUNT,NORMAL_ALT_COUNT,NORMAL_REF_COUNT,AMINO_ACID_CHANGE,ANNOTATION_JSON) VALUES (22604,6,6,672,'genome.wustl.edu','IlluminaGAIIx','Germline','Unknown','A','C','TCGA-A1-A0SH-10A-03D-A099-09','A','C','NA','NA','NA','NA','Unknown','Phase_IV','Capture','NA','1','dbGAP',-1,-1,-1,-1,'cyclases/Protein','{"zygosity":{"status": "heterozygous"}}');u}(jt  (d44663bed5eb628f7a438efc51b83ce32004cab7j  pom.xmlj  modifiedj  Kj  Kj  Kj  ^https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/pom.xmlj  ]https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/pom.xmlj  phttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  XS  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.8</frontend.version>
+    <frontend.version>v5.3.17</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>
@@ -314,7 +314,7 @@
     <tomcat.session.timeout>720</tomcat.session.timeout>
 
     <!-- THIS SHOULD BE KEPT IN SYNC TO VERSION IN CGDS.SQL -->
-    <db.version>2.13.0</db.version>
+    <db.version>2.13.1</db.version>
   </properties>
 
   <modules>u}(jt  (3e7dc6ec00ffe590ba819f7398f0da3b4158e9c8j  )portal/src/main/webapp/config_service.jspj  modifiedj  K	j  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -31,13 +31,13 @@
         String[] propNameArray = {
             "app.version",
             "app.name",
-            "dat.method",
             "oncoprint.custom_driver_annotation.binary.menu_label",
             "disabled_tabs",
             "civic.url",
             "oncoprint.custom_driver_annotation.binary.default",
             "oncoprint.oncokb.default",
             "oncoprint.hotspots.default",
+            "oncoprint.clustered.default",
             "genomenexus.url",
             "genomenexus.url.grch38",
             "google_analytics_profile_id",
@@ -146,8 +146,10 @@
             "skin.patient_view.copy_number_table.columns.show_on_init",
             "skin.patient_view.structural_variant_table.columns.show_on_init",
             "comparison.categorical_na_values",
-            "skin.hide_download_controls",
-            "study_download_url"
+            "study_download_url",
+            "skin.home_page.show_reference_genome",
+            "vaf.sequential_mode.default",
+            "vaf.log_scale.default"
         };
 
 
@@ -203,6 +205,10 @@
 
         obj.put("sessionServiceEnabled", !StringUtils.isEmpty(GlobalProperties.getSessionServiceUrl()));
 
+        obj.put("skin_hide_download_controls", GlobalProperties.getDownloadControl());
+        
+        obj.put("dat_method", GlobalProperties.getDataAccessTokenMethod());
+
         out.println(obj.toJSONString());
 
 u}(jt  (5cd1f3ba8b7e6f309b46c79edd07493f153db83aj  requirements.txtj  modifiedj  Kj  Kj  Kj  ghttps://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/requirements.txtj  fhttps://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/requirements.txtj  yhttps://api.github.com/repos/cBioPortal/cbioportal/contents/requirements.txt?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  @@ -2,5 +2,5 @@ requests==2.20.0
 markupsafe==2.0.1
 Jinja2==2.11.3
 mysqlclient==2.1.0
-PyYAML==5.4
+PyYAML==6.0.1
 dsnparse==0.1.15u}(jt  (5966f725a8d961b6a7816ebd51b990051507482ej  Hservice/src/main/java/org/cbioportal/service/AlterationCountService.javaj  modifiedj  K-j  K(j  KUj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FAlterationCountService.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FAlterationCountService.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FAlterationCountService.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X&  @@ -8,41 +8,46 @@
 
 public interface AlterationCountService {
 
-    Pair<List<AlterationCountByGene>, Long> getSampleAlterationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                      Select<Integer> entrezGeneIds,
-                                                                      boolean includeFrequency,
-                                                                      boolean includeMissingAlterationsFromGenePanel,
-                                                                      AlterationFilter alterationFilter);
+    Pair<List<AlterationCountByGene>, Long> getSampleAlterationGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                          Select<Integer> entrezGeneIds,
+                                                                          boolean includeFrequency,
+                                                                          boolean includeMissingAlterationsFromGenePanel,
+                                                                          AlterationFilter alterationFilter);
 
-    Pair<List<AlterationCountByGene>, Long> getPatientAlterationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                           Select<Integer> entrezGeneIds,
-                                                           boolean includeFrequency,
-                                                           boolean includeMissingAlterationsFromGenePanel,
-                                                           AlterationFilter alterationFilter);
+    Pair<List<AlterationCountByGene>, Long> getPatientAlterationGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                           Select<Integer> entrezGeneIds,
+                                                                           boolean includeFrequency,
+                                                                           boolean includeMissingAlterationsFromGenePanel,
+                                                                           AlterationFilter alterationFilter);
 
-    Pair<List<AlterationCountByGene>, Long> getSampleMutationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                        Select<Integer> entrezGeneIds,
-                                                        boolean includeFrequency,
-                                                        boolean includeMissingAlterationsFromGenePanel,
-                                                        AlterationFilter alterationFilter);
+    Pair<List<AlterationCountByGene>, Long> getSampleMutationGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                        Select<Integer> entrezGeneIds,
+                                                                        boolean includeFrequency,
+                                                                        boolean includeMissingAlterationsFromGenePanel,
+                                                                        AlterationFilter alterationFilter);
 
-    Pair<List<AlterationCountByGene>, Long> getPatientMutationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                         Select<Integer> entrezGeneIds,
-                                                         boolean includeFrequency,
-                                                         boolean includeMissingAlterationsFromGenePanel,
-                                                         AlterationFilter alterationFilter);
+    Pair<List<AlterationCountByGene>, Long> getPatientMutationGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                         Select<Integer> entrezGeneIds,
+                                                                         boolean includeFrequency,
+                                                                         boolean includeMissingAlterationsFromGenePanel,
+                                                                         AlterationFilter alterationFilter);
 
-    Pair<List<AlterationCountByGene>, Long> getSampleStructuralVariantCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                      Select<Integer> entrezGeneIds,
-                                                      boolean includeFrequency,
-                                                      boolean includeMissingAlterationsFromGenePanel,
-                                                      AlterationFilter alterationFilter);
+    Pair<List<AlterationCountByGene>, Long> getSampleStructuralVariantGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                 Select<Integer> entrezGeneIds,
+                                                                                 boolean includeFrequency,
+                                                                                 boolean includeMissingAlterationsFromGenePanel,
+                                                                                 AlterationFilter alterationFilter);
 
-    Pair<List<AlterationCountByGene>, Long> getPatientStructuralVariantCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                       Select<Integer> entrezGeneIds,
-                                                       boolean includeFrequency,
-                                                       boolean includeMissingAlterationsFromGenePanel,
-                                                       AlterationFilter alterationFilter);
+    Pair<List<AlterationCountByGene>, Long> getPatientStructuralVariantGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                  Select<Integer> entrezGeneIds,
+                                                                                  boolean includeFrequency,
+                                                                                  boolean includeMissingAlterationsFromGenePanel,
+                                                                                  AlterationFilter alterationFilter);
+
+    Pair<List<AlterationCountByStructuralVariant>, Long> getSampleStructuralVariantCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                          boolean includeFrequency,
+                                                                                          boolean includeMissingAlterationsFromGenePanel,
+                                                                                          AlterationFilter alterationFilter);
 
 // Should be restored when old CNA count endpoint is retired
 //    Pair<List<AlterationCountByGene>, Long> getSampleCnaCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
@@ -58,16 +63,16 @@ Pair<List<AlterationCountByGene>, Long> getPatientStructuralVariantCounts(List<M
 //                                                   AlterationEventTypeFilter alterationFilter);
 
     // Should be removed when old CNA count endpoint is retired
-    Pair<List<CopyNumberCountByGene>, Long> getSampleCnaCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                   Select<Integer> entrezGeneIds,
-                                                   boolean includeFrequency,
-                                                   boolean includeMissingAlterationsFromGenePanel,
-                                                   AlterationFilter alterationFilter);
+    Pair<List<CopyNumberCountByGene>, Long> getSampleCnaGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                   Select<Integer> entrezGeneIds,
+                                                                   boolean includeFrequency,
+                                                                   boolean includeMissingAlterationsFromGenePanel,
+                                                                   AlterationFilter alterationFilter);
 
-    Pair<List<CopyNumberCountByGene>, Long> getPatientCnaCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                    Select<Integer> entrezGeneIds,
-                                                    boolean includeFrequency,
-                                                    boolean includeMissingAlterationsFromGenePanel,
-                                                    AlterationFilter alterationFilter);
+    Pair<List<CopyNumberCountByGene>, Long> getPatientCnaGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                    Select<Integer> entrezGeneIds,
+                                                                    boolean includeFrequency,
+                                                                    boolean includeMissingAlterationsFromGenePanel,
+                                                                    AlterationFilter alterationFilter);
     
 }u}(jt  (972913ce2e4cf08e4584eb835de15c159b3fee6ej  Eservice/src/main/java/org/cbioportal/service/ClinicalDataService.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FClinicalDataService.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FClinicalDataService.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FClinicalDataService.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -52,6 +52,9 @@ BaseMeta fetchMetaClinicalData(List<String> studyIds, List<String> ids, List<Str
     List<ClinicalData> getPatientClinicalDataDetailedToSample(List<String> studyIds, List<String> patientIds,
             List<String> attributeIds);
 
-    List<ClinicalData> fetchSampleClinicalDataClinicalTable(List<String> studyIds, List<String> sampleIds, Integer pageSize,
-                                                            Integer pageNumber, String searchTerm, String sortBy, String direction);
+    List<ClinicalData> fetchSampleClinicalTable(List<String> studyIds, List<String> sampleIds, Integer pageSize,
+                                                Integer pageNumber, String searchTerm, String sortBy, String direction);
+    
+    Integer fetchSampleClinicalTableCount(List<String> studyIds, List<String> sampleIds, String searchTerm,
+                                          String sortBy, String direction);
 }u}(jt  (6fe7dc5d34d4c72498fa43daa6751eb394b4654cj  Jservice/src/main/java/org/cbioportal/service/StructuralVariantService.javaj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStructuralVariantService.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStructuralVariantService.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStructuralVariantService.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -26,6 +26,7 @@
 import java.util.List;
 
 import org.cbioportal.model.GeneFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 
@@ -42,4 +43,7 @@ List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String> molecu
                                                                  List<String> sampleIds,
                                                                  List<GeneFilterQuery> geneQueries);
 
+    List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
+                                                                      List<String> sampleIds,
+                                                                      List<StructuralVariantFilterQuery> structVarQueries);
 }
\ No newline at end of fileu}(jt  (67191ea758842520498fa65865633766fcae06dbj  Bservice/src/main/java/org/cbioportal/service/StudyViewService.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  XC  @@ -1,9 +1,9 @@
 package org.cbioportal.service;
 
+import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.exception.StudyNotFoundException;
-import org.springframework.cache.annotation.Cacheable;
 
 import java.util.List;
 
@@ -15,9 +15,14 @@ List<AlterationCountByGene> getMutationAlterationCountByGenes(List<String> study
 
     List<AlterationCountByGene> getStructuralVariantAlterationCountByGenes(List<String> studyIds, List<String> sampleIds, AlterationFilter annotationFilter)
         throws StudyNotFoundException;
+    
+    List<AlterationCountByStructuralVariant> getStructuralVariantAlterationCounts(List<String> studyIds, List<String> sampleIds, AlterationFilter annotationFilters);
 
     List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> studyIds, List<String> sampleIds, AlterationFilter annotationFilter)
         throws StudyNotFoundException;
 
+    List<GenomicDataCountItem> getCNAAlterationCountsByGeneSpecific(List<String> studyIds, List<String> sampleIds, List<Pair<String, String>> genomicDataFilters);
+
     List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String> sampleIds, List<String> studyIds, List<String> stableIds, List<String> profileTypes);
+
 }u}(jt  (0e5484abf2d36faee802a2ae4a0507543caa05d0j  Qservice/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.javaj  modifiedj  KTj  KFj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationCountServiceImpl.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationCountServiceImpl.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationCountServiceImpl.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  XbL  @@ -8,7 +8,6 @@
 import org.cbioportal.persistence.MolecularProfileRepository;
 import org.cbioportal.service.AlterationCountService;
 import org.cbioportal.service.util.AlterationEnrichmentUtil;
-import org.cbioportal.service.util.MolecularProfileUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -28,63 +27,59 @@ public class AlterationCountServiceImpl implements AlterationCountService {
     @Autowired
     private AlterationEnrichmentUtil<CopyNumberCountByGene> alterationEnrichmentUtilCna;
     @Autowired
-    private MolecularProfileUtil molecularProfileUtil;
+    private AlterationEnrichmentUtil<AlterationCountByStructuralVariant> alterationEnrichmentUtilStructVar;
     @Autowired
     private MolecularProfileRepository molecularProfileRepository;
 
     @Override
-    public Pair<List<AlterationCountByGene>, Long> getSampleAlterationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                             Select<Integer> entrezGeneIds,
-                                                                             boolean includeFrequency,
-                                                                             boolean includeMissingAlterationsFromGenePanel,
-                                                                             AlterationFilter alterationFilter) {
+    public Pair<List<AlterationCountByGene>, Long> getSampleAlterationGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                 Select<Integer> entrezGeneIds,
+                                                                                 boolean includeFrequency,
+                                                                                 boolean includeMissingAlterationsFromGenePanel,
+                                                                                 AlterationFilter alterationFilter) {
 
         Function<List<MolecularProfileCaseIdentifier>, List<AlterationCountByGene>> dataFetcher = profileCaseIdentifiers ->
-            alterationRepository.getSampleAlterationCounts(new TreeSet<>(profileCaseIdentifiers), entrezGeneIds, alterationFilter);
+            alterationRepository.getSampleAlterationGeneCounts(new TreeSet<>(profileCaseIdentifiers), entrezGeneIds, alterationFilter);
 
         BiFunction<List<MolecularProfileCaseIdentifier>, List<AlterationCountByGene>, Long> includeFrequencyFunction =
             (a, b) -> alterationEnrichmentUtil.includeFrequencyForSamples(a, b, includeMissingAlterationsFromGenePanel);
 
-        Function<AlterationCountByGene, String> keyGenerator = d -> d.getEntrezGeneId().toString();
-
-        return getAlterationCounts(
+        return getAlterationGeneCounts(
             molecularProfileCaseIdentifiers,
             includeFrequency,
             dataFetcher,
-            includeFrequencyFunction,
-            keyGenerator);
+            includeFrequencyFunction
+        );
     }
 
     @Override
-    public Pair<List<AlterationCountByGene>, Long> getPatientAlterationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                              Select<Integer> entrezGeneIds,
-                                                                              boolean includeFrequency,
-                                                                              boolean includeMissingAlterationsFromGenePanel,
-                                                                              AlterationFilter alterationFilter) {
+    public Pair<List<AlterationCountByGene>, Long> getPatientAlterationGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                  Select<Integer> entrezGeneIds,
+                                                                                  boolean includeFrequency,
+                                                                                  boolean includeMissingAlterationsFromGenePanel,
+                                                                                  AlterationFilter alterationFilter) {
 
         Function<List<MolecularProfileCaseIdentifier>, List<AlterationCountByGene>> dataFetcher = profileCaseIdentifiers ->
-            alterationRepository.getPatientAlterationCounts(profileCaseIdentifiers, entrezGeneIds, alterationFilter);
+            alterationRepository.getPatientAlterationGeneCounts(new TreeSet<>(profileCaseIdentifiers), entrezGeneIds, alterationFilter);
 
         BiFunction<List<MolecularProfileCaseIdentifier>, List<AlterationCountByGene>, Long> includeFrequencyFunction =
             (a, b) -> alterationEnrichmentUtil.includeFrequencyForPatients(a, b, includeMissingAlterationsFromGenePanel);
 
-        Function<AlterationCountByGene, String> keyGenerator = d -> d.getEntrezGeneId().toString();
-
-        return getAlterationCounts(
+        return getAlterationGeneCounts(
             molecularProfileCaseIdentifiers,
             includeFrequency,
             dataFetcher,
-            includeFrequencyFunction,
-            keyGenerator);
+            includeFrequencyFunction
+        );
     }
 
     @Override
-    public Pair<List<AlterationCountByGene>, Long> getSampleMutationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                           Select<Integer> entrezGeneIds,
-                                                                           boolean includeFrequency,
-                                                                           boolean includeMissingAlterationsFromGenePanel,
-                                                                           AlterationFilter alterationFilter) {
-        return getSampleAlterationCounts(molecularProfileCaseIdentifiers,
+    public Pair<List<AlterationCountByGene>, Long> getSampleMutationGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                               Select<Integer> entrezGeneIds,
+                                                                               boolean includeFrequency,
+                                                                               boolean includeMissingAlterationsFromGenePanel,
+                                                                               AlterationFilter alterationFilter) {
+        return getSampleAlterationGeneCounts(molecularProfileCaseIdentifiers,
             entrezGeneIds,
             includeFrequency,
             includeMissingAlterationsFromGenePanel,
@@ -93,25 +88,25 @@ public Pair<List<AlterationCountByGene>, Long> getSampleMutationCounts(List<Mole
     }
 
     @Override
-    public Pair<List<AlterationCountByGene>, Long> getPatientMutationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                            Select<Integer> entrezGeneIds,
-                                                                            boolean includeFrequency,
-                                                                            boolean includeMissingAlterationsFromGenePanel,
-                                                                            AlterationFilter alterationFilter) {
-        return getPatientAlterationCounts(molecularProfileCaseIdentifiers,
+    public Pair<List<AlterationCountByGene>, Long> getPatientMutationGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                Select<Integer> entrezGeneIds,
+                                                                                boolean includeFrequency,
+                                                                                boolean includeMissingAlterationsFromGenePanel,
+                                                                                AlterationFilter alterationFilter) {
+        return getPatientAlterationGeneCounts(molecularProfileCaseIdentifiers,
             entrezGeneIds,
             includeFrequency,
             includeMissingAlterationsFromGenePanel,
             alterationFilter);
     }
 
     @Override
-    public Pair<List<AlterationCountByGene>, Long> getSampleStructuralVariantCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                                    Select<Integer> entrezGeneIds,
-                                                                                    boolean includeFrequency,
-                                                                                    boolean includeMissingAlterationsFromGenePanel,
-                                                                                    AlterationFilter alterationFilter) {
-        return getSampleAlterationCounts(molecularProfileCaseIdentifiers,
+    public Pair<List<AlterationCountByGene>, Long> getSampleStructuralVariantGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                        Select<Integer> entrezGeneIds,
+                                                                                        boolean includeFrequency,
+                                                                                        boolean includeMissingAlterationsFromGenePanel,
+                                                                                        AlterationFilter alterationFilter) {
+        return getSampleAlterationGeneCounts(molecularProfileCaseIdentifiers,
             entrezGeneIds,
             includeFrequency,
             includeMissingAlterationsFromGenePanel,
@@ -120,19 +115,39 @@ public Pair<List<AlterationCountByGene>, Long> getSampleStructuralVariantCounts(
     }
 
     @Override
-    public Pair<List<AlterationCountByGene>, Long> getPatientStructuralVariantCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                                     Select<Integer> entrezGeneIds,
-                                                                                     boolean includeFrequency,
-                                                                                     boolean includeMissingAlterationsFromGenePanel,
-                                                                                     AlterationFilter alterationFilter) {
-        return getPatientAlterationCounts(molecularProfileCaseIdentifiers,
+    public Pair<List<AlterationCountByGene>, Long> getPatientStructuralVariantGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                         Select<Integer> entrezGeneIds,
+                                                                                         boolean includeFrequency,
+                                                                                         boolean includeMissingAlterationsFromGenePanel,
+                                                                                         AlterationFilter alterationFilter) {
+        return getPatientAlterationGeneCounts(molecularProfileCaseIdentifiers,
             entrezGeneIds,
             includeFrequency,
             includeMissingAlterationsFromGenePanel,
             alterationFilter
         );
     }
 
+    @Override
+    public Pair<List<AlterationCountByStructuralVariant>, Long> getSampleStructuralVariantCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                                 boolean includeFrequency,
+                                                                                                 boolean includeMissingAlterationsFromGenePanel,
+                                                                                                 AlterationFilter alterationFilter) {
+                                                                                                 
+        Function<List<MolecularProfileCaseIdentifier>, List<AlterationCountByStructuralVariant>> dataFetcher = profileCaseIdentifiers ->
+            alterationRepository.getSampleStructuralVariantCounts(new TreeSet<>(profileCaseIdentifiers), alterationFilter);
+
+        BiFunction<List<MolecularProfileCaseIdentifier>, List<AlterationCountByStructuralVariant>, Long> includeFrequencyFunction =
+            (a, b) -> alterationEnrichmentUtilStructVar.includeFrequencyForSamples(a, b, includeMissingAlterationsFromGenePanel);
+            
+        return getAlterationGeneCounts(
+            molecularProfileCaseIdentifiers,
+            includeFrequency,
+            dataFetcher,
+            includeFrequencyFunction
+        );
+    }
+
 // -- Should be reinstated when the legacy CNA count endpoint retires            
 //    @Override
 //    public List<AlterationCountByGene> getSampleCnaCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
@@ -163,57 +178,56 @@ public Pair<List<AlterationCountByGene>, Long> getPatientStructuralVariantCounts
 //    }
 
     @Override
-    public Pair<List<CopyNumberCountByGene>, Long> getSampleCnaCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                      Select<Integer> entrezGeneIds,
-                                                                      boolean includeFrequency,
-                                                                      boolean includeMissingAlterationsFromGenePanel,
-                                                                      AlterationFilter alterationFilter) {
+    public Pair<List<CopyNumberCountByGene>, Long> getSampleCnaGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                          Select<Integer> entrezGeneIds,
+                                                                          boolean includeFrequency,
+                                                                          boolean includeMissingAlterationsFromGenePanel,
+                                                                          AlterationFilter alterationFilter) {
 
         Function<List<MolecularProfileCaseIdentifier>, List<CopyNumberCountByGene>> dataFetcher = profileCaseIdentifiers ->
-            alterationRepository.getSampleCnaCounts(new TreeSet<>(profileCaseIdentifiers), entrezGeneIds, alterationFilter);
+            alterationRepository.getSampleCnaGeneCounts(new TreeSet<>(profileCaseIdentifiers), entrezGeneIds, alterationFilter);
 
         BiFunction<List<MolecularProfileCaseIdentifier>, List<CopyNumberCountByGene>, Long> includeFrequencyFunction =
             (a, b) -> alterationEnrichmentUtilCna.includeFrequencyForSamples(a, b, includeMissingAlterationsFromGenePanel);
 
         Function<CopyNumberCountByGene, String> keyGenerator = d -> d.getEntrezGeneId().toString() + d.getAlteration().toString();
 
-        return getAlterationCounts(
+        return getAlterationGeneCounts(
             molecularProfileCaseIdentifiers,
             includeFrequency,
             dataFetcher,
-            includeFrequencyFunction,
-            keyGenerator);
+            includeFrequencyFunction
+        );
     }
 
     @Override
-    public Pair<List<CopyNumberCountByGene>, Long> getPatientCnaCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                       Select<Integer> entrezGeneIds,
-                                                                       boolean includeFrequency,
-                                                                       boolean includeMissingAlterationsFromGenePanel,
-                                                                       AlterationFilter alterationFilter) {
+    public Pair<List<CopyNumberCountByGene>, Long> getPatientCnaGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                           Select<Integer> entrezGeneIds,
+                                                                           boolean includeFrequency,
+                                                                           boolean includeMissingAlterationsFromGenePanel,
+                                                                           AlterationFilter alterationFilter) {
 
         Function<List<MolecularProfileCaseIdentifier>, List<CopyNumberCountByGene>> dataFetcher = profileCaseIdentifiers ->
-            alterationRepository.getPatientCnaCounts(profileCaseIdentifiers, entrezGeneIds, alterationFilter);
+            alterationRepository.getPatientCnaGeneCounts(new TreeSet<>(profileCaseIdentifiers), entrezGeneIds, alterationFilter);
 
         BiFunction<List<MolecularProfileCaseIdentifier>, List<CopyNumberCountByGene>, Long> includeFrequencyFunction =
             (a, b) -> alterationEnrichmentUtilCna.includeFrequencyForPatients(a, b, includeMissingAlterationsFromGenePanel);
 
         Function<CopyNumberCountByGene, String> keyGenerator = d -> d.getEntrezGeneId().toString() + d.getAlteration().toString();
 
-        return getAlterationCounts(
+        return getAlterationGeneCounts(
             molecularProfileCaseIdentifiers,
             includeFrequency,
             dataFetcher,
-            includeFrequencyFunction,
-            keyGenerator);
+            includeFrequencyFunction
+        );
     }
 
-    private <S extends AlterationCountByGene> Pair<List<S>, Long> getAlterationCounts(
+    private <S extends AlterationCountBase> Pair<List<S>, Long> getAlterationGeneCounts(
         List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
         boolean includeFrequency,
         Function<List<MolecularProfileCaseIdentifier>, List<S>> dataFetcher,
-        BiFunction<List<MolecularProfileCaseIdentifier>, List<S>, Long> includeFrequencyFunction,
-        Function<S, String> keyGenerator) {
+        BiFunction<List<MolecularProfileCaseIdentifier>, List<S>, Long> includeFrequencyFunction) {
 
         List<S> alterationCountByGenes;
         AtomicReference<Long> profiledCasesCount = new AtomicReference<>(0L);
@@ -243,7 +257,7 @@ private <S extends AlterationCountByGene> Pair<List<S>, Long> getAlterationCount
                         profiledCasesCount.updateAndGet(v -> v + studyProfiledCasesCount);
                     }
                     studyAlterationCountByGenes.forEach(datum -> {
-                        String key = keyGenerator.apply(datum);
+                        String key = datum.getUniqueEventKey();
                         if (totalResult.containsKey(key)) {
                             S alterationCountByGene = totalResult.get(key);
                             alterationCountByGene.setTotalCount(alterationCountByGene.getTotalCount() + datum.getTotalCount());u     }(jt  (cbe49e7642989b0e66c79b0b0eb399fcd40aa687j  Vservice/src/main/java/org/cbioportal/service/impl/AlterationEnrichmentServiceImpl.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationEnrichmentServiceImpl.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationEnrichmentServiceImpl.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationEnrichmentServiceImpl.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -46,15 +46,15 @@ public Map<String, Pair<List<AlterationCountByGene>, Long>> getAlterationCountsb
 
                     if (enrichmentType.equals(EnrichmentType.SAMPLE)) {
                         return alterationCountService
-                            .getSampleAlterationCounts(
+                            .getSampleAlterationGeneCounts(
                                 entry.getValue(),
                                 Select.all(),
                                 true,
                                 true,
                                 alterationFilter);
                     } else {
                         return alterationCountService
-                            .getPatientAlterationCounts(
+                            .getPatientAlterationGeneCounts(
                                 entry.getValue(),
                                 Select.all(),
                                 true,u}(jt  (a4d41a8f3438310a4dcd64a44f747bcc9ea7885ej  Nservice/src/main/java/org/cbioportal/service/impl/ClinicalDataServiceImpl.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FClinicalDataServiceImpl.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FClinicalDataServiceImpl.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FClinicalDataServiceImpl.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -1,6 +1,5 @@
 package org.cbioportal.service.impl;
 
-import org.apache.commons.collections4.list.UnmodifiableList;
 import org.cbioportal.model.*;
 import org.cbioportal.model.meta.BaseMeta;
 import org.cbioportal.persistence.ClinicalDataRepository;
@@ -228,10 +227,17 @@ public List<ClinicalData> getPatientClinicalDataDetailedToSample(List<String> st
     }
 
     @Override
-    public List<ClinicalData> fetchSampleClinicalDataClinicalTable(List<String> studyIds, List<String> sampleIds, Integer pageSize,
-                                                                   Integer pageNumber, String searchTerm, String sortBy,
-                                                                   String direction) {
-        return clinicalDataRepository.fetchSampleClinicalDataClinicalTable(studyIds, sampleIds, pageSize, pageNumber, searchTerm,
+    public List<ClinicalData> fetchSampleClinicalTable(List<String> studyIds, List<String> sampleIds, Integer pageSize,
+                                                       Integer pageNumber, String searchTerm, String sortBy,
+                                                       String direction) {
+        return clinicalDataRepository.fetchSampleClinicalTable(studyIds, sampleIds, pageSize, pageNumber, searchTerm,
                                                                             sortBy, direction);
     }
+
+    @Override
+    public Integer fetchSampleClinicalTableCount(List<String> studyIds, List<String> sampleIds,
+                                                 String searchTerm, String sortBy, String direction) {
+        return clinicalDataRepository.fetchSampleClinicalTableCount(studyIds, sampleIds, searchTerm, 
+            sortBy, direction);
+    }
 }u}(jt  (bbb420b2b2d035acd398ff99ead9ccbfaad68f5aj  Sservice/src/main/java/org/cbioportal/service/impl/StructuralVariantServiceImpl.javaj  modifiedj  K	j  K j  K	j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStructuralVariantServiceImpl.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStructuralVariantServiceImpl.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStructuralVariantServiceImpl.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -24,6 +24,7 @@
 package org.cbioportal.service.impl;
 
 import org.cbioportal.model.GeneFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 import org.cbioportal.persistence.StructuralVariantRepository;
@@ -59,4 +60,12 @@ public List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String>
             molecularProfileIds, sampleIds, geneQueries);
     }
 
+    @Override
+    public List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
+                                                                             List<String> sampleIds,
+                                                                             List<StructuralVariantFilterQuery> structVarQueries) {
+        return structuralVariantRepository.fetchStructuralVariantsByStructVarQueries(
+            molecularProfileIds, sampleIds, structVarQueries);
+    }
+
 }u}(jt  (510fa8f0206c012b5da48c56b46b1b5332445673j  Kservice/src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.javaj  modifiedj  Kvj  Kj  Kzj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X$  @@ -2,8 +2,10 @@
 
 import org.apache.commons.collections4.map.MultiKeyMap;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
 import org.cbioportal.model.util.Select;
+import org.cbioportal.persistence.AlterationRepository;
 import org.cbioportal.service.*;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.exception.StudyNotFoundException;
@@ -14,6 +16,7 @@
 import java.util.*;
 import java.util.function.Function;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 @Service
 public class StudyViewServiceImpl implements StudyViewService {
@@ -33,6 +36,15 @@ public class StudyViewServiceImpl implements StudyViewService {
     @Autowired
     private GenericAssayService genericAssayService;
 
+    @Autowired
+    private AlterationRepository alterationRepository;
+
+    @Autowired
+    private GeneService geneService;
+    
+    @Autowired 
+    private MolecularDataService molecularDataService;
+    
     @Override
     public List<GenomicDataCount> getGenomicDataCounts(List<String> studyIds, List<String> sampleIds) {
         List<MolecularProfileCaseIdentifier> molecularProfileSampleIdentifiers =
@@ -82,7 +94,7 @@ public List<AlterationCountByGene> getMutationAlterationCountByGenes(List<String
         throws StudyNotFoundException {
         List<MolecularProfileCaseIdentifier> caseIdentifiers =
             molecularProfileService.getFirstMutationProfileCaseIdentifiers(studyIds, sampleIds);
-        List<AlterationCountByGene> alterationCountByGenes = alterationCountService.getSampleMutationCounts(
+        List<AlterationCountByGene> alterationCountByGenes = alterationCountService.getSampleMutationGeneCounts(
             caseIdentifiers,
             Select.all(),
             true,
@@ -99,7 +111,7 @@ public List<AlterationCountByGene> getStructuralVariantAlterationCountByGenes(Li
         throws StudyNotFoundException {
         List<MolecularProfileCaseIdentifier> caseIdentifiers =
             molecularProfileService.getFirstStructuralVariantProfileCaseIdentifiers(studyIds, sampleIds);
-        List<AlterationCountByGene> alterationCountByGenes = alterationCountService.getSampleStructuralVariantCounts(
+        List<AlterationCountByGene> alterationCountByGenes = alterationCountService.getSampleStructuralVariantGeneCounts(
             caseIdentifiers,
             Select.all(),
             true,
@@ -109,6 +121,18 @@ public List<AlterationCountByGene> getStructuralVariantAlterationCountByGenes(Li
         return alterationCountByGenes;
     }
 
+    @Override
+    public List<AlterationCountByStructuralVariant> getStructuralVariantAlterationCounts(List<String> studyIds,
+                                                                                         List<String> sampleIds,
+                                                                                         AlterationFilter annotationFilters) {
+        List<MolecularProfileCaseIdentifier> caseIdentifiers =
+            molecularProfileService.getFirstStructuralVariantProfileCaseIdentifiers(studyIds, sampleIds);
+        return alterationCountService.getSampleStructuralVariantCounts(caseIdentifiers,
+            true,
+            false,
+            annotationFilters).getFirst();
+    }
+
     private void annotateDataWithQValue(List<String> studyIds, List<AlterationCountByGene> alterationCountByGenes)
         throws StudyNotFoundException {
         Set<String> distinctStudyIds = new HashSet<>(studyIds);
@@ -138,8 +162,8 @@ public List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> stu
         throws StudyNotFoundException {
         List<MolecularProfileCaseIdentifier> caseIdentifiers =
             molecularProfileService.getFirstDiscreteCNAProfileCaseIdentifiers(studyIds, sampleIds);
-        Select<CNA> cnaTypes = Select.byValues(CNA_TYPES_AMP_AND_HOMDEL);
-        List<CopyNumberCountByGene> copyNumberCountByGenes = alterationCountService.getSampleCnaCounts(
+        
+        List<CopyNumberCountByGene> copyNumberCountByGenes = alterationCountService.getSampleCnaGeneCounts(
             caseIdentifiers,
             Select.all(),
             true,
@@ -170,6 +194,96 @@ public List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> stu
         return copyNumberCountByGenes;
     }
 
+    @Override
+    public List<GenomicDataCountItem> getCNAAlterationCountsByGeneSpecific(List<String> studyIds, 
+                                                                           List<String> sampleIds,
+                                                                           List<Pair<String, String>> genomicDataFilters) {
+        
+        List<MolecularProfile> molecularProfiles = molecularProfileService.getMolecularProfilesInStudies(studyIds,
+            "SUMMARY");
+
+        Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
+            .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
+
+        Set<String> hugoGeneSymbols = genomicDataFilters.stream().map(Pair::getKey)
+            .collect(Collectors.toSet());
+
+        Map<String, Integer> geneSymbolIdMap = geneService
+            .fetchGenes(new ArrayList<>(hugoGeneSymbols), "HUGO_GENE_SYMBOL",
+                "SUMMARY")
+            .stream().collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
+        
+        return genomicDataFilters
+            .stream()
+            .flatMap(gdFilter -> {
+                GenomicDataCountItem genomicDataCountItem = new GenomicDataCountItem();
+                String hugoGeneSymbol = gdFilter.getKey();
+                String profileType = gdFilter.getValue();
+                genomicDataCountItem.setHugoGeneSymbol(hugoGeneSymbol);
+                genomicDataCountItem.setProfileType(profileType);
+                
+                List<String> stableIds = Arrays.asList(geneSymbolIdMap.get(hugoGeneSymbol).toString());
+
+                Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
+                    .getOrDefault(profileType, new ArrayList<MolecularProfile>()).stream()
+                    .collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
+                        MolecularProfile::getStableId));
+                
+                List<String> mappedSampleIds = new ArrayList<>();
+                List<String> mappedProfileIds = new ArrayList<>();
+
+                for (int i = 0; i < sampleIds.size(); i++) {
+                    String studyId = studyIds.get(i);
+                    if (studyIdToMolecularProfileIdMap.containsKey(studyId)) {
+                        mappedSampleIds.add(sampleIds.get(i));
+                        mappedProfileIds.add(studyIdToMolecularProfileIdMap.get(studyId));
+                    }
+                }
+
+                if (mappedSampleIds.isEmpty()) {
+                    return Stream.of();
+                }
+
+                List<GeneMolecularData> geneMolecularDataList = molecularDataService.getMolecularDataInMultipleMolecularProfiles(mappedProfileIds, mappedSampleIds,
+                        stableIds.stream().map(Integer::parseInt).collect(Collectors.toList()), "SUMMARY");
+                
+                List<GenomicDataCount> genomicDataCounts = geneMolecularDataList
+                    .stream()
+                    .filter(g -> StringUtils.isNotEmpty(g.getValue()) && !g.getValue().equals("NA"))
+                    .collect(Collectors.groupingBy(GeneMolecularData::getValue))
+                    .entrySet()
+                    .stream()
+                    .map(entry -> {
+                        Integer alteration = Integer.valueOf(entry.getKey());
+                        List<GeneMolecularData> geneMolecularData = entry.getValue();
+                        int count = geneMolecularData.size();
+
+                        String label = CNA.getByCode(alteration.shortValue()).getDescription();
+
+                        GenomicDataCount genomicDataCount = new GenomicDataCount();
+                        genomicDataCount.setLabel(label);
+                        genomicDataCount.setValue(String.valueOf(alteration));
+                        genomicDataCount.setCount(count);
+
+                        return genomicDataCount;
+                    }).collect(Collectors.toList());
+
+                int totalCount = genomicDataCounts.stream().mapToInt(GenomicDataCount::getCount).sum();
+                int naCount = sampleIds.size() - totalCount;
+                
+                if (naCount > 0) {
+                    GenomicDataCount genomicDataCount = new GenomicDataCount();
+                    genomicDataCount.setLabel("NA");
+                    genomicDataCount.setValue("NA");
+                    genomicDataCount.setCount(naCount);
+                    genomicDataCounts.add(genomicDataCount);
+                }
+                
+                genomicDataCountItem.setCounts(genomicDataCounts);
+                return Stream.of(genomicDataCountItem);
+            }).collect(Collectors.toList());
+    };
+
     @Override
     public List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String> sampleIds, List<String> studyIds,
                                                                List<String> stableIds, List<String> profileTypes) {u}(jt  (75784a01c150196e8496cfbec4e9e15e064817dej  Kservice/src/main/java/org/cbioportal/service/impl/TreatmentServiceImpl.javaj  modifiedj  Kj  K3j  KPj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImpl.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImpl.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImpl.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -12,8 +12,6 @@
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
-import static java.util.stream.Collectors.toList;
-
 @Service
 public class TreatmentServiceImpl implements TreatmentService {
     @Autowired
@@ -25,7 +23,7 @@ private Pair<List<String>, List<String>> filterIds(List<String> sampleIds, List<
         }
         Set<String> studiesWithTreatments = studyIds.stream()
             .distinct()
-            .filter(studyId -> treatmentRepository.studyIdHasTreatments(studyId, key))
+            .filter(studyId -> treatmentRepository.hasTreatmentData(Collections.singletonList(studyId), key))
             .collect(Collectors.toSet());
         
         ArrayList<String> filteredSampleIds = new ArrayList<>();
@@ -40,16 +38,16 @@ private Pair<List<String>, List<String>> filterIds(List<String> sampleIds, List<
         }
         return new ImmutablePair<>(filteredSampleIds, filteredStudyIds);
     }
-    
+
     @Override
     public List<SampleTreatmentRow> getAllSampleTreatmentRows(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key) {
         Pair<List<String>, List<String>> filteredIds = filterIds(sampleIds, studyIds, key);
         sampleIds = filteredIds.getLeft();
         studyIds = filteredIds.getRight();
 
-        Map<String, List<ClinicalEventSample>> samplesByPatient = 
+        Map<String, List<ClinicalEventSample>> samplesByPatient =
             treatmentRepository.getSamplesByPatientId(sampleIds, studyIds);
-        Map<String, List<Treatment>> treatmentsByPatient = 
+        Map<String, List<Treatment>> treatmentsByPatient =
             treatmentRepository.getTreatmentsByPatientId(sampleIds, studyIds, key);
 
         Stream<SampleTreatmentRow> rows = samplesByPatient.keySet().stream()
@@ -150,71 +148,51 @@ Stream<SampleTreatmentRow> toRows() {
             );
         }
     }
-
     @Override
     public List<PatientTreatmentRow> getAllPatientTreatmentRows(
         List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key
     ) {
         Pair<List<String>, List<String>> filteredIds = filterIds(sampleIds, studyIds, key);
         sampleIds = filteredIds.getLeft();
         studyIds = filteredIds.getRight();
-        
-        Map<String, List<Treatment>> treatmentsByPatient = 
-            treatmentRepository.getTreatmentsByPatientId(sampleIds, studyIds, key);
-        Map<String, List<ClinicalEventSample>> samplesByPatient = treatmentRepository
-            .getShallowSamplesByPatientId(sampleIds, studyIds)
-            .entrySet()
-            .stream()
-            .filter(e -> treatmentsByPatient.containsKey(e.getKey()))
-            .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
-        Set<String> treatments = treatmentRepository.getAllUniqueTreatments(sampleIds, studyIds, key);
-
-        return treatments.stream()
-            .map(t -> createPatientTreatmentRowForTreatment(t, treatmentsByPatient, samplesByPatient))
-            .collect(Collectors.toList());
-    }
 
-    private PatientTreatmentRow createPatientTreatmentRowForTreatment(
-        String treatment,
-        Map<String, List<Treatment>> treatmentsByPatient,
-        Map<String, List<ClinicalEventSample>> samplesByPatient
-    ) {
-        // find all the patients that have received this treatment
-        List<Map.Entry<String, List<Treatment>>> matchingPatients = matchingPatients(treatment, treatmentsByPatient);
+        Map<String, List<ClinicalEventSample>> samplesByPatient = treatmentRepository
+            .getShallowSamplesByPatientId(sampleIds, studyIds);
 
-        // from those patients, extract the unique samples
-        Set<ClinicalEventSample> samples = matchingPatients
+        Map<String, List<Treatment>> treatmentSet = treatmentRepository.getTreatments(sampleIds, studyIds, key)
             .stream()
-            .map(Map.Entry::getKey)
-            .flatMap(patient -> samplesByPatient.getOrDefault(patient, new ArrayList<>()).stream())
-            .collect(Collectors.toSet());
-
-
-        return new PatientTreatmentRow(treatment, matchingPatients.size(), samples);
-    }
+            .collect(Collectors.groupingBy(Treatment::getTreatment));
 
-    private List<Map.Entry<String, List<Treatment>>> matchingPatients(
-        String treatment,
-        Map<String, List<Treatment>> treatmentsByPatient
-    ) {
-        return treatmentsByPatient.entrySet().stream()
-            .filter(p -> p.getValue().stream().anyMatch(t -> t.getTreatment().equals(treatment)))
-            .collect(toList());
+        /*
+            This logic transforms treatmentSet to list of PatientTreatmentRow. transformation steps:
+            - key in treatmentSet is going to be treatment
+            - get all unique patient ids -> this is going to give count
+            - get all clinicalEventSamples using above unique patient ids
+         */
+        return treatmentSet.entrySet()
+            .stream()
+            .map(entry -> {
+                String treatment = entry.getKey();
+                Set<String> patientIds = entry.getValue().stream().map(Treatment::getPatientId).collect(Collectors.toSet());
+                Set<ClinicalEventSample> clinicalEventSamples = patientIds
+                    .stream()
+                    .flatMap(patientId -> samplesByPatient.getOrDefault(patientId, new ArrayList<>()).stream())
+                    .collect(Collectors.toSet());
+                return new PatientTreatmentRow(treatment, patientIds.size(), clinicalEventSamples);
+            })
+            .collect(Collectors.toList());
     }
 
     @Override
     public Boolean containsTreatmentData(List<String> studies, ClinicalEventKeyCode key) {
-        return treatmentRepository.getTreatmentCount(studies, key.getKey()) > 0;
+        return treatmentRepository.hasTreatmentData(studies, key);
     }
 
     @Override
     public Boolean containsSampleTreatmentData(List<String> studyIds, ClinicalEventKeyCode key) {
         studyIds = studyIds.stream()
-            .filter(studyId -> treatmentRepository.studyIdHasTreatments(studyId, key))
+            .filter(studyId -> treatmentRepository.hasTreatmentData(Collections.singletonList(studyId), key))
             .collect(Collectors.toList());
-        Integer sampleCount = treatmentRepository.getSampleCount(studyIds);
-        Integer treatmentCount = treatmentRepository.getTreatmentCount(studyIds, key.getKey());
-        
-        return sampleCount * treatmentCount > 0;
+        return studyIds.size() > 0 && treatmentRepository.hasSampleTimelineData(studyIds);
     }
 }u}(jt  (8113cc63f7380d8cff4cb9026990fc7050114c95j  Oservice/src/main/java/org/cbioportal/service/util/AlterationEnrichmentUtil.javaj  modifiedj  K	j  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X}  @@ -2,6 +2,7 @@
 
 import org.apache.commons.math3.stat.inference.ChiSquareTest;
 import org.apache.commons.math3.util.Pair;
+import org.cbioportal.model.AlterationCountBase;
 import org.cbioportal.model.AlterationCountByGene;
 import org.cbioportal.model.AlterationEnrichment;
 import org.cbioportal.model.CountSummary;
@@ -28,7 +29,7 @@
 import java.util.Map.Entry;
 
 @Component
-public class AlterationEnrichmentUtil<T extends AlterationCountByGene> {
+public class AlterationEnrichmentUtil<T extends AlterationCountBase> {
 
     @Autowired
     private FisherExactTestCalculator fisherExactTestCalculator;
@@ -41,7 +42,7 @@ public class AlterationEnrichmentUtil<T extends AlterationCountByGene> {
     @Autowired
     private MolecularProfileService molecularProfileService;
 
-    public List<AlterationEnrichment> createAlterationEnrichments(Map<String, Pair<List<T>, Long>> mutationCountsbyGroup) {
+    public List<AlterationEnrichment> createAlterationEnrichments(Map<String, Pair<List<AlterationCountByGene>, Long>> mutationCountsbyGroup) {
         
         Map<String, Map<Integer, AlterationCountByGene>> mutationCountsbyEntrezGeneIdAndGroup = mutationCountsbyGroup
                     .entrySet()
@@ -131,7 +132,7 @@ public List<AlterationEnrichment> createAlterationEnrichments(Map<String, Pair<L
                         int alteredOnlyInQueryGenesCount = counts.get(0).getProfiledCount()
                             - counts.get(0).getAlteredCount();
 
-                        pValue = fisherExactTestCalculator.getCumulativePValue(alteredInNoneCount,
+                        pValue = fisherExactTestCalculator.getTwoTailedPValue(alteredInNoneCount,
                             counts.get(1).getAlteredCount(), alteredOnlyInQueryGenesCount,
                             counts.get(0).getAlteredCount());
                     } else {
@@ -160,14 +161,14 @@ public List<AlterationEnrichment> createAlterationEnrichments(Map<String, Pair<L
     
     public long includeFrequencyForSamples(
             List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-            List<T> alterationCountByGenes,
+            List<T> alterationCounts,
             boolean includeMissingAlterationsFromGenePanel) {
 
         // Collect profile id and sample id arrays.
         // These are arrays of equal length, where every index
         // represents a sample id / profile id-combination
         List<String> sampleIds = new ArrayList<>();
-        List<String> molecularProfileIds = new ArrayList<>();
+        List<String> molecularProfileIds = new ArrayList<>();   
         molecularProfileCaseIdentifiers.forEach(pair -> {
             sampleIds.add(pair.getCaseId());
             molecularProfileIds.add(pair.getMolecularProfileId());
@@ -176,7 +177,7 @@ public long includeFrequencyForSamples(
         List<GenePanelData> genePanelDataList = genePanelService
             .fetchGenePanelDataInMultipleMolecularProfiles(molecularProfileCaseIdentifiers);
 
-        profiledCasesCounter.calculate(alterationCountByGenes, genePanelDataList,
+        profiledCasesCounter.calculate(alterationCounts, genePanelDataList,
                 includeMissingAlterationsFromGenePanel, profiledCasesCounter.sampleUniqueIdentifier);
 
         return genePanelDataList
@@ -189,7 +190,7 @@ public long includeFrequencyForSamples(
 
     public long includeFrequencyForPatients(
             List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-            List<T> alterationCountByGenes,
+            List<T> alterationCounts,
             boolean includeMissingAlterationsFromGenePanel) {
 
         // Collect profile id and sample id arrays.
@@ -205,7 +206,7 @@ public long includeFrequencyForPatients(
         List<GenePanelData> genePanelDataList = genePanelService
             .fetchGenePanelDataInMultipleMolecularProfilesByPatientIds(molecularProfileCaseIdentifiers);
 
-        profiledCasesCounter.calculate(alterationCountByGenes, genePanelDataList,
+        profiledCasesCounter.calculate(alterationCounts, genePanelDataList,
             includeMissingAlterationsFromGenePanel, profiledCasesCounter.patientUniqueIdentifier);
 
         return genePanelDataListu}(jt  (ed94cad2b5bfc09610d8c17eae97a74684a109ddj  Pservice/src/main/java/org/cbioportal/service/util/FisherExactTestCalculator.javaj  modifiedj  K/j  K j  K/j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X(  @@ -40,4 +40,51 @@ public double getCumulativePValue(int a, int b, int c, int d) {
         }
         return p;
     }
+
+    public double getTwoTailedPValue(int a, int b, int c, int d) {
+        
+        int min, i;
+        int n = a + b + c + d;
+        double p = 0;
+        double[] f = new double[n + 1];
+        f[0] = 0.0;
+
+        for (int j = 1; j <= n; j++) {
+            f[j] = f[j - 1] + Math.log(j);
+        }
+
+        double baseP = getPValue(a, b, c, d, f);
+//         in order for a table under consideration to have its p-value included
+//         in the final result, it must have a p-value less than the baseP, i.e.
+//         Fisher's exact test computes the probability, given the observed marginal
+//         frequencies, of obtaining exactly the frequencies observed and any configuration more extreme.
+//         By "more extreme," we mean any configuration (given observed marginals) with a smaller probability of
+//         occurrence in the same direction (one-tailed) or in both directions (two-tailed).
+        
+        int initialA = a, initialB = b, initialC = c, initialD = d;
+        p += baseP;
+        
+        min = (c < b) ? c : b;
+        for (i = 0; i < min; i++) {
+            double tempP = getPValue(++a, --b, --c, ++d, f);
+            if (tempP <= baseP) {
+                p += tempP;
+            }
+        }
+
+        // reset the values to their original so we can repeat this process for the other side
+        a = initialA;
+        b = initialB;
+        c = initialC;
+        d = initialD;
+        
+        min = (a < d) ? a : d;
+        for (i = 0; i < min; i++) {
+            double pTemp = getPValue(--a, ++b, ++c, --d, f);
+            if (pTemp <= baseP) {
+                p += pTemp;
+            }
+        }
+        return p;
+    }
 }u}(jt  (3a4b3641df1dca64b1592d0f380a2d348fe6c051j  Kservice/src/main/java/org/cbioportal/service/util/ProfiledCasesCounter.javaj  modifiedj  K:j  K j  KZj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FProfiledCasesCounter.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FProfiledCasesCounter.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FProfiledCasesCounter.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X.  @@ -11,7 +11,7 @@
 import org.springframework.stereotype.Component;
 
 @Component
-public class ProfiledCasesCounter<T extends AlterationCountByGene> {
+public class ProfiledCasesCounter<T extends AlterationCountBase> {
 
     @Autowired
     private GenePanelService genePanelService;
@@ -27,6 +27,7 @@ public void calculate(List<T> alterationCounts,
             List<GenePanelData> genePanelDataList,
             boolean includeMissingAlterationsFromGenePanel,
             Function<GenePanelData, String> caseUniqueIdentifier) {
+            
         ProfiledCaseType profiledCaseType = (caseUniqueIdentifier == patientUniqueIdentifier) ?
             ProfiledCaseType.PATIENT : ProfiledCaseType.SAMPLE;
         Map<String, Set<String>> casesWithDataInGenePanel = extractCasesWithDataInGenePanel(genePanelDataList, caseUniqueIdentifier);
@@ -35,26 +36,30 @@ public void calculate(List<T> alterationCounts,
             genePanels = genePanelService.fetchGenePanels(new ArrayList<>(casesWithDataInGenePanel.keySet()), "DETAILED");
         }
 
-        Map<Pair<Integer, String>, List<GenePanel>> geneGenePanelMap = new HashMap<>();
+        Map<Pair<Integer, String>, List<GenePanel>> geneToGenePanel = new HashMap<>();
         for (GenePanel genePanel : genePanels) {
             for (GenePanelToGene genePanelToGene : genePanel.getGenes()) {
+                // TODO I am not sure whether it is smart to include the HUGO gene suymbol in the key here.
+                // What if two panels have the same Entrez gene id with different Hugo gene symbols? If that situation
+                // can never occur, better not include the HUGO symbol in the key and only use entrez gene id. It confuses
+                // developers that may think it is an important key element.
                 Pair<Integer, String> key = new Pair<>(genePanelToGene.getEntrezGeneId(), genePanelToGene.getHugoGeneSymbol());
-                if (geneGenePanelMap.containsKey(key)) {
-                    geneGenePanelMap.get(key).add(genePanel);
+                if (geneToGenePanel.containsKey(key)) {
+                    geneToGenePanel.get(key).add(genePanel);
                 } else {
                     List<GenePanel> geneGenePanelList = new ArrayList<>();
                     geneGenePanelList.add(genePanel);
-                    geneGenePanelMap.put(key, geneGenePanelList);
+                    geneToGenePanel.put(key, geneGenePanelList);
                 }
             }
         }
 
-        List<GenePanelData> profiled = genePanelDataList
+        List<GenePanelData> genePanelData = genePanelDataList
                 .stream()
                 .filter(GenePanelData::getProfiled)
                 .collect(Collectors.toList());
 
-        Set<String> profiledCases = profiled
+        Set<String> profiledCases = genePanelData
                 .stream()
                 // there can be duplicate patient or sample id, append study id
                 .map(caseUniqueIdentifier)
@@ -66,15 +71,15 @@ public void calculate(List<T> alterationCounts,
         // so a case is considered without panel data only if none of the profiles has a gene panel id
         
         // first identify cases with gene panel data
-        Set<String> casesWithPanelData = profiled
+        Set<String> casesWithPanelData = genePanelData
                 .stream()
                 .filter(g -> g.getGenePanelId() != null)
                 // there can be duplicate patient or sample id, append study id
                 .map(caseUniqueIdentifier)
                 .collect(Collectors.toSet());
 
         // find all unique cases
-        Set<String> casesWithoutPanelData = profiled
+        Set<String> casesWithoutPanelData = genePanelData
             .stream()
             // there can be duplicate patient or sample id, append study id
             .map(caseUniqueIdentifier)
@@ -83,17 +88,15 @@ public void calculate(List<T> alterationCounts,
         // removing cases with panel data from all unique cases gives us the cases without panel data
         casesWithoutPanelData.removeAll(casesWithPanelData);
         
-        for (AlterationCountByGene alterationCountByGene : alterationCounts) {
-            Integer entrezGeneId = alterationCountByGene.getEntrezGeneId();
-            Set<String> totalProfiledPatients = new HashSet<String>();
+        for (T alterationCount : alterationCounts) {
+            Set<String> totalProfiledPatients = new HashSet<>();
+            Set<String> allMatchingGenePanelIds = new HashSet<>();
             int totalProfiledSamples = 0;
-            Set<String> allMatchingGenePanelIds = new HashSet<String>();
-            Pair<Integer, String> key = new Pair<>(entrezGeneId,alterationCountByGene.getHugoGeneSymbol());
             // different calculations depending on if gene is linked to gene panels
-            if (geneGenePanelMap.containsKey(key)) {
+            if (alterationIsCoveredByGenePanel(alterationCount, geneToGenePanel)) {
                 // for every gene panel associated containing the gene, use the sum of unique cases
                 // as well as cases without panel data
-                for (GenePanel genePanel : geneGenePanelMap.get(key)) {
+                for (GenePanel genePanel : getGenePanelsForAlterationCount(alterationCount, geneToGenePanel)) {
                     allMatchingGenePanelIds.add(genePanel.getStableId());
                     if (profiledCaseType == ProfiledCaseType.PATIENT) {
                         totalProfiledPatients.addAll(casesWithDataInGenePanel.get(genePanel.getStableId()));
@@ -103,37 +106,37 @@ public void calculate(List<T> alterationCounts,
                 }
                 if (profiledCaseType == ProfiledCaseType.PATIENT) {
                     totalProfiledPatients.addAll(casesWithoutPanelData);
-                    alterationCountByGene.setNumberOfProfiledCases(totalProfiledPatients.size());
+                    alterationCount.setNumberOfProfiledCases(totalProfiledPatients.size());
                 } else {
                     totalProfiledSamples += casesWithoutPanelData.size();
-                    alterationCountByGene.setNumberOfProfiledCases(totalProfiledSamples);
+                    alterationCount.setNumberOfProfiledCases(totalProfiledSamples);
                 }
             } else {
                 // we use profiledCasesCount instead of casesWithoutPanelData to
                 // prevent a divide by zero error which can happen for targeted studies
                 // in which certain genes have events that are not captured by the panel.
-                alterationCountByGene.setNumberOfProfiledCases(profiledCasesCount);
+                alterationCount.setNumberOfProfiledCases(profiledCasesCount);
             }
-            alterationCountByGene.setMatchingGenePanelIds(allMatchingGenePanelIds);
+            alterationCount.setMatchingGenePanelIds(allMatchingGenePanelIds);
         }
 
         if (includeMissingAlterationsFromGenePanel) {
-            Map<Integer, Boolean> genesWithAlteration = alterationCounts.stream()
-                    .collect(Collectors.toMap(AlterationCountByGene::getEntrezGeneId, x -> true));
+            Set<Integer> genesWithAlteration = alterationCounts.stream()
+                    .flatMap(count -> Arrays.stream(count.getEntrezGeneIds()))
+                    .collect(Collectors.toSet());
 
-            geneGenePanelMap.entrySet().forEach(entry -> {
-                Pair<Integer, String> key = entry.getKey();
-                Integer entrezGeneId = key.getFirst();
-                String hugoGeneSymbol = key.getSecond();
+            geneToGenePanel.entrySet().forEach(entry -> {
+                Integer entrezGeneId = entry.getKey().getFirst();
+                String hugoGeneSymbol = entry.getKey().getSecond();
                 // add alterationCount object where there are no alterations but have genePanel
                 // object
-                if (!genesWithAlteration.containsKey(entrezGeneId)) {
+                if (!genesWithAlteration.contains(entrezGeneId)) {
                     AlterationCountByGene alterationCountByGene = new AlterationCountByGene();
 
-                    Set<String> totalProfiledPatients = new HashSet<String>();
+                    Set<String> totalProfiledPatients = new HashSet<>();
+                    Set<String> allMatchingGenePanelIds = new HashSet<>();
                     int totalProfiledSamples = 0;
-                    Set<String> allMatchingGenePanelIds = new HashSet<String>();
-                    for (GenePanel genePanel : geneGenePanelMap.get(key)) {
+                    for (GenePanel genePanel : geneToGenePanel.get(new Pair<>(entrezGeneId, hugoGeneSymbol))) {
                         allMatchingGenePanelIds.add(genePanel.getStableId());
                         if (profiledCaseType == ProfiledCaseType.PATIENT) {
                             totalProfiledPatients.addAll(casesWithDataInGenePanel.get(genePanel.getStableId()));
@@ -168,16 +171,39 @@ private Map<String, Set<String>> extractCasesWithDataInGenePanel(
             List<GenePanelData> genePanelDataList,
             Function<GenePanelData, String> caseUniqueIdentifier) {
 
-        Map<String, Set<String>> casesWithDataInGenePanel = new HashMap<String, Set<String>>();
+        Map<String, Set<String>> casesWithDataInGenePanel = new HashMap<>();
         // loop through all membership records -- ignore any where g.getGenePanelId == null
         for (GenePanelData genePanelDataRecord : genePanelDataList) {
             String associatedGenePanel = genePanelDataRecord.getGenePanelId();
             if (associatedGenePanel != null) {
-                casesWithDataInGenePanel.putIfAbsent(associatedGenePanel, new HashSet<String>());
+                casesWithDataInGenePanel.putIfAbsent(associatedGenePanel, new HashSet<>());
                 Set<String> casesForThisGenePanel = casesWithDataInGenePanel.get(associatedGenePanel);
                 casesForThisGenePanel.add(caseUniqueIdentifier.apply(genePanelDataRecord));
             }
         }
         return casesWithDataInGenePanel;
     }
+    
+    private boolean alterationIsCoveredByGenePanel(T alterationCount, Map<Pair<Integer, String>, List<GenePanel>> entrezIdToGenePanel) {
+        return !getGenePanelsForAlterationCount(alterationCount, entrezIdToGenePanel).isEmpty();
+    }
+
+    private List<GenePanel> getGenePanelsForAlterationCount(T alterationCount, Map<Pair<Integer, String>, List<GenePanel>> entrezIdToGenePanel) {
+        if (alterationCount instanceof AlterationCountByGene) {
+            Integer entrezId = ((AlterationCountByGene) alterationCount).getEntrezGeneId();
+            String hugoSymbol = ((AlterationCountByGene) alterationCount).getHugoGeneSymbol();
+            return entrezIdToGenePanel.getOrDefault(new Pair<>(entrezId, hugoSymbol), new ArrayList<>());
+        }
+        if (alterationCount instanceof AlterationCountByStructuralVariant) {
+            Integer gene1EntrezId = ((AlterationCountByStructuralVariant) alterationCount).getGene1EntrezGeneId();
+            String gene1HugoSymbol = ((AlterationCountByStructuralVariant) alterationCount).getGene1HugoGeneSymbol();
+            Integer gene2EntrezId = ((AlterationCountByStructuralVariant) alterationCount).getGene2EntrezGeneId();
+            String gene2HugoSymbol = ((AlterationCountByStructuralVariant) alterationCount).getGene2HugoGeneSymbol();
+            List<GenePanel> panels = entrezIdToGenePanel.getOrDefault(new Pair<>(gene1EntrezId, gene2HugoSymbol), new ArrayList<>());
+            panels.addAll(entrezIdToGenePanel.getOrDefault(new Pair<>(gene2EntrezId, gene2HugoSymbol), new ArrayList<>()));
+            return panels.stream().distinct().collect(Collectors.toList());
+        }
+        throw new IllegalArgumentException("At present only AlterationCountByGene or AlterationCountByStructuralVariant are " +
+            "supported.");
+    }
 }u}(jt  (bd2c4955826eb4bdae5b9a825e7f2dcb1d540ca7j  Uservice/src/test/java/org/cbioportal/service/impl/AlterationCountServiceImplTest.javaj  modifiedj  K2j  Kj  KHj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationCountServiceImplTest.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationCountServiceImplTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationCountServiceImplTest.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X|  @@ -2,7 +2,6 @@
 
 import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
-import org.cbioportal.model.QueryElement;
 import org.cbioportal.model.util.Select;
 import org.cbioportal.persistence.AlterationRepository;
 import org.cbioportal.persistence.MolecularProfileRepository;
@@ -33,6 +32,8 @@ public class AlterationCountServiceImplTest extends BaseServiceImplTest {
     private AlterationEnrichmentUtil<AlterationCountByGene> alterationEnrichmentUtil;
     @Mock
     private AlterationEnrichmentUtil<CopyNumberCountByGene> alterationEnrichmentUtilCna;
+    @Mock
+    private AlterationEnrichmentUtil<AlterationCountByStructuralVariant> alterationEnrichmentUtilStructVar;
     @Spy
     @InjectMocks
     private MolecularProfileUtil molecularProfileUtil;
@@ -47,6 +48,7 @@ public class AlterationCountServiceImplTest extends BaseServiceImplTest {
     boolean includeMissingAlterationsFromGenePanel = false;
     List<AlterationCountByGene> expectedCountByGeneList;
     List<CopyNumberCountByGene> expectedCnaCountByGeneList;
+    List<AlterationCountByStructuralVariant> expectedStructuralVariantList;
     AlterationFilter alterationFilter = new AlterationFilter(
         mutationEventTypes,
         cnaEventTypes,
@@ -79,18 +81,26 @@ public void setup() {
         copyNumberCountByGene.setEntrezGeneId(ENTREZ_GENE_ID_1);
         copyNumberCountByGene.setAlteration(2);
         expectedCnaCountByGeneList = Arrays.asList(copyNumberCountByGene);
+
+        final AlterationCountByStructuralVariant alterationCountByStructuralVariant = new AlterationCountByStructuralVariant();
+        alterationCountByStructuralVariant.setGene1EntrezGeneId(ENTREZ_GENE_ID_1);
+        alterationCountByStructuralVariant.setGene2EntrezGeneId(ENTREZ_GENE_ID_2);
+        alterationCountByStructuralVariant.setGene1HugoGeneSymbol(HUGO_GENE_SYMBOL_1);
+        alterationCountByStructuralVariant.setGene2HugoGeneSymbol(HUGO_GENE_SYMBOL_2);
+        expectedStructuralVariantList = Arrays.asList(alterationCountByStructuralVariant);
+        
     }
     
     @Test
-    public void getSampleAlterationCounts() {
+    public void getSampleAlterationGeneCounts() {
 
         // this mock tests correct argument types
-        when(alterationRepository.getSampleAlterationCounts(
+        when(alterationRepository.getSampleAlterationGeneCounts(
             new HashSet<>(caseIdentifiers),
             entrezGeneIds,
             alterationFilter)).thenReturn(expectedCountByGeneList);
 
-        Pair<List<AlterationCountByGene>, Long> result = alterationCountService.getSampleAlterationCounts(
+        Pair<List<AlterationCountByGene>, Long> result = alterationCountService.getSampleAlterationGeneCounts(
             caseIdentifiers,
             entrezGeneIds,
             includeFrequency,
@@ -102,15 +112,15 @@ public void getSampleAlterationCounts() {
     }
 
     @Test
-    public void getPatientAlterationCounts() {
+    public void getPatientAlterationGeneCounts() {
 
         // this mock tests correct argument types
-        when(alterationRepository.getPatientAlterationCounts(
-            caseIdentifiers,
+        when(alterationRepository.getPatientAlterationGeneCounts(
+            new HashSet<>(caseIdentifiers),
             entrezGeneIds,
             alterationFilter)).thenReturn(expectedCountByGeneList);
 
-        Pair<List<AlterationCountByGene>, Long> result = alterationCountService.getPatientAlterationCounts(
+        Pair<List<AlterationCountByGene>, Long> result = alterationCountService.getPatientAlterationGeneCounts(
             caseIdentifiers,
             entrezGeneIds,
             includeFrequency,
@@ -122,14 +132,14 @@ public void getPatientAlterationCounts() {
     
 
     @Test
-    public void getSampleMutationCounts() {
+    public void getSampleMutationGeneCounts() {
         // this mock tests correct argument types
-        when(alterationRepository.getSampleAlterationCounts(
+        when(alterationRepository.getSampleAlterationGeneCounts(
             new HashSet<>(caseIdentifiers),
             entrezGeneIds,
             alterationFilter)).thenReturn(expectedCountByGeneList);
 
-        Pair<List<AlterationCountByGene>, Long> result = alterationCountService.getSampleMutationCounts(
+        Pair<List<AlterationCountByGene>, Long> result = alterationCountService.getSampleMutationGeneCounts(
             caseIdentifiers,
             entrezGeneIds,
             includeFrequency,
@@ -141,15 +151,15 @@ public void getSampleMutationCounts() {
     }
 
     @Test
-    public void getPatientMutationCounts() throws MolecularProfileNotFoundException {
+    public void getPatientMutationGeneCounts() throws MolecularProfileNotFoundException {
 
         // this mock tests correct argument types
-        when(alterationRepository.getPatientAlterationCounts(
-            caseIdentifiers,
+        when(alterationRepository.getPatientAlterationGeneCounts(
+            new HashSet<>(caseIdentifiers),
             entrezGeneIds,
             alterationFilter)).thenReturn(expectedCountByGeneList);
 
-        Pair<List<AlterationCountByGene>, Long> result = alterationCountService.getPatientMutationCounts(
+        Pair<List<AlterationCountByGene>, Long> result = alterationCountService.getPatientMutationGeneCounts(
             caseIdentifiers,
             entrezGeneIds,
             includeFrequency,
@@ -161,15 +171,15 @@ public void getPatientMutationCounts() throws MolecularProfileNotFoundException
     }
 
     @Test
-    public void getSampleCnaCounts() {
+    public void getSampleCnaGeneCounts() {
 
         // this mock tests correct argument types
-        when(alterationRepository.getSampleCnaCounts(
+        when(alterationRepository.getSampleCnaGeneCounts(
             new TreeSet<>(caseIdentifiers),
             entrezGeneIds,
             alterationFilter)).thenReturn(expectedCnaCountByGeneList);
 
-        Pair<List<CopyNumberCountByGene>, Long> result = alterationCountService.getSampleCnaCounts(
+        Pair<List<CopyNumberCountByGene>, Long> result = alterationCountService.getSampleCnaGeneCounts(
             caseIdentifiers,
             entrezGeneIds,
             includeFrequency,
@@ -182,16 +192,16 @@ public void getSampleCnaCounts() {
     }
 
     @Test
-    public void getPatientCnaCounts() {
+    public void getPatientCnaGeneCounts() {
 
         // this mock tests correct argument types
-        when(alterationRepository.getPatientCnaCounts(
-            caseIdentifiers,
+        when(alterationRepository.getPatientCnaGeneCounts(
+            new HashSet<>(caseIdentifiers),
             entrezGeneIds,
             alterationFilter)).thenReturn(expectedCnaCountByGeneList);
 
 
-        Pair<List<CopyNumberCountByGene>, Long> result = alterationCountService.getPatientCnaCounts(
+        Pair<List<CopyNumberCountByGene>, Long> result = alterationCountService.getPatientCnaGeneCounts(
             caseIdentifiers,
             entrezGeneIds,
             includeFrequency,
@@ -201,4 +211,22 @@ public void getPatientCnaCounts() {
         verify(alterationEnrichmentUtilCna, times(1)).includeFrequencyForPatients(anyList(), anyList(), anyBoolean());
         Assert.assertEquals(expectedCnaCountByGeneList, result.getFirst());
     }
+
+    @Test
+    public void getSampleStructuralVariantCounts() {
+
+        when(alterationRepository.getSampleStructuralVariantCounts(
+            new TreeSet<>(caseIdentifiers),
+            alterationFilter)).thenReturn(expectedStructuralVariantList);
+
+        Pair<List<AlterationCountByStructuralVariant>, Long> result = alterationCountService.getSampleStructuralVariantCounts(
+            caseIdentifiers,
+            includeFrequency,
+            includeMissingAlterationsFromGenePanel,
+            alterationFilter);
+
+        verify(alterationEnrichmentUtilStructVar, times(1)).includeFrequencyForSamples(anyList(), anyList(), anyBoolean());
+        Assert.assertEquals(expectedStructuralVariantList, result.getFirst());
+
+    }
 }
\ No newline at end of fileu}(jt  (0c645bb26201079e10e004a8481525834dd85d23j  Zservice/src/test/java/org/cbioportal/service/impl/AlterationEnrichmentServiceImplTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationEnrichmentServiceImplTest.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationEnrichmentServiceImplTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationEnrichmentServiceImplTest.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -9,7 +9,6 @@
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
 import org.cbioportal.model.MutationCountByGene;
 import org.cbioportal.model.MutationEventType;
-import org.cbioportal.model.QueryElement;
 import org.cbioportal.model.util.Select;
 import org.cbioportal.service.AlterationCountService;
 import org.cbioportal.service.util.AlterationEnrichmentUtil;
@@ -71,7 +70,7 @@ public void getAlterationEnrichments() throws Exception {
 
         //  return counts for each of the two groups 
         for (String molecularProfileId : groupMolecularProfileCaseSets.keySet()) {
-            Mockito.when(alterationCountService.getSampleAlterationCounts(
+            Mockito.when(alterationCountService.getSampleAlterationGeneCounts(
                 groupMolecularProfileCaseSets.get(molecularProfileId),
                 Select.all(), true, true, alterationFilter)
             ).thenReturn(alterationSampleCountByGeneList);u}(jt  (827a7b752a515684801b8188ec8e397a80da98bfj  Jservice/src/test/java/org/cbioportal/service/impl/BaseServiceImplTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -59,5 +59,7 @@ public class BaseServiceImplTest {
     public static final String CATEGORY_VALUE_1 = "category_value1";
     public static final String CATEGORY_VALUE_2 = "category_value2";
     public static final String EMPTY_VALUE_1 = "";
-    public static final String EMPTY_VALUE_2 = "NA";    
+    public static final String EMPTY_VALUE_2 = "NA";
+    public static final String PROFILE_TYPE_1 = "profile_type1";
+    public static final String PROFILE_TYPE_2 = "profile_type2";
 }u}(jt  (801ab8afebfc5a1dbd192628acb1791f70a2338aj  Oservice/src/test/java/org/cbioportal/service/impl/StudyViewServiceImplTest.javaj  modifiedj  KQj  Kj  KXj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X1  @@ -14,10 +14,7 @@
 import org.mockito.Spy;
 import org.mockito.junit.MockitoJUnitRunner;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
+import java.util.*;
 
 import static org.mockito.ArgumentMatchers.*;
 
@@ -41,6 +38,10 @@ public class StudyViewServiceImplTest extends BaseServiceImplTest {
     private SignificantCopyNumberRegionService significantCopyNumberRegionService;
     @Mock
     private GenericAssayService genericAssayService;
+    @Mock
+    private MolecularDataService molecularDataService;
+    @Mock
+    private GeneService geneService;
     private AlterationFilter alterationFilter = new AlterationFilter();
 
     @Test
@@ -174,7 +175,7 @@ public void getMutationAlterationCountByGenes() throws Exception {
         alterationCountByGene1.setTotalCount(2);
         alterationCountByGene1.setNumberOfProfiledCases(2);
         alterationCountByGenes.add(alterationCountByGene1);
-        Mockito.when(alterationCountService.getSampleMutationCounts(molecularProfileCaseIdentifiers,
+        Mockito.when(alterationCountService.getSampleMutationGeneCounts(molecularProfileCaseIdentifiers,
             Select.all(),
             true,
             false,
@@ -208,7 +209,7 @@ public void getStructuralVariantAlterationCountByGenes() throws Exception {
         alterationCountByGene1.setTotalCount(2);
         alterationCountByGene1.setNumberOfProfiledCases(2);
         alterationCountByGenes.add(alterationCountByGene1);
-        Mockito.when(alterationCountService.getSampleStructuralVariantCounts(
+        Mockito.when(alterationCountService.getSampleStructuralVariantGeneCounts(
             molecularProfileCaseIdentifiers,
             Select.all(),
             true,
@@ -245,7 +246,7 @@ public void getCNAAlterationCountByGenes() throws Exception {
         alterationCountByGene1.setAlteration(2);
         alterationCountByGenes.add(alterationCountByGene1);
 
-        Mockito.when(alterationCountService.getSampleCnaCounts(
+        Mockito.when(alterationCountService.getSampleCnaGeneCounts(
             anyList(),
             any(Select.class),
             anyBoolean(),
@@ -255,6 +256,79 @@ public void getCNAAlterationCountByGenes() throws Exception {
         Assert.assertEquals(1, result.size());
     }
 
+    @Test
+    public void getCNAAlterationCountByGeneSpecific() throws Exception {
+
+        List<String> sampleIds = Arrays.asList(BaseServiceImplTest.SAMPLE_ID1, BaseServiceImplTest.SAMPLE_ID2, BaseServiceImplTest.SAMPLE_ID3);
+        List<String> studyIds = Collections.nCopies(3, BaseServiceImplTest.STUDY_ID);
+        List<Pair<String, String>> genomicDataFilters = new ArrayList<>();
+        Pair<String, String> genomicDataFilter1 = new Pair<>(BaseServiceImplTest.HUGO_GENE_SYMBOL_1, BaseServiceImplTest.PROFILE_TYPE_1);
+        Pair<String, String> genomicDataFilter2 = new Pair<>(BaseServiceImplTest.HUGO_GENE_SYMBOL_2, BaseServiceImplTest.PROFILE_TYPE_2);
+        genomicDataFilters.add(genomicDataFilter1);
+        genomicDataFilters.add(genomicDataFilter2);
+
+        List<MolecularProfile> molecularProfiles = new ArrayList<>();
+        MolecularProfile molecularProfile = new MolecularProfile();
+        molecularProfile.setCancerStudyIdentifier(BaseServiceImplTest.STUDY_ID);
+        molecularProfile.setStableId(BaseServiceImplTest.STUDY_ID + "_" + BaseServiceImplTest.MOLECULAR_PROFILE_ID_A);
+        molecularProfiles.add(molecularProfile);
+        
+        Mockito.when(molecularProfileService.getMolecularProfilesInStudies(studyIds, "SUMMARY"))
+            .thenReturn(molecularProfiles);
+        
+        Map<String, List<MolecularProfile>> molecularProfileMap = new HashMap<>();
+        molecularProfileMap.put(BaseServiceImplTest.PROFILE_TYPE_1, molecularProfiles);
+        molecularProfileMap.put(BaseServiceImplTest.PROFILE_TYPE_2, molecularProfiles);
+   
+        Mockito.when(molecularProfileUtil.categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles))
+            .thenReturn(molecularProfileMap);
+        
+        List<Gene> genes = new ArrayList<>();
+        Gene gene1 = new Gene();
+        gene1.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
+        gene1.setHugoGeneSymbol(BaseServiceImplTest.HUGO_GENE_SYMBOL_1);
+        Gene gene2 = new Gene();
+        gene2.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_2);
+        gene2.setHugoGeneSymbol(BaseServiceImplTest.HUGO_GENE_SYMBOL_2);
+        genes.add(gene1);
+        genes.add(gene2);
+
+        Mockito.when(geneService.fetchGenes(anyList(), anyString(), anyString()))
+                .thenReturn(genes);
+
+        List<GeneMolecularData> geneMolecularData = new ArrayList<>();
+        GeneMolecularData geneMolecularData1 = new GeneMolecularData();
+        geneMolecularData1.setValue("-2");
+        GeneMolecularData geneMolecularData2 = new GeneMolecularData();
+        geneMolecularData2.setValue("-2");
+        GeneMolecularData geneMolecularData3 = new GeneMolecularData();
+        geneMolecularData3.setValue("2");
+        GeneMolecularData geneMolecularData4 = new GeneMolecularData();
+        geneMolecularData4.setValue("2");
+        geneMolecularData.add(geneMolecularData1);
+        geneMolecularData.add(geneMolecularData2);
+        geneMolecularData.add(geneMolecularData3);
+        geneMolecularData.add(geneMolecularData4);
+        
+        Mockito.when(molecularDataService.getMolecularDataInMultipleMolecularProfiles(
+            anyList(),
+            anyList(),
+            anyList(),
+            anyString()))
+            .thenReturn(geneMolecularData);
+        
+        List<GenomicDataCountItem> result = studyViewService.getCNAAlterationCountsByGeneSpecific(studyIds, sampleIds, genomicDataFilters);
+        Assert.assertEquals(2, result.size());
+        Assert.assertEquals(BaseServiceImplTest.HUGO_GENE_SYMBOL_1, result.get(0).getHugoGeneSymbol());
+        Assert.assertEquals(BaseServiceImplTest.PROFILE_TYPE_1, result.get(0).getProfileType());
+        Assert.assertEquals(2, result.get(0).getCounts().get(0).getCount().intValue());
+        Assert.assertEquals(2, result.get(0).getCounts().get(1).getCount().intValue());
+        Assert.assertEquals(BaseServiceImplTest.HUGO_GENE_SYMBOL_2, result.get(1).getHugoGeneSymbol());
+        Assert.assertEquals(BaseServiceImplTest.PROFILE_TYPE_2, result.get(1).getProfileType());
+        Assert.assertEquals(2, result.get(1).getCounts().get(0).getCount().intValue());
+        Assert.assertEquals(2, result.get(1).getCounts().get(1).getCount().intValue());
+    }
+
     @Test
     public void fetchGenericAssayDataCounts() throws Exception {
 u}(jt  (8a86e465d3ffc60b71b738730098e6c85ace3286j  Oservice/src/test/java/org/cbioportal/service/impl/TreatmentServiceImplTest.javaj  modifiedj  Kj  Kj  K&j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImplTest.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImplTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImplTest.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X=  @@ -26,14 +26,11 @@ public class TreatmentServiceImplTest {
     private TreatmentRepository treatmentRepository;
     
     @Test
-    public void getAllSampleTreatmentsSingleRow() {
-        mockTreatmentsByPatient(
-            makeTreatment("madeupanib", "P0", 0, 10)
-        );
+    public void getAllPatientTreatmentRows() {
         mockSamplesByPatient(
             makeSample("S0", "P0", 5)
         );
-        mockAllTreatments("madeupanib");
+        mockTreatments(makeTreatment("madeupanib", "P0", 0, 10));
 
         PatientTreatmentRow rowA = makePatientRow("madeupanib", 1, Collections.singletonList("S0"), Collections.singletonList("P0"));
         List<PatientTreatmentRow> expected = Collections.singletonList(rowA);
@@ -43,15 +40,14 @@ public void getAllSampleTreatmentsSingleRow() {
     }
 
     @Test
-    public void getAllSampleTreatmentsOneSampleTwoTreatmentsOnePatient() {
-        mockTreatmentsByPatient(
+    public void getAllPatientTreatmentRowsOneSampleTwoTreatmentsOnePatient() {
+        mockTreatments(
             makeTreatment("madeupanib", "P0", 0, 10),
             makeTreatment("fakedrugazol", "P0", 0, 10)
         );
         mockSamplesByPatient(
             makeSample("S0", "P0", 5)
         );
-        mockAllTreatments("madeupanib", "fakedrugazol");
 
 
         PatientTreatmentRow rowA = makePatientRow("fakedrugazol", 1, Collections.singletonList("S0"), Collections.singletonList("P0"));
@@ -63,15 +59,14 @@ public void getAllSampleTreatmentsOneSampleTwoTreatmentsOnePatient() {
     }
 
     @Test
-    public void getAllSampleTreatmentsTwoSamplesOnePatientOneTreatment() {
-        mockTreatmentsByPatient(
+    public void getAllPatientTreatmentRowsTwoSamplesOnePatientOneTreatment() {
+        mockTreatments(
             makeTreatment("fakedrugazol", "P0", 0, 10)
         );
         mockSamplesByPatient(
             makeSample("S0", "P0", 5),
             makeSample("S1", "P0", 10)
         );
-        mockAllTreatments("fakedrugazol");
 
         // even though there are two samples, you expect a count of 1,
         // because this is from the patient level, and both samples are for the same patient
@@ -83,16 +78,15 @@ public void getAllSampleTreatmentsTwoSamplesOnePatientOneTreatment() {
     }
 
     @Test
-    public void getAllSampleTreatmentsTwoSamplesTwoPatientsTwoTreatments() {
-        mockTreatmentsByPatient(
+    public void getAllPatientTreatmentRowsTwoSamplesTwoPatientsTwoTreatments() {
+        mockTreatments(
             makeTreatment("fakedrugazol", "P0", 0, 10),
             makeTreatment("fakedrugazol", "P1", 0, 10)
         );
         mockSamplesByPatient(
             makeSample("S0", "P0", 5),
             makeSample("S1", "P1", 10)
         );
-        mockAllTreatments("fakedrugazol");
 
         // now there are two patients, so you expect a count of two
         PatientTreatmentRow rowA = makePatientRow("fakedrugazol", 2, Arrays.asList("S0", "S1"), Arrays.asList("P0", "P1"));
@@ -103,16 +97,15 @@ public void getAllSampleTreatmentsTwoSamplesTwoPatientsTwoTreatments() {
     }
 
     @Test
-    public void getAllSampleTreatmentsTwoSamplesTwoPatientsTwoDifferentTreatments() {
-        mockTreatmentsByPatient(
+    public void getAllPatientTreatmentRowsTwoSamplesTwoPatientsTwoDifferentTreatments() {
+        mockTreatments(
             makeTreatment("fakedrugazol", "P0", 0, 10),
             makeTreatment("madeupanib", "P1", 0, 10)
         );
         mockSamplesByPatient(
             makeSample("S0", "P0", 5),
             makeSample("S1", "P1", 10)
         );
-        mockAllTreatments("fakedrugazol", "madeupanib");
 
         PatientTreatmentRow rowA = makePatientRow("fakedrugazol", 1, Collections.singletonList("S0"), Collections.singletonList("P0"));
         PatientTreatmentRow rowB = makePatientRow("madeupanib", 1, Collections.singletonList("S1"), Collections.singletonList("P1"));
@@ -252,6 +245,11 @@ private void mockTreatmentsByPatient(Treatment... treatments) {
             .thenReturn(treatmentsByPatient);
     }
 
+    private void mockTreatments(Treatment... treatments) {
+        Mockito.when(treatmentRepository.getTreatments(Mockito.any(), Mockito.any(), Mockito.any()))
+            .thenReturn(Arrays.stream(treatments).collect(Collectors.toList()));
+    }
+
     private void mockSamplesByPatient(ClinicalEventSample... samples) {
         Map<String, List<ClinicalEventSample>> samplesByPatient = Arrays.stream(samples)
             .collect(Collectors.groupingBy(ClinicalEventSample::getPatientId));
@@ -261,12 +259,6 @@ private void mockSamplesByPatient(ClinicalEventSample... samples) {
             .thenReturn(samplesByPatient);
     }
 
-    private void mockAllTreatments(String... treatments) {
-        Set<String> allTreatments = new HashSet<>(Arrays.asList(treatments));
-        Mockito.when(treatmentRepository.getAllUniqueTreatments(Mockito.any(), Mockito.any(), Mockito.any()))
-            .thenReturn(allTreatments);
-    }
-
     private Treatment makeTreatment(String treatment, String patientId, Integer start, Integer stop) {
         Treatment t = new Treatment();
         t.setTreatment(treatment);u      }(jt  (7020d01ef0eaf51b229e44889e165bd1a5b7955bj  Sservice/src/test/java/org/cbioportal/service/util/AlterationEnrichmentUtilTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -101,8 +101,8 @@ public void createAlterationEnrichments() throws Exception {
 
         // START: for 2 groups
 
-        Mockito.when(fisherExactTestCalculator.getCumulativePValue(1, 1, 2, 0)).thenReturn(1.0);
-        Mockito.when(fisherExactTestCalculator.getCumulativePValue(2, 0, 0, 2)).thenReturn(0.3);
+        Mockito.when(fisherExactTestCalculator.getTwoTailedPValue(1, 1, 2, 0)).thenReturn(1.0);
+        Mockito.when(fisherExactTestCalculator.getTwoTailedPValue(2, 0, 0, 2)).thenReturn(0.3);
 
         List<AlterationEnrichment> result = alterationEnrichmentUtil.createAlterationEnrichments(
                 mutationCountsbyEntrezGeneIdAndGroup);u}(jt  (49aecf9c4d5027524a907d9ac6feddc19e39183ej  ,src/main/resources/portal.properties.EXAMPLEj  modifiedj  K
j  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  XN  @@ -104,11 +104,13 @@ skin.study_view.link_text=To build your own case set, try out our enhanced Study
 # skin.home_page.show_unauthorized_studies=false
 ## enable this to configure a global message for the studies that are unauthorized; the message can contain placecards like {$.Owner.email} for the studies that have the information in the study tags 
 # skin.home_page.unauthorized_studies_global_message=The study is unauthorized. You need to request access.
+## enable this to show reference genome next to the samples
+# skin.home_page.show_reference_genome=false
 
-setting controlling whether Download tabs and download/copy-to-clipboard controls should be shown
-# skin.hide_download_controls=true
+## setting controlling whether Download tabs and download/copy-to-clipboard controls should be shown
+# skin.hide_download_controls=false
 
-setting controlling which name should be used to display the authenticated user (email, or username)
+## setting controlling which name should be used to display the authenticated user (email, or username)
 # skin.user_display_name=email
 
 ## enable and set this property to specify a study group to be used to identify public studies for which no specific authorization entries are needed in the `authorities` table
@@ -169,6 +171,7 @@ dat.method=none
 dat.ttl_seconds=2592000
 dat.uuid.max_number_per_user=1
 dat.jwt.secret_key=
+dat.filter_user_role=
 
 # OAuth2 token data access settings
 #dat.oauth2.clientId=<client-id>
@@ -314,6 +317,7 @@ oncoprint.oncokb.default=true
 oncoprint.hotspots.default=true
 # oncoprint.hide_vus.default=true
 # oncoprint.clinical_tracks.config_json=classpath:/oncoprint-default-tracks.json
+# oncoprint.clustered.default=true
 
 # Custom gene sets
 # querypage.setsofgenes.location=file:/<path>
@@ -431,4 +435,9 @@ persistence.cache_type=no-cache
 
 # Set StudyDownloadLinkUrl
 # Allows download links within DataSets Tab (See Portal.Properties documentation for more info)
-# study_download_url=
\ No newline at end of file
+# study_download_url=
+
+# download_group=
+
+# vaf.sequential_mode.default=false
+# vaf.log_scale.default=falseu}(jt  (06ddc00f27ea6953d884de6b76256699baec9c38j  Cweb/src/main/java/org/cbioportal/web/DataAccessTokenController.javaj  modifiedj  K
j  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenController.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenController.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenController.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X"  @@ -20,7 +20,7 @@
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
-import io.swagger.models.HttpMethod;
+import org.apache.commons.lang3.StringUtils;
 import org.cbioportal.model.DataAccessToken;
 import org.cbioportal.service.DataAccessTokenService;
 import org.cbioportal.service.exception.DataAccessTokenNoUserIdentityException;
@@ -32,6 +32,7 @@
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.client.HttpClientErrorException;
@@ -54,6 +55,10 @@ public class DataAccessTokenController {
     @Value("${dat.unauth_users:anonymousUser}")
     private String[] USERS_WHO_CANNOT_USE_TOKENS;
 
+    private static String userRoleToAccessToken;
+    @Value("${download_group:}") // default is empty string
+    public void setUserRoleToAccessToken(String property) { userRoleToAccessToken = property; }
+
     @Autowired
     private DataAccessTokenService tokenService;
     private Set<String> usersWhoCannotUseTokenSet;
@@ -130,6 +135,10 @@ private String getAuthenticatedUser(Authentication authentication) {
         if (usersWhoCannotUseTokenSet.contains(username)) {
             throw new DataAccessTokenProhibitedUserException();
         }
+        if(StringUtils.isNotEmpty(userRoleToAccessToken) &&
+            !authentication.getAuthorities().contains(new SimpleGrantedAuthority(userRoleToAccessToken))) {
+            throw new DataAccessTokenProhibitedUserException();
+        }
         return username;
     }
 }u}(jt  (1b98a12abbc09460ae98599d036c7caab0612b09j  Iweb/src/main/java/org/cbioportal/web/OAuth2DataAccessTokenController.javaj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FOAuth2DataAccessTokenController.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FOAuth2DataAccessTokenController.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FOAuth2DataAccessTokenController.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X	  @@ -35,8 +35,10 @@
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
+import org.apache.commons.lang3.StringUtils;
 import org.cbioportal.model.DataAccessToken;
 import org.cbioportal.service.DataAccessTokenService;
+import org.cbioportal.service.exception.DataAccessTokenNoUserIdentityException;
 import org.cbioportal.service.exception.DataAccessTokenProhibitedUserException;
 import org.cbioportal.web.config.annotation.InternalApi;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -46,6 +48,7 @@
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.client.HttpClientErrorException;
@@ -76,6 +79,9 @@ public class OAuth2DataAccessTokenController {
     @Value("${dat.oauth2.clientId}")
     private String clientId;
 
+    @Value("${dat.filter_user_role:}") // default is empty string
+    private String userRoleToAccessToken;
+
     @Autowired
     private DataAccessTokenService tokenService;
     private String authorizationUrl;
@@ -98,6 +104,8 @@ public void postConstruct() throws UnsupportedEncodingException {
     public ResponseEntity<String> downloadDataAccessToken(Authentication authentication,
         HttpServletRequest request, HttpServletResponse response) throws IOException {
 
+        isUserAuthorizedToAccess(authentication);
+
         // redirect to authentication endpoint
         HttpHeaders headers = new HttpHeaders();
         headers.add("Location", authorizationUrl);
@@ -156,4 +164,15 @@ public void revokeDataAccessToken(@ApiParam(required = true, value = "token") @P
         throw new UnsupportedOperationException("this endpoint is does not apply to OAuth2 data access token method.");
     }
 
+    private void isUserAuthorizedToAccess(Authentication authentication) {
+        if (authentication == null || !authentication.isAuthenticated()) {
+            throw new DataAccessTokenNoUserIdentityException();
+        }
+
+        if(StringUtils.isNotEmpty(userRoleToAccessToken) &&
+            !authentication.getAuthorities().contains(new SimpleGrantedAuthority(userRoleToAccessToken))) {
+            throw new DataAccessTokenProhibitedUserException();
+        }
+    }
+
 }u}(jt  (faf514f645f75d2626941d290883336abf1f1352j  9web/src/main/java/org/cbioportal/web/StudyController.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  Xb  @@ -23,6 +23,7 @@
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -98,10 +99,10 @@ public ResponseEntity<List<CancerStudy>> getAllStudies(
         @ApiParam("Name of the property that the result list is sorted by")
         @RequestParam(required = false) StudySortBy sortBy,
         @ApiParam("Direction of the sort")
-        @RequestParam(defaultValue = "ASC") Direction direction,
-        @ApiParam(hidden = true, required = false)
-        @RequestParam(required = false) Authentication authentication) {
-        
+        @RequestParam(defaultValue = "ASC") Direction direction)
+        {
+
+        Authentication authentication = null;    
         // Only use this feature on the public portal and make sure it is never used
         // on portals using auth, as in auth setting, different users will have different
         // results.
@@ -115,6 +116,8 @@ public ResponseEntity<List<CancerStudy>> getAllStudies(
                 && direction == Direction.ASC) {
             return new ResponseEntity<>(defaultResponse, HttpStatus.OK);
         }
+        else
+            authentication = SecurityContextHolder.getContext().getAuthentication();
 
         if (projection == Projection.META) {
             HttpHeaders responseHeaders = new HttpHeaders();u}(jt  (f4ca464cf50123869269b7357a228fd1745d50f4j  =web/src/main/java/org/cbioportal/web/StudyViewController.javaj  modifiedj  Ksj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X6  @@ -9,20 +9,19 @@
 import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.commons.math3.stat.correlation.PearsonsCorrelation;
 import org.apache.commons.math3.stat.correlation.SpearmansCorrelation;
+import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
 import org.cbioportal.service.*;
 import org.cbioportal.service.exception.StudyNotFoundException;
 import org.cbioportal.service.util.ClinicalAttributeUtil;
-import org.cbioportal.service.util.CustomDataSession;
 import org.cbioportal.web.config.annotation.InternalApi;
 import org.cbioportal.model.AlterationFilter;
 import org.cbioportal.web.parameter.*;
-import org.cbioportal.web.parameter.sort.ClinicalDataSortBy;
-import org.cbioportal.web.studyview.CustomDataController;
 import org.cbioportal.web.util.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.context.ApplicationContext;
+import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
@@ -86,9 +85,6 @@ private void init() {
     private StudyViewService studyViewService;
     @Autowired
     private ClinicalDataBinUtil clinicalDataBinUtil;
-    @Autowired
-    private CustomDataService customDataService;
-    
     @Autowired
     private ClinicalEventService clinicalEventService;
 
@@ -289,7 +285,43 @@ public List<AlterationCountByGene> cacheableFetchStructuralVariantGenes(
         }
         return alterationCountByGenes;
     }
+    
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @RequestMapping(value = "/structuralvariant-counts/fetch", method = RequestMethod.POST,
+        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch structural variant genes by study view filter")
+    public ResponseEntity<List<AlterationCountByStructuralVariant>> fetchStructuralVariantCounts(
+        @ApiParam(required = true, value = "Study view filter")
+        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter,
+        @ApiIgnore // 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<String> involvedCancerStudies,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface.
+        @Valid @RequestAttribute(required = false, value = "interceptedStudyViewFilter") StudyViewFilter interceptedStudyViewFilter
+    ) throws StudyNotFoundException {
+
+        boolean singleStudyUnfiltered = studyViewFilterUtil.isSingleStudyUnfiltered(interceptedStudyViewFilter);
+        List<AlterationCountByStructuralVariant> alterationCountByStructuralVariants = 
+            instance.cacheableFetchStructuralVariantCounts(interceptedStudyViewFilter, singleStudyUnfiltered);
+        return new ResponseEntity<>(alterationCountByStructuralVariants, HttpStatus.OK);
+    }
+
+    @Cacheable(
+        cacheResolver = "staticRepositoryCacheOneResolver",
+        condition = "@cacheEnabledConfig.getEnabled() && #singleStudyUnfiltered"
+    )
+    public List<AlterationCountByStructuralVariant> cacheableFetchStructuralVariantCounts(
+        StudyViewFilter interceptedStudyViewFilter, boolean singleStudyUnfiltered
+    ) throws StudyNotFoundException {
 
+        List<SampleIdentifier> sampleIdentifiers = studyViewFilterApplier.apply(interceptedStudyViewFilter);
+        if(CollectionUtils.isNotEmpty(sampleIdentifiers)) {
+            List<String> studyIds = new ArrayList<>();
+            List<String> sampleIds = new ArrayList<>();
+            studyViewFilterUtil.extractStudyAndSampleIds(sampleIdentifiers, studyIds, sampleIds);
+            return studyViewService.getStructuralVariantAlterationCounts(studyIds, sampleIds, interceptedStudyViewFilter.getAlterationFilter());
+        }
+        return new ArrayList<>();
+    }
 
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/cna-genes/fetch", method = RequestMethod.POST,
@@ -409,6 +441,7 @@ private static double parseValueLinear(ClinicalData c) {
     @RequestMapping(value = "/clinical-data-density-plot/fetch", method = RequestMethod.POST,
         consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Fetch clinical data density plot bins by study view filter")
+    @Validated
     public ResponseEntity<DensityPlotData> fetchClinicalDataDensityPlot(
         @ApiParam(required = true, value = "Clinical Attribute ID of the X axis")
         @RequestParam String xAxisAttributeId,
@@ -435,7 +468,7 @@ public ResponseEntity<DensityPlotData> fetchClinicalDataDensityPlot(
         @ApiIgnore // 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,
         @ApiParam(required = true, value = "Study view filter")
-        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter) {
+        @RequestBody(required = false) StudyViewFilter studyViewFilter) {
 
         List<String> studyIds = new ArrayList<>();
         List<String> sampleIds = new ArrayList<>();
@@ -828,6 +861,47 @@ public ResponseEntity<List<GenomicDataBin>> fetchGenomicDataBinCounts(
         return new ResponseEntity<>(studyViewFilterApplier.getDataBins(dataBinMethod, interceptedGenomicDataBinCountFilter), HttpStatus.OK);
     }
 
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @RequestMapping(value = "/genomic-data-counts/fetch", method = RequestMethod.POST,
+        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch genomic data counts by GenomicDataCountFilter")
+    public ResponseEntity<List<GenomicDataCountItem>> fetchGenomicDataCounts(
+        @ApiParam(required = true, value = "Genomic data count filter") @Valid @RequestBody(required = false) GenomicDataCountFilter genomicDataCountFilter,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiParam(required = true, value = "Intercepted Genomic Data Count Filter")
+        @ApiIgnore
+        @Valid @RequestAttribute(required = false, value = "interceptedGenomicDataCountFilter") GenomicDataCountFilter interceptedGenomicDataCountFilter
+    ) throws StudyNotFoundException {
+        List<GenomicDataFilter> gdFilters = interceptedGenomicDataCountFilter.getGenomicDataFilters();
+        StudyViewFilter studyViewFilter = interceptedGenomicDataCountFilter.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 (gdFilters.size() == 1) {
+            studyViewFilterUtil.removeSelfFromGenomicDataFilter(
+                gdFilters.get(0).getHugoGeneSymbol(), 
+                gdFilters.get(0).getProfileType(), 
+                studyViewFilter);
+        }
+        List<SampleIdentifier> filteredSampleIdentifiers = studyViewFilterApplier.apply(studyViewFilter);
+
+        if (filteredSampleIdentifiers.isEmpty()) {
+            return new ResponseEntity<>(new ArrayList<>(), HttpStatus.OK);
+        }
+
+        List<String> studyIds = new ArrayList<>();
+        List<String> sampleIds = new ArrayList<>();
+        studyViewFilterUtil.extractStudyAndSampleIds(filteredSampleIdentifiers, studyIds, sampleIds);
+        
+        List<GenomicDataCountItem> result = studyViewService.getCNAAlterationCountsByGeneSpecific(
+            studyIds,
+            sampleIds,
+            gdFilters.stream().map(gdFilter -> new Pair<>(gdFilter.getHugoGeneSymbol(), gdFilter.getProfileType())).collect(Collectors.toList()));
+
+        return new ResponseEntity<>(result, HttpStatus.OK);
+    }
+    
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/generic-assay-data-counts/fetch", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Fetch generic assay data counts by study view filter")
@@ -887,39 +961,56 @@ public ResponseEntity<List<GenericAssayDataBin>> fetchGenericAssayDataBinCounts(
     @ApiOperation("Fetch clinical data for the Clinical Tab of Study View")
     public ResponseEntity<ClinicalDataCollection> fetchClinicalDataClinicalTable(
         @ApiParam(required = true, value = "Study view filter")
-        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter,
+        @Valid @RequestBody(required = false) 
+            StudyViewFilter studyViewFilter,
         @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
-        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @RequestAttribute(required = false, value = "involvedCancerStudies") 
+            Collection<String> involvedCancerStudies,
         @ApiIgnore // 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,
+        @Valid @RequestAttribute(required = false, value = "interceptedStudyViewFilter") 
+            StudyViewFilter interceptedStudyViewFilter,
         @ApiParam("Page size of the result list")
         @Max(CLINICAL_TAB_MAX_PAGE_SIZE)
         @Min(PagingConstants.NO_PAGING_PAGE_SIZE)
-        @RequestParam(defaultValue = PagingConstants.DEFAULT_NO_PAGING_PAGE_SIZE) Integer pageSize,
+        @RequestParam(defaultValue = PagingConstants.DEFAULT_NO_PAGING_PAGE_SIZE) 
+            Integer pageSize,
         @ApiParam("Page number of the result list")
         @Min(PagingConstants.MIN_PAGE_NUMBER)
-        @RequestParam(defaultValue = PagingConstants.DEFAULT_PAGE_NUMBER) Integer pageNumber,
+        @RequestParam(defaultValue = PagingConstants.DEFAULT_PAGE_NUMBER) 
+            Integer pageNumber,
         @ApiParam("Search term to filter sample rows. Samples are returned " +
             "with a partial match to the search term for any sample clinical attribute.")
-        @RequestParam(defaultValue = "") String searchTerm,
-        @ApiParam("Name of the property that the result list is sorted by")
-        @RequestParam(required = false) ClinicalDataSortBy sortBy,
+        @RequestParam(defaultValue = "") 
+            String searchTerm,
+        @ApiParam(value = "sampleId, patientId, or the ATTR_ID to sorted by")
+        @RequestParam(required = false) 
+            // TODO: Can we narrow down this string to a specific enum? 
+            String sortBy,
         @ApiParam("Direction of the sort")
-        @RequestParam(defaultValue = "ASC") Direction direction) {
-
+        @RequestParam(defaultValue = "ASC") 
+            Direction direction
+    ) {
         List<String> sampleStudyIds = new ArrayList<>();
         List<String> sampleIds = new ArrayList<>();
         List<SampleIdentifier> filteredSampleIdentifiers = studyViewFilterApplier.apply(interceptedStudyViewFilter);
         studyViewFilterUtil.extractStudyAndSampleIds(filteredSampleIdentifiers, sampleStudyIds, sampleIds);
         
-        List<ClinicalData> sampleClinicalData = clinicalDataService.fetchSampleClinicalDataClinicalTable(
+        List<ClinicalData> sampleClinicalData = clinicalDataService.fetchSampleClinicalTable(
             sampleStudyIds,
             sampleIds,
             pageSize,
             pageNumber,
             searchTerm,
-            sortBy != null ? sortBy.getOriginalValue() : null,
-            direction.name());
+            sortBy,
+            direction.name()
+        );
+        Integer total = clinicalDataService.fetchSampleClinicalTableCount(
+            sampleStudyIds,
+            sampleIds,
+            searchTerm,
+            sortBy,
+            direction.name()
+        );
             
         // Return empty when possible.
         if (sampleClinicalData.isEmpty()) {
@@ -942,8 +1033,10 @@ public ResponseEntity<ClinicalDataCollection> fetchClinicalDataClinicalTable(
         final ClinicalDataCollection clinicalDataCollection = new ClinicalDataCollection();
         clinicalDataCollection.setSampleClinicalData(sampleClinicalData);
         clinicalDataCollection.setPatientClinicalData(patientClinicalData);
-
-        return new ResponseEntity<>(clinicalDataCollection, HttpStatus.OK);
+        
+        HttpHeaders responseHeaders = new HttpHeaders();
+        responseHeaders.add(HeaderKeyConstants.TOTAL_COUNT, total.toString());
+        return new ResponseEntity<>(clinicalDataCollection, responseHeaders, HttpStatus.OK);
     }
 
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")u}(jt  (c17ecda37f2b8e84dab4ea76a40ba17f19fa8de4j  =web/src/main/java/org/cbioportal/web/TreatmentController.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FTreatmentController.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FTreatmentController.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FTreatmentController.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  Xw	  @@ -28,6 +28,7 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
+import java.util.Set;
 
 @PublicApi
 @RestController
@@ -151,12 +152,18 @@ public ResponseEntity<Boolean> getContainsTreatmentData(
         @ApiParam(required = true, value = "List of Study IDs")
         @Size(min = 1, max = PagingConstants.MAX_PAGE_SIZE)
         @RequestBody
-        List<String> studyIds
+        Set<String> studyIds
     ) {
-        Boolean containsTreatmentData = treatmentService.containsTreatmentData(studyIds, tier);
+        Boolean containsTreatmentData = instance.cacheableGetContainsTreatmentData(studyIds, tier);
         return new ResponseEntity<>(containsTreatmentData, HttpStatus.OK);
     }
 
+    // Caching enabled for any number of studies as the requests contains only studyIds and the response is a boolean
+    @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
+    public Boolean cacheableGetContainsTreatmentData(Set<String> studyIds, ClinicalEventKeyCode tier) {
+        return treatmentService.containsTreatmentData(new ArrayList<>(studyIds), tier);
+    }
+
     @PreAuthorize("hasPermission(#studyIds, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/treatments/display-sample", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Should sample level treatments be displayed")
@@ -168,9 +175,14 @@ public ResponseEntity<Boolean> getContainsSampleTreatmentData(
         @ApiParam(required = true, value = "List of Study IDs")
         @Size(min = 1, max = PagingConstants.MAX_PAGE_SIZE)
         @RequestBody
-        List<String> studyIds
+        Set<String> studyIds
     ) {
-        Boolean containsTreatmentData = treatmentService.containsSampleTreatmentData(studyIds, tier);
+        Boolean containsTreatmentData = instance.cacheableGetContainsSampleTreatmentData(studyIds, tier);
         return new ResponseEntity<>(containsTreatmentData, HttpStatus.OK);
     }
+
+    @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
+    public Boolean cacheableGetContainsSampleTreatmentData(Set<String> studyIds, ClinicalEventKeyCode tier) {
+        return treatmentService.containsSampleTreatmentData(new ArrayList<>(studyIds), tier);
+    }
 }u}(jt  (c01ec7696c1c982450178be39d0a178edd3ad3dcj  Jweb/src/main/java/org/cbioportal/web/parameter/GenomicDataCountFilter.javaj  addedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FGenomicDataCountFilter.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FGenomicDataCountFilter.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FGenomicDataCountFilter.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -0,0 +1,26 @@
+package org.cbioportal.web.parameter;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class GenomicDataCountFilter implements Serializable {
+
+    private List<GenomicDataFilter> genomicDataFilters;
+    private StudyViewFilter studyViewFilter;
+
+    public List<GenomicDataFilter> getGenomicDataFilters() {
+        return genomicDataFilters;
+    }
+
+    public void setGenomicDataFilters(List<GenomicDataFilter> genomicDataFilters) {
+        this.genomicDataFilters = genomicDataFilters;
+    }
+
+    public StudyViewFilter getStudyViewFilter() {
+        return studyViewFilter;
+    }
+
+    public void setStudyViewFilter(StudyViewFilter studyViewFilter) {
+        this.studyViewFilter = studyViewFilter;
+    }
+}u}(jt  (6a9e8c9b5a090c4009b997ce92ecaa613e5d8adcj  Cweb/src/main/java/org/cbioportal/web/parameter/StudyViewFilter.javaj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FStudyViewFilter.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FStudyViewFilter.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FStudyViewFilter.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X%  @@ -4,6 +4,7 @@
 import java.util.List;
 import java.util.Objects;
 
+import javax.validation.Valid;
 import javax.validation.constraints.AssertTrue;
 import javax.validation.constraints.Size;
 
@@ -12,6 +13,7 @@
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import org.cbioportal.model.AlterationFilter;
 import org.cbioportal.model.GeneFilter;
+import org.cbioportal.model.StudyViewStructuralVariantFilter;
 import org.cbioportal.web.parameter.filter.*;
 
 @JsonIgnoreProperties(ignoreUnknown = true)
@@ -24,6 +26,8 @@ public class StudyViewFilter implements Serializable {
     private List<String> studyIds;
     private List<ClinicalDataFilter> clinicalDataFilters;
     private List<GeneFilter> geneFilters;
+    @Valid
+    private List<StudyViewStructuralVariantFilter> structuralVariantFilters;
     private AndedSampleTreatmentFilters sampleTreatmentFilters;
     private AndedSampleTreatmentFilters sampleTreatmentGroupFilters;
     private AndedSampleTreatmentFilters sampleTreatmentTargetFilters;
@@ -110,6 +114,14 @@ public void setGeneFilters(List<GeneFilter> geneFilters) {
         this.geneFilters = geneFilters;
     }
 
+    public List<StudyViewStructuralVariantFilter> getStructuralVariantFilters() {
+        return structuralVariantFilters;
+    }
+
+    public void setStructuralVariantFilters(List<StudyViewStructuralVariantFilter> structuralVariantFilters) {
+        this.structuralVariantFilters = structuralVariantFilters;
+    }
+
     public List<List<String>> getGenomicProfiles() {
         return genomicProfiles;
     }u}(jt  (f56a51727b02e8666ff8e488ef65a6fa437382d3j  Vweb/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.javaj  modifiedj  K'j  Kj  K)j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X,  @@ -75,6 +75,7 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
     public static final String STUDY_VIEW_CLINICAL_DATA_BIN_COUNTS_PATH = "/clinical-data-bin-counts/fetch";
     public static final String STUDY_VIEW_CUSTOM_DATA_BIN_COUNTS_PATH = "/custom-data-bin-counts/fetch";
     public static final String STUDY_VIEW_GENOMICL_DATA_BIN_COUNTS_PATH = "/genomic-data-bin-counts/fetch";
+    public static final String STUDY_VIEW_GENOMICL_DATA_COUNTS_PATH = "/genomic-data-counts/fetch";
     public static final String STUDY_VIEW_GENERIC_ASSAY_DATA_BIN_COUNTS_PATH = "/generic-assay-data-bin-counts/fetch";
     public static final String STUDY_VIEW_GENERIC_ASSAY_DATA_COUNTS_PATH = "/generic-assay-data-counts/fetch";
     public static final String STUDY_VIEW_CLINICAL_DATA_COUNTS_PATH = "/clinical-data-counts/fetch";
@@ -85,6 +86,7 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
     public static final String STUDY_VIEW_FILTERED_SAMPLES = "/filtered-samples/fetch";
     public static final String STUDY_VIEW_MUTATED_GENES = "/mutated-genes/fetch";
     public static final String STUDY_VIEW_STRUCTURAL_VARIANT_GENES = "/structuralvariant-genes/fetch";
+    public static final String STUDY_VIEW_STRUCTURAL_VARIANT_COUNTS = "/structuralvariant-counts/fetch";
     public static final String STUDY_VIEW_SAMPLE_COUNTS = "/sample-counts/fetch";
     public static final String STUDY_VIEW_SAMPLE_LIST_COUNTS_PATH = "/sample-lists-counts/fetch";
     public static final String STUDY_VIEW_CLINICAL_TABLE_DATA_FETCH_PATH = "/clinical-data-table/fetch";
@@ -129,16 +131,18 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
             return extractAttributesFromClinicalDataBinCountFilter(request);
         } else if (requestPathInfo.equals(STUDY_VIEW_GENOMICL_DATA_BIN_COUNTS_PATH)) {
             return extractAttributesFromGenomicDataBinCountFilter(request);
+        } else if (requestPathInfo.equals(STUDY_VIEW_GENOMICL_DATA_COUNTS_PATH)) {
+            return extractAttributesFromGenomicDataCountFilter(request);
         } else if (requestPathInfo.equals(STUDY_VIEW_GENERIC_ASSAY_DATA_BIN_COUNTS_PATH)) {
             return extractAttributesFromGenericAssayDataBinCountFilter(request);
         } else if (requestPathInfo.equals(STUDY_VIEW_GENERIC_ASSAY_DATA_COUNTS_PATH)) {
             return extractAttributesFromGenericAssayDataCountFilter(request);
         } else if (Arrays.asList(STUDY_VIEW_CLINICAL_DATA_COUNTS_PATH, STUDY_VIEW_CUSTOM_DATA_COUNTS_PATH)
                 .contains(requestPathInfo)) {
             return extractAttributesFromClinicalDataCountFilter(request);
-        } else if (Arrays.asList(STUDY_VIEW_CLINICAL_DATA_DENSITY_PATH, STUDY_VIEW_CLINICAL_DATA_VIOLIN_PATH, STUDY_VIEW_CNA_GENES,
+        } 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_SAMPLE_COUNTS, STUDY_VIEW_SAMPLE_LIST_COUNTS_PATH, STUDY_VIEW_CLINICAL_TABLE_DATA_FETCH_PATH,
+                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
         ).contains(requestPathInfo)) {
             return extractAttributesFromStudyViewFilter(request);
@@ -476,6 +480,26 @@ private boolean extractAttributesFromGenomicDataBinCountFilter(HttpServletReques
         return true;
     }
 
+    private boolean extractAttributesFromGenomicDataCountFilter(HttpServletRequest request) {
+        try {
+            GenomicDataCountFilter genomicDataCountFilter = objectMapper.readValue(request.getInputStream(),
+                GenomicDataCountFilter.class);
+            LOG.debug("extracted genomicDataCountFilter: " + genomicDataCountFilter.toString());
+            LOG.debug("setting interceptedGenomicDataCountFilter to " + genomicDataCountFilter);
+            request.setAttribute("interceptedGenomicDataCountFilter", genomicDataCountFilter);
+            if (cacheMapUtil.hasCacheEnabled()) {
+                Collection<String> cancerStudyIdCollection = extractCancerStudyIdsFromGenomicDataCountFilter(
+                    genomicDataCountFilter);
+                LOG.debug("setting involvedCancerStudies to " + cancerStudyIdCollection);
+                request.setAttribute("involvedCancerStudies", cancerStudyIdCollection);
+            }
+        } catch (Exception e) {
+            LOG.error("exception thrown during extraction of genomicDataCountFilter: " + e);
+            return false;
+        }
+        return true;
+    }
+
     private boolean extractAttributesFromGenericAssayDataBinCountFilter(HttpServletRequest request) {
         try {
             GenericAssayDataBinCountFilter genericAssayDataBinCountFilter = objectMapper
@@ -565,6 +589,11 @@ private boolean extractAttributesFromStudyViewFilter(HttpServletRequest request)
                 // when the AlterationFilter is not part of the request.
                 studyViewFilter.setAlterationFilter(new AlterationFilter());
             }
+            if (studyViewFilter.getStructuralVariantFilters() == null) {
+                // For backwards compatibility an inactive filter is set
+                // when the StructuralVariantFilters are not part of the request.
+                studyViewFilter.setStructuralVariantFilters(new ArrayList<>());
+            }
             LOG.debug("extracted studyViewFilter: " + studyViewFilter.toString());
             LOG.debug("setting interceptedStudyViewFilter to " + studyViewFilter);
             request.setAttribute("interceptedStudyViewFilter", studyViewFilter);
@@ -716,6 +745,14 @@ private Set<String> extractCancerStudyIdsFromGenomicDataBinCountFilter(
         return new HashSet<String>();
     }
 
+    private Set<String> extractCancerStudyIdsFromGenomicDataCountFilter(
+        GenomicDataCountFilter genomicDataCountFilter) {
+        if (genomicDataCountFilter.getStudyViewFilter() != null) {
+            return extractCancerStudyIdsFromStudyViewFilter(genomicDataCountFilter.getStudyViewFilter());
+        }
+        return new HashSet<String>();
+    }
+
     private Set<String> extractCancerStudyIdsFromGenericAssayDataBinCountFilter(
             GenericAssayDataBinCountFilter genericAssayDataBinCountFilter) {
         if (genericAssayDataBinCountFilter.getStudyViewFilter() != null) {u}(jt  (0b97b6df9543ab021cea2f48c0727c7b578a7517j  Eweb/src/main/java/org/cbioportal/web/util/StudyViewFilterApplier.javaj  modifiedj  Kj  KQj  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  Xt?  @@ -166,8 +166,39 @@ public List<SampleIdentifier> apply(StudyViewFilter studyViewFilter, Boolean neg
             molecularProfiles = molecularProfileService.getMolecularProfilesInStudies(studyIds, "SUMMARY");
         }
 
-        sampleIdentifiers = intervalFilterExpressionData(sampleIdentifiers, molecularProfiles,
-                studyViewFilter.getGenomicDataFilters(), negateFilters);
+        List<GenomicDataFilter> genomicDataEqualityFilters = new ArrayList<>();
+        List<GenomicDataFilter> genomicDataIntervalFilters = new ArrayList<>();
+
+        List<GenomicDataFilter> genomicDataFilters = studyViewFilter.getGenomicDataFilters();
+
+        if (!CollectionUtils.isEmpty(genomicDataFilters)) {
+            Map<String, MolecularProfile> molecularProfileMapByType = molecularProfileUtil
+                .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles)
+                .entrySet()
+                .stream()
+                .collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().get(0)));
+
+            genomicDataFilters.forEach(genomicDataFilter -> {
+                String profileType = genomicDataFilter.getProfileType();
+                if (molecularProfileMapByType.containsKey(profileType)) {
+                    if (molecularProfileMapByType.get(profileType).getDatatype().equals("DISCRETE")) {
+                        genomicDataEqualityFilters.add(genomicDataFilter);
+                    } else {
+                        genomicDataIntervalFilters.add(genomicDataFilter);
+                    }
+                }
+            });
+        }
+        
+        if (!CollectionUtils.isEmpty(genomicDataEqualityFilters)) {
+            sampleIdentifiers = equalityFilterExpressionData(sampleIdentifiers, molecularProfiles,
+                genomicDataEqualityFilters, negateFilters);
+        }
+        
+        if (!CollectionUtils.isEmpty(genomicDataIntervalFilters)) {
+            sampleIdentifiers = intervalFilterExpressionData(sampleIdentifiers, molecularProfiles,
+                genomicDataIntervalFilters, negateFilters);
+        }
 
         sampleIdentifiers = intervalFilterExpressionData(sampleIdentifiers, molecularProfiles,
                 studyViewFilter.getGenericAssayDataFilters(), negateFilters);
@@ -847,99 +878,39 @@ private GenericAssayDataBin dataBintoGenericAssayDataBin(GenericAssayDataBinFilt
     }
 
     public <S extends DataFilter> List<SampleIdentifier> intervalFilterExpressionData(
-            List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
-            Boolean negateFilters) {
-
-        if (!CollectionUtils.isEmpty(dataFilters) && !CollectionUtils.isEmpty(sampleIdentifiers)) {
-
-            Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
-                    .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
+        Boolean negateFilters) {
 
-            List<String> studyIds = new ArrayList<>();
-            List<String> sampleIds = new ArrayList<>();
-            studyViewFilterUtil.extractStudyAndSampleIds(sampleIdentifiers, studyIds, sampleIds);
-            List<ClinicalData> clinicalDatas = new ArrayList<>();
-            List<ClinicalDataFilter> attributes = new ArrayList<>();
-            if (dataFilters.get(0) instanceof GenomicDataFilter) {
-                List<GenomicDataFilter> genomicDataIntervalFilters = (List<GenomicDataFilter>) dataFilters;
-                Set<String> hugoGeneSymbols = genomicDataIntervalFilters.stream()
-                        .map(GenomicDataFilter::getHugoGeneSymbol).collect(Collectors.toSet());
-                Map<String, Integer> geneNameIdMap = geneService
-                        .fetchGenes(new ArrayList<>(hugoGeneSymbols), GeneIdType.HUGO_GENE_SYMBOL.name(),
-                                Projection.SUMMARY.name())
-                        .stream().collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
-
-                clinicalDatas = genomicDataIntervalFilters.stream().flatMap(genomicDataFilter -> {
-
-                    Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
-                            .getOrDefault(genomicDataFilter.getProfileType(), new ArrayList<>())
-                            .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
-                                    MolecularProfile::getStableId));
-
-                    GenomicDataBinFilter genomicDataBinFilter = new GenomicDataBinFilter();
-                    genomicDataBinFilter.setHugoGeneSymbol(genomicDataFilter.getHugoGeneSymbol());
-                    genomicDataBinFilter.setProfileType(genomicDataFilter.getProfileType());
-                    return invokeDataFunc(sampleIds, studyIds,
-                            Arrays.asList(geneNameIdMap.get(genomicDataFilter.getHugoGeneSymbol()).toString()),
-                            studyIdToMolecularProfileIdMap, genomicDataBinFilter, fetchMolecularData);
-                }).collect(Collectors.toList());
-
-                attributes = genomicDataIntervalFilters.stream().map(genomicDataIntervalFilter -> {
-                    String attributeId = studyViewFilterUtil.getGenomicDataFilterUniqueKey(
-                            genomicDataIntervalFilter.getHugoGeneSymbol(), genomicDataIntervalFilter.getProfileType());
-                    ClinicalDataFilter clinicalDataIntervalFilter = new ClinicalDataFilter();
-                    clinicalDataIntervalFilter.setAttributeId(attributeId);
-                    clinicalDataIntervalFilter.setValues(genomicDataIntervalFilter.getValues());
-                    return clinicalDataIntervalFilter;
-                }).collect(Collectors.toList());
-            } else {
-                List<GenericAssayDataFilter> genericAssayDataFilters = (List<GenericAssayDataFilter>) dataFilters;
-
-                clinicalDatas = genericAssayDataFilters.stream().flatMap(genericAssayDataFilter -> {
+        return filterExpressionData(sampleIdentifiers, molecularProfiles, dataFilters, negateFilters, clinicalDataIntervalFilterApplier);
+    }
 
-                    Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
-                            .getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>())
-                            .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
-                                    MolecularProfile::getStableId));
-                    GenericAssayDataBinFilter genericAssayDataBinFilter = new GenericAssayDataBinFilter();
-                    genericAssayDataBinFilter.setStableId(genericAssayDataFilter.getStableId());
-                    genericAssayDataBinFilter.setProfileType(genericAssayDataFilter.getProfileType());
+    public <S extends DataFilter> List<SampleIdentifier> equalityFilterExpressionData(
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
+        Boolean negateFilters) {
 
-                    // get original data stream from invokeDataFunc
-                    Stream<ClinicalData> dataStream = invokeDataFunc(sampleIds, studyIds, Arrays.asList(genericAssayDataBinFilter.getStableId()),
-                        studyIdToMolecularProfileIdMap, genericAssayDataBinFilter, fetchGenericAssayData);
-                    // For patient level generic assay profile, only keep the one sample per patient
-                    List<MolecularProfile> profiles = molecularProfileMap.getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>());
-                    if (profiles.size() > 0 && profiles.get(0).getPatientLevel() == true) {
-                        dataStream = dataStream.collect(Collectors.groupingBy(d -> d.getPatientId())).values().stream()
-                            .flatMap(d -> d.stream().limit(1));
-                    }
-                    // don't change anything for non patient level data
-                    return dataStream;
-                }).collect(Collectors.toList());
+        return filterExpressionData(sampleIdentifiers, molecularProfiles, dataFilters, negateFilters, clinicalDataEqualityFilterApplier);
+    }
 
-                attributes = genericAssayDataFilters.stream().map(genericAssayDataFilter -> {
-                    String attributeId = studyViewFilterUtil.getGenericAssayDataFilterUniqueKey(
-                            genericAssayDataFilter.getStableId(), genericAssayDataFilter.getProfileType());
-                    ClinicalDataFilter clinicalDataIntervalFilter = new ClinicalDataFilter();
-                    clinicalDataIntervalFilter.setAttributeId(attributeId);
-                    clinicalDataIntervalFilter.setValues(genericAssayDataFilter.getValues());
-                    return clinicalDataIntervalFilter;
-                }).collect(Collectors.toList());
 
-            }
+    public <S extends DataFilter> List<SampleIdentifier> filterExpressionData(
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
+        Boolean negateFilters, ClinicalDataFilterApplier clinicalDataFilterApplier) {
+        if (!CollectionUtils.isEmpty(dataFilters) && !CollectionUtils.isEmpty(sampleIdentifiers)) {
+            List<ClinicalData> clinicalDatas =
+                fetchDataAndTransformToClinicalDataList(sampleIdentifiers, molecularProfiles, dataFilters);
+            List<ClinicalDataFilter> attributes =transformToClinicalDataFilter(dataFilters);
 
             MultiKeyMap clinicalDataMap = new MultiKeyMap();
 
             clinicalDatas.forEach(clinicalData -> {
                 clinicalDataMap.put(clinicalData.getStudyId(), clinicalData.getSampleId(), clinicalData.getAttrId(),
-                        clinicalData.getAttrValue());
+                    clinicalData.getAttrValue());
             });
 
             List<SampleIdentifier> newSampleIdentifiers = new ArrayList<>();
             for (SampleIdentifier sampleIdentifier : sampleIdentifiers) {
-                int count = clinicalDataIntervalFilterApplier.apply(attributes, clinicalDataMap,
-                        sampleIdentifier.getSampleId(), sampleIdentifier.getStudyId(), negateFilters);
+                int count = clinicalDataFilterApplier.apply(attributes, clinicalDataMap,
+                    sampleIdentifier.getSampleId(), sampleIdentifier.getStudyId(), negateFilters);
 
                 if (count == attributes.size()) {
                     newSampleIdentifiers.add(sampleIdentifier);
@@ -951,4 +922,86 @@ public <S extends DataFilter> List<SampleIdentifier> intervalFilterExpressionDat
 
         return sampleIdentifiers;
     }
+    
+    private <S extends DataFilter> List<ClinicalData> fetchDataAndTransformToClinicalDataList(
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters) {
+        Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
+            .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
+
+        List<String> studyIds = new ArrayList<>();
+        List<String> sampleIds = new ArrayList<>();
+        studyViewFilterUtil.extractStudyAndSampleIds(sampleIdentifiers, studyIds, sampleIds);
+        
+        if (dataFilters.get(0) instanceof GenomicDataFilter) {
+            List<GenomicDataFilter> genomicDataIntervalFilters = (List<GenomicDataFilter>) dataFilters;
+            Set<String> hugoGeneSymbols = genomicDataIntervalFilters.stream()
+                .map(GenomicDataFilter::getHugoGeneSymbol).collect(Collectors.toSet());
+            Map<String, Integer> geneNameIdMap = geneService
+                .fetchGenes(new ArrayList<>(hugoGeneSymbols), GeneIdType.HUGO_GENE_SYMBOL.name(),
+                    Projection.SUMMARY.name())
+                .stream().collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
+
+            return genomicDataIntervalFilters.stream().flatMap(genomicDataFilter -> {
+
+                Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
+                    .getOrDefault(genomicDataFilter.getProfileType(), new ArrayList<>())
+                    .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
+                        MolecularProfile::getStableId));
+
+                GenomicDataBinFilter genomicDataBinFilter = new GenomicDataBinFilter();
+                genomicDataBinFilter.setHugoGeneSymbol(genomicDataFilter.getHugoGeneSymbol());
+                genomicDataBinFilter.setProfileType(genomicDataFilter.getProfileType());
+                return invokeDataFunc(sampleIds, studyIds,
+                    Collections.singletonList(geneNameIdMap.get(genomicDataFilter.getHugoGeneSymbol()).toString()),
+                    studyIdToMolecularProfileIdMap, genomicDataBinFilter, fetchMolecularData);
+            }).collect(Collectors.toList());
+
+        } else {
+
+            return ((List<GenericAssayDataFilter>) dataFilters).stream().flatMap(genericAssayDataFilter -> {
+
+                Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
+                    .getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>())
+                    .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
+                        MolecularProfile::getStableId));
+                GenericAssayDataBinFilter genericAssayDataBinFilter = new GenericAssayDataBinFilter();
+                genericAssayDataBinFilter.setStableId(genericAssayDataFilter.getStableId());
+                genericAssayDataBinFilter.setProfileType(genericAssayDataFilter.getProfileType());
+
+                // get original data stream from invokeDataFunc
+                Stream<ClinicalData> dataStream = invokeDataFunc(sampleIds, studyIds, Collections.singletonList(genericAssayDataBinFilter.getStableId()),
+                    studyIdToMolecularProfileIdMap, genericAssayDataBinFilter, fetchGenericAssayData);
+                // For patient level generic assay profile, only keep the one sample per patient
+                List<MolecularProfile> profiles = molecularProfileMap.getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<>());
+                if (profiles.size() > 0 && profiles.get(0).getPatientLevel()) {
+                    dataStream = dataStream.collect(Collectors.groupingBy(ClinicalData::getPatientId)).values().stream()
+                        .flatMap(d -> d.stream().limit(1));
+                }
+                // don't change anything for non patient level data
+                return dataStream;
+            }).collect(Collectors.toList());
+
+        }
+    }
+
+    private <S extends DataFilter> List<ClinicalDataFilter> transformToClinicalDataFilter(List<S> dataFilters) {
+        List<ClinicalDataFilter> attributes;
+        attributes = dataFilters.stream().map(dataFilter -> {
+            String attributeId;
+            if (dataFilter instanceof GenomicDataFilter) {
+                GenomicDataFilter genomicDataFilter = (GenomicDataFilter) dataFilter;
+                attributeId = studyViewFilterUtil.getGenomicDataFilterUniqueKey(genomicDataFilter.getHugoGeneSymbol(), genomicDataFilter.getProfileType());
+            } else {
+                GenericAssayDataFilter genericAssayDataFilter = (GenericAssayDataFilter) dataFilter;
+                attributeId = studyViewFilterUtil.getGenericAssayDataFilterUniqueKey(
+                    genericAssayDataFilter.getStableId(), genericAssayDataFilter.getProfileType());
+            }
+
+            ClinicalDataFilter clinicalDataFilter = new ClinicalDataFilter();
+            clinicalDataFilter.setAttributeId(attributeId);
+            clinicalDataFilter.setValues(dataFilter.getValues());
+            return clinicalDataFilter;
+        }).collect(Collectors.toList());
+        return attributes;
+    }
 }u}(jt  (ecf5bdab85cceb359f2f511895ea0a4e26cbd0b9j  Bweb/src/main/java/org/cbioportal/web/util/StudyViewFilterUtil.javaj  modifiedj  K]j  Kj  Kaj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -2,6 +2,7 @@
 
 import java.util.*;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.map.MultiKeyMap;
@@ -10,8 +11,13 @@
 import org.cbioportal.model.ClinicalDataCount;
 import org.cbioportal.model.ClinicalDataCountItem;
 import org.cbioportal.model.DataBin;
+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;
+import org.cbioportal.model.StructuralVariantSpecialValue;
+import org.cbioportal.service.GeneService;
 import org.cbioportal.service.util.CustomDataSession;
 import org.cbioportal.service.util.CustomDataValue;
 import org.cbioportal.service.util.MolecularProfileUtil;
@@ -23,6 +29,9 @@
 public class StudyViewFilterUtil {
     @Autowired
     private MolecularProfileUtil molecularProfileUtil;
+
+    @Autowired
+    private GeneService geneService;
     
     public void extractStudyAndSampleIds(
         List<SampleIdentifier> sampleIdentifiers, 
@@ -36,19 +45,27 @@ public void extractStudyAndSampleIds(
     }
 
     public void removeSelfFromFilter(String attributeId, StudyViewFilter studyViewFilter) {
-        if (studyViewFilter!= null && studyViewFilter.getClinicalDataFilters() != null) {
+        if (studyViewFilter != null && studyViewFilter.getClinicalDataFilters() != null) {
             studyViewFilter.getClinicalDataFilters().removeIf(f -> f.getAttributeId().equals(attributeId));
         }
     }
+    
+    public void removeSelfFromGenomicDataFilter(String hugoGeneSymbol, String profileType, StudyViewFilter studyViewFilter) {
+        if (studyViewFilter != null && studyViewFilter.getGenomicDataFilters() != null) {
+            studyViewFilter.getGenomicDataFilters().removeIf(f -> 
+                f.getHugoGeneSymbol().equals(hugoGeneSymbol) && f.getProfileType().equals(profileType)
+            );
+        }
+    }
 
     public void removeSelfFromGenericAssayFilter(String stableId, StudyViewFilter studyViewFilter) {
-        if (studyViewFilter!= null && studyViewFilter.getGenericAssayDataFilters() != null) {
+        if (studyViewFilter != null && studyViewFilter.getGenericAssayDataFilters() != null) {
             studyViewFilter.getGenericAssayDataFilters().removeIf(f -> f.getStableId().equals(stableId));
         }
     }
 
     public void removeSelfCustomDataFromFilter(String attributeId, StudyViewFilter studyViewFilter) {
-        if (studyViewFilter!= null && studyViewFilter.getCustomDataFilters() != null) {
+        if (studyViewFilter != null && studyViewFilter.getCustomDataFilters() != null) {
             studyViewFilter.getCustomDataFilters().removeIf(f -> f.getAttributeId().equals(attributeId));
         }
     }
@@ -254,7 +271,78 @@ public List<Binnable> filterClinicalData(
 
         return combinedResult;
     }
-    
+
+    public List<GeneFilterQuery> cleanQueryGeneIds(List<GeneFilterQuery> geneQueries) {
+        List<String> hugoGeneSymbols = geneQueries
+            .stream()
+            .map(GeneFilterQuery::getHugoGeneSymbol)
+            .collect(Collectors.toList());
+
+        Map<String, Integer> symbolToEntrezGeneId = getStringIntegerMap(hugoGeneSymbols);
+
+        geneQueries.removeIf(
+            q -> !symbolToEntrezGeneId.containsKey(q.getHugoGeneSymbol())
+        );
+
+        geneQueries.stream().forEach(
+            q -> q.setEntrezGeneId(symbolToEntrezGeneId.get(q.getHugoGeneSymbol()))
+        );
+
+        return geneQueries;
+    }
+
+    private Map<String, Integer> getStringIntegerMap(List<String> hugoGeneSymbols) {
+        Map<String, Integer> symbolToEntrezGeneId = geneService
+            .fetchGenes(new ArrayList<>(hugoGeneSymbols),
+                GeneIdType.HUGO_GENE_SYMBOL.name(), Projection.SUMMARY.name())
+            .stream()
+            .collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
+        return symbolToEntrezGeneId;
+    }
+
+    public List<StructuralVariantFilterQuery> resolveEntrezGeneIds(List<StructuralVariantFilterQuery> structVarQueries) {
+
+        List<String> hugoGeneSymbols = structVarQueries
+            .stream()
+            .flatMap(q -> Stream.of(q.getGene1Query(), q.getGene2Query()))
+            .filter(structVarIdentifier -> structVarIdentifier.getHugoSymbol() != null)
+            .map(structVarIdentifier -> structVarIdentifier.getHugoSymbol())
+            .collect(Collectors.toList());
+
+        Map<String, Integer> symbolToEntrezGeneId = getStringIntegerMap(hugoGeneSymbols);
+
+        // Add Entrez gene ids to the queries.
+        structVarQueries.forEach(structVarQuery -> {
+            structVarQuery.getGene1Query().setEntrezId(
+                symbolToEntrezGeneId.getOrDefault(structVarQuery.getGene1Query().getHugoSymbol(), null)
+            );
+            structVarQuery.getGene2Query().setEntrezId(
+                symbolToEntrezGeneId.getOrDefault(structVarQuery.getGene2Query().getHugoSymbol(), null)
+            );
+        });
+
+        // Remove any genes where the Entrez gene id is needed, but translation failed.
+        structVarQueries.removeIf(
+            q ->   (q.getGene1Query().getSpecialValue() != StructuralVariantSpecialValue.NO_GENE
+                && q.getGene1Query().getSpecialValue() != StructuralVariantSpecialValue.ANY_GENE
+                && q.getGene1Query().getEntrezId() == null)
+                || (q.getGene2Query().getSpecialValue() != StructuralVariantSpecialValue.NO_GENE
+                && q.getGene2Query().getSpecialValue() != StructuralVariantSpecialValue.ANY_GENE
+                && q.getGene2Query().getEntrezId() == null)
+        );
+
+        return structVarQueries;
+    }
+
+    private Map<String, Integer> getHugoToEntrezQueryMap(List<String> hugoGeneSymbols) {
+        Map<String, Integer> 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<Binnable> filterClinicalDataByStudyAndSampleAndAttribute(
         List<Binnable> clinicalData,
         Map<String, String> sampleToStudyId,
@@ -311,4 +399,5 @@ private String generatePatientToStudyKey(Binnable clinicalData) {
     private String generateCaseToStudyKey(String studyId, String caseId) {
         return studyId + ":" + caseId;
     }
+    
 }u      }(jt  (9367c54884b028616e93f45bb9039886c7153fe3j  Yweb/src/main/java/org/cbioportal/web/util/appliers/StructuralVariantSubFilterApplier.javaj  addedj  Kpj  K j  Kpj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -0,0 +1,112 @@
+package org.cbioportal.web.util.appliers;
+
+import org.cbioportal.model.MolecularProfile;
+import org.cbioportal.model.StructuralVariantFilterQuery;
+import org.cbioportal.model.StudyViewStructuralVariantFilter;
+import org.cbioportal.service.MolecularProfileService;
+import org.cbioportal.service.StructuralVariantService;
+import org.cbioportal.web.parameter.SampleIdentifier;
+import org.cbioportal.web.parameter.StudyViewFilter;
+import org.cbioportal.web.util.StudyViewFilterUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+@Component
+public class StructuralVariantSubFilterApplier implements StudyViewSubFilterApplier {
+
+    @Autowired
+    private MolecularProfileService molecularProfileService;
+
+    @Autowired
+    private StructuralVariantService structuralVariantService;
+
+    @Autowired
+    private StudyViewFilterUtil studyViewFilterUtil;
+    
+    @Override
+    public List<SampleIdentifier> filter(List<SampleIdentifier> toFilter, StudyViewFilter filters) {
+
+        final List<StudyViewStructuralVariantFilter> structVarFilters = getStructVarFilters(filters);
+
+        List<String> includedStudyIds = toFilter.stream()
+            .map(SampleIdentifier::getStudyId)
+            .distinct()
+            .collect(Collectors.toList());
+
+        List<MolecularProfile> molecularProfiles = molecularProfileService.getMolecularProfilesInStudies(includedStudyIds, "SUMMARY");
+        
+        Map<String, MolecularProfile> molecularProfileMap = molecularProfiles.stream()
+            .collect(Collectors.toMap(MolecularProfile::getStableId, Function.identity()));
+
+        List<SampleIdentifier> remainingSampleIdentifiers = toFilter;
+        
+        for (StudyViewStructuralVariantFilter structuralVariantFilter : structVarFilters) {
+
+            // Collect molecular profiles referenced in gene filter.
+            List<MolecularProfile> filteredMolecularProfiles = structuralVariantFilter
+                .getMolecularProfileIds()
+                .stream()
+                .map(molecularProfileId -> molecularProfileMap.get(molecularProfileId))
+                .collect(Collectors.toList());
+
+            Map<String, List<MolecularProfile>> mapByStudyId = filteredMolecularProfiles
+                .stream()
+                .collect(Collectors.groupingBy(MolecularProfile::getCancerStudyIdentifier));
+
+            for (List<StructuralVariantFilterQuery> structVarQueries: structuralVariantFilter.getStructVarQueries()) {
+
+                // Remove samples in remainingSampleIdentifiers that belong to a study that is not accessible to the current user
+                // (do not appear in the molecularProfileMap argument). 
+                final List<SampleIdentifier> filteredSampleIdentifiers = remainingSampleIdentifiers.stream()
+                    .filter(i -> mapByStudyId.containsKey(i.getStudyId())).collect(Collectors.toList());
+
+                final List<String> molecularProfileIds = filteredSampleIdentifiers.stream()
+                    .map(i -> mapByStudyId.get(i.getStudyId()).get(0).getStableId())
+                    .distinct()
+                    .collect(Collectors.toList());
+                
+                final List<String> sampleIds = filteredSampleIdentifiers.stream()
+                        .map(SampleIdentifier::getSampleId)
+                        .collect(Collectors.toList());
+
+                final List<StructuralVariantFilterQuery> entrezIdEnhancedSvQueries = studyViewFilterUtil.resolveEntrezGeneIds(structVarQueries);
+                remainingSampleIdentifiers = structuralVariantService
+                    .fetchStructuralVariantsByStructVarQueries(molecularProfileIds, sampleIds, entrezIdEnhancedSvQueries)
+                    .stream()
+                    .map(m -> {
+                        SampleIdentifier sampleIdentifier = new SampleIdentifier();
+                        sampleIdentifier.setSampleId(m.getSampleId());
+                        sampleIdentifier.setStudyId(m.getStudyId());
+                        return sampleIdentifier;
+                    })
+                    .distinct()
+                    .collect(Collectors.toList());
+            }
+
+        }
+        return remainingSampleIdentifiers;
+    }
+
+    @Override
+    public boolean shouldApplyFilter(StudyViewFilter studyViewFilter) {
+        return !getStructVarFilters(studyViewFilter).isEmpty();
+    }
+
+    private static List<StudyViewStructuralVariantFilter> getStructVarFilters(StudyViewFilter filters) {
+        final List<StudyViewStructuralVariantFilter> structuralVariantFilters = filters.getStructuralVariantFilters();
+        if (structuralVariantFilters == null || structuralVariantFilters.isEmpty()) {
+            return new ArrayList<>();
+        }
+        final List<StudyViewStructuralVariantFilter> structVarFilters = structuralVariantFilters.stream()
+            .filter(structuralVariantFilter -> !structuralVariantFilter.getStructVarQueries().isEmpty())
+            .collect(Collectors.toList());
+        return structVarFilters;
+    }
+    
+}u}(jt  (b7155e59921e54de4e3abab8db9fddd2ed7e371aj  Gweb/src/test/java/org/cbioportal/web/DataAccessTokenControllerTest.javaj  modifiedj  K%j  K j  K%j  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenControllerTest.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenControllerTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenControllerTest.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -37,6 +37,7 @@
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 import org.springframework.test.context.web.WebAppConfiguration;
+import org.springframework.test.util.ReflectionTestUtils;
 import org.springframework.test.web.servlet.MockMvc;
 import org.springframework.test.web.servlet.MvcResult;
 import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
@@ -190,6 +191,32 @@ public void createTokenValidUserTest() throws Exception {
             .andReturn();
     }
 
+    @Test
+    public void createTokenValidUserTestWithUserRole() throws Exception {
+        ReflectionTestUtils.setField(DataAccessTokenController.class, "userRoleToAccessToken", "PLACEHOLDER_ROLE");
+        Mockito.when(tokenService.createDataAccessToken(ArgumentMatchers.anyString())).thenReturn(MOCK_TOKEN_INFO);
+        HttpSession session = getSession(MOCK_USER, MOCK_PASSWORD);
+        MvcResult result = mockMvc.perform(MockMvcRequestBuilders.post("/data-access-tokens")
+                .session((MockHttpSession) session)
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON))
+            .andExpect(MockMvcResultMatchers.status().isCreated())
+            .andReturn();
+    }
+
+    @Test
+    public void createTokenUnauthorizedUserTestWithUserRole() throws Exception {
+        ReflectionTestUtils.setField(DataAccessTokenController.class, "userRoleToAccessToken", "TEST");
+        Mockito.when(tokenService.createDataAccessToken(ArgumentMatchers.anyString())).thenReturn(MOCK_TOKEN_INFO);
+        HttpSession session = getSession(MOCK_USER, MOCK_PASSWORD);
+        MvcResult result = mockMvc.perform(MockMvcRequestBuilders.post("/data-access-tokens")
+                .session((MockHttpSession) session)
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON))
+            .andExpect(MockMvcResultMatchers.status().isUnauthorized())
+            .andReturn();
+    }
+
     /* Tests mapping for DELETE /data-access-tokens
      * Checks response status code is 200 success
      * Checks that correct username argument is passed to service class
@@ -241,4 +268,14 @@ public Void answer(InvocationOnMock getAllTokensInvocation) {
             Assert.fail("Unexpected argument passed to service class. Expected argument: " + MOCK_USER + " Received argument: " + receivedArgument);
         }
     }
+
+    @Test
+    public void createTokenNotLoggedIn() throws Exception {
+        Mockito.when(tokenService.createDataAccessToken(ArgumentMatchers.anyString())).thenReturn(MOCK_TOKEN_INFO);
+        MvcResult result = mockMvc.perform(MockMvcRequestBuilders.post("/data-access-tokens")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON))
+            .andExpect(MockMvcResultMatchers.status().isUnauthorized())
+            .andReturn();
+    }
 }u}(jt  (3951e57b963be731abed688f002aa194fc2f0793j  Aweb/src/test/java/org/cbioportal/web/StudyViewControllerTest.javaj  modifiedj  Mj  Kj  Mj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X|B  @@ -2,6 +2,7 @@
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.cbioportal.model.*;
+import org.cbioportal.model.util.Select;
 import org.cbioportal.persistence.AlterationRepository;
 import org.cbioportal.service.*;
 import org.cbioportal.service.util.MolecularProfileUtil;
@@ -61,6 +62,11 @@ public class StudyViewControllerTest {
     private static final String TEST_GENERIC_ASSAY_DATA_VALUE_2 = "value2";
     private static final String TEST_CLINICAL_EVENT_TYPE = "STATUS";
     private static final Integer TEST_CLINICAL_EVENT_TYPE_COUNT = 513;
+    private static final String TEST_CNA_ALTERATION_NAME_1 = "test_cna_event_type_1";
+    private static final String TEST_CNA_ALTERATION_NAME_2 = "test_cna_event_type_2";
+    private static final String TEST_CNA_ALTERATION_VALUE_1 = "2";
+    private static final String TEST_CNA_ALTERATION_VALUE_2 = "-2";
+    private static final String TEST_MOLECULAR_PROFILE_TYPE = "test_molecular_profile_type";
 
     private List<SampleIdentifier> filteredSampleIdentifiers = new ArrayList<>();
     private List<ClinicalData> clinicalData = new ArrayList<>();
@@ -128,6 +134,9 @@ public ViolinPlotService violinPlotService() {
         return mock(ViolinPlotService.class);
     }
 
+
+    private ArrayList<Sample> filteredSamples = new ArrayList<>();
+
     @Before
     public void setUp() throws Exception {
 
@@ -136,6 +145,17 @@ public void setUp() throws Exception {
         sampleIdentifier.setStudyId(TEST_STUDY_ID);
         filteredSampleIdentifiers.add(sampleIdentifier);
 
+        Sample sample1 = new Sample();
+        sample1.setStableId(TEST_SAMPLE_ID_1);
+        sample1.setPatientStableId(TEST_PATIENT_ID_1);
+        sample1.setCancerStudyIdentifier(TEST_STUDY_ID);
+        Sample sample2 = new Sample();
+        sample2.setStableId(TEST_SAMPLE_ID_2);
+        sample2.setPatientStableId(TEST_PATIENT_ID_2);
+        sample2.setCancerStudyIdentifier(TEST_STUDY_ID);
+        filteredSamples.add(sample1);
+        filteredSamples.add(sample2);
+
         ClinicalData clinicalData1 = new ClinicalData();
         clinicalData1.setAttrId(TEST_ATTRIBUTE_ID);
         clinicalData1.setAttrValue(TEST_CLINICAL_DATA_VALUE_1);
@@ -491,6 +511,92 @@ public void fetchSampleCounts() throws Exception {
             .andExpect(MockMvcResultMatchers.jsonPath("$[1].count").value(2));
     }
 
+
+    @Test
+    public void fetchGenomicDataCounts() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+
+        List<GenomicDataCountItem> genomicDataCountItems = new ArrayList<>();
+
+        GenomicDataCount genomicDataCount1 = new GenomicDataCount();
+        genomicDataCount1.setLabel(TEST_CNA_ALTERATION_NAME_1);
+        genomicDataCount1.setValue(TEST_CNA_ALTERATION_VALUE_1);
+        genomicDataCount1.setCount(1);
+        
+        GenomicDataCount genomicDataCount2 = new GenomicDataCount();
+        genomicDataCount2.setLabel(TEST_CNA_ALTERATION_NAME_2);
+        genomicDataCount2.setValue(TEST_CNA_ALTERATION_VALUE_2);
+        genomicDataCount2.setCount(1);
+
+        GenomicDataCountItem genomicDataCountItem1 = new GenomicDataCountItem();
+        List<GenomicDataCount> genomicDataCounts1 = new ArrayList<>();
+        genomicDataCounts1.add(genomicDataCount1);
+        genomicDataCounts1.add(genomicDataCount2);
+        genomicDataCountItem1.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_1);
+        genomicDataCountItem1.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataCountItem1.setCounts(genomicDataCounts1);
+
+        GenomicDataCountItem genomicDataCountItem2 = new GenomicDataCountItem();
+        List<GenomicDataCount> genomicDataCounts2 = new ArrayList<>();
+        genomicDataCounts2.add(genomicDataCount1);
+        genomicDataCounts2.add(genomicDataCount2);
+        genomicDataCountItem2.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_2);
+        genomicDataCountItem2.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataCountItem2.setCounts(genomicDataCounts2);
+
+        genomicDataCountItems.add(genomicDataCountItem1);
+        genomicDataCountItems.add(genomicDataCountItem2);
+
+        when(studyViewService.getCNAAlterationCountsByGeneSpecific(
+            anyList(),
+            anyList(),
+            anyList()))
+            .thenReturn(genomicDataCountItems);
+
+        GenomicDataCountFilter genomicDataCountFilter = new GenomicDataCountFilter();
+        List<GenomicDataFilter> genomicDataFilters = new ArrayList<>();
+        
+        GenomicDataFilter genomicDataFilter1 = new GenomicDataFilter();
+        genomicDataFilter1.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_1);
+        genomicDataFilter1.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataFilters.add(genomicDataFilter1);
+        
+        GenomicDataFilter genomicDataFilter2 = new GenomicDataFilter();
+        genomicDataFilter2.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_2);
+        genomicDataFilter2.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataFilters.add(genomicDataFilter2);
+        
+        genomicDataCountFilter.setGenomicDataFilters(genomicDataFilters);
+        
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+        genomicDataCountFilter.setStudyViewFilter(studyViewFilter);
+
+        mockMvc.perform(MockMvcRequestBuilders.post("/genomic-data-counts/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(genomicDataCountFilter)))
+            .andExpect(MockMvcResultMatchers.status().isOk())
+            .andExpect(MockMvcResultMatchers.content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].hugoGeneSymbol").value(TEST_HUGO_GENE_SYMBOL_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].profileType").value(TEST_MOLECULAR_PROFILE_TYPE))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[0].label").value(TEST_CNA_ALTERATION_NAME_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[0].value").value(TEST_CNA_ALTERATION_VALUE_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[0].count").value(1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[1].label").value(TEST_CNA_ALTERATION_NAME_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[1].value").value(TEST_CNA_ALTERATION_VALUE_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[1].count").value(1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].hugoGeneSymbol").value(TEST_HUGO_GENE_SYMBOL_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].profileType").value(TEST_MOLECULAR_PROFILE_TYPE))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[0].label").value(TEST_CNA_ALTERATION_NAME_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[0].value").value(TEST_CNA_ALTERATION_VALUE_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[0].count").value(1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[1].label").value(TEST_CNA_ALTERATION_NAME_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[1].value").value(TEST_CNA_ALTERATION_VALUE_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[1].count").value(1));
+    }
+    
     @Ignore("Skip StudyViewControllerTest.fetchClinicalDataDensityPlot due to assertion errors")
     @Test
     public void fetchClinicalDataDensityPlot() throws Exception {
@@ -765,9 +871,8 @@ public void fetchGenericAssayDataCounts() throws Exception {
 
     @Test
     public void fetchClinicalDataClinicalTable() throws Exception {
-
         // For this sake of this test the sample clinical data and patient clinical data are identical.
-        when(clinicalDataService.fetchSampleClinicalDataClinicalTable(anyList(), anyList(),
+        when(clinicalDataService.fetchSampleClinicalTable(anyList(), anyList(),
             anyInt(), anyInt(), anyString(), any(), anyString())).thenReturn(clinicalData);
         when(clinicalDataService.fetchClinicalData(anyList(), anyList(),
             any(), anyString(), anyString())).thenReturn(clinicalData);
@@ -820,4 +925,154 @@ public void fetchClinicalEventTypeCounts() throws Exception
             .andExpect(MockMvcResultMatchers.jsonPath("$[0].count").value(TEST_CLINICAL_EVENT_TYPE_COUNT));
     }
 
+    @Test
+    public void validateStructVarFilter() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+        when(studyViewFilterApplier.apply(any(), eq(false))).thenReturn(filteredSampleIdentifiers);
+
+        List<Sample> filteredSamples = new ArrayList<>();
+        Sample sample1 = new Sample();
+        sample1.setStableId(TEST_SAMPLE_ID_1);
+        sample1.setPatientStableId(TEST_PATIENT_ID_1);
+        sample1.setCancerStudyIdentifier(TEST_STUDY_ID);
+        filteredSamples.add(sample1);
+        Sample sample2 = new Sample();
+        sample2.setStableId(TEST_SAMPLE_ID_2);
+        sample2.setPatientStableId(TEST_PATIENT_ID_2);
+        sample2.setCancerStudyIdentifier(TEST_STUDY_ID);
+        filteredSamples.add(sample2);
+
+        when(sampleService.fetchSamples(anyList(), anyList(),
+            anyString())).thenReturn(filteredSamples);
+
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery("A", null, "B", null,
+            true, true, true, Select.all(),
+            true, true, true, true);
+        final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
+        structuralVariantFilter.setStructVarQueries(Arrays.asList(Arrays.asList(structVarFilterQuery)));
+        studyViewFilter.setStructuralVariantFilters(Arrays.asList(structuralVariantFilter));
+
+        // Test case:
+        structVarFilterQuery.getGene1Query().setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        structVarFilterQuery.getGene2Query().setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        
+        mockMvc.perform(MockMvcRequestBuilders.post("/filtered-samples/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(studyViewFilter)))
+            .andExpect(MockMvcResultMatchers.status().isBadRequest());
+    }
+    @Test
+    public void validateStructVarFilterBothAnyGene() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+        when(studyViewFilterApplier.apply(any(), eq(false))).thenReturn(filteredSampleIdentifiers);
+        when(sampleService.fetchSamples(anyList(), anyList(), anyString())).thenReturn(filteredSamples);
+
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery("A", null, "B", null,
+            true, true, true, Select.all(),
+            true, true, true, true);
+        final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
+        structuralVariantFilter.setStructVarQueries(Arrays.asList(Arrays.asList(structVarFilterQuery)));
+        studyViewFilter.setStructuralVariantFilters(Arrays.asList(structuralVariantFilter));
+
+        // Test case:
+        structVarFilterQuery.getGene1Query().setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        structVarFilterQuery.getGene2Query().setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        
+        mockMvc.perform(MockMvcRequestBuilders.post("/filtered-samples/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(studyViewFilter)))
+            .andExpect(MockMvcResultMatchers.status().isBadRequest());
+    }
+    
+    @Test
+    public void validateStructVarFilterBothNoGene() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+        when(studyViewFilterApplier.apply(any(), eq(false))).thenReturn(filteredSampleIdentifiers);
+        when(sampleService.fetchSamples(anyList(), anyList(), anyString())).thenReturn(filteredSamples);
+
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery("A", null, "B", null,
+            true, true, true, Select.all(),
+            true, true, true, true);
+        final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
+        structuralVariantFilter.setStructVarQueries(Arrays.asList(Arrays.asList(structVarFilterQuery)));
+        studyViewFilter.setStructuralVariantFilters(Arrays.asList(structuralVariantFilter));
+
+        // Test case:
+        structVarFilterQuery.getGene1Query().setSpecialValue(StructuralVariantSpecialValue.NO_GENE);
+        structVarFilterQuery.getGene2Query().setSpecialValue(StructuralVariantSpecialValue.NO_GENE);
+        
+        mockMvc.perform(MockMvcRequestBuilders.post("/filtered-samples/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(studyViewFilter)))
+            .andExpect(MockMvcResultMatchers.status().isBadRequest());
+    }
+    
+    @Test
+    public void validateStructVarFilterBothNoGeneId() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+        when(studyViewFilterApplier.apply(any(), eq(false))).thenReturn(filteredSampleIdentifiers);
+        when(sampleService.fetchSamples(anyList(), anyList(), anyString())).thenReturn(filteredSamples);
+
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+
+        // Test case:
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery(null, null, null, null,
+            true, true, true, Select.all(),
+            true, true, true, true);
+            
+        final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
+        structuralVariantFilter.setStructVarQueries(Arrays.asList(Arrays.asList(structVarFilterQuery)));
+        studyViewFilter.setStructuralVariantFilters(Arrays.asList(structuralVariantFilter));
+
+        mockMvc.perform(MockMvcRequestBuilders.post("/filtered-samples/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(studyViewFilter)))
+            .andExpect(MockMvcResultMatchers.status().isBadRequest());
+    }
+    
+    @Test
+    public void validateStructVarFilterBothGeneIdAndSpecialValueNull() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+        when(studyViewFilterApplier.apply(any(), eq(false))).thenReturn(filteredSampleIdentifiers);
+        when(sampleService.fetchSamples(anyList(), anyList(), anyString())).thenReturn(filteredSamples);
+
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+
+        // Test case:
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery(null, null, "B", null,
+            true, true, true, Select.all(),
+            true, true, true, true);
+        structVarFilterQuery.getGene1Query().setSpecialValue(null);
+
+        final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
+        structuralVariantFilter.setStructVarQueries(Arrays.asList(Arrays.asList(structVarFilterQuery)));
+        studyViewFilter.setStructuralVariantFilters(Arrays.asList(structuralVariantFilter));
+
+        mockMvc.perform(MockMvcRequestBuilders.post("/filtered-samples/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(studyViewFilter)))
+            .andExpect(MockMvcResultMatchers.status().isBadRequest());
+    }
+
 }u}(jt  (e8bd8efba6d188222d0992dd3282008e6123bd58j  ]web/src/test/java/org/cbioportal/web/util/appliers/StructuralVariantSubFilterApplierTest.javaj  addedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.javaj  https://github.com/cBioPortal/cbioportal/raw/ae160c6a3a72faee2afcebed8895392f3281b3d2/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.java?ref=ae160c6a3a72faee2afcebed8895392f3281b3d2j  X  @@ -0,0 +1,142 @@
+package org.cbioportal.web.util.appliers;
+
+import org.cbioportal.model.MolecularProfile;
+import org.cbioportal.model.StructuralVariantFilterQuery;
+import org.cbioportal.model.StructuralVariant;
+import org.cbioportal.model.StudyViewStructuralVariantFilter;
+import org.cbioportal.model.util.Select;
+import org.cbioportal.service.MolecularProfileService;
+import org.cbioportal.service.impl.StructuralVariantServiceImpl;
+import org.cbioportal.web.parameter.SampleIdentifier;
+import org.cbioportal.web.parameter.StudyViewFilter;
+import org.cbioportal.web.util.StudyViewFilterUtil;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.junit.MockitoJUnitRunner;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+
+import static org.mockito.ArgumentMatchers.anyList;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.when;
+
+@RunWith(MockitoJUnitRunner.Silent.class)
+public class StructuralVariantSubFilterApplierTest {
+
+    static final String ST_1_ID = "ST_1_ID";
+    static final String MP_1_ID = "MP_1_ID";
+    static final String G1 = "G1";
+    static final String G2 = "G2";
+    
+    @InjectMocks
+    StructuralVariantSubFilterApplier subject;
+
+    @Mock
+    MolecularProfileService molecularProfileService;
+
+    @Mock
+    StructuralVariantServiceImpl structuralVariantService;
+
+    @Mock
+    StudyViewFilterUtil studyViewFilterUtil;
+
+    private StudyViewFilter emptyStudyViewFilter = new StudyViewFilter();
+    private StudyViewFilter structVarStudyViewFilter = new StudyViewFilter();
+
+    @Before
+    public void setUp() throws Exception {
+
+        // For the test this arrangement does not matter much. What is more important
+        // is the SVs returned by the structuralVariantService service mock in response to
+        // subsequent query filter calls.
+        List<StructuralVariantFilterQuery> svA = Arrays.asList(createQuery(G1, G2));
+        List<StructuralVariantFilterQuery> svB = Arrays.asList(createQuery(G1, G2));
+        List<List<StructuralVariantFilterQuery>> svA_and_svB_filterQuery = Arrays.asList(svA, svB);
+
+        final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
+        structuralVariantFilter.setStructVarQueries(svA_and_svB_filterQuery);
+        structuralVariantFilter.setMolecularProfileIds(new HashSet<>(Arrays.asList(MP_1_ID)));
+        structVarStudyViewFilter.setStructuralVariantFilters(Arrays.asList(structuralVariantFilter));
+
+        MolecularProfile molecularProfile1 = new MolecularProfile();
+        molecularProfile1.setStableId(MP_1_ID);
+        molecularProfile1.setCancerStudyIdentifier(ST_1_ID);
+        molecularProfile1.setMolecularAlterationType(MolecularProfile.MolecularAlterationType.STRUCTURAL_VARIANT);
+
+        when(molecularProfileService.getMolecularProfilesInStudies(anyList(), eq("SUMMARY")))
+            .thenReturn(Arrays.asList(molecularProfile1));
+
+        final List<StructuralVariant> structuralVariantsQuerySvA = Arrays.asList(
+            createStructVar("1", ST_1_ID),
+            createStructVar("2", ST_1_ID),
+            createStructVar("3", ST_1_ID),
+            createStructVar("4", ST_1_ID),
+            createStructVar("5", ST_1_ID)
+        );
+        // This result determines the final result.
+        final List<StructuralVariant> structuralVariantsQuerySvB = Arrays.asList(
+            createStructVar("4", ST_1_ID),
+            createStructVar("5", ST_1_ID)
+        );
+        // Subsequently, return results for svA and svB queries.
+        when(studyViewFilterUtil.resolveEntrezGeneIds(anyList()))
+            .thenReturn(svA, svB);
+        when(structuralVariantService.fetchStructuralVariantsByStructVarQueries(anyList(), anyList(), anyList())
+        ).thenReturn(structuralVariantsQuerySvA, structuralVariantsQuerySvB);
+    }
+
+    // Does the function return OR relations between genes in the sv query filter?
+    @Test
+    public void filter() {
+        List<SampleIdentifier> sampleIdentifiers = Arrays.asList(
+            createSampleId("1", ST_1_ID),
+            createSampleId("2", ST_1_ID),
+            createSampleId("3", ST_1_ID),
+            createSampleId("4", ST_1_ID),
+            createSampleId("5", ST_1_ID),
+            createSampleId("6", ST_1_ID),
+            createSampleId("7", ST_1_ID),
+            createSampleId("8", ST_1_ID),
+            createSampleId("9", ST_1_ID),
+            createSampleId("10", ST_1_ID)
+        );
+        List<SampleIdentifier> expected = Arrays.asList(
+            createSampleId("4", ST_1_ID),
+            createSampleId("5", ST_1_ID)
+        );
+        Assert.assertEquals(expected, subject.filter(sampleIdentifiers, structVarStudyViewFilter));
+    }
+
+    @Test
+    public void shouldApplyFilter() {
+        Assert.assertFalse(subject.shouldApplyFilter(emptyStudyViewFilter));
+        Assert.assertTrue(subject.shouldApplyFilter(structVarStudyViewFilter)); 
+    }
+    
+    private StructuralVariantFilterQuery createQuery(String gene1, String gene2) {
+        return new StructuralVariantFilterQuery(gene1, null, gene2, null,
+            true, true, true, Select.all(),
+            true, true, true, true);
+    }
+    
+    private SampleIdentifier createSampleId(String samplId, String studyId) {
+        final SampleIdentifier sampleIdentifier = new SampleIdentifier();
+        sampleIdentifier.setStudyId(studyId);
+        sampleIdentifier.setSampleId(samplId);
+        return sampleIdentifier;
+    }
+    
+    private StructuralVariant createStructVar(String samplId, String studyId) {
+        final StructuralVariant structuralVariant = new StructuralVariant();
+        structuralVariant.setStudyId(studyId);
+        structuralVariant.setSampleId(samplId);
+        return structuralVariant;
+    }
+
+}
\ No newline at end of fileueu(1654557bcb2cf24fc310866ffaf313ad3a7c640c}(sha(1654557bcb2cf24fc310866ffaf313ad3a7c640cnode_idEC_kwDOAe-hB9oAKDE2NTQ1NTdiY2IyY2YyNGZjMzEwODY2ZmZhZjMxM2FkM2E3YzY0MGMcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-06-13T20:08:43Zu	committer}(j  GitHubj  noreply@github.comj  2023-06-13T20:08:43ZumessageFrontend v5.3.11tree}(j  (2e1b96695e9984678d7274f38efffafc46417191urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/2e1b96695e9984678d7274f38efffafc46417191uj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/1654557bcb2cf24fc310866ffaf313ad3a7c640c
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkiMzLCRBK7hj4Ov3rIwAAU98IACNRs3KjLFy7dtpWJ9htRTjt
VM0OZbQulMLlyfyVPytLkLXfjvzAszsDf8j6mjuiLk6tbHnqxCbYg0VkY4FrJm1h
srCjz7RadL/c/WdviFSE/uR1Tqr7WErhjmjNOa0ehgdvyURlnLuVXqOTKBHKoiNy
E9/7L4iDmB+SKfgdAqon1FB60Z64NbLufUQmYjjAqkQcxjou1O3aXyZgtq2DNy4x
yV98HAOFDU0sZWPn0AmNAvq5crbZRRquXgFA4373jVcVRY6TPN+NfSmzNDIxqtRq
4U9EWr0DCAdaJ9eWKzYgj3MhJjeJeKdWKCeW37QWkWKl/CyDLiypX4iKA/1lzDI=
=6WIt
-----END PGP SIGNATURE-----
payloadtree 2e1b96695e9984678d7274f38efffafc46417191
parent ff4c6ea2926a2628c3dbd2a55109a250f3f636be
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1686686923 -0400
committer GitHub <noreply@github.com> 1686686923 -0400

Frontend v5.3.11uuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1654557bcb2cf24fc310866ffaf313ad3a7c640chtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/1654557bcb2cf24fc310866ffaf313ad3a7c640ccomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/1654557bcb2cf24fc310866ffaf313ad3a7c640c/commentsj  }(login
dippindotsidJtO j  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j  'https://api.github.com/users/dippindotsj
  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj  }(j  web-flowj  J/j  MDQ6VXNlcjE5ODY0NDQ3j  4https://avatars.githubusercontent.com/u/19864447?v=4j  h5j  %https://api.github.com/users/web-flowj
  https://github.com/web-flowj  /https://api.github.com/users/web-flow/followersj  <https://api.github.com/users/web-flow/following{/other_user}j  5https://api.github.com/users/web-flow/gists{/gist_id}j!  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j#  3https://api.github.com/users/web-flow/subscriptionsj%  *https://api.github.com/users/web-flow/orgsj'  +https://api.github.com/users/web-flow/reposj)  6https://api.github.com/users/web-flow/events{/privacy}j+  5https://api.github.com/users/web-flow/received_eventsj-  Userj/  uparents]}(j  (ff4c6ea2926a2628c3dbd2a55109a250f3f636bej  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ff4c6ea2926a2628c3dbd2a55109a250f3f636bej
  Xhttps://github.com/cBioPortal/cbioportal/commit/ff4c6ea2926a2628c3dbd2a55109a250f3f636beuastats}(totalK	additionsK	deletionsKufiles]}(j  (3c1b06f5aacc03caf3fb92a90e26d6b84ddd4bedfilenamepom.xmlstatusmodifiedjI  KjJ  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/1654557bcb2cf24fc310866ffaf313ad3a7c640c/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/1654557bcb2cf24fc310866ffaf313ad3a7c640c/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=1654557bcb2cf24fc310866ffaf313ad3a7c640cpatchXY  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.10</frontend.version>
+    <frontend.version>v5.3.11</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(92d79bfa3bb87e12b292f702a59892d58b04f577}(sha(92d79bfa3bb87e12b292f702a59892d58b04f577node_idEC_kwDOAe-hB9oAKDkyZDc5YmZhM2JiODdlMTJiMjkyZjcwMmE1OTg5MmQ1OGIwNGY1Nzccommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-15T20:52:36Zu	committer}(jf  GitHubjh  noreply@github.comjj  2023-08-15T20:52:36ZumessageFrontend v5.3.18tree}(j^  (a0c9ec0bc961fac10c46d03e23c00eb1ccbb7862urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/a0c9ec0bc961fac10c46d03e23c00eb1ccbb7862ujv  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/92d79bfa3bb87e12b292f702a59892d58b04f577
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk2+WUCRBK7hj4Ov3rIwAARIwIAB9i2GZmhZXI9I2/bgWynTn3
TYpmh3GvYgfZxRH9PFFFuEPNimC3iev1J40KBTJEKy7mPxNFP5TZW/OFp5Qw1iqq
Ycfdusc7ih/zFPzC3ieG72Gq3InC9ldDk9S3IC6pF4J9+WzXcEEiXARZL312UvAy
YP48V9rgDrjHbrsVwP+rUPmt2fDrqsqmKkO8xrjK+QAXwYXOJMt/XWNCFJekLhTa
zmcBClC18K8o8iMKliiKW7aBowZokwEVrtgFivQfnUtMBJ8dbHmt3B9EYQMK1Loy
rxlbmUzjyfISFkbyln8e8NHsDw1DVG0uCe9ZPxrrHPeGKdMZRcORCvjOP0N8Tko=
=1P0G
-----END PGP SIGNATURE-----
payloadtree a0c9ec0bc961fac10c46d03e23c00eb1ccbb7862
parent dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1692132756 -0400
committer GitHub <noreply@github.com> 1692132756 -0400

Frontend v5.3.18uujv  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/92d79bfa3bb87e12b292f702a59892d58b04f577html_urlXhttps://github.com/cBioPortal/cbioportal/commit/92d79bfa3bb87e12b292f702a59892d58b04f577comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/92d79bfa3bb87e12b292f702a59892d58b04f577/commentsjd  }(login
dippindotsidJtO j`  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5jv  'https://api.github.com/users/dippindotsj  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminujl  }(j  web-flowj  J/j`  MDQ6VXNlcjE5ODY0NDQ3j  4https://avatars.githubusercontent.com/u/19864447?v=4j  h5jv  %https://api.github.com/users/web-flowj  https://github.com/web-flowj  /https://api.github.com/users/web-flow/followersj  <https://api.github.com/users/web-flow/following{/other_user}j  5https://api.github.com/users/web-flow/gists{/gist_id}j  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j  3https://api.github.com/users/web-flow/subscriptionsj  *https://api.github.com/users/web-flow/orgsj  +https://api.github.com/users/web-flow/reposj  6https://api.github.com/users/web-flow/events{/privacy}j  5https://api.github.com/users/web-flow/received_eventsj  Userj  uparents]}(j^  (dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7jv  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7j  Xhttps://github.com/cBioPortal/cbioportal/commit/dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7uastats}(totalK	additionsK	deletionsKufiles]}(j^  (d2c8c98c3a8ad67862705fdc52f754f44cec26f8filenamepom.xmlstatusmodifiedj  Kj  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/92d79bfa3bb87e12b292f702a59892d58b04f577/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/92d79bfa3bb87e12b292f702a59892d58b04f577/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=92d79bfa3bb87e12b292f702a59892d58b04f577patchXY  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.17</frontend.version>
+    <frontend.version>v5.3.18</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(249d4ca1bab7348af6f513bb4b897fac8cf93310}(sha(249d4ca1bab7348af6f513bb4b897fac8cf93310node_idEC_kwDOAe-hB9oAKDI0OWQ0Y2ExYmFiNzM0OGFmNmY1MTNiYjRiODk3ZmFjOGNmOTMzMTAcommit}(author}(namealismanemaillisman.aaron@gmail.comdate2023-07-10T16:00:22Zu	committer}(j  GitHubj  noreply@github.comj  2023-07-10T16:00:22ZumessagexMerge pull request #10258 from h164654156465/data-download-control

modify documentation for skin.hide_download_controlstree}(j  (abc621f465d41a0c50ccb30ae0ce38614d5d0886urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/abc621f465d41a0c50ccb30ae0ce38614d5d0886uj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/249d4ca1bab7348af6f513bb4b897fac8cf93310
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkrCsWCRBK7hj4Ov3rIwAA1nUIACNJP6jD7IC3u4Xpwq/LpxFg
4M3Lr8oBBEua9EkqUwA3uQJb790mfUVZnc8fpRQQfQ1ZrO8+71zvA4crW5GzP8VV
p+e76S0TqZ2CyxYzvEAx/9+szhn3NFVSyI2lzDXXH/SiZ3RMAAauTuyvOIcQzVQb
bcdD1ynK9RW4sB6NKmZKSTurIhvO1H4PS4DLbmR3QWV3yeIpz5ShQWA82bmeROyc
KyQk8rrUJV5IItHPMjpkUBITcw7j1wiQUFsIe+wBFscI6aliQnTnE/jyKFYIJ0pi
Gw48dLBvfPLXZmXejL3bbXzwtGHpb1g2ZHwPvHMBhmXVNfZz1JZvrSvEhFV7y7M=
=0YC2
-----END PGP SIGNATURE-----
payloadXw  tree abc621f465d41a0c50ccb30ae0ce38614d5d0886
parent 8acd3df44484464f15a25f7d12f88b4b75f48265
parent b205cb5a6853f273cd7cc6dd5202abfa6358c891
author alisman <lisman.aaron@gmail.com> 1689004822 -0400
committer GitHub <noreply@github.com> 1689004822 -0400

Merge pull request #10258 from h164654156465/data-download-control

modify documentation for skin.hide_download_controlsuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/249d4ca1bab7348af6f513bb4b897fac8cf93310html_urlXhttps://github.com/cBioPortal/cbioportal/commit/249d4ca1bab7348af6f513bb4b897fac8cf93310comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/249d4ca1bab7348af6f513bb4b897fac8cf93310/commentsj  }(loginalismanidJ j  MDQ6VXNlcjE4NjUyMQ==
avatar_url2https://avatars.githubusercontent.com/u/186521?v=4gravatar_idh5j  $https://api.github.com/users/alismanj  https://github.com/alisman
followers_url.https://api.github.com/users/alisman/followers
following_url;https://api.github.com/users/alisman/following{/other_user}	gists_url4https://api.github.com/users/alisman/gists{/gist_id}starred_url;https://api.github.com/users/alisman/starred{/owner}{/repo}subscriptions_url2https://api.github.com/users/alisman/subscriptionsorganizations_url)https://api.github.com/users/alisman/orgs	repos_url*https://api.github.com/users/alisman/repos
events_url5https://api.github.com/users/alisman/events{/privacy}received_events_url4https://api.github.com/users/alisman/received_eventstypeUser
site_adminuj  }(j   web-flowj  J/j  MDQ6VXNlcjE5ODY0NDQ3j  4https://avatars.githubusercontent.com/u/19864447?v=4j  h5j  %https://api.github.com/users/web-flowj  https://github.com/web-flowj	  /https://api.github.com/users/web-flow/followersj  <https://api.github.com/users/web-flow/following{/other_user}j
  5https://api.github.com/users/web-flow/gists{/gist_id}j  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j  3https://api.github.com/users/web-flow/subscriptionsj  *https://api.github.com/users/web-flow/orgsj  +https://api.github.com/users/web-flow/reposj  6https://api.github.com/users/web-flow/events{/privacy}j  5https://api.github.com/users/web-flow/received_eventsj  Userj  uparents](}(j  (8acd3df44484464f15a25f7d12f88b4b75f48265j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8acd3df44484464f15a25f7d12f88b4b75f48265j  Xhttps://github.com/cBioPortal/cbioportal/commit/8acd3df44484464f15a25f7d12f88b4b75f48265u}(j  (b205cb5a6853f273cd7cc6dd5202abfa6358c891j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b205cb5a6853f273cd7cc6dd5202abfa6358c891j  Xhttps://github.com/cBioPortal/cbioportal/commit/b205cb5a6853f273cd7cc6dd5202abfa6358c891uestats}(totalK	additionsK	deletionsKufiles](}(j  (feee782f5cca62c86cdca59156949d6bc91836a6filenameHdocs/deployment/customization/Customizing-your-instance-of-cBioPortal.mdstatusmodifiedj;  Kj<  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/249d4ca1bab7348af6f513bb4b897fac8cf93310/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdraw_urlhttps://github.com/cBioPortal/cbioportal/raw/249d4ca1bab7348af6f513bb4b897fac8cf93310/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.md?ref=249d4ca1bab7348af6f513bb4b897fac8cf93310patchX  @@ -244,8 +244,10 @@ Below you can find the complete list of all the available skin properties.
 		<tr>
             <td>skin.hide_download_controls</td>
             <td>removes all download and copy-to-clipboard options.</td>
-            <td>false</td>
-            <td>true / false</td>
+            <td>show</td>
+            <td>
+                string. "show" enables all download and copy-to-clipboard options. "data" disables data download but keeps figure and top-level data. "hide" disables all the download and copy-to-keyboard options.
+            </td>
         </tr>
         <tr>
             <td>skin.show_settings_menu</td>u}(j  (408b7ccd3c44b732cc302690449bd46ddb4d024cjA  ,src/main/resources/portal.properties.EXAMPLEjC  modifiedj;  Kj<  KjE  KjF  https://github.com/cBioPortal/cbioportal/blob/249d4ca1bab7348af6f513bb4b897fac8cf93310/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEjH  https://github.com/cBioPortal/cbioportal/raw/249d4ca1bab7348af6f513bb4b897fac8cf93310/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEjJ  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=249d4ca1bab7348af6f513bb4b897fac8cf93310jL  X  @@ -107,10 +107,10 @@ skin.study_view.link_text=To build your own case set, try out our enhanced Study
 ## enable this to show reference genome next to the samples
 # skin.home_page.show_reference_genome=false
 
-setting controlling whether Download tabs and download/copy-to-clipboard controls should be shown
-# skin.hide_download_controls=true
+## setting controlling whether Download tabs and download/copy-to-clipboard controls should be shown
+# skin.hide_download_controls=show
 
-setting controlling which name should be used to display the authenticated user (email, or username)
+## setting controlling which name should be used to display the authenticated user (email, or username)
 # skin.user_display_name=email
 
 ## enable and set this property to specify a study group to be used to identify public studies for which no specific authorization entries are needed in the `authorities` tableueu(f4c47d89683af00c216b077f4f9c512090dcc632}(sha(f4c47d89683af00c216b077f4f9c512090dcc632node_idEC_kwDOAe-hB9oAKGY0YzQ3ZDg5NjgzYWYwMGMyMTZiMDc3ZjRmOWM1MTIwOTBkY2M2MzIcommit}(author}(name
pieterlukasseemailpieterlukasse@gmail.comdate2023-06-23T20:42:58Zu	committer}(j`  GitHubjb  noreply@github.comjd  2023-06-23T20:42:58Zumessage+Merge branch 'master' into imporove-kc-docstree}(jX  (a975ec74b6faf29ebbd8e92193edd0fe161489f3urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/a975ec74b6faf29ebbd8e92193edd0fe161489f3ujp  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/f4c47d89683af00c216b077f4f9c512090dcc632
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJklgPSCRBK7hj4Ov3rIwAA+9EIAGWkcVNdw9M6o65x0GWLB8uf
1EPUUHyqeJsjAEcKHKoB0IBfPxlthEkmO2cq8HcaWMYH6Ba6+IZp4aAsRbk0f3HM
QCljcvec2eUdPiwBo//jzShIRiLKLVpu5SvXb0nsCB529SCZ+hrpBgHPjpSqPtrw
IFd/JTpqafcLs5zaHyEI4uI25oNgzeUSS1AEr+b47xzfqNwbgDW6aZED7HkghNB1
pAqGXhCLp6O7IpPkd+BeRuterygtej2+mPrlv6IykaRo/bGGWIEc8BPm2e0h0LK6
dFO+HGEy/A1VwVzYh9ZJWLeFxiepUhDtlvywO76RW3ytvv9O74db+flP7Sghkpg=
=pOyx
-----END PGP SIGNATURE-----
payloadX1  tree a975ec74b6faf29ebbd8e92193edd0fe161489f3
parent 7d4072f1564a604ea2900b2007b4885c67b5a8bf
parent 8bf1312544943ac06a3e7b932ead81a41aa232d0
author pieterlukasse <pieterlukasse@gmail.com> 1687552978 +0200
committer GitHub <noreply@github.com> 1687552978 +0200

Merge branch 'master' into imporove-kc-docsuujp  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/f4c47d89683af00c216b077f4f9c512090dcc632html_urlXhttps://github.com/cBioPortal/cbioportal/commit/f4c47d89683af00c216b077f4f9c512090dcc632comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/f4c47d89683af00c216b077f4f9c512090dcc632/commentsj^  }(login
pieterlukasseidJOA, jZ  MDQ6VXNlcjI5MDAzMDM=
avatar_url3https://avatars.githubusercontent.com/u/2900303?v=4gravatar_idh5jp  *https://api.github.com/users/pieterlukassej~   https://github.com/pieterlukasse
followers_url4https://api.github.com/users/pieterlukasse/followers
following_urlAhttps://api.github.com/users/pieterlukasse/following{/other_user}	gists_url:https://api.github.com/users/pieterlukasse/gists{/gist_id}starred_urlAhttps://api.github.com/users/pieterlukasse/starred{/owner}{/repo}subscriptions_url8https://api.github.com/users/pieterlukasse/subscriptionsorganizations_url/https://api.github.com/users/pieterlukasse/orgs	repos_url0https://api.github.com/users/pieterlukasse/repos
events_url;https://api.github.com/users/pieterlukasse/events{/privacy}received_events_url:https://api.github.com/users/pieterlukasse/received_eventstypeUser
site_adminujf  }(j  web-flowj  J/jZ  MDQ6VXNlcjE5ODY0NDQ3j  4https://avatars.githubusercontent.com/u/19864447?v=4j  h5jp  %https://api.github.com/users/web-flowj~  https://github.com/web-flowj  /https://api.github.com/users/web-flow/followersj  <https://api.github.com/users/web-flow/following{/other_user}j  5https://api.github.com/users/web-flow/gists{/gist_id}j  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j  3https://api.github.com/users/web-flow/subscriptionsj  *https://api.github.com/users/web-flow/orgsj  +https://api.github.com/users/web-flow/reposj  6https://api.github.com/users/web-flow/events{/privacy}j  5https://api.github.com/users/web-flow/received_eventsj  Userj  uparents](}(jX  (7d4072f1564a604ea2900b2007b4885c67b5a8bfjp  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7d4072f1564a604ea2900b2007b4885c67b5a8bfj~  Xhttps://github.com/cBioPortal/cbioportal/commit/7d4072f1564a604ea2900b2007b4885c67b5a8bfu}(jX  (8bf1312544943ac06a3e7b932ead81a41aa232d0jp  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8bf1312544943ac06a3e7b932ead81a41aa232d0j~  Xhttps://github.com/cBioPortal/cbioportal/commit/8bf1312544943ac06a3e7b932ead81a41aa232d0uestats}(totalK	additionsK	deletionsKufiles](}(jX  (19273b2d38a781eff9698b01a7561be22cd9ba57filename<docs/deployment/customization/portal.properties-Reference.mdstatusmodifiedj  Kj  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/f4c47d89683af00c216b077f4f9c512090dcc632/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdraw_urlhttps://github.com/cBioPortal/cbioportal/raw/f4c47d89683af00c216b077f4f9c512090dcc632/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.md?ref=f4c47d89683af00c216b077f4f9c512090dcc632patchX  @@ -167,6 +167,13 @@ If _show\_unauthorized\_studies_ feature has been enabled, a message (template)
 skin.home_page.unauthorized_studies_global_message=
 ```
 
+### Show badge with reference genome
+In instances with hg19 and hg38 studies you can show the reference genome in the home page next to the number of samples. This can be done setting this property to `true` (`false` by default):
+
+```
+skin.home_page.show_reference_genome=
+```
+
 ### Control the appearance of the settings menu in study view and group comparison that controls custom annotation-based filtering
 
 A settings menu that allows the user to filter alterations in study view and group comparison may be used when [custom driver annotations](/File-Formats.md#custom-driver-annotations) were loaded for the study or studies displayed in these sections. This menu will only appear, when setting the property _skin.show\_settings\_menu_ to _true_.u}(jX  (79e16e74df70d482ff59ab39640f0ba1b4e5a316j  )portal/src/main/webapp/config_service.jspj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/f4c47d89683af00c216b077f4f9c512090dcc632/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj  https://github.com/cBioPortal/cbioportal/raw/f4c47d89683af00c216b077f4f9c512090dcc632/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=f4c47d89683af00c216b077f4f9c512090dcc632j  XI  @@ -147,7 +147,8 @@
             "skin.patient_view.structural_variant_table.columns.show_on_init",
             "comparison.categorical_na_values",
             "skin.hide_download_controls",
-            "study_download_url"
+            "study_download_url",
+            "skin.home_page.show_reference_genome"
         };
 
 u}(jX  (7cfa8b26cf5cda380cb07062abfadeb8b387d4a5j  ,src/main/resources/portal.properties.EXAMPLEj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/f4c47d89683af00c216b077f4f9c512090dcc632/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj  https://github.com/cBioPortal/cbioportal/raw/f4c47d89683af00c216b077f4f9c512090dcc632/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=f4c47d89683af00c216b077f4f9c512090dcc632j  X  @@ -104,6 +104,8 @@ skin.study_view.link_text=To build your own case set, try out our enhanced Study
 # skin.home_page.show_unauthorized_studies=false
 ## enable this to configure a global message for the studies that are unauthorized; the message can contain placecards like {$.Owner.email} for the studies that have the information in the study tags 
 # skin.home_page.unauthorized_studies_global_message=The study is unauthorized. You need to request access.
+## enable this to show reference genome next to the samples
+# skin.home_page.show_reference_genome=false
 
 setting controlling whether Download tabs and download/copy-to-clipboard controls should be shown
 # skin.hide_download_controls=trueueu(69c17d4305f4b4938724d45587549ac493dc3648}(sha(69c17d4305f4b4938724d45587549ac493dc3648node_idEC_kwDOAe-hB9oAKDY5YzE3ZDQzMDVmNGI0OTM4NzI0ZDQ1NTg3NTQ5YWM0OTNkYzM2NDgcommit}(author}(namealismanemaillisman.aaron@gmail.comdate2023-06-20T14:39:14Zu	committer}(j  alismanj  lisman.aaron@gmail.comj  2023-06-20T14:39:14ZumessageFrontend v5.3.12tree}(j  (983735db1539a398ee0051c7e80231afe10f5ebaurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/983735db1539a398ee0051c7e80231afe10f5ebauj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/69c17d4305f4b4938724d45587549ac493dc3648
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/69c17d4305f4b4938724d45587549ac493dc3648html_urlXhttps://github.com/cBioPortal/cbioportal/commit/69c17d4305f4b4938724d45587549ac493dc3648comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/69c17d4305f4b4938724d45587549ac493dc3648/commentsj  }(loginalismanidJ j  MDQ6VXNlcjE4NjUyMQ==
avatar_url2https://avatars.githubusercontent.com/u/186521?v=4gravatar_idh5j  $https://api.github.com/users/alismanj  https://github.com/alisman
followers_url.https://api.github.com/users/alisman/followers
following_url;https://api.github.com/users/alisman/following{/other_user}	gists_url4https://api.github.com/users/alisman/gists{/gist_id}starred_url;https://api.github.com/users/alisman/starred{/owner}{/repo}subscriptions_url2https://api.github.com/users/alisman/subscriptionsorganizations_url)https://api.github.com/users/alisman/orgs	repos_url*https://api.github.com/users/alisman/repos
events_url5https://api.github.com/users/alisman/events{/privacy}received_events_url4https://api.github.com/users/alisman/received_eventstypeUser
site_adminuj  }(j  alismanj  J j  MDQ6VXNlcjE4NjUyMQ==j  2https://avatars.githubusercontent.com/u/186521?v=4j  h5j  $https://api.github.com/users/alismanj  https://github.com/alismanj  .https://api.github.com/users/alisman/followersj  ;https://api.github.com/users/alisman/following{/other_user}j  4https://api.github.com/users/alisman/gists{/gist_id}j  ;https://api.github.com/users/alisman/starred{/owner}{/repo}j  2https://api.github.com/users/alisman/subscriptionsj  )https://api.github.com/users/alisman/orgsj!  *https://api.github.com/users/alisman/reposj#  5https://api.github.com/users/alisman/events{/privacy}j%  4https://api.github.com/users/alisman/received_eventsj'  Userj)  uparents]}(j  (15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0j  Xhttps://github.com/cBioPortal/cbioportal/commit/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0uastats}(totalK	additionsK	deletionsKufiles]}(j  (62d6071956aac00a2aaece743c34938effdb8ef2filenamepom.xmlstatusmodifiedjC  KjD  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/69c17d4305f4b4938724d45587549ac493dc3648/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/69c17d4305f4b4938724d45587549ac493dc3648/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=69c17d4305f4b4938724d45587549ac493dc3648patchXY  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.11</frontend.version>
+    <frontend.version>v5.3.12</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(2105a7ad0b0dc4f2328c729e6779b152115ddcad}(sha(2105a7ad0b0dc4f2328c729e6779b152115ddcadnode_idEC_kwDOAe-hB9oAKDIxMDVhN2FkMGIwZGM0ZjIzMjhjNzI5ZTY3NzliMTUyMTE1ZGRjYWQcommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-07-27T14:21:35Zu	committer}(j`  Gaofei Zhaojb  ,15748980+dippindots@users.noreply.github.comjd  2023-08-10T19:59:29ZumessageUpdate migration docstree}(jX  (5d3c2adb3fad612c4d95f1de250b606b240afaafurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/5d3c2adb3fad612c4d95f1de250b606b240afaafujp  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/2105a7ad0b0dc4f2328c729e6779b152115ddcad
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujp  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2105a7ad0b0dc4f2328c729e6779b152115ddcadhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/2105a7ad0b0dc4f2328c729e6779b152115ddcadcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/2105a7ad0b0dc4f2328c729e6779b152115ddcad/commentsj^  }(login
pvannieropidJa jZ  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5jp  'https://api.github.com/users/pvannieropj|  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminujf  }(j  
dippindotsj  JtO jZ  MDQ6VXNlcjE1NzQ4OTgwj  4https://avatars.githubusercontent.com/u/15748980?v=4j  h5jp  'https://api.github.com/users/dippindotsj|  https://github.com/dippindotsj  1https://api.github.com/users/dippindots/followersj  >https://api.github.com/users/dippindots/following{/other_user}j  7https://api.github.com/users/dippindots/gists{/gist_id}j  >https://api.github.com/users/dippindots/starred{/owner}{/repo}     j  5https://api.github.com/users/dippindots/subscriptionsj  ,https://api.github.com/users/dippindots/orgsj  -https://api.github.com/users/dippindots/reposj  8https://api.github.com/users/dippindots/events{/privacy}j  7https://api.github.com/users/dippindots/received_eventsj  Userj  uparents]}(jX  (7fac9164aa6511cdb51e6b605212dc5418b39163jp  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7fac9164aa6511cdb51e6b605212dc5418b39163j|  Xhttps://github.com/cBioPortal/cbioportal/commit/7fac9164aa6511cdb51e6b605212dc5418b39163uastats}(totalK)	additionsK 	deletionsK	ufiles](}(jX  (b5177e87276e210fe706015283d83e8dc249f607filenamedocs/Migration-Guide.mdstatusmodifiedj  Kj  KchangesK'blob_urlphttps://github.com/cBioPortal/cbioportal/blob/2105a7ad0b0dc4f2328c729e6779b152115ddcad/docs%2FMigration-Guide.mdraw_urlohttps://github.com/cBioPortal/cbioportal/raw/2105a7ad0b0dc4f2328c729e6779b152115ddcad/docs%2FMigration-Guide.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FMigration-Guide.md?ref=2105a7ad0b0dc4f2328c729e6779b152115ddcadpatchX  @@ -1,22 +1,45 @@
 # Migration Guide
-This page describes various changes deployers will need to make as they deploy newer versions of the portal. 
+
+This page describes various changes deployers will need to make as they deploy newer versions of the portal. -
+
+## <v5.3.16 --> v5.3.17
+
+- Remove `db.host` and `db.portal_db_name` and `db.use_ssl` properties from the _portal.properties_ file or JVM
+  parameters. Update property `db.connection_string` to encode the hostname, port, database and other parameters
+  according to [Database Settings](portal.properties-Reference.md#Database-Settings) documentation and pass via
+  _portal.properties_ file or as JVM parameter.
 
 ## v4 -> v5
-- All fusion profiles are now required to be migrated to structural variant format. One can use this [migration tool](https://github.com/cBioPortal/datahub-study-curation-tools/tree/master/fusion-to-sv-converter) to migrate the fusion files.
-- All fusion files on [datahub](https://github.com/cBioPortal/datahub) were migrated to the structural variant format and their molecular profile ids were renamed from `{study_id}_fusion` to `{study_id}_structural_variants`. If you are using these datahub files one would need to re-import them.
-- Study view user setting will be outdated after migration, please follow `Clear Study View User settings` section in [Session Service Management](Session-Service-Management.md#Clear-Study-View-User-settings)
-- The new default set of transcripts for each gene has changed from `uniprot` to `mskcc`. See the [Mutation Data Annotation Section](./mutation-data-transcript-annotation.md) for more details. To keep the old set of default transcripts add the property `genomenexus.isoform_override_source=uniprot` to [the properties file](https://docs.cbioportal.org/deployment/customization/portal.properties-reference/#properties).
+
+- All fusion profiles are now required to be migrated to structural variant format. One can use
+  this [migration tool](https://github.com/cBioPortal/datahub-study-curation-tools/tree/master/fusion-to-sv-converter)
+  to migrate the fusion files.
+- All fusion files on [datahub](https://github.com/cBioPortal/datahub) were migrated to the structural variant format
+  and their molecular profile ids were renamed from `{study_id}_fusion` to `{study_id}_structural_variants`. If you are
+  using these datahub files one would need to re-import them.
+- Study view user setting will be outdated after migration, please follow `Clear Study View User settings` section
+  in [Session Service Management](Session-Service-Management.md#Clear-Study-View-User-settings)
+- The new default set of transcripts for each gene has changed from `uniprot` to `mskcc`. See
+  the [Mutation Data Annotation Section](./mutation-data-transcript-annotation.md) for more details. To keep the old set
+  of default transcripts add the property `genomenexus.isoform_override_source=uniprot`
+  to [the properties file](https://docs.cbioportal.org/deployment/customization/portal.properties-reference/#properties).
 
 See the [v5.0.0 release notes](https://github.com/cBioPortal/cbioportal/releases/tag/v5.0.0) for more details.
 
 ## v3 -> v4
+
 - Introduces `logback` package for logging. If you don't have any custom log4j.properties file, no changes are necessary
-- Cleans up several old databases ([PR](https://github.com/cBioPortal/cbioportal/pull/9360)). In theory the migration should be seamless, since the docker container detects an old database version and migrates it automatically.
+- Cleans up several old databases ([PR](https://github.com/cBioPortal/cbioportal/pull/9360)). In theory the migration
+  should be seamless, since the docker container detects an old database version and migrates it automatically.
 
 See the [v4.0.0 release notes](https://github.com/cBioPortal/cbioportal/releases/tag/v4.0.0) for more details.
 
 ## v2 -> v3
-- Session service is now required to be set up. You can't run it without session service. The recommended way to run cBioPortal is to use the Docker Compose instructions.
+
+- Session service is now required to be set up. You can't run it without session service. The recommended way to run
+  cBioPortal is to use the Docker Compose instructions.
 
 ## v1 -> v2
-- Changes cBioPortal to a Single Page App (SPA) written in React, Mobx and bootstrap that uses a REST API. It shouldn't change anything for a deployer.
+
+- Changes cBioPortal to a Single Page App (SPA) written in React, Mobx and bootstrap that uses a REST API. It shouldn't
+  change anything for a deployer.u}(jX  (4eafa623a893a469487dc5220c5f62c331598e5fj  <docs/deployment/customization/portal.properties-Reference.mdj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/2105a7ad0b0dc4f2328c729e6779b152115ddcad/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdj  https://github.com/cBioPortal/cbioportal/raw/2105a7ad0b0dc4f2328c729e6779b152115ddcad/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdj  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.md?ref=2105a7ad0b0dc4f2328c729e6779b152115ddcadj  X  @@ -22,7 +22,7 @@ For example:
 jdbc:mysql://localhost:3306/cbiodb?zeroDateTimeBehavior=convertToNull&useSSL=false
 ```
 
-:warning: The fields `db.host` and `db.portal_db_name` are deprecated. It is recommended to configure the database connection using
+:warning: The fields `db.host` and `db.portal_db_name` and `db.use_ssl` are deprecated. It is recommended to configure the database connection using
 the `db.connection_string` instead.
 
 `db.tomcat_resource_name` is required in order to work with the tomcat database connection pool and should have the default value jdbc/cbioportal in order to work correctly with the your WAR file.ueu(d07e617d801bc7f314e563d8f776f7dd217b5e8a}(sha(d07e617d801bc7f314e563d8f776f7dd217b5e8anode_idEC_kwDOAe-hB9oAKGQwN2U2MTdkODAxYmM3ZjMxNGU1NjNkOGY3NzZmN2RkMjE3YjVlOGEcommit}(author}(namehaynescdemailhaynescd@chop.edudate2023-05-03T15:31:10Zu	committer}(j  haynescdj  haynescd@chop.eduj  2023-05-24T19:37:37Zumessage>:sparkles: Add ability to set priority to -1 for clinical attrtree}(j  (dbb2f1ededd2896a1154ace58b3618d28e13c29eurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/dbb2f1ededd2896a1154ace58b3618d28e13c29euj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/d07e617d801bc7f314e563d8f776f7dd217b5e8a
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d07e617d801bc7f314e563d8f776f7dd217b5e8ahtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/d07e617d801bc7f314e563d8f776f7dd217b5e8acomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/d07e617d801bc7f314e563d8f776f7dd217b5e8a/commentsj  }(loginhaynescdidJ j  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5j  %https://api.github.com/users/haynescdj  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminuj  }(j  haynescdj   J j  MDQ6VXNlcjMzNjA4OTIwj  4https://avatars.githubusercontent.com/u/33608920?v=4j  h5j  %https://api.github.com/users/haynescdj  https://github.com/haynescdj  /https://api.github.com/users/haynescd/followersj	  <https://api.github.com/users/haynescd/following{/other_user}j  5https://api.github.com/users/haynescd/gists{/gist_id}j
  <https://api.github.com/users/haynescd/starred{/owner}{/repo}j  3https://api.github.com/users/haynescd/subscriptionsj  *https://api.github.com/users/haynescd/orgsj  +https://api.github.com/users/haynescd/reposj  6https://api.github.com/users/haynescd/events{/privacy}j  5https://api.github.com/users/haynescd/received_eventsj  Userj  uparents]}(j  (21947e1e6a1888bbcb03c306432e619c1a790559j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/21947e1e6a1888bbcb03c306432e619c1a790559j  Xhttps://github.com/cBioPortal/cbioportal/commit/21947e1e6a1888bbcb03c306432e619c1a790559uastats}(totalK	additionsK	deletionsKufiles]}(j  (097055f5c6d310ea104abb02f968968f3f68121bfilename.core/src/main/scripts/importer/validateData.pystatusmodifiedj5  Kj6  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/d07e617d801bc7f314e563d8f776f7dd217b5e8a/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.pyraw_urlhttps://github.com/cBioPortal/cbioportal/raw/d07e617d801bc7f314e563d8f776f7dd217b5e8a/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.pycontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.py?ref=d07e617d801bc7f314e563d8f776f7dd217b5e8apatchX6  @@ -2600,12 +2600,12 @@ def processTopLines(self, line_list):
                         invalid_values = True
                 elif self.METADATA_LINES[line_index] == 'priority':
                     try:
-                        if int(value) < 0:
+                        if int(value) < -1:
                             raise ValueError()
                     except ValueError:
                         self.logger.error(
                             'Priority definition should be an integer, and should be '
-                            'greater than or equal to zero',
+                            'greater than or equal to -1',
                             extra={'line_number': line_index + 1,
                                    'column_number': col_index + 1,
                                    'cause': value})uau(15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0}(sha(15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0node_idEC_kwDOAe-hB9oAKDE1Y2Y4Y2U0YzYxN2I4ZTk1OWVlOGZmM2MyMzEyZTdmYmE3ZWQ0YjAcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-06-16T14:00:28Zu	committer}(jR  GitHubjT  noreply@github.comjV  2023-06-16T14:00:28Zumessage\Merge pull request #10211 from BasLee/poc-paginated-clinical-table

Paginated clinical tabletree}(jJ  (ec0528a488e44f527daa8e27def20684ecfac1ccurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/ec0528a488e44f527daa8e27def20684ecfac1ccujb  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkjGr8CRBK7hj4Ov3rIwAAC0QIACHH6Kfw4y/NTqkgkRTKJY2g
8X60Zyj7520N94RQGl09EOTuxc7IhasSdc9TYb+pIEtHpndQz0+4FSj10j0g5XwF
t+TIb2eCzC0BfqPD3wvuLreaSNRlTOaHTzqPT22qU5rrt4ANov+coRzSJvtSsLLe
Lg2cqaXJwxeoySyVtsccywcoJVE+eX5CL09n3ha9k3gfuWz/D4Rb/y3COKZwyzit
FmJuWJyzJwLIj5lsTe8uX+F4HSF38sUxPOMIgc9ss/1GOvdKhbws8LoWdwD7Zfi2
NbymYHBsVukrg39qMeT6SSzYes1MCoNSRiil0/FZR47OKbM9tlvwfKu2ehL0cdY=
=Fi86
-----END PGP SIGNATURE-----
payloadXu  tree ec0528a488e44f527daa8e27def20684ecfac1cc
parent fede09ed2d1737ff366f3a15219ea1f14f678d1a
parent 654a5d60311fb89a34eccf5ddc4678cf8d9bad8c
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1686924028 -0400
committer GitHub <noreply@github.com> 1686924028 -0400

Merge pull request #10211 from BasLee/poc-paginated-clinical-table

Paginated clinical tableuujb  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0html_urlXhttps://github.com/cBioPortal/cbioportal/commit/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/commentsjP  }(login
dippindotsidJtO jL  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5jb  'https://api.github.com/users/dippindotsjp  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminujX  }(ju  web-flowjw  J/jL  MDQ6VXNlcjE5ODY0NDQ3jy  4https://avatars.githubusercontent.com/u/19864447?v=4j{  h5jb  %https://api.github.com/users/web-flowjp  https://github.com/web-flowj~  /https://api.github.com/users/web-flow/followersj  <https://api.github.com/users/web-flow/following{/other_user}j  5https://api.github.com/users/web-flow/gists{/gist_id}j  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j  3https://api.github.com/users/web-flow/subscriptionsj  *https://api.github.com/users/web-flow/orgsj  +https://api.github.com/users/web-flow/reposj  6https://api.github.com/users/web-flow/events{/privacy}j  5https://api.github.com/users/web-flow/received_eventsj  Userj  uparents](}(jJ  (fede09ed2d1737ff366f3a15219ea1f14f678d1ajb  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/fede09ed2d1737ff366f3a15219ea1f14f678d1ajp  Xhttps://github.com/cBioPortal/cbioportal/commit/fede09ed2d1737ff366f3a15219ea1f14f678d1au}(jJ  (654a5d60311fb89a34eccf5ddc4678cf8d9bad8cjb  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/654a5d60311fb89a34eccf5ddc4678cf8d9bad8cjp  Xhttps://github.com/cBioPortal/cbioportal/commit/654a5d60311fb89a34eccf5ddc4678cf8d9bad8cuestats}(totalK	additionsK	deletionsK:ufiles](}(jJ  (a1ed029ef223af2dede18066a4589d1d6c5cc628filenameDmodel/src/main/java/org/cbioportal/model/ClinicalDataCollection.javastatusmodifiedj  Kj  KchangesK	blob_urlhttps://github.com/cBioPortal/cbioportal/blob/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FClinicalDataCollection.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FClinicalDataCollection.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FClinicalDataCollection.java?ref=15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0patchX  @@ -5,9 +5,16 @@
 
 public class ClinicalDataCollection {
 
+    /**
+     * Paginated resource
+     */
     private List<ClinicalData> sampleClinicalData = new ArrayList<>();
-    private List<ClinicalData> patientClinicalData = new ArrayList<>();
 
+    /**
+     * Patient info associated with paginated samples
+     */
+    private List<ClinicalData> patientClinicalData = new ArrayList<>();
+    
     public List<ClinicalData> getSampleClinicalData() {
         return sampleClinicalData;
     }u}(jJ  (2ff7c09087f076874a8b964d260f8f340f4e79d7j  `persistence/persistence-api/src/main/java/org/cbioportal/persistence/ClinicalDataRepository.javaj  modifiedj  Kj  Kj  K
j  https://github.com/cBioPortal/cbioportal/blob/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FClinicalDataRepository.javaj  https://github.com/cBioPortal/cbioportal/raw/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FClinicalDataRepository.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FClinicalDataRepository.java?ref=15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0j  X  @@ -47,9 +47,13 @@ BaseMeta fetchMetaClinicalDataInStudy(String studyId, List<String> ids, List<Str
     List<ClinicalData> fetchClinicalData(List<String> studyIds, List<String> ids, List<String> attributeIds,
                                          String clinicalDataType, String projection);
 
-    List<ClinicalData> fetchSampleClinicalDataClinicalTable(List<String> studyIds, List<String> ids,
-                                                            Integer pageSize, Integer pageNumber, String searchTerm,
-                                                            String sortBy, String direction);
+    List<ClinicalData> fetchSampleClinicalTable(List<String> studyIds, List<String> ids,
+                                                Integer pageSize, Integer pageNumber, String searchTerm,
+                                                String sortBy, String direction);
+
+    @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
+    Integer fetchSampleClinicalTableCount(List<String> studyIds, List<String> ids, String searchTerm,
+                                          String sortBy, String direction);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
     BaseMeta fetchMetaClinicalData(List<String> studyIds, List<String> ids, List<String> attributeIds,u}(jJ  (1f4209deffbd08bf72a2d44f3a41ed8187320620j  hpersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/ClinicalDataMapper.javaj  modifiedj  Kj  Kj  K
j  https://github.com/cBioPortal/cbioportal/blob/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.javaj  https://github.com/cBioPortal/cbioportal/raw/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.java?ref=15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0j  X  @@ -18,9 +18,12 @@ List<ClinicalData> getPatientClinicalData(List<String> studyIds, List<String> pa
                                               String projection, Integer limit, Integer offset, String sortby,
                                               String direction);
 
-    List<ClinicalData> getSampleClinicalDataClinicalTable(List<String> studyIds, List<String> sampleIds, String projection, 
-                                                          Integer limit, Integer offset, String searchTerm,
-                                                          String sortBy, String direction);
+    List<ClinicalData> getSampleClinicalTable(List<String> studyIds, List<String> sampleIds, String projection,
+                                              Integer limit, Integer offset, String searchTerm,
+                                              String sortBy, String direction);
+
+    Integer getSampleClinicalTableCount(List<String> studyIds, List<String> sampleIds, String projection,
+                                        String searchTerm, String sortBy, String direction);
 
     BaseMeta getMetaPatientClinicalData(List<String> studyIds, List<String> patientIds, List<String> attributeIds);
 
@@ -33,5 +36,4 @@ List<ClinicalDataCount> fetchPatientClinicalDataCounts(List<String> studyIds, Li
     List<ClinicalData> getPatientClinicalDataDetailedToSample(List<String> studyIds, List<String> patientIds,
                                                               List<String> attributeIds, String projection, Integer limit,
                                                               Integer offset, String sortBy, String direction);
-
 }u}(jJ  (15c692f84bcb017c9f83f2c6fc3ff25ffccf7f51j  spersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/ClinicalDataMyBatisRepository.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMyBatisRepository.javaj  https://github.com/cBioPortal/cbioportal/raw/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMyBatisRepository.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMyBatisRepository.java?ref=15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0j  X  @@ -138,17 +138,24 @@ public List<ClinicalData> fetchClinicalData(List<String> studyIds, List<String>
     }
 
     @Override
-    public List<ClinicalData> fetchSampleClinicalDataClinicalTable(List<String> studyIds, List<String> ids,
-                                                                   Integer pageSize, Integer pageNumber, String searchTerm,
-                                                                   String sortBy, String direction) {
+    public List<ClinicalData> fetchSampleClinicalTable(List<String> studyIds, List<String> ids,
+                                                       Integer pageSize, Integer pageNumber, String searchTerm,
+                                                       String sortBy, String direction) {
         if (ids.isEmpty()) {
             return new ArrayList<>();
         }
         int offset = offsetCalculator.calculate(pageSize, pageNumber);
-        return clinicalDataMapper.getSampleClinicalDataClinicalTable(studyIds, ids,"SUMMARY", pageSize,
+        return clinicalDataMapper.getSampleClinicalTable(studyIds, ids,"SUMMARY", pageSize,
             offset, searchTerm, sortBy, direction);
     }
 
+    @Override
+    public Integer fetchSampleClinicalTableCount(List<String> studyIds, List<String> sampleIds,
+                                                 String searchTerm, String sortBy, String direction) {
+        return clinicalDataMapper.getSampleClinicalTableCount(studyIds, sampleIds,"SUMMARY", 
+            searchTerm, sortBy, direction);
+    }
+
     @Override
     public BaseMeta fetchMetaClinicalData(List<String> studyIds, List<String> ids, List<String> attributeIds,
                                           String clinicalDataType) {u}(jJ  (29e6cd536c59c8a5a75ed8b29ab4ec8f3edde60fj  lpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatis/ClinicalDataMapper.xmlj  modifiedj  K+j  Kj  K6j  https://github.com/cBioPortal/cbioportal/blob/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.xmlj  https://github.com/cBioPortal/cbioportal/raw/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.xmlj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.xml?ref=15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0j  X  @@ -47,6 +47,11 @@
         INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
     </sql>
 
+    <sql id="fromSampleAndClinicalPatient">
+        <include refid="fromSample"/>
+        LEFT JOIN clinical_patient ON clinical_patient.INTERNAL_ID = patient.INTERNAL_ID
+    </sql>
+
     <sql id="fromPatient">
         FROM clinical_patient
         INNER JOIN patient ON clinical_patient.INTERNAL_ID = patient.INTERNAL_ID
@@ -221,7 +226,7 @@
         GROUP BY clinical_patient.ATTR_ID, clinical_patient.ATTR_VALUE
     </select>
 
-    <select id="getSampleClinicalDataClinicalTable" resultType="org.cbioportal.model.ClinicalData">
+    <select id="getSampleClinicalTable" resultType="org.cbioportal.model.ClinicalData">
         SELECT
         <include refid="selectSample">
             <property name="prefix" value=""/>
@@ -230,28 +235,55 @@
         <include refid="whereSampleSearchAndPagination"/>
     </select>
 
+    <select id="getSampleClinicalTableCount" resultType="Integer">
+        SELECT count(DISTINCT clinical_sample.INTERNAL_ID)
+        <include refid="fromSample"/>
+        <include refid="whereSampleSearchAndPagination"/>
+    </select>
+    
     <sql id="whereSampleSearchAndPagination">
-        INNER JOIN
-        (SELECT DISTINCT clinical_sample.INTERNAL_ID
+        INNER JOIN (
+            SELECT DISTINCT clinical_sample.INTERNAL_ID
             <if test="_parameter.containsKey('sortBy') and sortBy != null">
-                , clinical_sample.ATTR_ID, clinical_sample.ATTR_VALUE
+                <if test="sortBy == 'sampleId'">
+                  , sample.STABLE_ID AS SORT_BY
+                </if>
+                <if test="sortBy == 'patientId'">
+                  , patient.STABLE_ID AS SORT_BY
+                </if>
+                <!-- else: -->
+                <if test="sortBy != 'sampleId' and sortBy != 'patientId'">
+                  <!-- Mark samples without the sort attribute as NULL: -->
+                  , CASE 
+                        WHEN clinical_sample.ATTR_ID = #{sortBy} THEN clinical_sample.ATTR_VALUE 
+                        WHEN clinical_patient.ATTR_ID = #{sortBy} THEN clinical_patient.ATTR_VALUE 
+                        ELSE NULL 
+                    END AS SORT_BY
+                </if>
             </if>
-            <include refid="fromSample"/>
+            <include refid="fromSampleAndClinicalPatient"/>
             <include refid="whereSample"/>
             <if test="_parameter.containsKey('searchTerm') and searchTerm != null and not searchTerm.isBlank()">
                 AND
-                clinical_sample.ATTR_VALUE LIKE CONCAT('%','${searchTerm}', '%')
+                clinical_sample.ATTR_VALUE LIKE CONCAT('%', #{searchTerm}, '%')
             </if>
             <if test="_parameter.containsKey('sortBy') and sortBy != null">
-                AND 
-                clinical_sample.ATTR_ID = '${sortBy}'
-                ORDER BY clinical_sample.ATTR_VALUE ${direction}
+                <!-- Put 'NULL samples' last: -->
+                <choose>
+                    <when test="_databaseId == 'mysql'">
+                        ORDER BY ISNULL(SORT_BY), SORT_BY ${direction}
+                    </when>
+                    <when test="_databaseId == 'h2'">
+                        ORDER BY SORT_BY ${direction} NULLS LAST
+                    </when>
+                </choose>
             </if>
+            
             <if test="_parameter.containsKey('limit') and limit != null and limit != 0">
                 LIMIT #{limit} OFFSET #{offset}
             </if>
-        ) as sample_id_subquery
-        ON clinical_sample.INTERNAL_ID = sample_id_subquery.INTERNAL_ID
+        ) AS sample_id_subquery
+          ON clinical_sample.INTERNAL_ID = sample_id_subquery.INTERNAL_ID
     </sql>
     
 </mapper>u}(jJ  (406e830c8fb8db33c04c693951f4c689ad814cdbj  wpersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/ClinicalDataMyBatisRepositoryTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMyBatisRepositoryTest.javaj  https://github.com/cBioPortal/cbioportal/raw/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMyBatisRepositoryTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMyBatisRepositoryTest.java?ref=15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0j  X  @@ -354,9 +354,9 @@ public void fetchClinicalDataNullAttributeSummaryProjection() {
     @Test
     public void fetchClinicalSampleDataClinicalTabPagingSuccess() {
 
-        List<ClinicalData> resultFirstPage = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(studyIds,
+        List<ClinicalData> resultFirstPage = clinicalDataMyBatisRepository.fetchSampleClinicalTable(studyIds,
             sampleIds, 1, 0, noSearch, noSort, "DESC");
-        List<ClinicalData> resultSecondPage = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(studyIds,
+        List<ClinicalData> resultSecondPage = clinicalDataMyBatisRepository.fetchSampleClinicalTable(studyIds,
             sampleIds, 1, 1, noSearch, noSort, "DESC");
 
         Assert.assertEquals(4, resultFirstPage.size());
@@ -380,7 +380,7 @@ public void fetchClinicalSampleDataClinicalTabPagingSuccess() {
     public void fetchClinicalSampleDataClinicalTablePagingHandleNoneExistingPage() {
 
         // There are only two patients in total. The second page (index 1) with pageSize 2 does not refer to any records.
-        List<ClinicalData> resultNonExistingPage = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(
+        List<ClinicalData> resultNonExistingPage = clinicalDataMyBatisRepository.fetchSampleClinicalTable(
             studyIds, sampleIds, 2, 1, noSearch, noSort, "DESC");
 
         Assert.assertEquals(0, resultNonExistingPage.size());
@@ -389,15 +389,15 @@ public void fetchClinicalSampleDataClinicalTablePagingHandleNoneExistingPage() {
     @Test
     public void fetchClinicalSampleDataClinicalTabSearchTermSuccess() {
 
-        List<ClinicalData> resultSample1 = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(
+        List<ClinicalData> resultSample1 = clinicalDataMyBatisRepository.fetchSampleClinicalTable(
             studyIds, sampleIds, noPaging, noPaging, "5C631CE8", noSort, "DESC");
             
         Assert.assertEquals(4, resultSample1.size());
         List<String> observedSampleIds = resultSample1.stream().map(s -> s.getSampleId()).distinct().collect(Collectors.toList());
         Assert.assertEquals(1, observedSampleIds.size());
         Assert.assertEquals("TCGA-A1-A0SB-01", observedSampleIds.get(0));
 
-        List<ClinicalData> resultSample2 = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(
+        List<ClinicalData> resultSample2 = clinicalDataMyBatisRepository.fetchSampleClinicalTable(
             studyIds, sampleIds, noPaging, noPaging, "F3408556-9259", noSort, "DESC");
 
         Assert.assertEquals(4, resultSample2.size());
@@ -409,7 +409,7 @@ public void fetchClinicalSampleDataClinicalTabSearchTermSuccess() {
     @Test
     public void fetchClinicalSampleDataEClinicalTabEmptyStringSearchTerm() {
 
-        List<ClinicalData> result = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(
+        List<ClinicalData> result = clinicalDataMyBatisRepository.fetchSampleClinicalTable(
             studyIds, sampleIds, noPaging, noPaging, "", noSort, "DESC");
             
         Assert.assertEquals(8, result.size());
@@ -418,9 +418,9 @@ public void fetchClinicalSampleDataEClinicalTabEmptyStringSearchTerm() {
     @Test
     public void fetchClinicalSampleDataClinicalTabSortSuccess() {
 
-        List<ClinicalData> resultSortAsc = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(studyIds,
+        List<ClinicalData> resultSortAsc = clinicalDataMyBatisRepository.fetchSampleClinicalTable(studyIds,
             sampleIds, 1, 0, noSearch, "SAMPLE_TYPE", "ASC");
-        List<ClinicalData> resultSortDesc = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(studyIds,
+        List<ClinicalData> resultSortDesc = clinicalDataMyBatisRepository.fetchSampleClinicalTable(studyIds,
             sampleIds, 1, 0, noSearch, "SAMPLE_TYPE", "DESC");
 
         Assert.assertEquals(4, resultSortAsc.size());u}(jJ  (972913ce2e4cf08e4584eb835de15c159b3fee6ej  Eservice/src/main/java/org/cbioportal/service/ClinicalDataService.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FClinicalDataService.javaj  https://github.com/cBioPortal/cbioportal/raw/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FClinicalDataService.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FClinicalDataService.java?ref=15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0j  X  @@ -52,6 +52,9 @@ BaseMeta fetchMetaClinicalData(List<String> studyIds, List<String> ids, List<Str
     List<ClinicalData> getPatientClinicalDataDetailedToSample(List<String> studyIds, List<String> patientIds,
             List<String> attributeIds);
 
-    List<ClinicalData> fetchSampleClinicalDataClinicalTable(List<String> studyIds, List<String> sampleIds, Integer pageSize,
-                                                            Integer pageNumber, String searchTerm, String sortBy, String direction);
+    List<ClinicalData> fetchSampleClinicalTable(List<String> studyIds, List<String> sampleIds, Integer pageSize,
+                                                Integer pageNumber, String searchTerm, String sortBy, String direction);
+    
+    Integer fetchSampleClinicalTableCount(List<String> studyIds, List<String> sampleIds, String searchTerm,
+                                          String sortBy, String direction);
 }u}(jJ  (a4d41a8f3438310a4dcd64a44f747bcc9ea7885ej  Nservice/src/main/java/org/cbioportal/service/impl/ClinicalDataServiceImpl.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FClinicalDataServiceImpl.javaj  https://github.com/cBioPortal/cbioportal/raw/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FClinicalDataServiceImpl.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FClinicalDataServiceImpl.java?ref=15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0j  X  @@ -1,6 +1,5 @@
 package org.cbioportal.service.impl;
 
-import org.apache.commons.collections4.list.UnmodifiableList;
 import org.cbioportal.model.*;
 import org.cbioportal.model.meta.BaseMeta;
 import org.cbioportal.persistence.ClinicalDataRepository;
@@ -228,10 +227,17 @@ public List<ClinicalData> getPatientClinicalDataDetailedToSample(List<String> st
     }
 
     @Override
-    public List<ClinicalData> fetchSampleClinicalDataClinicalTable(List<String> studyIds, List<String> sampleIds, Integer pageSize,
-                                                                   Integer pageNumber, String searchTerm, String sortBy,
-                                                                   String direction) {
-        return clinicalDataRepository.fetchSampleClinicalDataClinicalTable(studyIds, sampleIds, pageSize, pageNumber, searchTerm,
+    public List<ClinicalData> fetchSampleClinicalTable(List<String> studyIds, List<String> sampleIds, Integer pageSize,
+                                                       Integer pageNumber, String searchTerm, String sortBy,
+                                                       String direction) {
+        return clinicalDataRepository.fetchSampleClinicalTable(studyIds, sampleIds, pageSize, pageNumber, searchTerm,
                                                                             sortBy, direction);
     }
+
+    @Override
+    public Integer fetchSampleClinicalTableCount(List<String> studyIds, List<String> sampleIds,
+                                                 String searchTerm, String sortBy, String direction) {
+        return clinicalDataRepository.fetchSampleClinicalTableCount(studyIds, sampleIds, searchTerm, 
+            sortBy, direction);
+    }
 }u}(jJ  (3216dd5054aba561d153e938c07daa1cc15ebe21j  =web/src/main/java/org/cbioportal/web/StudyViewController.javaj  modifiedj  K#j  Kj  K5j  https://github.com/cBioPortal/cbioportal/blob/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj  https://github.com/cBioPortal/cbioportal/raw/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0j  X&  @@ -13,16 +13,14 @@
 import org.cbioportal.service.*;
 import org.cbioportal.service.exception.StudyNotFoundException;
 import org.cbioportal.service.util.ClinicalAttributeUtil;
-import org.cbioportal.service.util.CustomDataSession;
 import org.cbioportal.web.config.annotation.InternalApi;
 import org.cbioportal.model.AlterationFilter;
 import org.cbioportal.web.parameter.*;
-import org.cbioportal.web.parameter.sort.ClinicalDataSortBy;
-import org.cbioportal.web.studyview.CustomDataController;
 import org.cbioportal.web.util.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.context.ApplicationContext;
+import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
@@ -887,39 +885,56 @@ public ResponseEntity<List<GenericAssayDataBin>> fetchGenericAssayDataBinCounts(
     @ApiOperation("Fetch clinical data for the Clinical Tab of Study View")
     public ResponseEntity<ClinicalDataCollection> fetchClinicalDataClinicalTable(
         @ApiParam(required = true, value = "Study view filter")
-        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter,
+        @Valid @RequestBody(required = false) 
+            StudyViewFilter studyViewFilter,
         @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
-        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @RequestAttribute(required = false, value = "involvedCancerStudies") 
+            Collection<String> involvedCancerStudies,
         @ApiIgnore // 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,
+        @Valid @RequestAttribute(required = false, value = "interceptedStudyViewFilter") 
+            StudyViewFilter interceptedStudyViewFilter,
         @ApiParam("Page size of the result list")
         @Max(CLINICAL_TAB_MAX_PAGE_SIZE)
         @Min(PagingConstants.NO_PAGING_PAGE_SIZE)
-        @RequestParam(defaultValue = PagingConstants.DEFAULT_NO_PAGING_PAGE_SIZE) Integer pageSize,
+        @RequestParam(defaultValue = PagingConstants.DEFAULT_NO_PAGING_PAGE_SIZE) 
+            Integer pageSize,
         @ApiParam("Page number of the result list")
         @Min(PagingConstants.MIN_PAGE_NUMBER)
-        @RequestParam(defaultValue = PagingConstants.DEFAULT_PAGE_NUMBER) Integer pageNumber,
+        @RequestParam(defaultValue = PagingConstants.DEFAULT_PAGE_NUMBER) 
+            Integer pageNumber,
         @ApiParam("Search term to filter sample rows. Samples are returned " +
             "with a partial match to the search term for any sample clinical attribute.")
-        @RequestParam(defaultValue = "") String searchTerm,
-        @ApiParam("Name of the property that the result list is sorted by")
-        @RequestParam(required = false) ClinicalDataSortBy sortBy,
+        @RequestParam(defaultValue = "") 
+            String searchTerm,
+        @ApiParam(value = "sampleId, patientId, or the ATTR_ID to sorted by")
+        @RequestParam(required = false) 
+            // TODO: Can we narrow down this string to a specific enum? 
+            String sortBy,
         @ApiParam("Direction of the sort")
-        @RequestParam(defaultValue = "ASC") Direction direction) {
-
+        @RequestParam(defaultValue = "ASC") 
+            Direction direction
+    ) {
         List<String> sampleStudyIds = new ArrayList<>();
         List<String> sampleIds = new ArrayList<>();
         List<SampleIdentifier> filteredSampleIdentifiers = studyViewFilterApplier.apply(interceptedStudyViewFilter);
         studyViewFilterUtil.extractStudyAndSampleIds(filteredSampleIdentifiers, sampleStudyIds, sampleIds);
         
-        List<ClinicalData> sampleClinicalData = clinicalDataService.fetchSampleClinicalDataClinicalTable(
+        List<ClinicalData> sampleClinicalData = clinicalDataService.fetchSampleClinicalTable(
             sampleStudyIds,
             sampleIds,
             pageSize,
             pageNumber,
             searchTerm,
-            sortBy != null ? sortBy.getOriginalValue() : null,
-            direction.name());
+            sortBy,
+            direction.name()
+        );
+        Integer total = clinicalDataService.fetchSampleClinicalTableCount(
+            sampleStudyIds,
+            sampleIds,
+            searchTerm,
+            sortBy,
+            direction.name()
+        );
             
         // Return empty when possible.
         if (sampleClinicalData.isEmpty()) {
@@ -942,8 +957,10 @@ public ResponseEntity<ClinicalDataCollection> fetchClinicalDataClinicalTable(
         final ClinicalDataCollection clinicalDataCollection = new ClinicalDataCollection();
         clinicalDataCollection.setSampleClinicalData(sampleClinicalData);
         clinicalDataCollection.setPatientClinicalData(patientClinicalData);
-
-        return new ResponseEntity<>(clinicalDataCollection, HttpStatus.OK);
+        
+        HttpHeaders responseHeaders = new HttpHeaders();
+        responseHeaders.add(HeaderKeyConstants.TOTAL_COUNT, total.toString());
+        return new ResponseEntity<>(clinicalDataCollection, responseHeaders, HttpStatus.OK);
     }
 
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")u}(jJ  (027b928a95166459b3173677858e968b15d0d769j  Aweb/src/test/java/org/cbioportal/web/StudyViewControllerTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj  https://github.com/cBioPortal/cbioportal/raw/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.java?ref=15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0j  X  @@ -765,9 +765,8 @@ public void fetchGenericAssayDataCounts() throws Exception {
 
     @Test
     public void fetchClinicalDataClinicalTable() throws Exception {
-
         // For this sake of this test the sample clinical data and patient clinical data are identical.
-        when(clinicalDataService.fetchSampleClinicalDataClinicalTable(anyList(), anyList(),
+        when(clinicalDataService.fetchSampleClinicalTable(anyList(), anyList(),
             anyInt(), anyInt(), anyString(), any(), anyString())).thenReturn(clinicalData);
         when(clinicalDataService.fetchClinicalData(anyList(), anyList(),
             any(), anyString(), anyString())).thenReturn(clinicalData);ueu(0c6fb2a18c2d848e8a95b85cd7e03964d0e31fbc}(sha(0c6fb2a18c2d848e8a95b85cd7e03964d0e31fbcnode_idEC_kwDOAe-hB9oAKDBjNmZiMmExOGMyZDg0OGU4YTk1Yjg1Y2Q3ZTAzOTY0ZDBlMzFmYmMcommit}(author}(namesbabyanushaemailsatravab@mskcc.orgdate2023-08-18T19:26:05Zu	committer}(j  sbabyanushaj  satravab@mskcc.orgj  2023-08-18T19:26:05ZumessageRemoved methylation updatetree}(j
  (e0e691b9d36c612a0b87727e6a268c90d8aafb35urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/e0e691b9d36c612a0b87727e6a268c90d8aafb35uj%  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/0c6fb2a18c2d848e8a95b85cd7e03964d0e31fbc
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj%  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/0c6fb2a18c2d848e8a95b85cd7e03964d0e31fbchtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/0c6fb2a18c2d848e8a95b85cd7e03964d0e31fbccomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/0c6fb2a18c2d848e8a95b85cd7e03964d0e31fbc/commentsj  }(loginsbabyanushaidJ`_j  MDQ6VXNlcjYxNDMxNjQ4
avatar_url4https://avatars.githubusercontent.com/u/61431648?v=4gravatar_idh5j%  (https://api.github.com/users/sbabyanushaj1  https://github.com/sbabyanusha
followers_url2https://api.github.com/users/sbabyanusha/followers
following_url?https://api.github.com/users/sbabyanusha/following{/other_user}	gists_url8https://api.github.com/users/sbabyanusha/gists{/gist_id}starred_url?https://api.github.com/users/sbabyanusha/starred{/owner}{/repo}subscriptions_url6https://api.github.com/users/sbabyanusha/subscriptionsorganizations_url-https://api.github.com/users/sbabyanusha/orgs	repos_url.https://api.github.com/users/sbabyanusha/repos
events_url9https://api.github.com/users/sbabyanusha/events{/privacy}received_events_url8https://api.github.com/users/sbabyanusha/received_eventstypeUser
site_adminuj  }(j6  sbabyanushaj8  J`_j  MDQ6VXNlcjYxNDMxNjQ4j:  4https://avatars.githubusercontent.com/u/61431648?v=4j<  h5j%  (https://api.github.com/users/sbabyanushaj1  https://github.com/sbabyanushaj?  2https://api.github.com/users/sbabyanusha/followersjA  ?https://api.github.com/users/sbabyanusha/following{/other_user}jC  8https://api.github.com/users/sbabyanusha/gists{/gist_id}jE  ?https://api.github.com/users/sbabyanusha/starred{/owner}{/repo}jG  6https://api.github.com/users/sbabyanusha/subscriptionsjI  -https://api.github.com/users/sbabyanusha/orgsjK  .https://api.github.com/users/sbabyanusha/reposjM  9https://api.github.com/users/sbabyanusha/events{/privacy}jO  8https://api.github.com/users/sbabyanusha/received_eventsjQ  UserjS  uparents]}(j
  (7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj%  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cdj1  Xhttps://github.com/cBioPortal/cbioportal/commit/7ab62d6bf822e75ccc86cfb670f62189b8eaf8cduastats}(totalK	additionsK	deletionsKufiles]}(j
  (b69ddaec5fd5befa6fd4ad355fd4b6e699267da6filenamedocs/News.mdstatusmodifiedjm  Kjn  KchangesKblob_urlehttps://github.com/cBioPortal/cbioportal/blob/0c6fb2a18c2d848e8a95b85cd7e03964d0e31fbc/docs%2FNews.mdraw_urldhttps://github.com/cBioPortal/cbioportal/raw/0c6fb2a18c2d848e8a95b85cd7e03964d0e31fbc/docs%2FNews.mdcontents_urlwhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FNews.md?ref=0c6fb2a18c2d848e8a95b85cd7e03964d0e31fbcpatchX  @@ -1,4 +1,4 @@
-## Aug 18, 2023
+## Aug 21, 2023
 *   **Added data** consisting of 4,488 samples from 7 studies:
     * [Lung Adenocarcinoma Met Organotropism (MSK, Cancer Cell 2023)](https://www.cbioportal.org/study/summary?id=luad_mskcc_2023_met_organotropism) *2653 samples*
     * [Acute Myeloid Leukemia (OHSU, Cancer Cell 2022)](https://www.cbioportal.org/study/summary?id=aml_ohsu_2022) *942 samples*
@@ -12,12 +12,8 @@
 
 * **Data Improvements**
    
-   * Methylation profile 450K is added to all 32 TCGA Pan-Can studies, in generic assay format. Data source: [GDC](https://gdc.cancer.gov/node/977). 
-<img width="973" alt="Screen Shot 2023-08-17 at 5 50 25 PM" src="https://github.com/cBioPortal/datahub/assets/61431648/7c8a53bd-9696-4e10-a49c-ac206ad9f263">
-
-    
    * Genetic Ancestry data is added to all 32 TCGA Pan-Can studies, in generic assay format. Data source: [GDC](https://gdc.cancer.gov/about-data/publications/CCG-AIM-2020). 
-<img width="855" alt="Screen Shot 2023-08-17 at 5 49 21 PM" src="https://github.com/cBioPortal/datahub/assets/61431648/e23df5d3-483a-4ed7-baab-198352bb724e">
+<img width="1191" alt="Screen Shot 2023-08-18 at 3 24 21 PM" src="https://github.com/cBioPortal/datahub/assets/61431648/9c026fdd-df32-4277-82a0-ef5486af2aa1">
 
 
 ## Aug 1, 2023uau(418c2699ce6db76b04b702f9f96d2727e990291b}(sha(418c2699ce6db76b04b702f9f96d2727e990291bnode_idEC_kwDOAe-hB9oAKDQxOGMyNjk5Y2U2ZGI3NmIwNGI3MDJmOWY5NmQyNzI3ZTk5MDI5MWIcommit}(author}(name
Onur Sumeremails.onur.sumer@gmail.comdate2023-06-28T22:08:07Zu	committer}(j  
Onur Sumerj  s.onur.sumer@gmail.comj  2023-06-29T21:04:58Zumessage#add tests for clinical data filterstree}(j  (b79b39c5b128b23be8b5395bb61041d374bc7e70urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/b79b39c5b128b23be8b5395bb61041d374bc7e70uj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/418c2699ce6db76b04b702f9f96d2727e990291b
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/418c2699ce6db76b04b702f9f96d2727e990291bhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/418c2699ce6db76b04b702f9f96d2727e990291bcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/418c2699ce6db76b04b702f9f96d2727e990291b/commentsj  }(login	onursumeridJ6 j  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5j  &https://api.github.com/users/onursumerj  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminuj  }(j  	onursumerj  J6 j  MDQ6VXNlcjM2MDQxOTg=j  3https://avatars.githubusercontent.com/u/3604198?v=4j  h5j  &https://api.github.com/users/onursumerj  https://github.com/onursumerj  0https://api.github.com/users/onursumer/followersj  =https://api.github.com/users/onursumer/following{/other_user}j  6https://api.github.com/users/onursumer/gists{/gist_id}j  =https://api.github.com/users/onursumer/starred{/owner}{/repo}j  4https://api.github.com/users/onursumer/subscriptionsj  +https://api.github.com/users/onursumer/orgsj  ,https://api.github.com/users/onursumer/reposj  7https://api.github.com/users/onursumer/events{/privacy}j  6https://api.github.com/users/onursumer/received_eventsj  Userj  uparents]}(j  (047cb2640b5cde4cd78944dac3eee9fe735d1ab9j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/047cb2640b5cde4cd78944dac3eee9fe735d1ab9j  Xhttps://github.com/cBioPortal/cbioportal/commit/047cb2640b5cde4cd78944dac3eee9fe735d1ab9uastats}(totalKg	additionsKX	deletionsKufiles](}(j  (49d487a128ead9451607aeba6c27687dc8af03fcfilenametpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmlstatusmodifiedj  Kj  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/418c2699ce6db76b04b702f9f96d2727e990291b/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/418c2699ce6db76b04b702f9f96d2727e990291b/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=418c2699ce6db76b04b702f9f96d2727e990291bpatchXH  @@ -122,8 +122,7 @@
                             </if>
                         </trim>
                     </foreach>
-                </foreach>
-                )
+                </foreach>                
             </if>
             <!-- ... extend for other elements of the StudyViewFilter object -->
         </trim>u}(j  (b8862780fccd750d01e4e384e9ec7b82d621d6c2j  persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepositoryTest.javaj  modifiedj  KDj  K
j  KQj  https://github.com/cBioPortal/cbioportal/blob/418c2699ce6db76b04b702f9f96d2727e990291b/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaj  https://github.com/cBioPortal/cbioportal/raw/418c2699ce6db76b04b702f9f96d2727e990291b/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.java?ref=418c2699ce6db76b04b702f9f96d2727e990291bj  X  @@ -2,6 +2,8 @@
 
 import org.cbioportal.model.AlterationCountByGene;
 import org.cbioportal.model.Sample;
+import org.cbioportal.webparam.ClinicalDataFilter;
+import org.cbioportal.webparam.DataFilterValue;
 import org.cbioportal.webparam.StudyViewFilter;
 import org.junit.Assert;
 import org.junit.Test;
@@ -11,8 +13,10 @@
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
-import java.util.ArrayList;
-import java.util.List;
+import java.math.BigDecimal;
+import java.util.*;
+import java.util.function.Function;
+import java.util.stream.Collectors;
 
 @RunWith(SpringJUnit4ClassRunner.class)
 @ContextConfiguration("/testContextDatabaseClickhouse.xml")
@@ -24,26 +28,77 @@ public class StudyViewMyBatisRepositoryTest {
 
     @Test
     public void getFilteredSamples() {
-        StudyViewFilter studyViewFilter = new StudyViewFilter();
-
-        List<String> studyIds = new ArrayList<>();
-        studyIds.add("msk_ch_2020");
-        studyViewFilter.setStudyIds(studyIds);
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(new String[]{"msk_ch_2020", "msk_impact_2017"}, null);
         
+        // test total number of samples
         List<Sample> samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter);
-        Assert.assertEquals(3, samples.size());
+        Assert.assertEquals(11, samples.size());
+        
+        // test sample numerical clinical attributes
+        studyViewFilter = generateStudyViewFilter(
+            new String[]{"msk_impact_2017"},
+            Collections.singletonList(
+                generateNumericalClinicalDataFilter("TUMOR_PURITY", new String[]{"20-35"})
+            )
+        );
+
+        samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter);
+        Assert.assertEquals(2, samples.size());
     }
 
     @Test
     public void getMutatedGenes() {
-        StudyViewFilter studyViewFilter = new StudyViewFilter();
-
-        List<String> studyIds = new ArrayList<>();
-        studyIds.add("msk_ch_2020");
-        studyViewFilter.setStudyIds(studyIds);
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(new String[]{"msk_ch_2020"}, null);
 
         List<AlterationCountByGene> mutations = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter);
         Assert.assertEquals(2, mutations.size());
     }
 
+    
+    private StudyViewFilter generateStudyViewFilter(
+        String[] studyIds,
+        List<ClinicalDataFilter> clinicalDataFilters
+    ) {
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(studyIds));
+        studyViewFilter.setClinicalDataFilters(clinicalDataFilters);
+        
+        return studyViewFilter;
+    }
+    
+    private ClinicalDataFilter generateCategoricalClinicalDataFilter(String attributeId, String[] values) {
+        return generateClinicalDataFilter(attributeId, values, mapCategoricalValues);
+    }
+
+    private ClinicalDataFilter generateNumericalClinicalDataFilter(String attributeId, String[] values) {
+        return generateClinicalDataFilter(attributeId, values, mapNumericalValues);
+    }
+
+    private ClinicalDataFilter generateClinicalDataFilter(String attributeId, String[] values, Function<String, DataFilterValue> mapper) {
+        ClinicalDataFilter clinicalDataFilter = new ClinicalDataFilter();
+        List<DataFilterValue> dataFilterValues = Arrays.stream(values).map(mapper).collect(Collectors.toList());
+
+        clinicalDataFilter.setValues(dataFilterValues);
+        clinicalDataFilter.setAttributeId(attributeId);
+
+        return clinicalDataFilter;
+    }
+    
+    private final Function<String, DataFilterValue> mapCategoricalValues = v -> {
+        DataFilterValue dataFilterValue = new DataFilterValue();
+        dataFilterValue.setValue(v);
+        return dataFilterValue;
+    };
+    
+    private final Function<String, DataFilterValue> mapNumericalValues = v -> {
+        DataFilterValue dataFilterValue = new DataFilterValue();
+
+        String[] parts = v.split("-");
+        long start = Long.parseLong(parts[0]);
+        long end = parts.length > 1 ? Long.parseLong(parts[1]) : start;
+        dataFilterValue.setStart(BigDecimal.valueOf(start));
+        dataFilterValue.setEnd(BigDecimal.valueOf(end));
+        
+        return dataFilterValue;
+    };
 }
\ No newline at end of fileu}(j  (f5f5add90d24e823c16653d17e6d1c8358bbc722j  Hpersistence/persistence-mybatis/src/test/resources/clickhouseTestSql.sqlj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/418c2699ce6db76b04b702f9f96d2727e990291b/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseTestSql.sqlj  https://github.com/cBioPortal/cbioportal/raw/418c2699ce6db76b04b702f9f96d2727e990291b/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseTestSql.sqlj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseTestSql.sql?ref=418c2699ce6db76b04b702f9f96d2727e990291bj  X  @@ -8,9 +8,28 @@ INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_nam
 INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000023', 'TIME_FROM_DX_TO_SEQ', 245, 'msk_ch_2020');
 INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000023', 'TIME_TO_BLOOD_DRAW_FROM_TX', 166, 'msk_ch_2020');
 
+INSERT INTO sample_clinical_attribute_numeric (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_impact_2017_P-0012622', 'msk_impact_2017_P-0000004-T01-IM3', 'TUMOR_PURITY', 50, 'msk_impact_2017');
+INSERT INTO sample_clinical_attribute_numeric (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_impact_2017_P-0012622', 'msk_impact_2017_P-0000015-T01-IM3', 'TUMOR_PURITY', 40, 'msk_impact_2017');
+INSERT INTO sample_clinical_attribute_numeric (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_impact_2017_P-0012622', 'msk_impact_2017_P-0000023-T01-IM3', 'TUMOR_PURITY', 30, 'msk_impact_2017');
+INSERT INTO sample_clinical_attribute_numeric (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_impact_2017_P-0012622', 'msk_impact_2017_P-0000024-T01-IM3', 'TUMOR_PURITY', 40, 'msk_impact_2017');
+INSERT INTO sample_clinical_attribute_numeric (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_impact_2017_P-0012622', 'msk_impact_2017_P-0000025-T02-IM5', 'TUMOR_PURITY', 30, 'msk_impact_2017');
+INSERT INTO sample_clinical_attribute_numeric (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_impact_2017_P-0012622', 'msk_impact_2017_P-0000026-T01-IM3', 'TUMOR_PURITY', 10, 'msk_impact_2017');
+INSERT INTO sample_clinical_attribute_numeric (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_impact_2017_P-0012622', 'msk_impact_2017_P-0000030-T01-IM3', 'TUMOR_PURITY', 40, 'msk_impact_2017');
+INSERT INTO sample_clinical_attribute_numeric (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_impact_2017_P-0012622', 'msk_impact_2017_P-0000034-T01-IM3', 'TUMOR_PURITY', 40, 'msk_impact_2017');
+
 INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000004-N01', '', 'P-0000004-N01', 'msk_ch_2020_P-0000004', '', 'P-0000004', 'msk_ch_2020');
 INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000015-N01', '', 'P-0000015-N01', 'msk_ch_2020_P-0000015', '', 'P-0000015', 'msk_ch_2020');
 INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000023-N01', '', 'P-0000023-N01', 'msk_ch_2020_P-0000023', '', 'P-0000023', 'msk_ch_2020');
+
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_impact_2017_P-0000004-T01-IM3', '', 'P-0000004-T01-IM3', 'msk_impact_2017_P-0012622', '', 'P-0012622', 'msk_impact_2017');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_impact_2017_P-0000015-T01-IM3', '', 'P-0000015-T01-IM3', 'msk_impact_2017_P-0012622', '', 'P-0012622', 'msk_impact_2017');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_impact_2017_P-0000023-T01-IM3', '', 'P-0000023-T01-IM3', 'msk_impact_2017_P-0012622', '', 'P-0012622', 'msk_impact_2017');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_impact_2017_P-0000024-T01-IM3', '', 'P-0000024-T01-IM3', 'msk_impact_2017_P-0012622', '', 'P-0012622', 'msk_impact_2017');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_impact_2017_P-0000025-T02-IM5', '', 'P-0000025-T02-IM5', 'msk_impact_2017_P-0012622', '', 'P-0012622', 'msk_impact_2017');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_impact_2017_P-0000026-T01-IM3', '', 'P-0000026-T01-IM3', 'msk_impact_2017_P-0012622', '', 'P-0012622', 'msk_impact_2017');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_impact_2017_P-0000030-T01-IM3', '', 'P-0000030-T01-IM3', 'msk_impact_2017_P-0012622', '', 'P-0012622', 'msk_impact_2017');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_impact_2017_P-0000034-T01-IM3', '', 'P-0000034-T01-IM3', 'msk_impact_2017_P-0012622', '', 'P-0012622', 'msk_impact_2017');
+
 -- 
 INSERT INTO genomic_event (sample_unique_id, variant, hugo_gene_symbol, gene_panel_stable_id, cancer_study_identifier, genetic_profile_stable_id) VALUES ('msk_ch_2020_P-0000004-N01', 'p.R1051Q', 'KDR', '', 'msk_ch_2020', 'msk_ch_2020_mutations');
 INSERT INTO genomic_event (sample_unique_id, variant, hugo_gene_symbol, gene_panel_stable_id, cancer_study_identifier, genetic_profile_stable_id) VALUES ('msk_ch_2020_P-0000004-N01', 'p.T1884I', 'TET2', '', 'msk_ch_2020', 'msk_ch_2020_mutations');ueu     (643cfcdb15b3649e6160c6e8bb6f80fcf4df3338}(sha(643cfcdb15b3649e6160c6e8bb6f80fcf4df3338node_idEC_kwDOAe-hB9oAKDY0M2NmY2RiMTViMzY0OWU2MTYwYzZlOGJiNmY4MGZjZjRkZjMzMzgcommit}(author}(name
Ino de Bruijnemailino@ino.biodate2023-08-16T14:36:38Zu	committer}(j  GitHubj  noreply@github.comj  2023-08-16T14:36:38Zumessageadd info about adding labelstree}(j  (428c7efbee6b693c02b48f203cce3877cdeef379urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/428c7efbee6b693c02b48f203cce3877cdeef379uj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/643cfcdb15b3649e6160c6e8bb6f80fcf4df3338
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk3N72CRBK7hj4Ov3rIwAARj8IABttYfEF5KcA+CK/V3mehvdW
pg36XjjtEassVMzpJD+BiOnBXSkurcbhathzcW3e7nGNTZJeq3OOMwW6RbIBIUnU
VYjcP1qL5n9uGZT9oen+zphC6NjLEeKuL/j83Qa7YKfmPemSa21IwxyKLNZ7dL4A
7ka+bG8NKDZSX+E0PnMJgJtsyW8JNGRfCsCicv8G1uZBQyW1YVtm7tOd9t5eDuHW
F3H2dfHZ8Gmq/GVyJBCPoNOhaNEfkGet2gkHsmvBM/W48sfGjGFQSvTUjcP1w7RC
IZDZykHQWhHdhprkdiBnq/ilD8gr+eF37mOb0dk233trWoXd+LxamJKkyRm+/2E=
=4fW0
-----END PGP SIGNATURE-----
payloadtree 428c7efbee6b693c02b48f203cce3877cdeef379
parent e9cbd82f07ef7eb4cfb2054e10890ef6b91e666e
author Ino de Bruijn <ino@ino.bio> 1692196598 -0400
committer GitHub <noreply@github.com> 1692196598 -0400

add info about adding labelsuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/643cfcdb15b3649e6160c6e8bb6f80fcf4df3338html_urlXhttps://github.com/cBioPortal/cbioportal/commit/643cfcdb15b3649e6160c6e8bb6f80fcf4df3338comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/643cfcdb15b3649e6160c6e8bb6f80fcf4df3338/commentsj
  }(logininodbidJZ j	  MDQ6VXNlcjEzMzQwMDQ=
avatar_url3https://avatars.githubusercontent.com/u/1334004?v=4gravatar_idh5j  "https://api.github.com/users/inodbj-  https://github.com/inodb
followers_url,https://api.github.com/users/inodb/followers
following_url9https://api.github.com/users/inodb/following{/other_user}	gists_url2https://api.github.com/users/inodb/gists{/gist_id}starred_url9https://api.github.com/users/inodb/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/inodb/subscriptionsorganizations_url'https://api.github.com/users/inodb/orgs	repos_url(https://api.github.com/users/inodb/repos
events_url3https://api.github.com/users/inodb/events{/privacy}received_events_url2https://api.github.com/users/inodb/received_eventstypeUser
site_adminuj  }(j2  web-flowj4  J/j	  MDQ6VXNlcjE5ODY0NDQ3j6  4https://avatars.githubusercontent.com/u/19864447?v=4j8  h5j  %https://api.github.com/users/web-flowj-  https://github.com/web-flowj;  /https://api.github.com/users/web-flow/followersj=  <https://api.github.com/users/web-flow/following{/other_user}j?  5https://api.github.com/users/web-flow/gists{/gist_id}jA  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jC  3https://api.github.com/users/web-flow/subscriptionsjE  *https://api.github.com/users/web-flow/orgsjG  +https://api.github.com/users/web-flow/reposjI  6https://api.github.com/users/web-flow/events{/privacy}jK  5https://api.github.com/users/web-flow/received_eventsjM  UserjO  uparents]}(j  (e9cbd82f07ef7eb4cfb2054e10890ef6b91e666ej  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/e9cbd82f07ef7eb4cfb2054e10890ef6b91e666ej-  Xhttps://github.com/cBioPortal/cbioportal/commit/e9cbd82f07ef7eb4cfb2054e10890ef6b91e666euastats}(totalK	additionsK	deletionsK ufiles]}(j  (4c5f1764094a99125c143ce4b1c684555b19eb8dfilename .github/PULL_REQUEST_TEMPLATE.mdstatusmodifiedji  Kjj  K changesKblob_urlyhttps://github.com/cBioPortal/cbioportal/blob/643cfcdb15b3649e6160c6e8bb6f80fcf4df3338/.github%2FPULL_REQUEST_TEMPLATE.mdraw_urlxhttps://github.com/cBioPortal/cbioportal/raw/643cfcdb15b3649e6160c6e8bb6f80fcf4df3338/.github%2FPULL_REQUEST_TEMPLATE.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/.github%2FPULL_REQUEST_TEMPLATE.md?ref=643cfcdb15b3649e6160c6e8bb6f80fcf4df3338patchX  @@ -9,6 +9,7 @@ Describe changes proposed in this pull request:
 - [ ] Has tests or has a separate issue that describes the types of test that should be created. If no test is included it should explicitly be mentioned in the PR why there is no test.
 - [ ] The commit log is comprehensible. It follows [7 rules of great commit messages](http://chris.beams.io/posts/git-commit/). For most PRs a single commit should suffice, in some cases multiple topical commits can be useful. During review it is ok to see tiny commits (e.g. Fix reviewer comments), but right before the code gets merged to master or rc branch, any such commits should be squashed since they are useless to the other developers. Definitely avoid [merge commits, use rebase instead.](http://nathanleclaire.com/blog/2014/09/14/dont-be-scared-of-git-rebase/)
 - [ ] Is this PR adding logic based on one or more **clinical** attributes? If yes, please make sure validation for this attribute is also present in the data validation / data loading layers (in backend repo) and documented in [File-Formats Clinical data section](https://github.com/cBioPortal/cbioportal/blob/master/docs/File-Formats.md#clinical-data)!
+- [ ] Make sure your PR has one of the labels defined in https://github.com/cBioPortal/cbioportal/blob/master/.github/release-drafter.yml
 
 # Any screenshots or GIFs?
 If this is a new visual feature please add a before/after screenshot or gifuau(670337a1e3c1655561947d10beac9aa551318e6a}(sha(670337a1e3c1655561947d10beac9aa551318e6anode_idEC_kwDOAe-hB9oAKDY3MDMzN2ExZTNjMTY1NTU2MTk0N2QxMGJlYWM5YWE1NTEzMThlNmEcommit}(author}(namealismanemaillisman.aaron@gmail.comdate2023-06-26T14:56:09Zu	committer}(j  GitHubj  noreply@github.comj  2023-06-26T14:56:09ZumessagesMerge pull request #10119 from pvannierop/sv_counts_endpoint

RFC68: Impl. Struct Var count endpoint for Study Viewtree}(j~  (5d75b2911b13531c31a1ab65ca289c62ce5f37baurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/5d75b2911b13531c31a1ab65ca289c62ce5f37bauj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/670337a1e3c1655561947d10beac9aa551318e6a
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkmacJCRBK7hj4Ov3rIwAAKcMIAJFVVdbrzEiCERJx8d5be4A/
rDP4EJj0OMkf8p6zAyVy5ft9EaeTcX77GQoxukjvMc18eDkt10CNtfoxjp9Nnt/Z
k6Kr4jUj6qx4TqjLvxHd7gtnLl8KvnqteFRXYEYwe4J2dSxvUlKdeEf9SdYmiFys
+U7OdYu53Hj6xMJ5i8tghU5II/gVqyXvjPr9LQpLmomQjsm6UZPyqvrIDGUacypz
iWhzeZ6RIVhT2eIomdsYNMdYp86uAkrykq3hiCXcpwr6DzmSz0CKuVNfSjU9XGhq
sWqfhDxxthp+VG/ayuKFYId/uG9CT8WNrf+BCGTpGkAe+tL41OUDq3Yk8EVP6Pk=
=eKxr
-----END PGP SIGNATURE-----
payloadXr  tree 5d75b2911b13531c31a1ab65ca289c62ce5f37ba
parent 8b911fc3b52efd581a7b09a6939a8a3ca2722dfa
parent 631a5b3a5fe9212454af7cbb5a48c6891a20c527
author alisman <lisman.aaron@gmail.com> 1687791369 -0400
committer GitHub <noreply@github.com> 1687791369 -0400

Merge pull request #10119 from pvannierop/sv_counts_endpoint

RFC68: Impl. Struct Var count endpoint for Study Viewuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/670337a1e3c1655561947d10beac9aa551318e6ahtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/670337a1e3c1655561947d10beac9aa551318e6acomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/670337a1e3c1655561947d10beac9aa551318e6a/commentsj  }(loginalismanidJ j  MDQ6VXNlcjE4NjUyMQ==
avatar_url2https://avatars.githubusercontent.com/u/186521?v=4gravatar_idh5j  $https://api.github.com/users/alismanj  https://github.com/alisman
followers_url.https://api.github.com/users/alisman/followers
following_url;https://api.github.com/users/alisman/following{/other_user}	gists_url4https://api.github.com/users/alisman/gists{/gist_id}starred_url;https://api.github.com/users/alisman/starred{/owner}{/repo}subscriptions_url2https://api.github.com/users/alisman/subscriptionsorganizations_url)https://api.github.com/users/alisman/orgs	repos_url*https://api.github.com/users/alisman/repos
events_url5https://api.github.com/users/alisman/events{/privacy}received_events_url4https://api.github.com/users/alisman/received_eventstypeUser
site_adminuj  }(j  web-flowj  J/j  MDQ6VXNlcjE5ODY0NDQ3j  4https://avatars.githubusercontent.com/u/19864447?v=4j  h5j  %https://api.github.com/users/web-flowj  https://github.com/web-flowj  /https://api.github.com/users/web-flow/followersj  <https://api.github.com/users/web-flow/following{/other_user}j  5https://api.github.com/users/web-flow/gists{/gist_id}j  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j  3https://api.github.com/users/web-flow/subscriptionsj  *https://api.github.com/users/web-flow/orgsj  +https://api.github.com/users/web-flow/reposj  6https://api.github.com/users/web-flow/events{/privacy}j  5https://api.github.com/users/web-flow/received_eventsj  Userj  uparents](}(j~  (8b911fc3b52efd581a7b09a6939a8a3ca2722dfaj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8b911fc3b52efd581a7b09a6939a8a3ca2722dfaj  Xhttps://github.com/cBioPortal/cbioportal/commit/8b911fc3b52efd581a7b09a6939a8a3ca2722dfau}(j~  (631a5b3a5fe9212454af7cbb5a48c6891a20c527j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/631a5b3a5fe9212454af7cbb5a48c6891a20c527j  Xhttps://github.com/cBioPortal/cbioportal/commit/631a5b3a5fe9212454af7cbb5a48c6891a20c527uestats}(totalMm	additionsM	deletionsMufiles](}(j~  (28d2d07b4292906aa5f5c5a7745074960a37f3d2filename.core/src/main/scripts/importer/validateData.pystatusmodifiedj  Kj  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.pyraw_urlhttps://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.pycontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.py?ref=670337a1e3c1655561947d10beac9aa551318e6apatchX  @@ -3270,12 +3270,12 @@ def checkSVstatus(sv_status):
                     'No Entrez gene id or gene symbol provided for site 1 and site 2',
                     extra={'line_number': self.line_number})
         elif site1_gene is None and site2_gene is not None:
-            self.logger.warning(
+            self.logger.info(
                 'No Entrez gene id or gene symbol provided for site 1. '
                 'Assuming either the intragenic, deletion, duplication, translocation or inversion variant',
                 extra={'line_number': self.line_number})
         elif site2_gene is None and site1_gene is not None:
-            self.logger.warning(
+            self.logger.info(
                 'No Entrez gene id or gene symbol provided for site 2. '
                 'Assuming either the intragenic, deletion, duplication, translocation or inversion variant',
                 extra={'line_number': self.line_number})u}(j~  (91de51fb7356906110944cdd27eaf3761097919dj  Gcore/src/test/scripts/test_data/study_es_0/data_structural_variants.txtj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fdata_structural_variants.txtj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fdata_structural_variants.txtj  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fdata_structural_variants.txt?ref=670337a1e3c1655561947d10beac9aa551318e6aj  X  @@ -45,3 +45,5 @@ TCGA-A2-A04Q-01	NA	SND1	ENST00000354725	10	1	10000000	EXON	SND1_BRAF_CUSTOMHYVE_
 TCGA-A2-A0SX-01	NA	MKRN1	ENST00000255977	4	1	10000000	EXON	MKRN1_BRAF_CUSTOMHYVE_1	NA	BRAF	ENST00000288602	11	1	10000000		EXON	MKRN1_BRAF_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	MKRN1_BRAF_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			
 TCGA-AO-A0JL-01	NA	MKRN1	ENST00000255977	4	1	10000000	EXON	MKRN1_BRAF_CUSTOMHYVE_1	NA	BRAF	ENST00000288602	11	1	10000000		EXON	MKRN1_BRAF_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	MKRN1_BRAF_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			
 TCGA-AO-A0JL-01	NA	BRAF	ENST00000288602	6	1	10000000	EXON	BRAF_TTN_CUSTOMHYVE_1	NA	TTN	ENST00000589042	2	1	111111111		EXON	BRAF_TTN_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	BRAF_TTN_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			
+TCGA-AO-A0JL-01	NA	BRAF	ENST00000288602	6	1	10000000	EXON	BRAF_NULL_CUSTOMHYVE_1	NA			2	1	111111111		EXON	BRAF_NULL_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	BRAF_NULL_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			
+TCGA-AO-A0JL-01	NA			6	1	10000000	EXON	NULL_TTN_CUSTOMHYVE_1	NA	TTN	ENST00000589042	2	1	111111111		EXON	NULL_TTN_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	NULL_TTN_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			u}(j~  (8a39412f12d159a96b8ad548010704f8baa3a118j  =core/src/test/scripts/test_data/study_es_0/result_report.htmlj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.htmlj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.htmlj  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.html?ref=670337a1e3c1655561947d10beac9aa551318e6aj  X	  @@ -1742,7 +1742,7 @@ <h4 class="panel-title">data_resource_study.txt</h4>
           <a role="button" data-toggle="collapse" aria-expanded="true"
              href="#collapse_ZGF0YV9zdHJ1Y3R1cmFsX3ZhcmlhbnRzLnR4dA",
              aria-controls="collapse_ZGF0YV9zdHJ1Y3R1cmFsX3ZhcmlhbnRzLnR4dA">
-            <span class="badge">3</span>
+            <span class="badge">5</span>
             <h4 class="panel-title">data_structural_variants.txt</h4>
           </a>
         </div>
@@ -1770,6 +1770,22 @@ <h4 class="panel-title">data_structural_variants.txt</h4>
                 <td>&ndash;</td>
                 <td></td>
               </tr>
+              <tr class="success">
+                <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
+                <td>48</td>
+                <td>&ndash;</td>
+                <td>No Entrez gene id or gene symbol provided for site 2. Assuming either the intragenic, deletion, duplication, translocation or inversion variant</td>
+                <td>&ndash;</td>
+                <td></td>
+              </tr>
+              <tr class="success">
+                <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
+                <td>49</td>
+                <td>&ndash;</td>
+                <td>No Entrez gene id or gene symbol provided for site 1. Assuming either the intragenic, deletion, duplication, translocation or inversion variant</td>
+                <td>&ndash;</td>
+                <td></td>
+              </tr>
               <tr class="success">
                 <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
                 <td>&ndash;</td>
@@ -1782,7 +1798,7 @@ <h4 class="panel-title">data_structural_variants.txt</h4>
                 <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
                 <td>&ndash;</td>
                 <td>&ndash;</td>
-                <td>Read 47 lines. Lines with warning: 0. Lines with error: 0</td>
+                <td>Read 49 lines. Lines with warning: 0. Lines with error: 0</td>
                 <td>&ndash;</td>
                 <td></td>
               </tr>u}(j~  (cbe797905633ff28d7a8789d5e57940fad804014j  Amodel/src/main/java/org/cbioportal/model/AlterationCountBase.javaj  addedj  K3j  K j  K3j  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FAlterationCountBase.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FAlterationCountBase.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FAlterationCountBase.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  X  @@ -0,0 +1,51 @@
+package org.cbioportal.model;
+
+import java.io.Serializable;
+import java.util.Set;
+
+public abstract class AlterationCountBase implements Serializable {
+
+    private Integer numberOfAlteredCases;
+    private Integer totalCount;
+    private Integer numberOfProfiledCases;
+    private Set<String> matchingGenePanelIds;
+
+    public Integer getNumberOfAlteredCases() {
+        return numberOfAlteredCases;
+    }
+
+    public void setNumberOfAlteredCases(Integer numberOfAlteredCases) {
+        this.numberOfAlteredCases = numberOfAlteredCases;
+    }
+
+    public Integer getTotalCount() {
+        return totalCount;
+    }
+
+    public void setTotalCount(Integer totalCount) {
+        this.totalCount = totalCount;
+    }
+    
+    public Integer getNumberOfProfiledCases() {
+        return numberOfProfiledCases;
+    }
+
+    public void setNumberOfProfiledCases(Integer numberOfProfiledCases) {
+        this.numberOfProfiledCases = numberOfProfiledCases;
+    }
+
+    public Set<String> getMatchingGenePanelIds() {
+        return matchingGenePanelIds;
+    }
+
+    public void setMatchingGenePanelIds(Set<String> matchingGenePanelIds) {
+        this.matchingGenePanelIds = matchingGenePanelIds;
+    }
+    
+    public abstract String getUniqueEventKey();
+    
+    public abstract String[] getHugoGeneSymbols();
+    
+    public abstract Integer[] getEntrezGeneIds();
+
+}u}(j~  (d3a6ecf3d62c551d991dbe8cdac44088b7be31f6j  Cmodel/src/main/java/org/cbioportal/model/AlterationCountByGene.javaj  modifiedj  K
j  Kj  K'j  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FAlterationCountByGene.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FAlterationCountByGene.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FAlterationCountByGene.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  Xs  @@ -1,18 +1,13 @@
 package org.cbioportal.model;
 
-import java.io.Serializable;
 import java.math.BigDecimal;
-import java.util.Set;
 
-public class AlterationCountByGene implements Serializable {
+public class AlterationCountByGene extends AlterationCountBase {
 
     private Integer entrezGeneId;
     private String hugoGeneSymbol;
     private Integer numberOfAlteredCases;
-    private Integer totalCount;
-    private Integer numberOfProfiledCases;
     private BigDecimal qValue;
-    private Set<String> matchingGenePanelIds;
 
     public Integer getEntrezGeneId() {
         return entrezGeneId;
@@ -38,22 +33,6 @@ public void setNumberOfAlteredCases(Integer numberOfAlteredCases) {
         this.numberOfAlteredCases = numberOfAlteredCases;
     }
 
-    public Integer getTotalCount() {
-        return totalCount;
-    }
-
-    public void setTotalCount(Integer totalCount) {
-        this.totalCount = totalCount;
-    }
-    
-    public Integer getNumberOfProfiledCases() {
-        return numberOfProfiledCases;
-    }
-
-    public void setNumberOfProfiledCases(Integer numberOfProfiledCases) {
-        this.numberOfProfiledCases = numberOfProfiledCases;
-    }
-
     public BigDecimal getqValue() {
         return qValue;
     }
@@ -62,11 +41,19 @@ public void setqValue(BigDecimal qValue) {
         this.qValue = qValue;
     }
 
-    public Set<String> getMatchingGenePanelIds() {
-        return matchingGenePanelIds;
+    @Override
+    public String getUniqueEventKey() {
+        return hugoGeneSymbol;
     }
 
-    public void setMatchingGenePanelIds(Set<String> matchingGenePanelIds) {
-        this.matchingGenePanelIds = matchingGenePanelIds;
+    @Override
+    public String[] getHugoGeneSymbols() {
+        return new String[]{hugoGeneSymbol};
     }
+
+    @Override
+    public Integer[] getEntrezGeneIds() {
+        return new Integer[]{entrezGeneId};
+    }
+
 }u}(j~  (88800d1f84f8a8d70e521140f0755f7573f7e2e6j  Pmodel/src/main/java/org/cbioportal/model/AlterationCountByStructuralVariant.javaj  addedj  K8j  K j  K8j  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FAlterationCountByStructuralVariant.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FAlterationCountByStructuralVariant.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FAlterationCountByStructuralVariant.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  X?  @@ -0,0 +1,56 @@
+package org.cbioportal.model;
+
+public class AlterationCountByStructuralVariant extends AlterationCountBase {
+
+    private Integer gene1EntrezGeneId;
+    private String gene1HugoGeneSymbol; 
+    private Integer gene2EntrezGeneId;
+    private String gene2HugoGeneSymbol;
+    
+    public Integer getGene1EntrezGeneId() {
+        return gene1EntrezGeneId;
+    }
+
+    public void setGene1EntrezGeneId(Integer gene1EntrezGeneId) {
+        this.gene1EntrezGeneId = gene1EntrezGeneId;
+    }
+
+    public String getGene1HugoGeneSymbol() {
+        return gene1HugoGeneSymbol;
+    }
+
+    public void setGene1HugoGeneSymbol(String gene1HugoGeneSymbol) {
+        this.gene1HugoGeneSymbol = gene1HugoGeneSymbol;
+    }
+
+    public Integer getGene2EntrezGeneId() {
+        return gene2EntrezGeneId;
+    }
+
+    public void setGene2EntrezGeneId(Integer gene2EntrezGeneId) {
+        this.gene2EntrezGeneId = gene2EntrezGeneId;
+    }
+
+    public String getGene2HugoGeneSymbol() {
+        return gene2HugoGeneSymbol;
+    }
+
+    public void setGene2HugoGeneSymbol(String gene2HugoGeneSymbol) {
+        this.gene2HugoGeneSymbol = gene2HugoGeneSymbol;
+    }
+
+    @Override
+    public String getUniqueEventKey() {
+        return gene1HugoGeneSymbol + "::" + gene2HugoGeneSymbol;
+    }
+
+    @Override
+    public String[] getHugoGeneSymbols() {
+        return new String[]{gene1HugoGeneSymbol, gene2HugoGeneSymbol};
+    }
+
+    @Override
+    public Integer[] getEntrezGeneIds() {
+        return new Integer[]{gene1EntrezGeneId, gene2EntrezGeneId};
+    }
+}u}(j~  (ef1143066e785074681a8996e9bf59a9c1271b8ej  Cmodel/src/main/java/org/cbioportal/model/CopyNumberCountByGene.javaj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FCopyNumberCountByGene.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FCopyNumberCountByGene.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FCopyNumberCountByGene.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  X  @@ -22,4 +22,9 @@ public String getCytoband() {
 	public void setCytoband(String cytoband) {
 		this.cytoband = cytoband;
 	}
+
+    @Override
+    public String getUniqueEventKey() {
+        return getEntrezGeneId().toString() + getAlteration().toString();
+    }
 }u}(j~  (b8f436eea09c9068e3beb6f2bf6c8e697117375bj  ^persistence/persistence-api/src/main/java/org/cbioportal/persistence/AlterationRepository.javaj  modifiedj  Kj  Kj  K j  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FAlterationRepository.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FAlterationRepository.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FAlterationRepository.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  X  @@ -10,23 +10,31 @@
 public interface AlterationRepository {
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    List<AlterationCountByGene> getSampleAlterationCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                          Select<Integer> entrezGeneIds,
-                                                          AlterationFilter alterationFilter);
+    List<AlterationCountByGene> getSampleAlterationGeneCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                              Select<Integer> entrezGeneIds,
+                                                              AlterationFilter alterationFilter);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    List<AlterationCountByGene> getPatientAlterationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                           Select<Integer> entrezGeneIds,
-                                                           AlterationFilter alterationFilter);
+    List<AlterationCountByGene> getPatientAlterationGeneCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                               Select<Integer> entrezGeneIds,
+                                                               AlterationFilter alterationFilter);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    List<CopyNumberCountByGene> getSampleCnaCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                   Select<Integer> entrezGeneIds,
-                                                   AlterationFilter alterationFilter);
+    List<CopyNumberCountByGene> getSampleCnaGeneCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                       Select<Integer> entrezGeneIds,
+                                                       AlterationFilter alterationFilter);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    List<CopyNumberCountByGene> getPatientCnaCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                    Select<Integer> entrezGeneIds,
-                                                    AlterationFilter alterationFilter);
+    List<CopyNumberCountByGene> getPatientCnaGeneCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                        Select<Integer> entrezGeneIds,
+                                                        AlterationFilter alterationFilter);
+
+    @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
+    List<AlterationCountByStructuralVariant> getSampleStructuralVariantCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                              AlterationFilter alterationFilter);
+
+    @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
+    List<AlterationCountByStructuralVariant> getPatientStructuralVariantCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                               AlterationFilter alterationFilter);
     
 }u}(j~  (4b1461cdbb8916fab5303917adc7ccd706d8c15dj  lpersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/AlterationCountsMapper.javaj  modifiedj  K1j  Kj  K7j  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationCountsMapper.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationCountsMapper.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationCountsMapper.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  X$  @@ -1,6 +1,7 @@
 package org.cbioportal.persistence.mybatis;
 
 import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.AlterationCountByStructuralVariant;
 import org.cbioportal.model.CopyNumberCountByGene;
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
 import org.cbioportal.model.util.Select;
@@ -10,7 +11,7 @@
 public interface AlterationCountsMapper {
 
     /**
-     * Calculate sample-level counts of mutation and discrete CNA alteration events.
+     * Calculate sample-level counts of mutation and discrete CNA alteration events in genes.
      * @param entrezGeneIds  Gene ids to get counts for.
      * @param mutationTypes  Types of mutations to include in alteration counts. 
      * @param cnaTypes  Types of discrete copy number alteration types to include in alteration counts.
@@ -23,7 +24,7 @@ public interface AlterationCountsMapper {
      * @param includeSomatic  Include somatic mutations in alteration counts
      * @return  Gene-level counts of (1) the total number of alterations and (2) the number of altered samples.
      */
-    List<AlterationCountByGene> getSampleAlterationCounts(List<MolecularProfileCaseIdentifier> mutationMolecularProfileCaseIdentifiers,
+    List<AlterationCountByGene> getSampleAlterationGeneCounts(List<MolecularProfileCaseIdentifier> mutationMolecularProfileCaseIdentifiers,
                                                           List<MolecularProfileCaseIdentifier> cnaMolecularProfileCaseIdentifiers,
                                                           List<MolecularProfileCaseIdentifier> structuralVariantMolecularProfileCaseIdentifiers,
                                                           Select<Integer> entrezGeneIds,
@@ -38,7 +39,7 @@ List<AlterationCountByGene> getSampleAlterationCounts(List<MolecularProfileCaseI
                                                           boolean includeUnknownStatus);
 
     /**
-     * Calculate patient-level counts of mutation and discrete CNA alteration events.
+     * Calculate patient-level counts of mutation and discrete CNA alteration events in genes.
      * @param entrezGeneIds  Gene ids to get counts for.
      * @param mutationTypes  Types of mutations to include in alteration counts.
      * @param cnaTypes  Types of discrete copy number alteration types to include in alteration counts.
@@ -52,7 +53,7 @@ List<AlterationCountByGene> getSampleAlterationCounts(List<MolecularProfileCaseI
      * @param includeUnknownStatus  Include mutations that have mutation status 'unknown' in alteration counts
      * @return  Gene-level counts of (1) the total number of alterations and (2) the number of altered patients.
      */
-    List<AlterationCountByGene> getPatientAlterationCounts(List<MolecularProfileCaseIdentifier> mutationMolecularProfileCaseIdentifiers,
+    List<AlterationCountByGene> getPatientAlterationGeneCounts(List<MolecularProfileCaseIdentifier> mutationMolecularProfileCaseIdentifiers,
                                                            List<MolecularProfileCaseIdentifier> cnaMolecularProfileCaseIdentifiers,
                                                            List<MolecularProfileCaseIdentifier> structuralVariantMolecularProfileCaseIdentifiers,
                                                            Select<Integer> entrezGeneIds,
@@ -68,7 +69,7 @@ List<AlterationCountByGene> getPatientAlterationCounts(List<MolecularProfileCase
                                                            boolean includeUnknownStatus);
 
     // legacy method that returns CopyNumberCountByGene
-    List<CopyNumberCountByGene> getSampleCnaCounts(List<MolecularProfileCaseIdentifier> cnaMolecularProfileCaseIdentifiers,
+    List<CopyNumberCountByGene> getSampleCnaGeneCounts(List<MolecularProfileCaseIdentifier> cnaMolecularProfileCaseIdentifiers,
                                                    Select<Integer> entrezGeneIds,
                                                    Select<Short> cnaTypes,
                                                    boolean includeDriver,
@@ -78,7 +79,7 @@ List<CopyNumberCountByGene> getSampleCnaCounts(List<MolecularProfileCaseIdentifi
                                                    boolean includeUnknownTier);
 
     // legacy method that returns CopyNumberCountByGene
-    List<CopyNumberCountByGene> getPatientCnaCounts(List<MolecularProfileCaseIdentifier> cnaMolecularProfileCaseIdentifiers,
+    List<CopyNumberCountByGene> getPatientCnaGeneCounts(List<MolecularProfileCaseIdentifier> cnaMolecularProfileCaseIdentifiers,
                                                     Select<Integer> entrezGeneIds,
                                                     Select<Short> cnaTypes,
                                                     boolean includeDriver,
@@ -88,4 +89,46 @@ List<CopyNumberCountByGene> getPatientCnaCounts(List<MolecularProfileCaseIdentif
                                                     boolean includeUnknownTier);
 
     List<MolecularProfileCaseIdentifier> getMolecularProfileCaseInternalIdentifier(List<MolecularProfileCaseIdentifier> molecularProfileSampleIdentifiers, String caseType);
+
+    /**
+     * Calculate sample-level counts of structural variant events.
+     * @param includeDriver Include Variants of Unknown significance. Uses annotations loaded as 'custom driver annotations'.
+     * @param includeVUS  Include Variants of Unknown significance. Uses annotations loaded as 'custom driver annotations'.
+     * @param includeUnknownOncogenicity  Include variants that are not annotated as driver or VUS. Uses annotations loaded as 'custom driver annotations'.
+     * @param selectedTiers  Force alterations assigned to a tier to be interpreted as driver events. Uses tier annotations loaded as 'custom driver annotation tiers'.
+     * @param includeUnknownTier Include mutations that have unspecified tier, or tiers with '', 'NA' or 'unknown' in alteration counts
+     * @param includeGermline  Include germline mutations in alteration counts
+     * @param includeSomatic  Include somatic mutations in alteration counts
+     * @return  StructVar-level counts (GeneA::GeneB) of (1) the total number of alterations and (2) the number of altered samples.
+     */
+    List<AlterationCountByStructuralVariant> getSampleStructuralVariantCounts(List<MolecularProfileCaseIdentifier> structuralVariantMolecularProfileCaseIdentifiers,
+                                                                              boolean includeDriver,
+                                                                              boolean includeVUS,
+                                                                              boolean includeUnknownOncogenicity,
+                                                                              Select<String> selectedTiers,
+                                                                              boolean includeUnknownTier,
+                                                                              boolean includeGermline,
+                                                                              boolean includeSomatic,
+                                                                              boolean includeUnknownStatus);
+    /**
+     * Calculate patient-level counts of structural variant events.
+     * @param includeDriver Include Variants of Unknown significance. Uses annotations loaded as 'custom driver annotations'.
+     * @param includeVUS  Include Variants of Unknown significance. Uses annotations loaded as 'custom driver annotations'.
+     * @param includeUnknownOncogenicity  Include variants that are not annotated as driver or VUS. Uses annotations loaded as 'custom driver annotations'.
+     * @param selectedTiers  Force alterations assigned to a tier to be interpreted as driver events. Uses tier annotations loaded as 'custom driver annotation tiers'.
+     * @param includeUnknownTier Include mutations that have unspecified tier, or tiers with '', 'NA' or 'unknown' in alteration counts
+     * @param includeGermline  Include germline mutations in alteration counts
+     * @param includeSomatic  Include somatic mutations in alteration counts
+     * @return  StructVar-level counts (GeneA::GeneB) of (1) the total number of alterations and (2) the number of altered patients.
+     */
+    List<AlterationCountByStructuralVariant> getPatientStructuralVariantCounts(List<MolecularProfileCaseIdentifier> structuralVariantMolecularProfileCaseIdentifiers,
+                                                                              boolean includeDriver,
+                                                                              boolean includeVUS,
+                                                                              boolean includeUnknownOncogenicity,
+                                                                              Select<String> selectedTiers,
+                                                                              boolean includeUnknownTier,
+                                                                              boolean includeGermline,
+                                                                              boolean includeSomatic,
+                                                                              boolean includeUnknownStatus);
+    
 }u}(j~  (47b861df951fc1baeecceed634cfe192edae2558j  qpersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/AlterationMyBatisRepository.javaj  modifiedj  K?j  Kj  KQj  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepository.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepository.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepository.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  X'  @@ -1,6 +1,7 @@
 package org.cbioportal.persistence.mybatis;
 
 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;
@@ -26,9 +27,9 @@ public class AlterationMyBatisRepository implements AlterationRepository {
     private MolecularProfileRepository molecularProfileRepository;
 
     @Override
-    public List<AlterationCountByGene> getSampleAlterationCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                 Select<Integer> entrezGeneIds,
-                                                                 AlterationFilter alterationFilter) {
+    public List<AlterationCountByGene> getSampleAlterationGeneCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                     Select<Integer> entrezGeneIds,
+                                                                     AlterationFilter alterationFilter) {
 
         if ((alterationFilter.getMutationTypeSelect().hasNone() && alterationFilter.getCNAEventTypeSelect().hasNone()
                   && !alterationFilter.getStructuralVariants())
@@ -50,7 +51,7 @@ public List<AlterationCountByGene> getSampleAlterationCounts(Set<MolecularProfil
             alterationCountsMapper.getMolecularProfileCaseInternalIdentifier(new ArrayList<>(molecularProfileCaseIdentifiers), "SAMPLE_ID")
             .stream()
             .collect(Collectors.groupingBy(e -> profileTypeByProfileId.getOrDefault(e.getMolecularProfileId(), null)));
-        return alterationCountsMapper.getSampleAlterationCounts(
+        return alterationCountsMapper.getSampleAlterationGeneCounts(
             groupedIdentifiersByProfileType.get(MolecularAlterationType.MUTATION_EXTENDED),
             groupedIdentifiersByProfileType.get(MolecularAlterationType.COPY_NUMBER_ALTERATION),
             groupedIdentifiersByProfileType.get(MolecularAlterationType.STRUCTURAL_VARIANT),
@@ -68,9 +69,9 @@ public List<AlterationCountByGene> getSampleAlterationCounts(Set<MolecularProfil
     }
 
     @Override
-    public List<AlterationCountByGene> getPatientAlterationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                  Select<Integer> entrezGeneIds,
-                                                                  AlterationFilter alterationFilter) {
+    public List<AlterationCountByGene> getPatientAlterationGeneCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                      Select<Integer> entrezGeneIds,
+                                                                      AlterationFilter alterationFilter) {
 
         if ((alterationFilter.getMutationTypeSelect().hasNone() && alterationFilter.getCNAEventTypeSelect().hasNone()
             && !alterationFilter.getStructuralVariants())
@@ -91,12 +92,12 @@ public List<AlterationCountByGene> getPatientAlterationCounts(List<MolecularProf
             .collect(Collectors.toMap(datum -> datum.getMolecularProfileId().toString(), MolecularProfile::getMolecularAlterationType));
 
         Map<MolecularAlterationType, List<MolecularProfileCaseIdentifier>> groupedIdentifiersByProfileType =
-            alterationCountsMapper.getMolecularProfileCaseInternalIdentifier(molecularProfileCaseIdentifiers, "PATIENT_ID")
+            alterationCountsMapper.getMolecularProfileCaseInternalIdentifier(new ArrayList<>(molecularProfileCaseIdentifiers), "PATIENT_ID")
             .stream()
             .collect(Collectors.groupingBy(e -> profileTypeByProfileId.getOrDefault(e.getMolecularProfileId(), null)));
 
 
-        return alterationCountsMapper.getPatientAlterationCounts(
+        return alterationCountsMapper.getPatientAlterationGeneCounts(
             groupedIdentifiersByProfileType.get(MolecularAlterationType.MUTATION_EXTENDED),
             groupedIdentifiersByProfileType.get(MolecularAlterationType.COPY_NUMBER_ALTERATION),
             groupedIdentifiersByProfileType.get(MolecularAlterationType.STRUCTURAL_VARIANT),
@@ -115,9 +116,9 @@ public List<AlterationCountByGene> getPatientAlterationCounts(List<MolecularProf
     }
 
     @Override
-    public List<CopyNumberCountByGene> getSampleCnaCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                          Select<Integer> entrezGeneIds,
-                                                          AlterationFilter alterationFilter) {
+    public List<CopyNumberCountByGene> getSampleCnaGeneCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                              Select<Integer> entrezGeneIds,
+                                                              AlterationFilter alterationFilter) {
 
         if (alterationFilter.getCNAEventTypeSelect().hasNone() || molecularProfileCaseIdentifiers == null
             || allAlterationsExcludedDriverAnnotation(alterationFilter)
@@ -128,7 +129,7 @@ public List<CopyNumberCountByGene> getSampleCnaCounts(Set<MolecularProfileCaseId
         List<MolecularProfileCaseIdentifier> molecularProfileCaseInternalIdentifiers =
             alterationCountsMapper.getMolecularProfileCaseInternalIdentifier(new ArrayList<>(molecularProfileCaseIdentifiers), "SAMPLE_ID");
 
-        return alterationCountsMapper.getSampleCnaCounts(
+        return alterationCountsMapper.getSampleCnaGeneCounts(
             molecularProfileCaseInternalIdentifiers,
             entrezGeneIds,
             createCnaTypeList(alterationFilter),
@@ -140,19 +141,19 @@ public List<CopyNumberCountByGene> getSampleCnaCounts(Set<MolecularProfileCaseId
     }
 
     @Override
-    public List<CopyNumberCountByGene> getPatientCnaCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                           Select<Integer> entrezGeneIds,
-                                                           AlterationFilter alterationFilter) {
+    public List<CopyNumberCountByGene> getPatientCnaGeneCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                               Select<Integer> entrezGeneIds,
+                                                               AlterationFilter alterationFilter) {
 
         if (alterationFilter.getCNAEventTypeSelect().hasNone() || molecularProfileCaseIdentifiers == null
             || allAlterationsExcludedDriverAnnotation(alterationFilter)
             || allAlterationsExcludedDriverTierAnnotation(alterationFilter)) {
             return Collections.emptyList();
         }
         List<MolecularProfileCaseIdentifier> molecularProfileCaseInternalIdentifiers =
-            alterationCountsMapper.getMolecularProfileCaseInternalIdentifier(molecularProfileCaseIdentifiers, "PATIENT_ID");
+            alterationCountsMapper.getMolecularProfileCaseInternalIdentifier(new ArrayList<>(molecularProfileCaseIdentifiers), "PATIENT_ID");
 
-        return alterationCountsMapper.getPatientCnaCounts(
+        return alterationCountsMapper.getPatientCnaGeneCounts(
             molecularProfileCaseInternalIdentifiers,
             entrezGeneIds,
             createCnaTypeList(alterationFilter),
@@ -163,6 +164,50 @@ public List<CopyNumberCountByGene> getPatientCnaCounts(List<MolecularProfileCase
             alterationFilter.getIncludeUnknownTier());
     }
 
+    @Override
+    public List<AlterationCountByStructuralVariant> getSampleStructuralVariantCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                     AlterationFilter alterationFilter) {
+
+        if (molecularProfileCaseIdentifiers == null
+            || molecularProfileCaseIdentifiers.isEmpty()
+            || allAlterationsExcludedMutationStatus(alterationFilter)) {
+            return Collections.emptyList();
+        }
+
+        return alterationCountsMapper.getSampleStructuralVariantCounts(
+            new ArrayList<>(molecularProfileCaseIdentifiers),
+            alterationFilter.getIncludeDriver(),
+            alterationFilter.getIncludeVUS(),
+            alterationFilter.getIncludeUnknownOncogenicity(),
+            alterationFilter.getSelectedTiers(),
+            alterationFilter.getIncludeUnknownTier(),
+            alterationFilter.getIncludeGermline(),
+            alterationFilter.getIncludeSomatic(),
+            alterationFilter.getIncludeUnknownStatus());
+    }
+
+    @Override
+    public List<AlterationCountByStructuralVariant> getPatientStructuralVariantCounts(Set<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                     AlterationFilter alterationFilter) {
+
+        if (molecularProfileCaseIdentifiers == null
+            || molecularProfileCaseIdentifiers.isEmpty()
+            || allAlterationsExcludedMutationStatus(alterationFilter)) {
+            return Collections.emptyList();
+        }
+
+        return alterationCountsMapper.getPatientStructuralVariantCounts(
+            new ArrayList<>(molecularProfileCaseIdentifiers),
+            alterationFilter.getIncludeDriver(),
+            alterationFilter.getIncludeVUS(),
+            alterationFilter.getIncludeUnknownOncogenicity(),
+            alterationFilter.getSelectedTiers(),
+            alterationFilter.getIncludeUnknownTier(),
+            alterationFilter.getIncludeGermline(),
+            alterationFilter.getIncludeSomatic(),
+            alterationFilter.getIncludeUnknownStatus());
+    }
+    
     private Select<Short> createCnaTypeList(final AlterationFilter alterationFilter) {
         if (alterationFilter.getCNAEventTypeSelect().hasNone())
             return Select.none();u}(j~  (01ed5f7bae7167941c488b34592e51cba881fbdej  ppersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatis/AlterationCountsMapper.xmlj  modifiedj  K?j  K	j  KHj  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationCountsMapper.xmlj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationCountsMapper.xmlj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationCountsMapper.xml?ref=670337a1e3c1655561947d10beac9aa551318e6aj  X+  @@ -3,7 +3,7 @@
 
 <mapper namespace="org.cbioportal.persistence.mybatis.AlterationCountsMapper">
 
-    <select id="getSampleAlterationCounts" resultType="org.cbioportal.model.AlterationCountByGene">
+    <select id="getSampleAlterationGeneCounts" resultType="org.cbioportal.model.AlterationCountByGene">
         SELECT 
             ENTREZ_GENE_ID AS entrezGeneId,
             HUGO_GENE_SYMBOL AS hugoGeneSymbol,
@@ -37,7 +37,7 @@
         GROUP BY ENTREZ_GENE_ID, HUGO_GENE_SYMBOL;
     </select>
 
-    <select id="getPatientAlterationCounts" resultType="org.cbioportal.model.AlterationCountByGene">
+    <select id="getPatientAlterationGeneCounts" resultType="org.cbioportal.model.AlterationCountByGene">
         SELECT
             ENTREZ_GENE_ID AS entrezGeneId,
             HUGO_GENE_SYMBOL AS hugoGeneSymbol,
@@ -71,7 +71,7 @@
         GROUP BY ENTREZ_GENE_ID, HUGO_GENE_SYMBOL;
     </select>
 
-    <select id="getSampleCnaCounts" resultType="org.cbioportal.model.CopyNumberCountByGene">
+    <select id="getSampleCnaGeneCounts" resultType="org.cbioportal.model.CopyNumberCountByGene">
         SELECT
             cna_event.ENTREZ_GENE_ID AS entrezGeneId,
             gene.HUGO_GENE_SYMBOL AS hugoGeneSymbol,
@@ -111,7 +111,7 @@
         GROUP BY cna_event.ENTREZ_GENE_ID, cna_event.ALTERATION, reference_genome_gene.CYTOBAND, gene.HUGO_GENE_SYMBOL
     </select>
 
-    <select id="getPatientCnaCounts" resultType="org.cbioportal.model.CopyNumberCountByGene">
+    <select id="getPatientCnaGeneCounts" resultType="org.cbioportal.model.CopyNumberCountByGene">
         SELECT
             cna_event.ENTREZ_GENE_ID AS entrezGeneId,
             gene.HUGO_GENE_SYMBOL AS hugoGeneSymbol,
@@ -147,6 +147,60 @@
         </where>
         GROUP BY cna_event.ENTREZ_GENE_ID, cna_event.ALTERATION, gene.HUGO_GENE_SYMBOL
     </select>
+    
+    <select id="getSampleStructuralVariantCounts" resultType="org.cbioportal.model.AlterationCountByStructuralVariant">
+        SELECT
+            gene1.ENTREZ_GENE_ID AS gene1EntrezGeneId,
+            gene1.HUGO_GENE_SYMBOL AS gene1HugoGeneSymbol,
+            gene2.ENTREZ_GENE_ID AS gene2EntrezGeneId,
+            gene2.HUGO_GENE_SYMBOL AS gene2HugoGeneSymbol,
+            COUNT(*) AS totalCount,
+            COUNT(DISTINCT(sample.INTERNAL_ID)) AS numberOfAlteredCases
+        FROM structural_variant
+            INNER JOIN genetic_profile ON structural_variant.GENETIC_PROFILE_ID = genetic_profile.GENETIC_PROFILE_ID
+            <include refid="fromIncludeCustomAnnotationsSV" />
+            INNER JOIN sample ON structural_variant.SAMPLE_ID = sample.INTERNAL_ID
+            INNER JOIN patient ON sample.PATIENT_ID = patient.INTERNAL_ID
+            LEFT JOIN gene as gene1 ON structural_variant.SITE1_ENTREZ_GENE_ID = gene1.ENTREZ_GENE_ID
+            LEFT JOIN gene as gene2 ON structural_variant.SITE2_ENTREZ_GENE_ID = gene2.ENTREZ_GENE_ID
+        <where>
+            <include refid="whereCustomAnnotations"/>
+            <include refid="whereSVStatus" />
+            <include refid="caseFilter">
+                <property name="case_type" value="'SAMPLE_ID'"/>
+                <property name="identifiers" value="structuralVariantMolecularProfileCaseIdentifiers" />
+                <property name="geneticProfileIdentifier" value="genetic_profile.STABLE_ID" />
+                <property name="caseStableIdentifier" value="caseStableIdentifier" />
+            </include>
+        </where>
+        GROUP BY gene1.ENTREZ_GENE_ID, gene2.ENTREZ_GENE_ID
+    </select>
+    
+    <select id="getPatientStructuralVariantCounts" resultType="org.cbioportal.model.AlterationCountByStructuralVariant">
+        SELECT
+            gene1.ENTREZ_GENE_ID AS gene1EntrezGeneId,
+            gene1.HUGO_GENE_SYMBOL AS gene1HugoGeneSymbol,
+            gene2.ENTREZ_GENE_ID AS gene2EntrezGeneId,
+            gene2.HUGO_GENE_SYMBOL AS gene2HugoGeneSymbol,
+            COUNT(*) AS totalCount,
+            COUNT(DISTINCT(patient.INTERNAL_ID)) AS numberOfAlteredCases
+        FROM structural_variant
+            INNER JOIN genetic_profile ON structural_variant.GENETIC_PROFILE_ID = genetic_profile.GENETIC_PROFILE_ID
+            INNER JOIN sample ON structural_variant.SAMPLE_ID = sample.INTERNAL_ID
+            INNER JOIN patient ON sample.PATIENT_ID = patient.INTERNAL_ID
+            INNER JOIN gene as gene1 ON structural_variant.SITE1_ENTREZ_GENE_ID = gene1.ENTREZ_GENE_ID
+            INNER JOIN gene as gene2 ON structural_variant.SITE2_ENTREZ_GENE_ID = gene2.ENTREZ_GENE_ID
+        <where>
+            <include refid="whereSVStatus" />
+            <include refid="caseFilter">
+                <property name="case_type" value="'PATIENT_ID'"/>
+                <property name="identifiers" value="structuralVariantMolecularProfileCaseIdentifiers" />
+                <property name="geneticProfileIdentifier" value="genetic_profile.STABLE_ID" />
+                <property name="caseStableIdentifier" value="caseStableIdentifier" />
+            </include>
+        </where>
+        GROUP BY gene1.ENTREZ_GENE_ID, gene2.ENTREZ_GENE_ID
+    </select>
 
     <sql id="fromIncludeCustomAnnotationsMutation">
         <!--For better performance, only join in the alteration_driver_annotation table when we need to filter on it.-->
@@ -291,15 +345,15 @@
                 <trim prefix="AND (" suffix=")" prefixOverrides="OR">
                     <if test="includeGermline">
                         OR
-                        LOWER(combinedResults.SV_STATUS) = 'germline'
+                        LOWER(SV_STATUS) = 'germline'
                     </if>
                     <if test="includeSomatic">
                         OR
-                        LOWER(combinedResults.SV_STATUS) = 'somatic'
+                        LOWER(SV_STATUS) = 'somatic'
                     </if>
                     <if test="includeUnknownStatus">
                         OR
-                        LOWER(combinedResults.SV_STATUS) NOT IN ('germline', 'somatic')
+                        LOWER(SV_STATUS) NOT IN ('germline', 'somatic')
                     </if>
                 </trim>
             </when>
@@ -427,7 +481,7 @@
                 <include refid="caseUniqueIdentifier" /> as caseUniqueId,
                 <include refid="caseStableIdentifier" /> as caseStableId,
                 genetic_profile.GENETIC_PROFILE_ID as geneticProfileId,
-                structural_variant.SV_STATUS
+                structural_variant.SV_STATUS as SV_STATUS
             FROM
                 structural_variant
             INNER JOIN genetic_profile ON structural_variant.GENETIC_PROFILE_ID = genetic_profile.GENETIC_PROFILE_ID
@@ -447,7 +501,7 @@
                 <include refid="caseUniqueIdentifier" /> as caseUniqueId,
                 <include refid="caseStableIdentifier" /> as caseStableId,
                 genetic_profile.GENETIC_PROFILE_ID as geneticProfileId,
-                structural_variant.SV_STATUS
+                structural_variant.SV_STATUS as SV_STATUS
             FROM
                 structural_variant
             INNER JOIN genetic_profile ON structural_variant.GENETIC_PROFILE_ID = genetic_profile.GENETIC_PROFILE_IDu}(j~  (7330e13633afaa967c98ab5edcb30e2f3a0f5044j  upersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/AlterationMyBatisRepositoryTest.javaj  modifiedj  M'j  Kj  Mj  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  X  @@ -1,7 +1,6 @@
 package org.cbioportal.persistence.mybatis;
 
 import org.cbioportal.model.*;
-import org.cbioportal.model.QueryElement;
 import org.cbioportal.model.util.Select;
 import org.junit.Assert;
 import org.junit.Before;
@@ -12,7 +11,6 @@
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
-import java.sql.ResultSet;
 import java.util.*;
 
 @RunWith(SpringJUnit4ClassRunner.class)
@@ -21,7 +19,7 @@
 public class AlterationMyBatisRepositoryTest {
 
     //    mutation and cna events in testSql.sql
-    //        SAMPLE_ID,    ENTREZ_GENE_ID, HUGO_GENE_SYMBOL, GENETIC_PROFILE_ID, TYPE, MUTATION_TYPE, DRIVER_FILTER, DRIVER_TIERS_FILTER, PATIENT_ID, MUTATION_TYPE
+    //        SAMPLE_ID,    ENTREZ_GENE_ID, HUGO_GENE_SYMBOL, GENETIC_PROFILE_ID, TYPE, MUTATIONio_TYPE, DRIVER_FILTER, DRIVER_TIERS_FILTER, PATIENT_ID, MUTATION_TYPE
     //        1	    207	    AKT1	2	CNA         -2	                Putative_Driver	    Tier 1  TCGA-A1-A0SB    germline
     //        2	    207	    AKT1	2	CNA         2	                Putative_Passenger	Tier 2  TCGA-A1-A0SD    germline
     //        1	    207	    AKT1	6	MUTATION    Nonsense_Mutation	Putative_Driver	    Tier 1  TCGA-A1-A0SB    germline
@@ -44,7 +42,8 @@ public class AlterationMyBatisRepositoryTest {
     //       15     57670-673   KIAA..-BRAF 13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
     //        1     8031-5979   NCOA4-RET   7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
     //       15     8031-5979   NCOA4-RET   13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
-    //        1     7113-2078   TMPRSS2-ERG 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     7113-2078   TMPRSS2-ERG 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-       NCOA4-      13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
 
     @Autowired
     private AlterationMyBatisRepository alterationMyBatisRepository;
@@ -58,15 +57,13 @@ public class AlterationMyBatisRepositoryTest {
         CNA.AMP,
         CNA.HOMDEL
     ));
-    List<MolecularProfileCaseIdentifier> sampleIdToProfileId = new ArrayList<>();
-    List<MolecularProfileCaseIdentifier> patientIdToProfileId = new ArrayList<>();
-
-    List<MolecularProfileCaseIdentifier> svSampleIdToProfileId = new ArrayList<>();
-    List<MolecularProfileCaseIdentifier> svPatientIdToProfileId = new ArrayList<>();
+    Set<MolecularProfileCaseIdentifier> sampleIdToProfileId = new TreeSet<>();
+    Set<MolecularProfileCaseIdentifier> svSampleIdToProfileId = new TreeSet<>();
+    Set<MolecularProfileCaseIdentifier> patientIdToProfileId = new TreeSet<>();
+    Set<MolecularProfileCaseIdentifier> svPatientIdToProfileId = new TreeSet<>();
     AlterationFilter alterationFilter;
     
     Select<Integer> entrezGeneIds;
-
     Select<Integer> svEntrezGeneIds;
 
     @Before
@@ -83,6 +80,7 @@ public void setup() {
         sampleIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SD-01", "study_tcga_pub_gistic"));
         svSampleIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SB-01", "study_tcga_pub_sv"));
         svSampleIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SD-01", "study_tcga_pub_sv"));
+        svSampleIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-B0SO-01", "acc_tcga_sv"));
 
         patientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SB", "study_tcga_pub_mutations"));
         patientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SE", "study_tcga_pub_mutations"));
@@ -95,6 +93,7 @@ public void setup() {
         patientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SD", "study_tcga_pub_gistic"));
         svPatientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SB", "study_tcga_pub_sv"));
         svPatientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SD", "study_tcga_pub_sv"));
+        svPatientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-B0SO", "acc_tcga_sv"));
 
         entrezGeneIds = Select.byValues(Arrays.asList(207, 208, 672, 2064));
         svEntrezGeneIds = Select.byValues(Arrays.asList(57670, 8031, 27436, 7113));
@@ -113,60 +112,60 @@ public void setup() {
     }
 
     @Test
-    public void getSampleMutationCountAllDriverAnnotationsExcluded() throws Exception {
+    public void getSampleMutationGeneCountAllDriverAnnotationsExcluded() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeVUS(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new HashSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getSampleMutationCountAllDriverTiersExcluded() throws Exception {
+    public void getSampleMutationGeneCountAllDriverTiersExcluded() throws Exception {
         alterationFilter.setSelectedTiers(Select.none());
         alterationFilter.setIncludeUnknownTier(false);
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
             new TreeSet<>(sampleIdToProfileId),
             entrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getSampleMutationCountAllDriverTiersExcludedWithNullSelect() throws Exception {
+    public void getSampleMutationGeneCountAllDriverTiersExcludedWithNullSelect() throws Exception {
         alterationFilter.setSelectedTiers(null);
         alterationFilter.setIncludeUnknownTier(false);
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getSampleMutationCountAllMutationStatusExcluded() throws Exception {
+    public void getSampleMutationGeneCountAllMutationStatusExcluded() throws Exception {
         alterationFilter.setIncludeSomatic(false);
         alterationFilter.setIncludeGermline(false);
         alterationFilter.setIncludeUnknownStatus(false);
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getSampleMutationCount() throws Exception {
+    public void getSampleMutationGeneCount() throws Exception {
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
@@ -183,10 +182,10 @@ public void getSampleMutationCount() throws Exception {
     }
 
     @Test
-    public void getSampleCnaCount() throws Exception {
+    public void getSampleCnaGeneCount() throws Exception {
         alterationFilter.setMutationTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
@@ -200,9 +199,9 @@ public void getSampleCnaCount() throws Exception {
     }
 
     @Test
-    public void getSampleMutationAndCnaCount() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+    public void getSampleMutationAndCnaGeneCount() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
@@ -221,58 +220,58 @@ public void getSampleMutationAndCnaCount() throws Exception {
     @Test
     public void whenSampleNotProfiledForCNA() throws Exception {
 
-        List<MolecularProfileCaseIdentifier> sampleIdToProfileId = new ArrayList<>();
+        Set<MolecularProfileCaseIdentifier> sampleIdToProfileId = new TreeSet<>();
         // Sample is not profiled for mutations and not cna
         sampleIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SE-01", "study_tcga_pub_gistic"));
 
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getPatientCnaCountAllDriverAnnotationsExcluded() throws Exception {
+    public void getPatientCnaGeneCountAllDriverAnnotationsExcluded() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeVUS(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
         alterationFilter.setMutationTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getPatientCnaCountAllDriverTiersExcluded() throws Exception {
+    public void getPatientCnaGeneCountAllDriverTiersExcluded() throws Exception {
         alterationFilter.setSelectedTiers(Select.none());
         alterationFilter.setIncludeUnknownTier(false);
         alterationFilter.setMutationTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getPatientCnaCountAllDriverTiersExcludedNullSelect() throws Exception {
+    public void getPatientCnaGeneCountAllDriverTiersExcludedNullSelect() throws Exception {
         alterationFilter.setSelectedTiers(null);
         alterationFilter.setIncludeUnknownTier(false);
         alterationFilter.setMutationTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
     }
     
     @Test
-    public void getPatientCnaCount() throws Exception {
+    public void getPatientCnaGeneCount() throws Exception {
         alterationFilter.setMutationTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,    
             alterationFilter);
@@ -289,14 +288,14 @@ public void getPatientCnaCount() throws Exception {
     }
 
     @Test
-    public void getSampleCnaCountLegacy() throws Exception {
+    public void getSampleCnaGeneCountLegacy() throws Exception {
 
         // FIXME: the CnaCountLegacy endpoint is different from the AlterationCount endpoint
         // because it returns a single additional value 'cytoband'. It would make sense to 
         // harmonize these endpoints (both or none return 'cytoband') and use the AlterationCount
         // endpoint for all counts. Let's discuss...
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(
-            new TreeSet<>(sampleIdToProfileId), 
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(
+            sampleIdToProfileId, 
             entrezGeneIds,
             alterationFilter);
 
@@ -310,13 +309,13 @@ public void getSampleCnaCountLegacy() throws Exception {
     }
     
     @Test
-    public void getPatientCnaCountLegacy() throws Exception {
+    public void getPatientCnaGeneCountLegacy() throws Exception {
 
         // FIXME: the CnaCountLegacy endpoint is different from the AlterationCount endpoint
         // because it returns a single additional value 'cytoband'. It would make sense to 
         // harmonize these endpoints (both or none return 'cytoband') and use the AlterationCount
         // endpoint for all counts. Let's discuss...
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -333,57 +332,57 @@ public void getPatientCnaCountLegacy() throws Exception {
     }
 
     @Test
-    public void getSampleAlterationCountsReturnsZeroForMutationsAndCnaSelectorsInNone() {
+    public void getSampleAlterationGeneCountsReturnsZeroForMutationsAndCnaSelectorsInNone() {
         alterationFilter.setCnaTypeSelect(Select.none());
         alterationFilter.setMutationTypeSelect(Select.none());
 	alterationFilter.setStructuralVariants(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getSampleAlterationCountsReturnsAllForMutationsAndCnaSelectorsInAll() {
+    public void getSampleAlterationGeneCountsReturnsAllForMutationsAndCnaSelectorsInAll() {
         alterationFilter.setCnaTypeSelect(Select.all());
         alterationFilter.setMutationTypeSelect(Select.all());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
         Assert.assertEquals(3, result.size());
     }
 
     @Test
-    public void getSampleCountNullIds() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
+    public void getSampleGeneCountNullIds() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
             null, entrezGeneIds, new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getPatientCountNullIds() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+    public void getPatientGeneCountNullIds() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             null, entrezGeneIds, new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getSampleCnaCountNullIds() throws Exception {
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(
+    public void getSampleCnaGeneCountNullIds() throws Exception {
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(
             null, entrezGeneIds, new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getSampleCountIncludeOnlyDriver() throws Exception {
+    public void getSampleGeneCountIncludeOnlyDriver() throws Exception {
         alterationFilter.setIncludeVUS(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
@@ -397,11 +396,11 @@ public void getSampleCountIncludeOnlyDriver() throws Exception {
     }
 
     @Test
-    public void getSampleCountIncludeOnlyVus() throws Exception {
+    public void getSampleGeneCountIncludeOnlyVus() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
@@ -418,11 +417,11 @@ public void getSampleCountIncludeOnlyVus() throws Exception {
     }
 
     @Test
-    public void getSampleCountIncludeOnlyUnknownOncogenicity() throws Exception {
+    public void getSampleGeneCountIncludeOnlyUnknownOncogenicity() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeVUS(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
@@ -433,12 +432,12 @@ public void getSampleCountIncludeOnlyUnknownOncogenicity() throws Exception {
     }
 
     @Test
-    public void getSampleCountIncludeOnlyTiers() throws Exception {
+    public void getSampleGeneCountIncludeOnlyTiers() throws Exception {
         // All 'Tier 2' tiers are forced to be interpreted as driver events
         alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Tier 2")));
         alterationFilter.setIncludeUnknownTier(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
@@ -452,10 +451,10 @@ public void getSampleCountIncludeOnlyTiers() throws Exception {
     }
 
     @Test
-    public void getSampleCountIncludeUnknownTier() throws Exception {
+    public void getSampleGeneCountIncludeUnknownTier() throws Exception {
         alterationFilter.setSelectedTiers(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId,
             entrezGeneIds,
             alterationFilter);
 
@@ -466,8 +465,8 @@ public void getSampleCountIncludeUnknownTier() throws Exception {
     }
 
     @Test
-    public void getPatientMutationAndCnaCount() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+    public void getPatientMutationAndCnaGeneCount() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -487,11 +486,11 @@ public void getPatientMutationAndCnaCount() throws Exception {
     }
 
     @Test
-    public void getPatientMutationCountIncludeOnlyGermline() throws Exception {
+    public void getPatientMutationGeneCountIncludeOnlyGermline() throws Exception {
         alterationFilter.setIncludeSomatic(false);
         alterationFilter.setIncludeUnknownStatus(false);
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -509,11 +508,11 @@ public void getPatientMutationCountIncludeOnlyGermline() throws Exception {
     }
 
     @Test
-    public void getPatientMutationCountIncludeOnlySomatic() throws Exception {
+    public void getPatientMutationGeneCountIncludeOnlySomatic() throws Exception {
         alterationFilter.setIncludeGermline(false);
         alterationFilter.setIncludeUnknownStatus(false);
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -522,11 +521,11 @@ public void getPatientMutationCountIncludeOnlySomatic() throws Exception {
     }
 
     @Test
-    public void getPatientMutationCountIncludeOnlyUnknownStatus() throws Exception {
+    public void getPatientMutationGeneCountIncludeOnlyUnknownStatus() throws Exception {
         alterationFilter.setIncludeGermline(false);
         alterationFilter.setIncludeSomatic(false);
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -535,10 +534,10 @@ public void getPatientMutationCountIncludeOnlyUnknownStatus() throws Exception {
     }
 
     @Test
-    public void getPatientCountIncludeOnlyDriver() throws Exception {
+    public void getPatientGeneCountIncludeOnlyDriver() throws Exception {
         alterationFilter.setIncludeVUS(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -553,10 +552,10 @@ public void getPatientCountIncludeOnlyDriver() throws Exception {
     }
 
     @Test
-    public void getPatientCountIncludeOnlyVUS() throws Exception {
+    public void getPatientGeneCountIncludeOnlyVUS() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -574,10 +573,10 @@ public void getPatientCountIncludeOnlyVUS() throws Exception {
     }
     
     @Test
-    public void getPatientCountIncludeOnlyUnknownOncogenicity() throws Exception {
+    public void getPatientGeneCountIncludeOnlyUnknownOncogenicity() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeVUS(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -589,11 +588,11 @@ public void getPatientCountIncludeOnlyUnknownOncogenicity() throws Exception {
     }
 
     @Test
-    public void getPatientCountIncludeOnlyTiers() throws Exception {
+    public void getPatientGeneCountIncludeOnlyTiers() throws Exception {
         // All 'Tier 2' tiers are forced to be interpreted as driver events
         alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Tier 2")));
         alterationFilter.setIncludeUnknownTier(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -608,9 +607,9 @@ public void getPatientCountIncludeOnlyTiers() throws Exception {
     }
 
     @Test
-    public void getPatientCountIncludeUnknownTier() throws Exception {
+    public void getPatientGeneCountIncludeUnknownTier() throws Exception {
         alterationFilter.setSelectedTiers(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId,
             entrezGeneIds,
             alterationFilter);
@@ -622,10 +621,10 @@ public void getPatientCountIncludeUnknownTier() throws Exception {
     }
 
     @Test
-    public void getSampleCnaCountLegacyOnlyDriver() throws Exception {
+    public void getSampleCnaGeneCountLegacyOnlyDriver() throws Exception {
         alterationFilter.setIncludeVUS(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(new TreeSet<>(sampleIdToProfileId), entrezGeneIds, alterationFilter);
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(sampleIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
         AlterationCountByGene result207 = result.stream().filter(r -> r.getEntrezGeneId() == 207).findFirst().get();
@@ -634,10 +633,10 @@ public void getSampleCnaCountLegacyOnlyDriver() throws Exception {
     }
 
     @Test
-    public void getSampleCnaCountLegacyOnlyVUS() throws Exception {
+    public void getSampleCnaGeneCountLegacyOnlyVUS() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(new TreeSet<>(sampleIdToProfileId), entrezGeneIds, alterationFilter);
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(sampleIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
         AlterationCountByGene result207 = result.stream().filter(r -> r.getEntrezGeneId() == 207).findFirst().get();
@@ -646,11 +645,11 @@ public void getSampleCnaCountLegacyOnlyVUS() throws Exception {
     }
 
     @Test
-    public void getSampleCnaCountLegacyOnlyUnknownOncogenicity() throws Exception {
+    public void getSampleCnaGeneCountLegacyOnlyUnknownOncogenicity() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeVUS(false);
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(
-            new TreeSet<>(sampleIdToProfileId), entrezGeneIds, alterationFilter);
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(
+            sampleIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
         AlterationCountByGene result208 = result.stream().filter(r -> r.getEntrezGeneId() == 208).findFirst().get();
@@ -659,10 +658,10 @@ public void getSampleCnaCountLegacyOnlyUnknownOncogenicity() throws Exception {
     }
 
     @Test
-    public void getSampleCnaCountLegacyOnlyUnknownTier() throws Exception {
+    public void getSampleCnaGeneCountLegacyOnlyUnknownTier() throws Exception {
         alterationFilter.setSelectedTiers(Select.none());
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(
-            new TreeSet<>(sampleIdToProfileId), entrezGeneIds, alterationFilter);
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(
+            sampleIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
         AlterationCountByGene result208 = result.stream().filter(r -> r.getEntrezGeneId() == 208).findFirst().get();
@@ -671,12 +670,12 @@ public void getSampleCnaCountLegacyOnlyUnknownTier() throws Exception {
     }
 
     @Test
-    public void getSampleCnaCountLegacyOnlyTier2() throws Exception {
+    public void getSampleCnaGeneCountLegacyOnlyTier2() throws Exception {
         // All 'Tier 2' tiers are forced to be interpreted as driver events
         alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Tier 2")));
         alterationFilter.setIncludeUnknownTier(false);
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(
-            new TreeSet<>(sampleIdToProfileId), entrezGeneIds, alterationFilter);
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(
+            sampleIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
         AlterationCountByGene result207 = result.stream().filter(r -> r.getEntrezGeneId() == 207).findFirst().get();
@@ -685,10 +684,10 @@ public void getSampleCnaCountLegacyOnlyTier2() throws Exception {
     }
 
     @Test
-    public void getPatientCnaCountLegacyOnlyDriver() throws Exception {
+    public void getPatientCnaGeneCountLegacyOnlyDriver() throws Exception {
         alterationFilter.setIncludeVUS(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             patientIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
@@ -698,10 +697,10 @@ public void getPatientCnaCountLegacyOnlyDriver() throws Exception {
     }
 
     @Test
-    public void getPatientCnaCountLegacyOnlyVUS() throws Exception {
+    public void getPatientCnaGeneCountLegacyOnlyVUS() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeUnknownOncogenicity(false);
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             patientIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
@@ -711,10 +710,10 @@ public void getPatientCnaCountLegacyOnlyVUS() throws Exception {
     }
 
     @Test
-    public void getPatientCnaCountLegacyOnlyUnknownOncogenicity() throws Exception {
+    public void getPatientCnaGeneCountLegacyOnlyUnknownOncogenicity() throws Exception {
         alterationFilter.setIncludeDriver(false);
         alterationFilter.setIncludeVUS(false);
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             patientIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
@@ -724,9 +723,9 @@ public void getPatientCnaCountLegacyOnlyUnknownOncogenicity() throws Exception {
     }
 
     @Test
-    public void getPatientCnaCountLegacyOnlyUnknownTier() throws Exception {
+    public void getPatientCnaGeneCountLegacyOnlyUnknownTier() throws Exception {
         alterationFilter.setSelectedTiers(Select.none());
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             patientIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
@@ -736,12 +735,12 @@ public void getPatientCnaCountLegacyOnlyUnknownTier() throws Exception {
     }
 
     @Test
-    public void getPatientCnaCountLegacyOnlyTier2() throws Exception {
+    public void getPatientCnaGeneCountLegacyOnlyTier2() throws Exception {
         // All 'Tier 2' tiers are forced to be interpreted as driver events
         alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Tier 2")));
         alterationFilter.setIncludeUnknownTier(false);
         alterationFilter.setSelectedTiers( Select.byValues(Arrays.asList("Tier 2")));
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             patientIdToProfileId, entrezGeneIds, alterationFilter);
 
         Assert.assertEquals(1, result.size());
@@ -752,92 +751,92 @@ public void getPatientCnaCountLegacyOnlyTier2() throws Exception {
 
 
     @Test
-    public void getPatientCnaCountNullIds() throws Exception {
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+    public void getPatientCnaGeneCountNullIds() throws Exception {
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             null, entrezGeneIds, new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
     
     @Test
-    public void getSampleCountNullEntrezGeneIds() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId), null, new AlterationFilter());
+    public void getSampleGeneCountNullEntrezGeneIds() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId, null, new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
     
     @Test
-    public void getSampleCountEmptyEntrezGeneIds() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId), Select.none(), new AlterationFilter());
+    public void getSampleGeneCountEmptyEntrezGeneIds() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId, Select.none(), new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
     
     @Test
-    public void getSampleCountAllEntrezGeneIds() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(sampleIdToProfileId), Select.all(), new AlterationFilter());
+    public void getSampleGeneCountAllEntrezGeneIds() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            sampleIdToProfileId, Select.all(), new AlterationFilter());
         Assert.assertEquals(3, result.size());
     }
 
     @Test
-    public void getPatientCountNullEntrezGeneIds() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+    public void getPatientGeneCountNullEntrezGeneIds() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId, null, new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getPatientCountEmptyEntrezGeneIds() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+    public void getPatientGeneCountEmptyEntrezGeneIds() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId, Select.none(), new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getPatientCountAllEntrezGeneIds() throws Exception {
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+    public void getPatientGeneCountAllEntrezGeneIds() throws Exception {
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             patientIdToProfileId, Select.all(), new AlterationFilter());
         Assert.assertEquals(3, result.size());
     }
 
     @Test
-    public void getSampleCnaCountNullEntrezGeneIds() throws Exception {
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(
-            new TreeSet<>(sampleIdToProfileId), null, new AlterationFilter());
+    public void getSampleCnaGeneCountNullEntrezGeneIds() throws Exception {
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(
+            sampleIdToProfileId, null, new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getSampleCnaCountEmptyEntrezGeneIds() throws Exception {
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(
-            new TreeSet<>(sampleIdToProfileId), Select.none(), new AlterationFilter());
+    public void getSampleCnaGeneCountEmptyEntrezGeneIds() throws Exception {
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(
+            sampleIdToProfileId, Select.none(), new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getSampleCnaCountAllEntrezGeneIds() throws Exception {
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaCounts(
-            new TreeSet<>(sampleIdToProfileId), Select.all(), new AlterationFilter());
+    public void getSampleCnaGeneCountAllEntrezGeneIds() throws Exception {
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getSampleCnaGeneCounts(
+            sampleIdToProfileId, Select.all(), new AlterationFilter());
         Assert.assertEquals(3, result.size());
     }
 
     @Test
-    public void getPatientCnaCountNullEntrezGeneIds() throws Exception {
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+    public void getPatientCnaGeneCountNullEntrezGeneIds() throws Exception {
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             patientIdToProfileId, null, new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getPatientCnaCountEmptyEntrezGeneIds() throws Exception {
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+    public void getPatientCnaGeneCountEmptyEntrezGeneIds() throws Exception {
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             patientIdToProfileId, Select.none(), new AlterationFilter());
         Assert.assertEquals(0, result.size());
     }
 
     @Test
-    public void getPatientCnaCountAllEntrezGeneIds() throws Exception {
-        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaCounts(
+    public void getPatientCnaGeneCountAllEntrezGeneIds() throws Exception {
+        List<CopyNumberCountByGene> result = alterationMyBatisRepository.getPatientCnaGeneCounts(
             patientIdToProfileId, Select.all(), new AlterationFilter());
         Assert.assertEquals(3, result.size());
     }
@@ -851,8 +850,8 @@ public void getSampleStructuralVariantCountAllStructuralVariantStatusExcluded()
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(svSampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            svSampleIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
@@ -863,8 +862,8 @@ public void getSampleStructuralVariantCountAllStructuralVariantStatusIncluded()
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(svSampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            svSampleIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
         Assert.assertEquals(4, result.size());
@@ -877,19 +876,22 @@ public void getSampleStructuralVariantCountIncludeOnlyGermline() throws Exceptio
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(svSampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            svSampleIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
         // two structural variants in testSql.sql are germline mutations
 
         AlterationCountByGene result57670 = result.stream().filter(r -> r.getEntrezGeneId() == 57670).findFirst().get();
         AlterationCountByGene result27436 = result.stream().filter(r -> r.getEntrezGeneId() == 27436).findFirst().get();
-        Assert.assertEquals(2, result.size());
+        AlterationCountByGene result7113 = result.stream().filter(r -> r.getEntrezGeneId() == 7113).findFirst().get();
+        Assert.assertEquals(3, result.size());
         Assert.assertEquals((Integer) 1, result57670.getTotalCount());
         Assert.assertEquals((Integer) 1, result57670.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result27436.getTotalCount());
         Assert.assertEquals((Integer) 1, result27436.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, result7113.getTotalCount());
+        Assert.assertEquals((Integer) 1, result7113.getNumberOfAlteredCases());
     }
 
     @Test
@@ -899,8 +901,8 @@ public void getSampleStructuralVariantCountIncludeOnlySomatic() throws Exception
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(svSampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            svSampleIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
         Assert.assertEquals(4, result.size());
@@ -909,10 +911,10 @@ public void getSampleStructuralVariantCountIncludeOnlySomatic() throws Exception
         AlterationCountByGene result8031 = result.stream().filter(r -> r.getEntrezGeneId() == 8031).findFirst().get();
         AlterationCountByGene result27436 = result.stream().filter(r -> r.getEntrezGeneId() == 27436).findFirst().get();
         AlterationCountByGene result7113 = result.stream().filter(r -> r.getEntrezGeneId() == 7113).findFirst().get();
-        Assert.assertEquals((Integer) 2, result57670.getTotalCount());
-        Assert.assertEquals((Integer) 2, result57670.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 1, result8031.getTotalCount());
-        Assert.assertEquals((Integer) 1, result8031.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, result57670.getTotalCount());
+        Assert.assertEquals((Integer) 3, result57670.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, result8031.getTotalCount());
+        Assert.assertEquals((Integer) 2, result8031.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result27436.getTotalCount());
         Assert.assertEquals((Integer) 1, result27436.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result7113.getTotalCount());
@@ -926,8 +928,8 @@ public void getSampleStructuralVariantCountIncludeOnlyUnknownStatus() throws Exc
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationCounts(
-            new TreeSet<>(svSampleIdToProfileId),
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getSampleAlterationGeneCounts(
+            svSampleIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
         Assert.assertEquals(0, result.size());
@@ -942,7 +944,7 @@ public void getPatientStructuralVariantCountAllStructuralVariantStatusExcluded()
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
@@ -954,7 +956,7 @@ public void getPatientStructuralVariantCountAllStructuralVariantStatusIncluded()
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
@@ -968,19 +970,22 @@ public void getPatientStructuralVariantCountIncludeOnlyGermline() throws Excepti
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
         // two structural variants in testSql.sql are germline mutations
-        Assert.assertEquals(2, result.size());
+        Assert.assertEquals(3, result.size());
 
         AlterationCountByGene result57670 = result.stream().filter(r -> r.getEntrezGeneId() == 57670).findFirst().get();
         AlterationCountByGene result27436 = result.stream().filter(r -> r.getEntrezGeneId() == 27436).findFirst().get();
+        AlterationCountByGene result7113 = result.stream().filter(r -> r.getEntrezGeneId() == 7113).findFirst().get();
         Assert.assertEquals((Integer) 1, result57670.getTotalCount());
         Assert.assertEquals((Integer) 1, result57670.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result27436.getTotalCount());
         Assert.assertEquals((Integer) 1, result27436.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, result7113.getTotalCount());
+        Assert.assertEquals((Integer) 1, result7113.getNumberOfAlteredCases());
     }
 
     @Test
@@ -990,7 +995,7 @@ public void getPatientStructuralVariantCountIncludeOnlySomatic() throws Exceptio
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
@@ -1000,10 +1005,10 @@ public void getPatientStructuralVariantCountIncludeOnlySomatic() throws Exceptio
         AlterationCountByGene result8031 = result.stream().filter(r -> r.getEntrezGeneId() == 8031).findFirst().get();
         AlterationCountByGene result27436 = result.stream().filter(r -> r.getEntrezGeneId() == 27436).findFirst().get();
         AlterationCountByGene result7113 = result.stream().filter(r -> r.getEntrezGeneId() == 7113).findFirst().get();
-        Assert.assertEquals((Integer) 2, result57670.getTotalCount());
-        Assert.assertEquals((Integer) 2, result57670.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 1, result8031.getTotalCount());
-        Assert.assertEquals((Integer) 1, result8031.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, result57670.getTotalCount());
+        Assert.assertEquals((Integer) 3, result57670.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, result8031.getTotalCount());
+        Assert.assertEquals((Integer) 2, result8031.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result27436.getTotalCount());
         Assert.assertEquals((Integer) 1, result27436.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result7113.getTotalCount());
@@ -1017,7 +1022,7 @@ public void getPatientStructuralVariantCountIncludeOnlyUnknownStatus() throws Ex
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,
             svEntrezGeneIds,
             alterationFilter);
@@ -1031,7 +1036,7 @@ public void getPatientStructuralVariantCountIncludeCustomDriverAnnotationsInclud
         alterationFilter.setCnaTypeSelect(Select.none());
         alterationFilter.setSelectedTiers(Select.byValues(List.of("Class 2")));
         alterationFilter.setIncludeUnknownTier(true);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,
             svEntrezGeneIds,
             alterationFilter
@@ -1046,12 +1051,129 @@ public void getPatientStructuralVariantCountIncludeCustomDriverAnnotationsExclud
         alterationFilter.setCnaTypeSelect(Select.none());
         alterationFilter.setSelectedTiers(Select.byValues(List.of("Class 2")));
         alterationFilter.setIncludeUnknownTier(false);
-        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationCounts(
+        List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,
             svEntrezGeneIds,
             alterationFilter
         );
         Assert.assertEquals(1, result.size());
     }
+    @Test
+    public void getSampleStructuralVariantCount() throws Exception {
+        List<AlterationCountByStructuralVariant> result = alterationMyBatisRepository.getSampleStructuralVariantCounts(
+            svSampleIdToProfileId,
+            alterationFilter);
+
+        // Should be one KIAA154-BRAF, one NCOA4-RET and one NCOA4-null
+        Assert.assertEquals(5, result.size());
+        AlterationCountByStructuralVariant resultEmlAlk = findStructVarCount("EML4", "ALK", result);
+        AlterationCountByStructuralVariant resultKiaaBraf= findStructVarCount("KIAA1549", "BRAF", result);
+        AlterationCountByStructuralVariant resultTmprsErg = findStructVarCount("TMPRSS2", "ERG", result);
+        AlterationCountByStructuralVariant resultNcoRet = findStructVarCount("NCOA4", "RET", result);
+        AlterationCountByStructuralVariant resultNcoNull = findStructVarCount("NCOA4", null, result);
+        Assert.assertEquals((Integer) 2, resultEmlAlk.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultEmlAlk.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 4, resultKiaaBraf.getTotalCount());
+        Assert.assertEquals((Integer) 3, resultKiaaBraf.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, resultNcoNull.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultNcoNull.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultTmprsErg.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultTmprsErg.getNumberOfAlteredCases());
+    }
+
+    @Test
+    public void getSampleStructuralVariantCountAllSvStatusExcluded() throws Exception {
+    
+        // Note: 'NA' for SV status is not allowed as per file-formats.md
+        alterationFilter.setIncludeSomatic(false);
+        alterationFilter.setIncludeGermline(false);
+        alterationFilter.setIncludeUnknownStatus(false);
+        List<AlterationCountByStructuralVariant> result = alterationMyBatisRepository.getSampleStructuralVariantCounts(
+            sampleIdToProfileId,
+            alterationFilter);
+
+        Assert.assertEquals(0, result.size());
+    }
+
+    @Test
+    public void getSampleStructuralVariantCountSomaticSvStatusExcluded() throws Exception {
+
+        // Note: 'NA' for SV status is not allowed as per file-formats.md
+        alterationFilter.setIncludeSomatic(false);
+        alterationFilter.setIncludeUnknownStatus(false);
+        List<AlterationCountByStructuralVariant> result = alterationMyBatisRepository.getSampleStructuralVariantCounts(
+            svSampleIdToProfileId,
+            alterationFilter);
+
+        Assert.assertEquals(3, result.size());
+        AlterationCountByStructuralVariant resultKiaaBraf= findStructVarCount("KIAA1549", "BRAF", result);
+        AlterationCountByStructuralVariant resultEmlAlk = findStructVarCount("EML4", "ALK", result);
+        AlterationCountByStructuralVariant resultTmprsErg = findStructVarCount("TMPRSS2", "ERG", result);
+        Assert.assertEquals((Integer) 1, resultKiaaBraf.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultKiaaBraf.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, resultEmlAlk.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultEmlAlk.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, resultTmprsErg.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultTmprsErg.getNumberOfAlteredCases());
+    }
+
+    @Test
+    public void getSampleStructuralVariantCountGermlineSvStatusExcluded() throws Exception {
+        // Note: 'NA' for SV status is not allowed as per file-formats.md
+        alterationFilter.setIncludeGermline(false);
+        alterationFilter.setIncludeUnknownStatus(false);
+        List<AlterationCountByStructuralVariant> result = alterationMyBatisRepository.getSampleStructuralVariantCounts(
+            svSampleIdToProfileId,
+            alterationFilter);
+
+        Assert.assertEquals(5, result.size());
+        AlterationCountByStructuralVariant resultEmlAlk = findStructVarCount("EML4", "ALK", result);
+        AlterationCountByStructuralVariant resultKiaaBraf= findStructVarCount("KIAA1549", "BRAF", result);
+        AlterationCountByStructuralVariant resultTmprsErg = findStructVarCount("TMPRSS2", "ERG", result);
+        AlterationCountByStructuralVariant resultNcoRet = findStructVarCount("NCOA4", "RET", result);
+        AlterationCountByStructuralVariant resultNcoNull = findStructVarCount("NCOA4", null, result);
+        Assert.assertEquals((Integer) 1, resultEmlAlk.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultEmlAlk.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, resultKiaaBraf.getTotalCount());
+        Assert.assertEquals((Integer) 3, resultKiaaBraf.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, resultNcoNull.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultNcoNull.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, resultTmprsErg.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultTmprsErg.getNumberOfAlteredCases());
+    }
+
+    @Test
+    public void getPatientStructuralVariantCount() throws Exception {
+        List<AlterationCountByStructuralVariant> result = alterationMyBatisRepository.getPatientStructuralVariantCounts(
+            svPatientIdToProfileId,
+            alterationFilter);
+
+        Assert.assertEquals(4, result.size());
+        AlterationCountByStructuralVariant resultEmlAlk = findStructVarCount("EML4", "ALK", result);
+        AlterationCountByStructuralVariant resultKiaaBraf= findStructVarCount("KIAA1549", "BRAF", result);
+        AlterationCountByStructuralVariant resultTmprsErg = findStructVarCount("TMPRSS2", "ERG", result);
+        AlterationCountByStructuralVariant resultNcoRet = findStructVarCount("NCOA4", "RET", result);
+        Assert.assertEquals((Integer) 2, resultEmlAlk.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultEmlAlk.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 4, resultKiaaBraf.getTotalCount());
+        Assert.assertEquals((Integer) 3, resultKiaaBraf.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultTmprsErg.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultTmprsErg.getNumberOfAlteredCases());
+    }
+
+    private AlterationCountByStructuralVariant findStructVarCount(String gene1HugoSymbol,
+                                                                  String gene2HugoSymbol,
+                                                                  List<AlterationCountByStructuralVariant> counts) {
+        return counts.stream().filter(
+            c -> ((c.getGene1HugoGeneSymbol() == null && gene1HugoSymbol == null) || (c.getGene1HugoGeneSymbol() != null && c.getGene1HugoGeneSymbol().equals(gene1HugoSymbol)))
+              && ((c.getGene2HugoGeneSymbol() == null && gene2HugoSymbol == null) || (c.getGene2HugoGeneSymbol() != null && c.getGene2HugoGeneSymbol().equals(gene2HugoSymbol)))
+            ).findFirst().get();
+    }
     
 }u     }(j~  (f7e19dec49b007059a91744d5387e6e420e55b45j  |persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/StructuralVariantMyBatisRepositoryTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepositoryTest.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepositoryTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepositoryTest.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  Xn  @@ -95,14 +95,15 @@ public void init() {
     boolean includeSomatic;
     boolean includeUnknownStatus;
     private List<GeneFilterQuery> geneQueries;
-    List<StructuralVariantQuery> noStructVars = Collections.emptyList();
+    private List<StructuralVariantQuery> noStructVars = Collections.emptyList();
 
     @Test
     public void fetchStructuralVariantsNoSampleIdentifiers() {
 
         List<String> molecularProfileIds = new ArrayList<>();
         List<Integer> entrezGeneIds = new ArrayList<>();
         List<String> sampleIds = new ArrayList<>();
+        
         molecularProfileIds.add("study_tcga_pub_sv");
         entrezGeneIds.add(57670);
 
@@ -640,5 +641,4 @@ public void fetchStructuralVariantsWithMultipleStructuralVariantQueryNullQueryVa
         Assert.assertEquals("ENST00000340058_NULL",  result.get(0).getSite2EnsemblTranscriptId());
     }
 
-
 }u}(j~  (5966f725a8d961b6a7816ebd51b990051507482ej  Hservice/src/main/java/org/cbioportal/service/AlterationCountService.javaj  modifiedj  K-j  K(j  KUj  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FAlterationCountService.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FAlterationCountService.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FAlterationCountService.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  X&  @@ -8,41 +8,46 @@
 
 public interface AlterationCountService {
 
-    Pair<List<AlterationCountByGene>, Long> getSampleAlterationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                      Select<Integer> entrezGeneIds,
-                                                                      boolean includeFrequency,
-                                                                      boolean includeMissingAlterationsFromGenePanel,
-                                                                      AlterationFilter alterationFilter);
+    Pair<List<AlterationCountByGene>, Long> getSampleAlterationGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                          Select<Integer> entrezGeneIds,
+                                                                          boolean includeFrequency,
+                                                                          boolean includeMissingAlterationsFromGenePanel,
+                                                                          AlterationFilter alterationFilter);
 
-    Pair<List<AlterationCountByGene>, Long> getPatientAlterationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                           Select<Integer> entrezGeneIds,
-                                                           boolean includeFrequency,
-                                                           boolean includeMissingAlterationsFromGenePanel,
-                                                           AlterationFilter alterationFilter);
+    Pair<List<AlterationCountByGene>, Long> getPatientAlterationGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                           Select<Integer> entrezGeneIds,
+                                                                           boolean includeFrequency,
+                                                                           boolean includeMissingAlterationsFromGenePanel,
+                                                                           AlterationFilter alterationFilter);
 
-    Pair<List<AlterationCountByGene>, Long> getSampleMutationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                        Select<Integer> entrezGeneIds,
-                                                        boolean includeFrequency,
-                                                        boolean includeMissingAlterationsFromGenePanel,
-                                                        AlterationFilter alterationFilter);
+    Pair<List<AlterationCountByGene>, Long> getSampleMutationGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                        Select<Integer> entrezGeneIds,
+                                                                        boolean includeFrequency,
+                                                                        boolean includeMissingAlterationsFromGenePanel,
+                                                                        AlterationFilter alterationFilter);
 
-    Pair<List<AlterationCountByGene>, Long> getPatientMutationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                         Select<Integer> entrezGeneIds,
-                                                         boolean includeFrequency,
-                                                         boolean includeMissingAlterationsFromGenePanel,
-                                                         AlterationFilter alterationFilter);
+    Pair<List<AlterationCountByGene>, Long> getPatientMutationGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                         Select<Integer> entrezGeneIds,
+                                                                         boolean includeFrequency,
+                                                                         boolean includeMissingAlterationsFromGenePanel,
+                                                                         AlterationFilter alterationFilter);
 
-    Pair<List<AlterationCountByGene>, Long> getSampleStructuralVariantCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                      Select<Integer> entrezGeneIds,
-                                                      boolean includeFrequency,
-                                                      boolean includeMissingAlterationsFromGenePanel,
-                                                      AlterationFilter alterationFilter);
+    Pair<List<AlterationCountByGene>, Long> getSampleStructuralVariantGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                 Select<Integer> entrezGeneIds,
+                                                                                 boolean includeFrequency,
+                                                                                 boolean includeMissingAlterationsFromGenePanel,
+                                                                                 AlterationFilter alterationFilter);
 
-    Pair<List<AlterationCountByGene>, Long> getPatientStructuralVariantCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                       Select<Integer> entrezGeneIds,
-                                                       boolean includeFrequency,
-                                                       boolean includeMissingAlterationsFromGenePanel,
-                                                       AlterationFilter alterationFilter);
+    Pair<List<AlterationCountByGene>, Long> getPatientStructuralVariantGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                  Select<Integer> entrezGeneIds,
+                                                                                  boolean includeFrequency,
+                                                                                  boolean includeMissingAlterationsFromGenePanel,
+                                                                                  AlterationFilter alterationFilter);
+
+    Pair<List<AlterationCountByStructuralVariant>, Long> getSampleStructuralVariantCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                          boolean includeFrequency,
+                                                                                          boolean includeMissingAlterationsFromGenePanel,
+                                                                                          AlterationFilter alterationFilter);
 
 // Should be restored when old CNA count endpoint is retired
 //    Pair<List<AlterationCountByGene>, Long> getSampleCnaCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
@@ -58,16 +63,16 @@ Pair<List<AlterationCountByGene>, Long> getPatientStructuralVariantCounts(List<M
 //                                                   AlterationEventTypeFilter alterationFilter);
 
     // Should be removed when old CNA count endpoint is retired
-    Pair<List<CopyNumberCountByGene>, Long> getSampleCnaCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                   Select<Integer> entrezGeneIds,
-                                                   boolean includeFrequency,
-                                                   boolean includeMissingAlterationsFromGenePanel,
-                                                   AlterationFilter alterationFilter);
+    Pair<List<CopyNumberCountByGene>, Long> getSampleCnaGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                   Select<Integer> entrezGeneIds,
+                                                                   boolean includeFrequency,
+                                                                   boolean includeMissingAlterationsFromGenePanel,
+                                                                   AlterationFilter alterationFilter);
 
-    Pair<List<CopyNumberCountByGene>, Long> getPatientCnaCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                    Select<Integer> entrezGeneIds,
-                                                    boolean includeFrequency,
-                                                    boolean includeMissingAlterationsFromGenePanel,
-                                                    AlterationFilter alterationFilter);
+    Pair<List<CopyNumberCountByGene>, Long> getPatientCnaGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                    Select<Integer> entrezGeneIds,
+                                                                    boolean includeFrequency,
+                                                                    boolean includeMissingAlterationsFromGenePanel,
+                                                                    AlterationFilter alterationFilter);
     
 }u}(j~  (e3fdeb890c767f78d7a9b7218de1162e640956efj  Bservice/src/main/java/org/cbioportal/service/StudyViewService.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  Xq  @@ -1,9 +1,7 @@
 package org.cbioportal.service;
 
 import org.cbioportal.model.*;
-import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.exception.StudyNotFoundException;
-import org.springframework.cache.annotation.Cacheable;
 
 import java.util.List;
 
@@ -15,9 +13,12 @@ List<AlterationCountByGene> getMutationAlterationCountByGenes(List<String> study
 
     List<AlterationCountByGene> getStructuralVariantAlterationCountByGenes(List<String> studyIds, List<String> sampleIds, AlterationFilter annotationFilter)
         throws StudyNotFoundException;
+    
+    List<AlterationCountByStructuralVariant> getStructuralVariantAlterationCounts(List<String> studyIds, List<String> sampleIds, AlterationFilter annotationFilters);
 
     List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> studyIds, List<String> sampleIds, AlterationFilter annotationFilter)
         throws StudyNotFoundException;
 
     List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String> sampleIds, List<String> studyIds, List<String> stableIds, List<String> profileTypes);
+
 }u}(j~  (0e5484abf2d36faee802a2ae4a0507543caa05d0j  Qservice/src/main/java/org/cbioportal/service/impl/AlterationCountServiceImpl.javaj  modifiedj  KTj  KFj  Kj  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationCountServiceImpl.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationCountServiceImpl.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationCountServiceImpl.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  XbL  @@ -8,7 +8,6 @@
 import org.cbioportal.persistence.MolecularProfileRepository;
 import org.cbioportal.service.AlterationCountService;
 import org.cbioportal.service.util.AlterationEnrichmentUtil;
-import org.cbioportal.service.util.MolecularProfileUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -28,63 +27,59 @@ public class AlterationCountServiceImpl implements AlterationCountService {
     @Autowired
     private AlterationEnrichmentUtil<CopyNumberCountByGene> alterationEnrichmentUtilCna;
     @Autowired
-    private MolecularProfileUtil molecularProfileUtil;
+    private AlterationEnrichmentUtil<AlterationCountByStructuralVariant> alterationEnrichmentUtilStructVar;
     @Autowired
     private MolecularProfileRepository molecularProfileRepository;
 
     @Override
-    public Pair<List<AlterationCountByGene>, Long> getSampleAlterationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                             Select<Integer> entrezGeneIds,
-                                                                             boolean includeFrequency,
-                                                                             boolean includeMissingAlterationsFromGenePanel,
-                                                                             AlterationFilter alterationFilter) {
+    public Pair<List<AlterationCountByGene>, Long> getSampleAlterationGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                 Select<Integer> entrezGeneIds,
+                                                                                 boolean includeFrequency,
+                                                                                 boolean includeMissingAlterationsFromGenePanel,
+                                                                                 AlterationFilter alterationFilter) {
 
         Function<List<MolecularProfileCaseIdentifier>, List<AlterationCountByGene>> dataFetcher = profileCaseIdentifiers ->
-            alterationRepository.getSampleAlterationCounts(new TreeSet<>(profileCaseIdentifiers), entrezGeneIds, alterationFilter);
+            alterationRepository.getSampleAlterationGeneCounts(new TreeSet<>(profileCaseIdentifiers), entrezGeneIds, alterationFilter);
 
         BiFunction<List<MolecularProfileCaseIdentifier>, List<AlterationCountByGene>, Long> includeFrequencyFunction =
             (a, b) -> alterationEnrichmentUtil.includeFrequencyForSamples(a, b, includeMissingAlterationsFromGenePanel);
 
-        Function<AlterationCountByGene, String> keyGenerator = d -> d.getEntrezGeneId().toString();
-
-        return getAlterationCounts(
+        return getAlterationGeneCounts(
             molecularProfileCaseIdentifiers,
             includeFrequency,
             dataFetcher,
-            includeFrequencyFunction,
-            keyGenerator);
+            includeFrequencyFunction
+        );
     }
 
     @Override
-    public Pair<List<AlterationCountByGene>, Long> getPatientAlterationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                              Select<Integer> entrezGeneIds,
-                                                                              boolean includeFrequency,
-                                                                              boolean includeMissingAlterationsFromGenePanel,
-                                                                              AlterationFilter alterationFilter) {
+    public Pair<List<AlterationCountByGene>, Long> getPatientAlterationGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                  Select<Integer> entrezGeneIds,
+                                                                                  boolean includeFrequency,
+                                                                                  boolean includeMissingAlterationsFromGenePanel,
+                                                                                  AlterationFilter alterationFilter) {
 
         Function<List<MolecularProfileCaseIdentifier>, List<AlterationCountByGene>> dataFetcher = profileCaseIdentifiers ->
-            alterationRepository.getPatientAlterationCounts(profileCaseIdentifiers, entrezGeneIds, alterationFilter);
+            alterationRepository.getPatientAlterationGeneCounts(new TreeSet<>(profileCaseIdentifiers), entrezGeneIds, alterationFilter);
 
         BiFunction<List<MolecularProfileCaseIdentifier>, List<AlterationCountByGene>, Long> includeFrequencyFunction =
             (a, b) -> alterationEnrichmentUtil.includeFrequencyForPatients(a, b, includeMissingAlterationsFromGenePanel);
 
-        Function<AlterationCountByGene, String> keyGenerator = d -> d.getEntrezGeneId().toString();
-
-        return getAlterationCounts(
+        return getAlterationGeneCounts(
             molecularProfileCaseIdentifiers,
             includeFrequency,
             dataFetcher,
-            includeFrequencyFunction,
-            keyGenerator);
+            includeFrequencyFunction
+        );
     }
 
     @Override
-    public Pair<List<AlterationCountByGene>, Long> getSampleMutationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                           Select<Integer> entrezGeneIds,
-                                                                           boolean includeFrequency,
-                                                                           boolean includeMissingAlterationsFromGenePanel,
-                                                                           AlterationFilter alterationFilter) {
-        return getSampleAlterationCounts(molecularProfileCaseIdentifiers,
+    public Pair<List<AlterationCountByGene>, Long> getSampleMutationGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                               Select<Integer> entrezGeneIds,
+                                                                               boolean includeFrequency,
+                                                                               boolean includeMissingAlterationsFromGenePanel,
+                                                                               AlterationFilter alterationFilter) {
+        return getSampleAlterationGeneCounts(molecularProfileCaseIdentifiers,
             entrezGeneIds,
             includeFrequency,
             includeMissingAlterationsFromGenePanel,
@@ -93,25 +88,25 @@ public Pair<List<AlterationCountByGene>, Long> getSampleMutationCounts(List<Mole
     }
 
     @Override
-    public Pair<List<AlterationCountByGene>, Long> getPatientMutationCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                            Select<Integer> entrezGeneIds,
-                                                                            boolean includeFrequency,
-                                                                            boolean includeMissingAlterationsFromGenePanel,
-                                                                            AlterationFilter alterationFilter) {
-        return getPatientAlterationCounts(molecularProfileCaseIdentifiers,
+    public Pair<List<AlterationCountByGene>, Long> getPatientMutationGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                Select<Integer> entrezGeneIds,
+                                                                                boolean includeFrequency,
+                                                                                boolean includeMissingAlterationsFromGenePanel,
+                                                                                AlterationFilter alterationFilter) {
+        return getPatientAlterationGeneCounts(molecularProfileCaseIdentifiers,
             entrezGeneIds,
             includeFrequency,
             includeMissingAlterationsFromGenePanel,
             alterationFilter);
     }
 
     @Override
-    public Pair<List<AlterationCountByGene>, Long> getSampleStructuralVariantCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                                    Select<Integer> entrezGeneIds,
-                                                                                    boolean includeFrequency,
-                                                                                    boolean includeMissingAlterationsFromGenePanel,
-                                                                                    AlterationFilter alterationFilter) {
-        return getSampleAlterationCounts(molecularProfileCaseIdentifiers,
+    public Pair<List<AlterationCountByGene>, Long> getSampleStructuralVariantGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                        Select<Integer> entrezGeneIds,
+                                                                                        boolean includeFrequency,
+                                                                                        boolean includeMissingAlterationsFromGenePanel,
+                                                                                        AlterationFilter alterationFilter) {
+        return getSampleAlterationGeneCounts(molecularProfileCaseIdentifiers,
             entrezGeneIds,
             includeFrequency,
             includeMissingAlterationsFromGenePanel,
@@ -120,19 +115,39 @@ public Pair<List<AlterationCountByGene>, Long> getSampleStructuralVariantCounts(
     }
 
     @Override
-    public Pair<List<AlterationCountByGene>, Long> getPatientStructuralVariantCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                                     Select<Integer> entrezGeneIds,
-                                                                                     boolean includeFrequency,
-                                                                                     boolean includeMissingAlterationsFromGenePanel,
-                                                                                     AlterationFilter alterationFilter) {
-        return getPatientAlterationCounts(molecularProfileCaseIdentifiers,
+    public Pair<List<AlterationCountByGene>, Long> getPatientStructuralVariantGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                         Select<Integer> entrezGeneIds,
+                                                                                         boolean includeFrequency,
+                                                                                         boolean includeMissingAlterationsFromGenePanel,
+                                                                                         AlterationFilter alterationFilter) {
+        return getPatientAlterationGeneCounts(molecularProfileCaseIdentifiers,
             entrezGeneIds,
             includeFrequency,
             includeMissingAlterationsFromGenePanel,
             alterationFilter
         );
     }
 
+    @Override
+    public Pair<List<AlterationCountByStructuralVariant>, Long> getSampleStructuralVariantCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                                                 boolean includeFrequency,
+                                                                                                 boolean includeMissingAlterationsFromGenePanel,
+                                                                                                 AlterationFilter alterationFilter) {
+                                                                                                 
+        Function<List<MolecularProfileCaseIdentifier>, List<AlterationCountByStructuralVariant>> dataFetcher = profileCaseIdentifiers ->
+            alterationRepository.getSampleStructuralVariantCounts(new TreeSet<>(profileCaseIdentifiers), alterationFilter);
+
+        BiFunction<List<MolecularProfileCaseIdentifier>, List<AlterationCountByStructuralVariant>, Long> includeFrequencyFunction =
+            (a, b) -> alterationEnrichmentUtilStructVar.includeFrequencyForSamples(a, b, includeMissingAlterationsFromGenePanel);
+            
+        return getAlterationGeneCounts(
+            molecularProfileCaseIdentifiers,
+            includeFrequency,
+            dataFetcher,
+            includeFrequencyFunction
+        );
+    }
+
 // -- Should be reinstated when the legacy CNA count endpoint retires            
 //    @Override
 //    public List<AlterationCountByGene> getSampleCnaCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
@@ -163,57 +178,56 @@ public Pair<List<AlterationCountByGene>, Long> getPatientStructuralVariantCounts
 //    }
 
     @Override
-    public Pair<List<CopyNumberCountByGene>, Long> getSampleCnaCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                      Select<Integer> entrezGeneIds,
-                                                                      boolean includeFrequency,
-                                                                      boolean includeMissingAlterationsFromGenePanel,
-                                                                      AlterationFilter alterationFilter) {
+    public Pair<List<CopyNumberCountByGene>, Long> getSampleCnaGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                          Select<Integer> entrezGeneIds,
+                                                                          boolean includeFrequency,
+                                                                          boolean includeMissingAlterationsFromGenePanel,
+                                                                          AlterationFilter alterationFilter) {
 
         Function<List<MolecularProfileCaseIdentifier>, List<CopyNumberCountByGene>> dataFetcher = profileCaseIdentifiers ->
-            alterationRepository.getSampleCnaCounts(new TreeSet<>(profileCaseIdentifiers), entrezGeneIds, alterationFilter);
+            alterationRepository.getSampleCnaGeneCounts(new TreeSet<>(profileCaseIdentifiers), entrezGeneIds, alterationFilter);
 
         BiFunction<List<MolecularProfileCaseIdentifier>, List<CopyNumberCountByGene>, Long> includeFrequencyFunction =
             (a, b) -> alterationEnrichmentUtilCna.includeFrequencyForSamples(a, b, includeMissingAlterationsFromGenePanel);
 
         Function<CopyNumberCountByGene, String> keyGenerator = d -> d.getEntrezGeneId().toString() + d.getAlteration().toString();
 
-        return getAlterationCounts(
+        return getAlterationGeneCounts(
             molecularProfileCaseIdentifiers,
             includeFrequency,
             dataFetcher,
-            includeFrequencyFunction,
-            keyGenerator);
+            includeFrequencyFunction
+        );
     }
 
     @Override
-    public Pair<List<CopyNumberCountByGene>, Long> getPatientCnaCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-                                                                       Select<Integer> entrezGeneIds,
-                                                                       boolean includeFrequency,
-                                                                       boolean includeMissingAlterationsFromGenePanel,
-                                                                       AlterationFilter alterationFilter) {
+    public Pair<List<CopyNumberCountByGene>, Long> getPatientCnaGeneCounts(List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
+                                                                           Select<Integer> entrezGeneIds,
+                                                                           boolean includeFrequency,
+                                                                           boolean includeMissingAlterationsFromGenePanel,
+                                                                           AlterationFilter alterationFilter) {
 
         Function<List<MolecularProfileCaseIdentifier>, List<CopyNumberCountByGene>> dataFetcher = profileCaseIdentifiers ->
-            alterationRepository.getPatientCnaCounts(profileCaseIdentifiers, entrezGeneIds, alterationFilter);
+            alterationRepository.getPatientCnaGeneCounts(new TreeSet<>(profileCaseIdentifiers), entrezGeneIds, alterationFilter);
 
         BiFunction<List<MolecularProfileCaseIdentifier>, List<CopyNumberCountByGene>, Long> includeFrequencyFunction =
             (a, b) -> alterationEnrichmentUtilCna.includeFrequencyForPatients(a, b, includeMissingAlterationsFromGenePanel);
 
         Function<CopyNumberCountByGene, String> keyGenerator = d -> d.getEntrezGeneId().toString() + d.getAlteration().toString();
 
-        return getAlterationCounts(
+        return getAlterationGeneCounts(
             molecularProfileCaseIdentifiers,
             includeFrequency,
             dataFetcher,
-            includeFrequencyFunction,
-            keyGenerator);
+            includeFrequencyFunction
+        );
     }
 
-    private <S extends AlterationCountByGene> Pair<List<S>, Long> getAlterationCounts(
+    private <S extends AlterationCountBase> Pair<List<S>, Long> getAlterationGeneCounts(
         List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
         boolean includeFrequency,
         Function<List<MolecularProfileCaseIdentifier>, List<S>> dataFetcher,
-        BiFunction<List<MolecularProfileCaseIdentifier>, List<S>, Long> includeFrequencyFunction,
-        Function<S, String> keyGenerator) {
+        BiFunction<List<MolecularProfileCaseIdentifier>, List<S>, Long> includeFrequencyFunction) {
 
         List<S> alterationCountByGenes;
         AtomicReference<Long> profiledCasesCount = new AtomicReference<>(0L);
@@ -243,7 +257,7 @@ private <S extends AlterationCountByGene> Pair<List<S>, Long> getAlterationCount
                         profiledCasesCount.updateAndGet(v -> v + studyProfiledCasesCount);
                     }
                     studyAlterationCountByGenes.forEach(datum -> {
-                        String key = keyGenerator.apply(datum);
+                        String key = datum.getUniqueEventKey();
                         if (totalResult.containsKey(key)) {
                             S alterationCountByGene = totalResult.get(key);
                             alterationCountByGene.setTotalCount(alterationCountByGene.getTotalCount() + datum.getTotalCount());u}(j~  (cbe49e7642989b0e66c79b0b0eb399fcd40aa687j  Vservice/src/main/java/org/cbioportal/service/impl/AlterationEnrichmentServiceImpl.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationEnrichmentServiceImpl.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationEnrichmentServiceImpl.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationEnrichmentServiceImpl.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  X  @@ -46,15 +46,15 @@ public Map<String, Pair<List<AlterationCountByGene>, Long>> getAlterationCountsb
 
                     if (enrichmentType.equals(EnrichmentType.SAMPLE)) {
                         return alterationCountService
-                            .getSampleAlterationCounts(
+                            .getSampleAlterationGeneCounts(
                                 entry.getValue(),
                                 Select.all(),
                                 true,
                                 true,
                                 alterationFilter);
                     } else {
                         return alterationCountService
-                            .getPatientAlterationCounts(
+                            .getPatientAlterationGeneCounts(
                                 entry.getValue(),
                                 Select.all(),
                                 true,u}(j~  (234452da89d5ff5243b4a577dca3618c4f2dede8j  Kservice/src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  XW  @@ -4,6 +4,7 @@
 import org.apache.commons.lang3.StringUtils;
 import org.cbioportal.model.*;
 import org.cbioportal.model.util.Select;
+import org.cbioportal.persistence.AlterationRepository;
 import org.cbioportal.service.*;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.exception.StudyNotFoundException;
@@ -33,6 +34,9 @@ public class StudyViewServiceImpl implements StudyViewService {
     @Autowired
     private GenericAssayService genericAssayService;
 
+    @Autowired
+    private AlterationRepository alterationRepository;
+
     @Override
     public List<GenomicDataCount> getGenomicDataCounts(List<String> studyIds, List<String> sampleIds) {
         List<MolecularProfileCaseIdentifier> molecularProfileSampleIdentifiers =
@@ -82,7 +86,7 @@ public List<AlterationCountByGene> getMutationAlterationCountByGenes(List<String
         throws StudyNotFoundException {
         List<MolecularProfileCaseIdentifier> caseIdentifiers =
             molecularProfileService.getFirstMutationProfileCaseIdentifiers(studyIds, sampleIds);
-        List<AlterationCountByGene> alterationCountByGenes = alterationCountService.getSampleMutationCounts(
+        List<AlterationCountByGene> alterationCountByGenes = alterationCountService.getSampleMutationGeneCounts(
             caseIdentifiers,
             Select.all(),
             true,
@@ -99,7 +103,7 @@ public List<AlterationCountByGene> getStructuralVariantAlterationCountByGenes(Li
         throws StudyNotFoundException {
         List<MolecularProfileCaseIdentifier> caseIdentifiers =
             molecularProfileService.getFirstStructuralVariantProfileCaseIdentifiers(studyIds, sampleIds);
-        List<AlterationCountByGene> alterationCountByGenes = alterationCountService.getSampleStructuralVariantCounts(
+        List<AlterationCountByGene> alterationCountByGenes = alterationCountService.getSampleStructuralVariantGeneCounts(
             caseIdentifiers,
             Select.all(),
             true,
@@ -109,6 +113,18 @@ public List<AlterationCountByGene> getStructuralVariantAlterationCountByGenes(Li
         return alterationCountByGenes;
     }
 
+    @Override
+    public List<AlterationCountByStructuralVariant> getStructuralVariantAlterationCounts(List<String> studyIds,
+                                                                                         List<String> sampleIds,
+                                                                                         AlterationFilter annotationFilters) {
+        List<MolecularProfileCaseIdentifier> caseIdentifiers =
+            molecularProfileService.getFirstStructuralVariantProfileCaseIdentifiers(studyIds, sampleIds);
+        return alterationCountService.getSampleStructuralVariantCounts(caseIdentifiers,
+            true,
+            false,
+            annotationFilters).getFirst();
+    }
+
     private void annotateDataWithQValue(List<String> studyIds, List<AlterationCountByGene> alterationCountByGenes)
         throws StudyNotFoundException {
         Set<String> distinctStudyIds = new HashSet<>(studyIds);
@@ -139,7 +155,7 @@ public List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> stu
         List<MolecularProfileCaseIdentifier> caseIdentifiers =
             molecularProfileService.getFirstDiscreteCNAProfileCaseIdentifiers(studyIds, sampleIds);
         Select<CNA> cnaTypes = Select.byValues(CNA_TYPES_AMP_AND_HOMDEL);
-        List<CopyNumberCountByGene> copyNumberCountByGenes = alterationCountService.getSampleCnaCounts(
+        List<CopyNumberCountByGene> copyNumberCountByGenes = alterationCountService.getSampleCnaGeneCounts(
             caseIdentifiers,
             Select.all(),
             true,
@@ -245,4 +261,5 @@ public List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String>
             })
             .collect(Collectors.toList());
     }
+
 }u}(j~  (0b2b0183c8155b1b6402ca45d8d5417ac30500fbj  Oservice/src/main/java/org/cbioportal/service/util/AlterationEnrichmentUtil.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  X
  @@ -2,6 +2,7 @@
 
 import org.apache.commons.math3.stat.inference.ChiSquareTest;
 import org.apache.commons.math3.util.Pair;
+import org.cbioportal.model.AlterationCountBase;
 import org.cbioportal.model.AlterationCountByGene;
 import org.cbioportal.model.AlterationEnrichment;
 import org.cbioportal.model.CountSummary;
@@ -28,7 +29,7 @@
 import java.util.Map.Entry;
 
 @Component
-public class AlterationEnrichmentUtil<T extends AlterationCountByGene> {
+public class AlterationEnrichmentUtil<T extends AlterationCountBase> {
 
     @Autowired
     private FisherExactTestCalculator fisherExactTestCalculator;
@@ -41,7 +42,7 @@ public class AlterationEnrichmentUtil<T extends AlterationCountByGene> {
     @Autowired
     private MolecularProfileService molecularProfileService;
 
-    public List<AlterationEnrichment> createAlterationEnrichments(Map<String, Pair<List<T>, Long>> mutationCountsbyGroup) {
+    public List<AlterationEnrichment> createAlterationEnrichments(Map<String, Pair<List<AlterationCountByGene>, Long>> mutationCountsbyGroup) {
         
         Map<String, Map<Integer, AlterationCountByGene>> mutationCountsbyEntrezGeneIdAndGroup = mutationCountsbyGroup
                     .entrySet()
@@ -160,14 +161,14 @@ public List<AlterationEnrichment> createAlterationEnrichments(Map<String, Pair<L
     
     public long includeFrequencyForSamples(
             List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-            List<T> alterationCountByGenes,
+            List<T> alterationCounts,
             boolean includeMissingAlterationsFromGenePanel) {
 
         // Collect profile id and sample id arrays.
         // These are arrays of equal length, where every index
         // represents a sample id / profile id-combination
         List<String> sampleIds = new ArrayList<>();
-        List<String> molecularProfileIds = new ArrayList<>();
+        List<String> molecularProfileIds = new ArrayList<>();   
         molecularProfileCaseIdentifiers.forEach(pair -> {
             sampleIds.add(pair.getCaseId());
             molecularProfileIds.add(pair.getMolecularProfileId());
@@ -176,7 +177,7 @@ public long includeFrequencyForSamples(
         List<GenePanelData> genePanelDataList = genePanelService
             .fetchGenePanelDataInMultipleMolecularProfiles(molecularProfileCaseIdentifiers);
 
-        profiledCasesCounter.calculate(alterationCountByGenes, genePanelDataList,
+        profiledCasesCounter.calculate(alterationCounts, genePanelDataList,
                 includeMissingAlterationsFromGenePanel, profiledCasesCounter.sampleUniqueIdentifier);
 
         return genePanelDataList
@@ -189,7 +190,7 @@ public long includeFrequencyForSamples(
 
     public long includeFrequencyForPatients(
             List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-            List<T> alterationCountByGenes,
+            List<T> alterationCounts,
             boolean includeMissingAlterationsFromGenePanel) {
 
         // Collect profile id and sample id arrays.
@@ -205,7 +206,7 @@ public long includeFrequencyForPatients(
         List<GenePanelData> genePanelDataList = genePanelService
             .fetchGenePanelDataInMultipleMolecularProfilesByPatientIds(molecularProfileCaseIdentifiers);
 
-        profiledCasesCounter.calculate(alterationCountByGenes, genePanelDataList,
+        profiledCasesCounter.calculate(alterationCounts, genePanelDataList,
             includeMissingAlterationsFromGenePanel, profiledCasesCounter.patientUniqueIdentifier);
 
         return genePanelDataListu}(j~  (3a4b3641df1dca64b1592d0f380a2d348fe6c051j  Kservice/src/main/java/org/cbioportal/service/util/ProfiledCasesCounter.javaj  modifiedj  K:j  K j  KZj  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FProfiledCasesCounter.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FProfiledCasesCounter.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FProfiledCasesCounter.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  X.  @@ -11,7 +11,7 @@
 import org.springframework.stereotype.Component;
 
 @Component
-public class ProfiledCasesCounter<T extends AlterationCountByGene> {
+public class ProfiledCasesCounter<T extends AlterationCountBase> {
 
     @Autowired
     private GenePanelService genePanelService;
@@ -27,6 +27,7 @@ public void calculate(List<T> alterationCounts,
             List<GenePanelData> genePanelDataList,
             boolean includeMissingAlterationsFromGenePanel,
             Function<GenePanelData, String> caseUniqueIdentifier) {
+            
         ProfiledCaseType profiledCaseType = (caseUniqueIdentifier == patientUniqueIdentifier) ?
             ProfiledCaseType.PATIENT : ProfiledCaseType.SAMPLE;
         Map<String, Set<String>> casesWithDataInGenePanel = extractCasesWithDataInGenePanel(genePanelDataList, caseUniqueIdentifier);
@@ -35,26 +36,30 @@ public void calculate(List<T> alterationCounts,
             genePanels = genePanelService.fetchGenePanels(new ArrayList<>(casesWithDataInGenePanel.keySet()), "DETAILED");
         }
 
-        Map<Pair<Integer, String>, List<GenePanel>> geneGenePanelMap = new HashMap<>();
+        Map<Pair<Integer, String>, List<GenePanel>> geneToGenePanel = new HashMap<>();
         for (GenePanel genePanel : genePanels) {
             for (GenePanelToGene genePanelToGene : genePanel.getGenes()) {
+                // TODO I am not sure whether it is smart to include the HUGO gene suymbol in the key here.
+                // What if two panels have the same Entrez gene id with different Hugo gene symbols? If that situation
+                // can never occur, better not include the HUGO symbol in the key and only use entrez gene id. It confuses
+                // developers that may think it is an important key element.
                 Pair<Integer, String> key = new Pair<>(genePanelToGene.getEntrezGeneId(), genePanelToGene.getHugoGeneSymbol());
-                if (geneGenePanelMap.containsKey(key)) {
-                    geneGenePanelMap.get(key).add(genePanel);
+                if (geneToGenePanel.containsKey(key)) {
+                    geneToGenePanel.get(key).add(genePanel);
                 } else {
                     List<GenePanel> geneGenePanelList = new ArrayList<>();
                     geneGenePanelList.add(genePanel);
-                    geneGenePanelMap.put(key, geneGenePanelList);
+                    geneToGenePanel.put(key, geneGenePanelList);
                 }
             }
         }
 
-        List<GenePanelData> profiled = genePanelDataList
+        List<GenePanelData> genePanelData = genePanelDataList
                 .stream()
                 .filter(GenePanelData::getProfiled)
                 .collect(Collectors.toList());
 
-        Set<String> profiledCases = profiled
+        Set<String> profiledCases = genePanelData
                 .stream()
                 // there can be duplicate patient or sample id, append study id
                 .map(caseUniqueIdentifier)
@@ -66,15 +71,15 @@ public void calculate(List<T> alterationCounts,
         // so a case is considered without panel data only if none of the profiles has a gene panel id
         
         // first identify cases with gene panel data
-        Set<String> casesWithPanelData = profiled
+        Set<String> casesWithPanelData = genePanelData
                 .stream()
                 .filter(g -> g.getGenePanelId() != null)
                 // there can be duplicate patient or sample id, append study id
                 .map(caseUniqueIdentifier)
                 .collect(Collectors.toSet());
 
         // find all unique cases
-        Set<String> casesWithoutPanelData = profiled
+        Set<String> casesWithoutPanelData = genePanelData
             .stream()
             // there can be duplicate patient or sample id, append study id
             .map(caseUniqueIdentifier)
@@ -83,17 +88,15 @@ public void calculate(List<T> alterationCounts,
         // removing cases with panel data from all unique cases gives us the cases without panel data
         casesWithoutPanelData.removeAll(casesWithPanelData);
         
-        for (AlterationCountByGene alterationCountByGene : alterationCounts) {
-            Integer entrezGeneId = alterationCountByGene.getEntrezGeneId();
-            Set<String> totalProfiledPatients = new HashSet<String>();
+        for (T alterationCount : alterationCounts) {
+            Set<String> totalProfiledPatients = new HashSet<>();
+            Set<String> allMatchingGenePanelIds = new HashSet<>();
             int totalProfiledSamples = 0;
-            Set<String> allMatchingGenePanelIds = new HashSet<String>();
-            Pair<Integer, String> key = new Pair<>(entrezGeneId,alterationCountByGene.getHugoGeneSymbol());
             // different calculations depending on if gene is linked to gene panels
-            if (geneGenePanelMap.containsKey(key)) {
+            if (alterationIsCoveredByGenePanel(alterationCount, geneToGenePanel)) {
                 // for every gene panel associated containing the gene, use the sum of unique cases
                 // as well as cases without panel data
-                for (GenePanel genePanel : geneGenePanelMap.get(key)) {
+                for (GenePanel genePanel : getGenePanelsForAlterationCount(alterationCount, geneToGenePanel)) {
                     allMatchingGenePanelIds.add(genePanel.getStableId());
                     if (profiledCaseType == ProfiledCaseType.PATIENT) {
                         totalProfiledPatients.addAll(casesWithDataInGenePanel.get(genePanel.getStableId()));
@@ -103,37 +106,37 @@ public void calculate(List<T> alterationCounts,
                 }
                 if (profiledCaseType == ProfiledCaseType.PATIENT) {
                     totalProfiledPatients.addAll(casesWithoutPanelData);
-                    alterationCountByGene.setNumberOfProfiledCases(totalProfiledPatients.size());
+                    alterationCount.setNumberOfProfiledCases(totalProfiledPatients.size());
                 } else {
                     totalProfiledSamples += casesWithoutPanelData.size();
-                    alterationCountByGene.setNumberOfProfiledCases(totalProfiledSamples);
+                    alterationCount.setNumberOfProfiledCases(totalProfiledSamples);
                 }
             } else {
                 // we use profiledCasesCount instead of casesWithoutPanelData to
                 // prevent a divide by zero error which can happen for targeted studies
                 // in which certain genes have events that are not captured by the panel.
-                alterationCountByGene.setNumberOfProfiledCases(profiledCasesCount);
+                alterationCount.setNumberOfProfiledCases(profiledCasesCount);
             }
-            alterationCountByGene.setMatchingGenePanelIds(allMatchingGenePanelIds);
+            alterationCount.setMatchingGenePanelIds(allMatchingGenePanelIds);
         }
 
         if (includeMissingAlterationsFromGenePanel) {
-            Map<Integer, Boolean> genesWithAlteration = alterationCounts.stream()
-                    .collect(Collectors.toMap(AlterationCountByGene::getEntrezGeneId, x -> true));
+            Set<Integer> genesWithAlteration = alterationCounts.stream()
+                    .flatMap(count -> Arrays.stream(count.getEntrezGeneIds()))
+                    .collect(Collectors.toSet());
 
-            geneGenePanelMap.entrySet().forEach(entry -> {
-                Pair<Integer, String> key = entry.getKey();
-                Integer entrezGeneId = key.getFirst();
-                String hugoGeneSymbol = key.getSecond();
+            geneToGenePanel.entrySet().forEach(entry -> {
+                Integer entrezGeneId = entry.getKey().getFirst();
+                String hugoGeneSymbol = entry.getKey().getSecond();
                 // add alterationCount object where there are no alterations but have genePanel
                 // object
-                if (!genesWithAlteration.containsKey(entrezGeneId)) {
+                if (!genesWithAlteration.contains(entrezGeneId)) {
                     AlterationCountByGene alterationCountByGene = new AlterationCountByGene();
 
-                    Set<String> totalProfiledPatients = new HashSet<String>();
+                    Set<String> totalProfiledPatients = new HashSet<>();
+                    Set<String> allMatchingGenePanelIds = new HashSet<>();
                     int totalProfiledSamples = 0;
-                    Set<String> allMatchingGenePanelIds = new HashSet<String>();
-                    for (GenePanel genePanel : geneGenePanelMap.get(key)) {
+                    for (GenePanel genePanel : geneToGenePanel.get(new Pair<>(entrezGeneId, hugoGeneSymbol))) {
                         allMatchingGenePanelIds.add(genePanel.getStableId());
                         if (profiledCaseType == ProfiledCaseType.PATIENT) {
                             totalProfiledPatients.addAll(casesWithDataInGenePanel.get(genePanel.getStableId()));
@@ -168,16 +171,39 @@ private Map<String, Set<String>> extractCasesWithDataInGenePanel(
             List<GenePanelData> genePanelDataList,
             Function<GenePanelData, String> caseUniqueIdentifier) {
 
-        Map<String, Set<String>> casesWithDataInGenePanel = new HashMap<String, Set<String>>();
+        Map<String, Set<String>> casesWithDataInGenePanel = new HashMap<>();
         // loop through all membership records -- ignore any where g.getGenePanelId == null
         for (GenePanelData genePanelDataRecord : genePanelDataList) {
             String associatedGenePanel = genePanelDataRecord.getGenePanelId();
             if (associatedGenePanel != null) {
-                casesWithDataInGenePanel.putIfAbsent(associatedGenePanel, new HashSet<String>());
+                casesWithDataInGenePanel.putIfAbsent(associatedGenePanel, new HashSet<>());
                 Set<String> casesForThisGenePanel = casesWithDataInGenePanel.get(associatedGenePanel);
                 casesForThisGenePanel.add(caseUniqueIdentifier.apply(genePanelDataRecord));
             }
         }
         return casesWithDataInGenePanel;
     }
+    
+    private boolean alterationIsCoveredByGenePanel(T alterationCount, Map<Pair<Integer, String>, List<GenePanel>> entrezIdToGenePanel) {
+        return !getGenePanelsForAlterationCount(alterationCount, entrezIdToGenePanel).isEmpty();
+    }
+
+    private List<GenePanel> getGenePanelsForAlterationCount(T alterationCount, Map<Pair<Integer, String>, List<GenePanel>> entrezIdToGenePanel) {
+        if (alterationCount instanceof AlterationCountByGene) {
+            Integer entrezId = ((AlterationCountByGene) alterationCount).getEntrezGeneId();
+            String hugoSymbol = ((AlterationCountByGene) alterationCount).getHugoGeneSymbol();
+            return entrezIdToGenePanel.getOrDefault(new Pair<>(entrezId, hugoSymbol), new ArrayList<>());
+        }
+        if (alterationCount instanceof AlterationCountByStructuralVariant) {
+            Integer gene1EntrezId = ((AlterationCountByStructuralVariant) alterationCount).getGene1EntrezGeneId();
+            String gene1HugoSymbol = ((AlterationCountByStructuralVariant) alterationCount).getGene1HugoGeneSymbol();
+            Integer gene2EntrezId = ((AlterationCountByStructuralVariant) alterationCount).getGene2EntrezGeneId();
+            String gene2HugoSymbol = ((AlterationCountByStructuralVariant) alterationCount).getGene2HugoGeneSymbol();
+            List<GenePanel> panels = entrezIdToGenePanel.getOrDefault(new Pair<>(gene1EntrezId, gene2HugoSymbol), new ArrayList<>());
+            panels.addAll(entrezIdToGenePanel.getOrDefault(new Pair<>(gene2EntrezId, gene2HugoSymbol), new ArrayList<>()));
+            return panels.stream().distinct().collect(Collectors.toList());
+        }
+        throw new IllegalArgumentException("At present only AlterationCountByGene or AlterationCountByStructuralVariant are " +
+            "supported.");
+    }
 }u}(j~  (bd2c4955826eb4bdae5b9a825e7f2dcb1d540ca7j  Uservice/src/test/java/org/cbioportal/service/impl/AlterationCountServiceImplTest.javaj  modifiedj  K2j  Kj  KHj  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationCountServiceImplTest.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationCountServiceImplTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationCountServiceImplTest.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  X|  @@ -2,7 +2,6 @@
 
 import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
-import org.cbioportal.model.QueryElement;
 import org.cbioportal.model.util.Select;
 import org.cbioportal.persistence.AlterationRepository;
 import org.cbioportal.persistence.MolecularProfileRepository;
@@ -33,6 +32,8 @@ public class AlterationCountServiceImplTest extends BaseServiceImplTest {
     private AlterationEnrichmentUtil<AlterationCountByGene> alterationEnrichmentUtil;
     @Mock
     private AlterationEnrichmentUtil<CopyNumberCountByGene> alterationEnrichmentUtilCna;
+    @Mock
+    private AlterationEnrichmentUtil<AlterationCountByStructuralVariant> alterationEnrichmentUtilStructVar;
     @Spy
     @InjectMocks
     private MolecularProfileUtil molecularProfileUtil;
@@ -47,6 +48,7 @@ public class AlterationCountServiceImplTest extends BaseServiceImplTest {
     boolean includeMissingAlterationsFromGenePanel = false;
     List<AlterationCountByGene> expectedCountByGeneList;
     List<CopyNumberCountByGene> expectedCnaCountByGeneList;
+    List<AlterationCountByStructuralVariant> expectedStructuralVariantList;
     AlterationFilter alterationFilter = new AlterationFilter(
         mutationEventTypes,
         cnaEventTypes,
@@ -79,18 +81,26 @@ public void setup() {
         copyNumberCountByGene.setEntrezGeneId(ENTREZ_GENE_ID_1);
         copyNumberCountByGene.setAlteration(2);
         expectedCnaCountByGeneList = Arrays.asList(copyNumberCountByGene);
+
+        final AlterationCountByStructuralVariant alterationCountByStructuralVariant = new AlterationCountByStructuralVariant();
+        alterationCountByStructuralVariant.setGene1EntrezGeneId(ENTREZ_GENE_ID_1);
+        alterationCountByStructuralVariant.setGene2EntrezGeneId(ENTREZ_GENE_ID_2);
+        alterationCountByStructuralVariant.setGene1HugoGeneSymbol(HUGO_GENE_SYMBOL_1);
+        alterationCountByStructuralVariant.setGene2HugoGeneSymbol(HUGO_GENE_SYMBOL_2);
+        expectedStructuralVariantList = Arrays.asList(alterationCountByStructuralVariant);
+        
     }
     
     @Test
-    public void getSampleAlterationCounts() {
+    public void getSampleAlterationGeneCounts() {
 
         // this mock tests correct argument types
-        when(alterationRepository.getSampleAlterationCounts(
+        when(alterationRepository.getSampleAlterationGeneCounts(
             new HashSet<>(caseIdentifiers),
             entrezGeneIds,
             alterationFilter)).thenReturn(expectedCountByGeneList);
 
-        Pair<List<AlterationCountByGene>, Long> result = alterationCountService.getSampleAlterationCounts(
+        Pair<List<AlterationCountByGene>, Long> result = alterationCountService.getSampleAlterationGeneCounts(
             caseIdentifiers,
             entrezGeneIds,
             includeFrequency,
@@ -102,15 +112,15 @@ public void getSampleAlterationCounts() {
     }
 
     @Test
-    public void getPatientAlterationCounts() {
+    public void getPatientAlterationGeneCounts() {
 
         // this mock tests correct argument types
-        when(alterationRepository.getPatientAlterationCounts(
-            caseIdentifiers,
+        when(alterationRepository.getPatientAlterationGeneCounts(
+            new HashSet<>(caseIdentifiers),
             entrezGeneIds,
             alterationFilter)).thenReturn(expectedCountByGeneList);
 
-        Pair<List<AlterationCountByGene>, Long> result = alterationCountService.getPatientAlterationCounts(
+        Pair<List<AlterationCountByGene>, Long> result = alterationCountService.getPatientAlterationGeneCounts(
             caseIdentifiers,
             entrezGeneIds,
             includeFrequency,
@@ -122,14 +132,14 @@ public void getPatientAlterationCounts() {
     
 
     @Test
-    public void getSampleMutationCounts() {
+    public void getSampleMutationGeneCounts() {
         // this mock tests correct argument types
-        when(alterationRepository.getSampleAlterationCounts(
+        when(alterationRepository.getSampleAlterationGeneCounts(
             new HashSet<>(caseIdentifiers),
             entrezGeneIds,
             alterationFilter)).thenReturn(expectedCountByGeneList);
 
-        Pair<List<AlterationCountByGene>, Long> result = alterationCountService.getSampleMutationCounts(
+        Pair<List<AlterationCountByGene>, Long> result = alterationCountService.getSampleMutationGeneCounts(
             caseIdentifiers,
             entrezGeneIds,
             includeFrequency,
@@ -141,15 +151,15 @@ public void getSampleMutationCounts() {
     }
 
     @Test
-    public void getPatientMutationCounts() throws MolecularProfileNotFoundException {
+    public void getPatientMutationGeneCounts() throws MolecularProfileNotFoundException {
 
         // this mock tests correct argument types
-        when(alterationRepository.getPatientAlterationCounts(
-            caseIdentifiers,
+        when(alterationRepository.getPatientAlterationGeneCounts(
+            new HashSet<>(caseIdentifiers),
             entrezGeneIds,
             alterationFilter)).thenReturn(expectedCountByGeneList);
 
-        Pair<List<AlterationCountByGene>, Long> result = alterationCountService.getPatientMutationCounts(
+        Pair<List<AlterationCountByGene>, Long> result = alterationCountService.getPatientMutationGeneCounts(
             caseIdentifiers,
             entrezGeneIds,
             includeFrequency,
@@ -161,15 +171,15 @@ public void getPatientMutationCounts() throws MolecularProfileNotFoundException
     }
 
     @Test
-    public void getSampleCnaCounts() {
+    public void getSampleCnaGeneCounts() {
 
         // this mock tests correct argument types
-        when(alterationRepository.getSampleCnaCounts(
+        when(alterationRepository.getSampleCnaGeneCounts(
             new TreeSet<>(caseIdentifiers),
             entrezGeneIds,
             alterationFilter)).thenReturn(expectedCnaCountByGeneList);
 
-        Pair<List<CopyNumberCountByGene>, Long> result = alterationCountService.getSampleCnaCounts(
+        Pair<List<CopyNumberCountByGene>, Long> result = alterationCountService.getSampleCnaGeneCounts(
             caseIdentifiers,
             entrezGeneIds,
             includeFrequency,
@@ -182,16 +192,16 @@ public void getSampleCnaCounts() {
     }
 
     @Test
-    public void getPatientCnaCounts() {
+    public void getPatientCnaGeneCounts() {
 
         // this mock tests correct argument types
-        when(alterationRepository.getPatientCnaCounts(
-            caseIdentifiers,
+        when(alterationRepository.getPatientCnaGeneCounts(
+            new HashSet<>(caseIdentifiers),
             entrezGeneIds,
             alterationFilter)).thenReturn(expectedCnaCountByGeneList);
 
 
-        Pair<List<CopyNumberCountByGene>, Long> result = alterationCountService.getPatientCnaCounts(
+        Pair<List<CopyNumberCountByGene>, Long> result = alterationCountService.getPatientCnaGeneCounts(
             caseIdentifiers,
             entrezGeneIds,
             includeFrequency,
@@ -201,4 +211,22 @@ public void getPatientCnaCounts() {
         verify(alterationEnrichmentUtilCna, times(1)).includeFrequencyForPatients(anyList(), anyList(), anyBoolean());
         Assert.assertEquals(expectedCnaCountByGeneList, result.getFirst());
     }
+
+    @Test
+    public void getSampleStructuralVariantCounts() {
+
+        when(alterationRepository.getSampleStructuralVariantCounts(
+            new TreeSet<>(caseIdentifiers),
+            alterationFilter)).thenReturn(expectedStructuralVariantList);
+
+        Pair<List<AlterationCountByStructuralVariant>, Long> result = alterationCountService.getSampleStructuralVariantCounts(
+            caseIdentifiers,
+            includeFrequency,
+            includeMissingAlterationsFromGenePanel,
+            alterationFilter);
+
+        verify(alterationEnrichmentUtilStructVar, times(1)).includeFrequencyForSamples(anyList(), anyList(), anyBoolean());
+        Assert.assertEquals(expectedStructuralVariantList, result.getFirst());
+
+    }
 }
\ No newline at end of fileu6      }(j~  (0c645bb26201079e10e004a8481525834dd85d23j  Zservice/src/test/java/org/cbioportal/service/impl/AlterationEnrichmentServiceImplTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationEnrichmentServiceImplTest.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationEnrichmentServiceImplTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FAlterationEnrichmentServiceImplTest.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  X  @@ -9,7 +9,6 @@
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
 import org.cbioportal.model.MutationCountByGene;
 import org.cbioportal.model.MutationEventType;
-import org.cbioportal.model.QueryElement;
 import org.cbioportal.model.util.Select;
 import org.cbioportal.service.AlterationCountService;
 import org.cbioportal.service.util.AlterationEnrichmentUtil;
@@ -71,7 +70,7 @@ public void getAlterationEnrichments() throws Exception {
 
         //  return counts for each of the two groups 
         for (String molecularProfileId : groupMolecularProfileCaseSets.keySet()) {
-            Mockito.when(alterationCountService.getSampleAlterationCounts(
+            Mockito.when(alterationCountService.getSampleAlterationGeneCounts(
                 groupMolecularProfileCaseSets.get(molecularProfileId),
                 Select.all(), true, true, alterationFilter)
             ).thenReturn(alterationSampleCountByGeneList);u}(j~  (4500e9058ea35290ec13f9b8f2c1600b3a23ef60j  Oservice/src/test/java/org/cbioportal/service/impl/StudyViewServiceImplTest.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  X  @@ -174,7 +174,7 @@ public void getMutationAlterationCountByGenes() throws Exception {
         alterationCountByGene1.setTotalCount(2);
         alterationCountByGene1.setNumberOfProfiledCases(2);
         alterationCountByGenes.add(alterationCountByGene1);
-        Mockito.when(alterationCountService.getSampleMutationCounts(molecularProfileCaseIdentifiers,
+        Mockito.when(alterationCountService.getSampleMutationGeneCounts(molecularProfileCaseIdentifiers,
             Select.all(),
             true,
             false,
@@ -208,7 +208,7 @@ public void getStructuralVariantAlterationCountByGenes() throws Exception {
         alterationCountByGene1.setTotalCount(2);
         alterationCountByGene1.setNumberOfProfiledCases(2);
         alterationCountByGenes.add(alterationCountByGene1);
-        Mockito.when(alterationCountService.getSampleStructuralVariantCounts(
+        Mockito.when(alterationCountService.getSampleStructuralVariantGeneCounts(
             molecularProfileCaseIdentifiers,
             Select.all(),
             true,
@@ -245,7 +245,7 @@ public void getCNAAlterationCountByGenes() throws Exception {
         alterationCountByGene1.setAlteration(2);
         alterationCountByGenes.add(alterationCountByGene1);
 
-        Mockito.when(alterationCountService.getSampleCnaCounts(
+        Mockito.when(alterationCountService.getSampleCnaGeneCounts(
             anyList(),
             any(Select.class),
             anyBoolean(),u}(j~  (12243ba95f426cb0bef6ac146a746b469286b78fj  =web/src/main/java/org/cbioportal/web/StudyViewController.javaj  modifiedj  K%j  Kj  K(j  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  X"  @@ -16,6 +16,7 @@
 import org.cbioportal.web.config.annotation.InternalApi;
 import org.cbioportal.model.AlterationFilter;
 import org.cbioportal.web.parameter.*;
+import org.cbioportal.web.parameter.sort.ClinicalDataSortBy;
 import org.cbioportal.web.util.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.Cacheable;
@@ -84,9 +85,6 @@ private void init() {
     private StudyViewService studyViewService;
     @Autowired
     private ClinicalDataBinUtil clinicalDataBinUtil;
-    @Autowired
-    private CustomDataService customDataService;
-    
     @Autowired
     private ClinicalEventService clinicalEventService;
 
@@ -287,7 +285,43 @@ public List<AlterationCountByGene> cacheableFetchStructuralVariantGenes(
         }
         return alterationCountByGenes;
     }
+    
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @RequestMapping(value = "/structuralvariant-counts/fetch", method = RequestMethod.POST,
+        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch structural variant genes by study view filter")
+    public ResponseEntity<List<AlterationCountByStructuralVariant>> fetchStructuralVariantCounts(
+        @ApiParam(required = true, value = "Study view filter")
+        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter,
+        @ApiIgnore // 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<String> involvedCancerStudies,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface.
+        @Valid @RequestAttribute(required = false, value = "interceptedStudyViewFilter") StudyViewFilter interceptedStudyViewFilter
+    ) throws StudyNotFoundException {
+
+        boolean singleStudyUnfiltered = studyViewFilterUtil.isSingleStudyUnfiltered(interceptedStudyViewFilter);
+        List<AlterationCountByStructuralVariant> alterationCountByStructuralVariants = 
+            instance.cacheableFetchStructuralVariantCounts(interceptedStudyViewFilter, singleStudyUnfiltered);
+        return new ResponseEntity<>(alterationCountByStructuralVariants, HttpStatus.OK);
+    }
+
+    @Cacheable(
+        cacheResolver = "staticRepositoryCacheOneResolver",
+        condition = "@cacheEnabledConfig.getEnabled() && #singleStudyUnfiltered"
+    )
+    public List<AlterationCountByStructuralVariant> cacheableFetchStructuralVariantCounts(
+        StudyViewFilter interceptedStudyViewFilter, boolean singleStudyUnfiltered
+    ) throws StudyNotFoundException {
 
+        List<SampleIdentifier> sampleIdentifiers = studyViewFilterApplier.apply(interceptedStudyViewFilter);
+        if(CollectionUtils.isNotEmpty(sampleIdentifiers)) {
+            List<String> studyIds = new ArrayList<>();
+            List<String> sampleIds = new ArrayList<>();
+            studyViewFilterUtil.extractStudyAndSampleIds(sampleIdentifiers, studyIds, sampleIds);
+            return studyViewService.getStructuralVariantAlterationCounts(studyIds, sampleIds, interceptedStudyViewFilter.getAlterationFilter());
+        }
+        return new ArrayList<>();
+    }
 
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/cna-genes/fetch", method = RequestMethod.POST,u}(j~  (4a472b921e461f336c180b043eab8c5597a43770j  Vweb/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.javaj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/670337a1e3c1655561947d10beac9aa551318e6a/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaj  https://github.com/cBioPortal/cbioportal/raw/670337a1e3c1655561947d10beac9aa551318e6a/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.java?ref=670337a1e3c1655561947d10beac9aa551318e6aj  X  @@ -85,6 +85,7 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
     public static final String STUDY_VIEW_FILTERED_SAMPLES = "/filtered-samples/fetch";
     public static final String STUDY_VIEW_MUTATED_GENES = "/mutated-genes/fetch";
     public static final String STUDY_VIEW_STRUCTURAL_VARIANT_GENES = "/structuralvariant-genes/fetch";
+    public static final String STUDY_VIEW_STRUCTURAL_VARIANT_COUNTS = "/structuralvariant-counts/fetch";
     public static final String STUDY_VIEW_SAMPLE_COUNTS = "/sample-counts/fetch";
     public static final String STUDY_VIEW_SAMPLE_LIST_COUNTS_PATH = "/sample-lists-counts/fetch";
     public static final String STUDY_VIEW_CLINICAL_TABLE_DATA_FETCH_PATH = "/clinical-data-table/fetch";
@@ -138,7 +139,7 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
             return extractAttributesFromClinicalDataCountFilter(request);
         } 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_SAMPLE_COUNTS, STUDY_VIEW_SAMPLE_LIST_COUNTS_PATH, STUDY_VIEW_CLINICAL_TABLE_DATA_FETCH_PATH,
+                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
         ).contains(requestPathInfo)) {
             return extractAttributesFromStudyViewFilter(request);ueu(9dec4aeba4d0bbef6983ffe12e21992fa7ccb2e2}(sha(9dec4aeba4d0bbef6983ffe12e21992fa7ccb2e2node_idEC_kwDOAe-hB9oAKDlkZWM0YWViYTRkMGJiZWY2OTgzZmZlMTJlMjE5OTJmYTdjY2IyZTIcommit}(author}(namehaynescdemailhaynescd@chop.edudate2023-05-03T15:31:10Zu	committer}(j  haynescdj  haynescd@chop.eduj  2023-05-23T19:26:45Zumessage>:sparkles: Add ability to set priority to -1 for clinical attrtree}(j  (1fc7a097c876ba173004ad2fde53e271868799c6urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/1fc7a097c876ba173004ad2fde53e271868799c6uj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/9dec4aeba4d0bbef6983ffe12e21992fa7ccb2e2
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9dec4aeba4d0bbef6983ffe12e21992fa7ccb2e2html_urlXhttps://github.com/cBioPortal/cbioportal/commit/9dec4aeba4d0bbef6983ffe12e21992fa7ccb2e2comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/9dec4aeba4d0bbef6983ffe12e21992fa7ccb2e2/commentsj  }(loginhaynescdidJ j  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5j  %https://api.github.com/users/haynescdj  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminuj  }(j  haynescdj  J j  MDQ6VXNlcjMzNjA4OTIwj  4https://avatars.githubusercontent.com/u/33608920?v=4j  h5j  %https://api.github.com/users/haynescdj  https://github.com/haynescdj  /https://api.github.com/users/haynescd/followersj  <https://api.github.com/users/haynescd/following{/other_user}j  5https://api.github.com/users/haynescd/gists{/gist_id}j  <https://api.github.com/users/haynescd/starred{/owner}{/repo}j  3https://api.github.com/users/haynescd/subscriptionsj  *https://api.github.com/users/haynescd/orgsj  +https://api.github.com/users/haynescd/reposj  6https://api.github.com/users/haynescd/events{/privacy}j  5https://api.github.com/users/haynescd/received_eventsj  Userj  uparents]}(j  (899a5c825c5d8e21cdb80e9117239d0c78dacd87j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/899a5c825c5d8e21cdb80e9117239d0c78dacd87j  Xhttps://github.com/cBioPortal/cbioportal/commit/899a5c825c5d8e21cdb80e9117239d0c78dacd87uastats}(totalK	additionsK	deletionsKufiles]}(j  (097055f5c6d310ea104abb02f968968f3f68121bfilename.core/src/main/scripts/importer/validateData.pystatusmodifiedj  Kj  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/9dec4aeba4d0bbef6983ffe12e21992fa7ccb2e2/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.pyraw_urlhttps://github.com/cBioPortal/cbioportal/raw/9dec4aeba4d0bbef6983ffe12e21992fa7ccb2e2/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.pycontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.py?ref=9dec4aeba4d0bbef6983ffe12e21992fa7ccb2e2patchX6  @@ -2600,12 +2600,12 @@ def processTopLines(self, line_list):
                         invalid_values = True
                 elif self.METADATA_LINES[line_index] == 'priority':
                     try:
-                        if int(value) < 0:
+                        if int(value) < -1:
                             raise ValueError()
                     except ValueError:
                         self.logger.error(
                             'Priority definition should be an integer, and should be '
-                            'greater than or equal to zero',
+                            'greater than or equal to -1',
                             extra={'line_number': line_index + 1,
                                    'column_number': col_index + 1,
                                    'cause': value})uau(0ed47592726452a87ac27cce7fef0cdce7719ada}(sha(0ed47592726452a87ac27cce7fef0cdce7719adanode_idEC_kwDOAe-hB9oAKDBlZDQ3NTkyNzI2NDUyYTg3YWMyN2NjZTdmZWYwY2RjZTc3MTlhZGEcommit}(author}(name	Karthik Kemailkalletlakarthik@gmail.comdate2023-07-26T16:15:27Zu	committer}(j6  GitHubj8  noreply@github.comj:  2023-07-26T16:15:27Zumessage"Cache treatment endpoints (#10282)tree}(j.  (f7c0be0f5cee6b331d50dc6a26241aff865af9dfurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/f7c0be0f5cee6b331d50dc6a26241aff865af9dfujF  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/0ed47592726452a87ac27cce7fef0cdce7719ada
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkwUafCRBK7hj4Ov3rIwAAXhoIAEKvLjgb4/vHInXh85h1oCeK
FAHGFtxqjzQPhZjszw9+jEjUNliJSt8Z4mLbxEBXB1f8smWCH9U3KeVp8kJkgOnL
dTQXV0WicrVhU8yEOCeuu57aIJe6BfS1v/GoGJEuwkfn292WczVCPk5JIurZXvRE
Cd6bbm/fS6ljFCU9199+xET7fr9tfibYy96tqOGxNVr3GxwDUktLJJIKjcwJWYVp
9eGSzE2Zk5injqmeKzfpMWiXMd0yR8vuHgRQn5HGglpCDKJ2dOsgjM1tt5JFuVEf
Z/yyl9VatdRGDul0sVpUiVXx7FKw1LMXFRbRx11cW63rFaYK3drMM+kfVDAsGpY=
=KjjG
-----END PGP SIGNATURE-----
payloadtree f7c0be0f5cee6b331d50dc6a26241aff865af9df
parent 4ac327bf13f47d36dd9a393dcece5583aa1896e4
author Karthik K <kalletlakarthik@gmail.com> 1690388127 -0400
committer GitHub <noreply@github.com> 1690388127 -0400

Cache treatment endpoints (#10282)

uujF  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/0ed47592726452a87ac27cce7fef0cdce7719adahtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/0ed47592726452a87ac27cce7fef0cdce7719adacomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/0ed47592726452a87ac27cce7fef0cdce7719ada/commentsj4  }(login	kalletlakidJƴ j0  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5jF  &https://api.github.com/users/kalletlakjT  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminuj<  }(jY  web-flowj[  J/j0  MDQ6VXNlcjE5ODY0NDQ3j]  4https://avatars.githubusercontent.com/u/19864447?v=4j_  h5jF  %https://api.github.com/users/web-flowjT  https://github.com/web-flowjb  /https://api.github.com/users/web-flow/followersjd  <https://api.github.com/users/web-flow/following{/other_user}jf  5https://api.github.com/users/web-flow/gists{/gist_id}jh  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jj  3https://api.github.com/users/web-flow/subscriptionsjl  *https://api.github.com/users/web-flow/orgsjn  +https://api.github.com/users/web-flow/reposjp  6https://api.github.com/users/web-flow/events{/privacy}jr  5https://api.github.com/users/web-flow/received_eventsjt  Userjv  uparents]}(j.  (4ac327bf13f47d36dd9a393dcece5583aa1896e4jF  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4ac327bf13f47d36dd9a393dcece5583aa1896e4jT  Xhttps://github.com/cBioPortal/cbioportal/commit/4ac327bf13f47d36dd9a393dcece5583aa1896e4uastats}(totalK	additionsK	deletionsKufiles]}(j.  (c17ecda37f2b8e84dab4ea76a40ba17f19fa8de4filename=web/src/main/java/org/cbioportal/web/TreatmentController.javastatusmodifiedj  Kj  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/0ed47592726452a87ac27cce7fef0cdce7719ada/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FTreatmentController.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/0ed47592726452a87ac27cce7fef0cdce7719ada/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FTreatmentController.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FTreatmentController.java?ref=0ed47592726452a87ac27cce7fef0cdce7719adapatchXw	  @@ -28,6 +28,7 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
+import java.util.Set;
 
 @PublicApi
 @RestController
@@ -151,12 +152,18 @@ public ResponseEntity<Boolean> getContainsTreatmentData(
         @ApiParam(required = true, value = "List of Study IDs")
         @Size(min = 1, max = PagingConstants.MAX_PAGE_SIZE)
         @RequestBody
-        List<String> studyIds
+        Set<String> studyIds
     ) {
-        Boolean containsTreatmentData = treatmentService.containsTreatmentData(studyIds, tier);
+        Boolean containsTreatmentData = instance.cacheableGetContainsTreatmentData(studyIds, tier);
         return new ResponseEntity<>(containsTreatmentData, HttpStatus.OK);
     }
 
+    // Caching enabled for any number of studies as the requests contains only studyIds and the response is a boolean
+    @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
+    public Boolean cacheableGetContainsTreatmentData(Set<String> studyIds, ClinicalEventKeyCode tier) {
+        return treatmentService.containsTreatmentData(new ArrayList<>(studyIds), tier);
+    }
+
     @PreAuthorize("hasPermission(#studyIds, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/treatments/display-sample", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Should sample level treatments be displayed")
@@ -168,9 +175,14 @@ public ResponseEntity<Boolean> getContainsSampleTreatmentData(
         @ApiParam(required = true, value = "List of Study IDs")
         @Size(min = 1, max = PagingConstants.MAX_PAGE_SIZE)
         @RequestBody
-        List<String> studyIds
+        Set<String> studyIds
     ) {
-        Boolean containsTreatmentData = treatmentService.containsSampleTreatmentData(studyIds, tier);
+        Boolean containsTreatmentData = instance.cacheableGetContainsSampleTreatmentData(studyIds, tier);
         return new ResponseEntity<>(containsTreatmentData, HttpStatus.OK);
     }
+
+    @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
+    public Boolean cacheableGetContainsSampleTreatmentData(Set<String> studyIds, ClinicalEventKeyCode tier) {
+        return treatmentService.containsSampleTreatmentData(new ArrayList<>(studyIds), tier);
+    }
 }uau(ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbd}(sha(ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbdnode_idEC_kwDOAe-hB9oAKGRkY2Y0NGVjMDZjOGIwNWU0ZjJlNTM3ZDBlMmNlOWQ4MzRlMmNiYmQcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-11T17:40:38Zu	committer}(j  Djokovic0311j  .55948986+Djokovic0311@users.noreply.github.comj  2023-08-11T17:40:38Zumessagesolve core test issuetree}(j  (ea9c66523a92d1c24963f503bd1b17fe8bc7f485urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/ea9c66523a92d1c24963f503bd1b17fe8bc7f485uj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbd
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbdhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbdcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbd/commentsj  }(loginDjokovic0311idJUj  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5j  )https://api.github.com/users/Djokovic0311j  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminuj  }(j  Djokovic0311j  JUj  MDQ6VXNlcjU1OTQ4OTg2j  4https://avatars.githubusercontent.com/u/55948986?v=4j  h5j  )https://api.github.com/users/Djokovic0311j  https://github.com/Djokovic0311j  3https://api.github.com/users/Djokovic0311/followersj  @https://api.github.com/users/Djokovic0311/following{/other_user}j  9https://api.github.com/users/Djokovic0311/gists{/gist_id}j  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}j  7https://api.github.com/users/Djokovic0311/subscriptionsj  .https://api.github.com/users/Djokovic0311/orgsj  /https://api.github.com/users/Djokovic0311/reposj  :https://api.github.com/users/Djokovic0311/events{/privacy}j  9https://api.github.com/users/Djokovic0311/received_eventsj  Userj  uparents]}(j  (710e948068af09a4810af2296fd3b92fd73a9b39j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/710e948068af09a4810af2296fd3b92fd73a9b39j  Xhttps://github.com/cBioPortal/cbioportal/commit/710e948068af09a4810af2296fd3b92fd73a9b39uastats}(totalK	additionsK	deletionsKufiles](}(j  (04295d959b8cdbe0461397f92f1931f3b139f6b2filenameMservice/src/main/java/org/cbioportal/service/ExpressionEnrichmentService.javastatusmodifiedj  Kj  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbd/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbd/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.java?ref=ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbdpatchX  @@ -3,20 +3,33 @@
 import java.util.List;
 import java.util.Map;
 
-import org.cbioportal.model.EnrichmentType;
+import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
 import org.cbioportal.model.GenericAssayEnrichment;
 import org.cbioportal.model.GenomicEnrichment;
+import org.cbioportal.model.EnrichmentType;
+
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 
 public interface ExpressionEnrichmentService {
 
     List<GenomicEnrichment> getGenomicEnrichments(String molecularProfileId,
-            Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+                                                  Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
             throws MolecularProfileNotFoundException;
 
     List<GenericAssayEnrichment> getGenericAssayEnrichments(String molecularProfileId,
             Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
             throws MolecularProfileNotFoundException;
+    List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
+        String molecularProfileId,
+        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
+        EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException;
+
+    List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
+                                                                                  Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
+                                                                                  EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException;
 
 }u}(j  (aeb5f65818e630dff97b2b59b8c7b73f2caacf89j  Vservice/src/main/java/org/cbioportal/service/impl/ExpressionEnrichmentServiceImpl.javaj
  modifiedj  Kj  K
j  Kj  https://github.com/cBioPortal/cbioportal/blob/ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbd/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.javaj  https://github.com/cBioPortal/cbioportal/raw/ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbd/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.java?ref=ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbdj  XK)  @@ -1,19 +1,12 @@
 package org.cbioportal.service.impl;
+import java.math.BigDecimal;
 import java.util.*;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 
 import org.apache.commons.lang3.BooleanUtils;
-import org.cbioportal.model.EnrichmentType;
-import org.cbioportal.model.Gene;
-import org.cbioportal.model.GeneMolecularAlteration;
-import org.cbioportal.model.GenericAssayEnrichment;
-import org.cbioportal.model.GenericAssayMolecularAlteration;
-import org.cbioportal.model.GenomicEnrichment;
-import org.cbioportal.model.MolecularProfile;
+import org.cbioportal.model.*;
 import org.cbioportal.model.MolecularProfile.MolecularAlterationType;
-import org.cbioportal.model.MolecularProfileCaseIdentifier;
-import org.cbioportal.model.Sample;
 import org.cbioportal.model.meta.GenericAssayMeta;
 import org.cbioportal.persistence.MolecularDataRepository;
 import org.cbioportal.service.ExpressionEnrichmentService;
@@ -23,6 +16,7 @@
 import org.cbioportal.service.SampleService;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.util.ExpressionEnrichmentUtil;
+import org.cbioportal.service.util.FisherExactTestCalculator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -42,7 +36,8 @@ public class ExpressionEnrichmentServiceImpl implements ExpressionEnrichmentServ
     private GenericAssayService genericAssayService;
     @Autowired
     private SampleService sampleService;
-
+    @Autowired
+    private FisherExactTestCalculator fisherExactTestCalculator = new FisherExactTestCalculator();
     @Override
     // transaction needs to be setup here in order to return Iterable from
     // molecularDataService in fetchCoExpressions
@@ -152,4 +147,143 @@ private void validateMolecularProfile(MolecularProfile molecularProfile,
         }
     }
 
+
+    @Override
+    @Transactional(readOnly = true)
+    public List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
+        String molecularProfileId,
+        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException {
+
+        // Validate and fetch molecular profile
+        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, true);
+
+        // Get the molecular alterations for the provided profile
+        Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
+            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
+
+        // Filter the case sets based on molecular profile
+        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
+
+        // Obtain binary enrichments from the utility
+        List<GenericAssayBinaryEnrichment> genericAssayBinaryEnrichments = expressionEnrichmentUtil.getGenericAssayBinaryEnrichments(molecularProfile,
+            filteredMolecularProfileCaseSets, enrichmentType, maItr);
+
+        // Calculate q-values for enrichments
+        calcQValues(genericAssayBinaryEnrichments);
+
+        // Extract stable IDs from binary enrichments
+        List<String> getGenericAssayStableIds = genericAssayBinaryEnrichments.stream()
+            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
+
+        // Fetch metadata of generic assays by their stable IDs
+        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
+
+        // Assign meta properties to each enrichment
+        return genericAssayBinaryEnrichments.stream().map(enrichmentDatum -> {
+            enrichmentDatum.setGenericEntityMetaProperties(
+                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
+            return enrichmentDatum;
+        }).collect(Collectors.toList());
+    }
+
+    @Override
+    @Transactional(readOnly = true)
+    public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
+                                                                                         Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException {
+
+        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, false);
+
+        Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
+            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
+
+        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets;
+        filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
+
+        List<GenericAssayCategoricalEnrichment> genericAssayCategoricalEnrichments = expressionEnrichmentUtil.getGenericAssayCategoricalEnrichments(molecularProfile,
+            filteredMolecularProfileCaseSets, enrichmentType, maItr);
+
+        calcQValues(genericAssayCategoricalEnrichments);
+
+        List<String> getGenericAssayStableIds = genericAssayCategoricalEnrichments.stream()
+            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
+        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
+
+        return genericAssayCategoricalEnrichments.stream().map(enrichmentDatum -> {
+            enrichmentDatum.setGenericEntityMetaProperties(
+                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
+            return enrichmentDatum;
+        }).collect(Collectors.toList());
+    }
+
+    private MolecularProfile getAndValidateMolecularProfile(String molecularProfileId, boolean isBinary) throws MolecularProfileNotFoundException {
+        MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
+        validateMolecularProfile(molecularProfile, Arrays.asList(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY), isBinary);
+        return molecularProfile;
+    }
+
+    private void validateMolecularProfile(MolecularProfile molecularProfile,
+                                          List<MolecularProfile.MolecularAlterationType> validMolecularAlterationTypes,
+                                          boolean isBinary) throws MolecularProfileNotFoundException {
+        if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
+            // Check alteration type
+            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+        }
+        // Check datatype for binary or categorical
+        if(isBinary) {
+            if(!molecularProfile.getDatatype().equals("BINARY")) {
+                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+            }
+        } else {
+            if(!molecularProfile.getDatatype().equals("CATEGORICAL")) {
+                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+            }
+        }
+    }
+
+    private Map<String, List<MolecularProfileCaseIdentifier>> filterMolecularProfileCaseSets(MolecularProfile molecularProfile, Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets) {
+        if (BooleanUtils.isTrue(molecularProfile.getPatientLevel())) {
+            // If patient level, filter duplicates by patient id
+            // For now we only support sample level for samples
+            List<String> sampleIds = molecularProfileCaseSets.values().stream().flatMap(Collection::stream).map(MolecularProfileCaseIdentifier::getCaseId).collect(Collectors.toList());
+            List<String> studyIds = Collections.nCopies(sampleIds.size(), molecularProfile.getCancerStudyIdentifier());
+            List<Sample> samples = sampleService.fetchSamples(studyIds, sampleIds, "ID");
+            Map<String, Integer> sampleIdToPatientIdMap = samples.stream().collect(Collectors.toMap(Sample::getStableId, Sample::getPatientId));
+
+            Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = new HashMap<>();
+            for (Map.Entry<String, List<MolecularProfileCaseIdentifier>> pair : molecularProfileCaseSets.entrySet()) {
+                Set<Integer> patientSet = new HashSet<Integer>();
+                List<MolecularProfileCaseIdentifier> identifierListUniqueByPatientId = new ArrayList<>();
+                for (MolecularProfileCaseIdentifier caseIdentifier : pair.getValue()) {
+                    if (!patientSet.contains(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()))) {
+                        identifierListUniqueByPatientId.add(caseIdentifier);
+                        patientSet.add(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()));
+                    }
+                }
+                filteredMolecularProfileCaseSets.put(pair.getKey(), identifierListUniqueByPatientId);
+            }
+            return filteredMolecularProfileCaseSets;
+        } else {
+            return molecularProfileCaseSets;
+        }
+    }
+
+    private Map<String, GenericAssayMeta> getGenericAssayMetaByStableId(List<String> stableIds, String molecularProfileId) {
+        return genericAssayService.getGenericAssayMetaByStableIdsAndMolecularIds(stableIds, stableIds.stream().map(sid -> molecularProfileId)
+                .collect(Collectors.toList()), "SUMMARY").stream()
+            .collect(Collectors.toMap(GenericAssayMeta::getStableId, Function.identity()));
+    }
+
+    private <T extends GenericAssayEnrichment> void calcQValues(List<T> enrichments) {
+        // Sort enrichments by pValue
+        Collections.sort(enrichments, GenericAssayEnrichment::compare);
+        BigDecimal[] pValues = enrichments.stream().map(T::getpValue).toArray(BigDecimal[]::new);
+        BigDecimal[] qValues = fisherExactTestCalculator.calcqValue(pValues);
+        // Assign q-values to enrichments
+        for (int i = 0; i < enrichments.size(); i++) {
+            enrichments.get(i).setqValue(qValues[i]);
+        }
+    }
+
 }u}(j  (5e864bdbbd03d33bb400869361c0a9c63f5031dfj  Jweb/src/main/java/org/cbioportal/web/GenericAssayEnrichmentController.javaj
  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbd/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.javaj  https://github.com/cBioPortal/cbioportal/raw/ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbd/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.java?ref=ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbdj  X  @@ -7,7 +7,7 @@
 import org.cbioportal.model.GenericAssayBinaryEnrichment;
 import org.cbioportal.model.GenericAssayCategoricalEnrichment;
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
-import org.cbioportal.service.GenericAssayEnrichmentService;
+import org.cbioportal.service.ExpressionEnrichmentService;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.web.config.annotation.InternalApi;
 import org.cbioportal.web.parameter.MolecularProfileCasesGroupFilter;
@@ -33,7 +33,7 @@
 @Api(tags = "Generic Assay Enrichment Data", description = " ")
 public class GenericAssayEnrichmentController {
     @Autowired
-    private GenericAssayEnrichmentService genericAssayEnrichmentService;
+    private ExpressionEnrichmentService expressionEnrichmentService;
 
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/generic-assay-categorical-enrichments/fetch",
@@ -85,7 +85,7 @@ public ResponseEntity<List<GenericAssayBinaryEnrichment>> fetchGenericAssayBinar
         }
 
         return new ResponseEntity<>(
-            genericAssayEnrichmentService.getGenericAssayBinaryEnrichments(
+            expressionEnrichmentService.getGenericAssayBinaryEnrichments(
                 molecularProfileIds.iterator().next(), groupCaseIdentifierSet, enrichmentType),
             HttpStatus.OK);
     }
@@ -105,7 +105,7 @@ private List<GenericAssayCategoricalEnrichment> fetchExpressionEnrichments(Enric
         if (molecularProfileIds.size() > 1) {
             throw new UnsupportedOperationException("Multi-study expression enrichments is not yet implemented");
         }
-        return genericAssayEnrichmentService.getGenericAssayCategoricalEnrichments(
+        return expressionEnrichmentService.getGenericAssayCategoricalEnrichments(
             molecularProfileIds.iterator().next(), groupCaseIdentifierSet, enrichmentType);
     }
 }ueu(ccdb8ebde9549aeeff6b414f7cdb32136d2c395c}(sha(ccdb8ebde9549aeeff6b414f7cdb32136d2c395cnode_idEC_kwDOAe-hB9oAKGNjZGI4ZWJkZTk1NDlhZWVmZjZiNDE0ZjdjZGIzMjEzNmQyYzM5NWMcommit}(author}(namehaynescdemailhaynescd@chop.edudate2023-07-18T04:01:52Zu	committer}(j2  haynescdj4  haynescd@chop.eduj6  2023-07-18T04:01:52ZumessageFix GeneFilterstree}(j*  (53915af83ba79ddc6b09aef90616bd282ef84941urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/53915af83ba79ddc6b09aef90616bd282ef84941ujB  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/ccdb8ebde9549aeeff6b414f7cdb32136d2c395c
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujB  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ccdb8ebde9549aeeff6b414f7cdb32136d2c395chtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/ccdb8ebde9549aeeff6b414f7cdb32136d2c395ccomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/ccdb8ebde9549aeeff6b414f7cdb32136d2c395c/commentsj0  }(loginhaynescdidJ j,  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5jB  %https://api.github.com/users/haynescdjN  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminuj8  }(jS  haynescdjU  J j,  MDQ6VXNlcjMzNjA4OTIwjW  4https://avatars.githubusercontent.com/u/33608920?v=4jY  h5jB  %https://api.github.com/users/haynescdjN  https://github.com/haynescdj\  /https://api.github.com/users/haynescd/followersj^  <https://api.github.com/users/haynescd/following{/other_user}j`  5https://api.github.com/users/haynescd/gists{/gist_id}jb  <https://api.github.com/users/haynescd/starred{/owner}{/repo}jd  3https://api.github.com/users/haynescd/subscriptionsjf  *https://api.github.com/users/haynescd/orgsjh  +https://api.github.com/users/haynescd/reposjj  6https://api.github.com/users/haynescd/events{/privacy}jl  5https://api.github.com/users/haynescd/received_eventsjn  Userjp  uparents]}(j*  (e0e441dfea9270d60d6f13b0ac6fe08db2651687jB  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/e0e441dfea9270d60d6f13b0ac6fe08db2651687jN  Xhttps://github.com/cBioPortal/cbioportal/commit/e0e441dfea9270d60d6f13b0ac6fe08db2651687uastats}(totalKn	additionsKJ	deletionsK$ufiles](}(j*  (5e3de2d52844214457d468063bdcb31cc4f66b76filenametpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmlstatusmodifiedj  Kj  K
changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/ccdb8ebde9549aeeff6b414f7cdb32136d2c395c/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/ccdb8ebde9549aeeff6b414f7cdb32136d2c395c/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=ccdb8ebde9549aeeff6b414f7cdb32136d2c395cpatchX_	  @@ -160,26 +160,24 @@
                 </foreach>
             </if>
             <if test="studyViewFilter.geneFilters != null and !studyViewFilter.geneFilters.isEmpty()">
-                INTERSECT
-                SELECT sample_unique_id
-                FROM genomic_event
-                <where>
-                    <trim prefixOverrides="OR">
-                        <foreach item="profileGroup" collection="studyViewFilter.geneFilters" open="OR (" separator="," close=")">
+                <foreach item="profileGroup" collection="studyViewFilter.geneFilters">
+                    <foreach item="geneFilterQueryList" collection="profileGroup.getGeneQueries()" open="INTERSECT" separator="INTERSECT">
+                        SELECT sample_unique_id
+                        FROM genomic_event
+                        <where>
                             genetic_profile_stable_id IN
                             <foreach item="molecularProfileId" collection="profileGroup.getMolecularProfileIds()" open="(" separator="," close=")">
                                 #{molecularProfileId}
                             </foreach>
                             AND hugo_gene_symbol IN (
-                            <foreach item="geneFilterQueryList" collection="profileGroup.getGeneQueries()" separator=",">
-                                <foreach item="geneFilterQuery" collection="geneFilterQueryList" separator=",">
-                                    #{geneFilterQuery.hugoGeneSymbol}
-                                </foreach>
+                            <foreach item="geneFilterQuery" collection="geneFilterQueryList" separator=",">
+                                #{geneFilterQuery.hugoGeneSymbol}
                             </foreach>
                             )
-                        </foreach>
-                    </trim>
-                </where>
+                        </where>
+                        
+                    </foreach>
+                </foreach>
             </if>
             <if test="categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters() != null and !categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters().isEmpty()">
                 <foreach item="clinicalDataFilter" collection="categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters()" open="INTERSECT" separator="INTERSECT">u}(j*  (c110f7065f7157a5243426bc6c9378a736fcc360j  persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepositoryTest.javaj  modifiedj  K?j  Kj  KVj  https://github.com/cBioPortal/cbioportal/blob/ccdb8ebde9549aeeff6b414f7cdb32136d2c395c/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaj  https://github.com/cBioPortal/cbioportal/raw/ccdb8ebde9549aeeff6b414f7cdb32136d2c395c/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.java?ref=ccdb8ebde9549aeeff6b414f7cdb32136d2c395cj  X  @@ -3,6 +3,7 @@
 import org.cbioportal.model.AlterationCountByGene;
 import org.cbioportal.model.ClinicalData;
 import org.cbioportal.model.ClinicalDataCount;
+import org.cbioportal.model.Gene;
 import org.cbioportal.model.Sample;
 import org.cbioportal.model.util.Select;
 import org.cbioportal.persistence.enums.ClinicalAttributeDataSource;
@@ -102,7 +103,7 @@ public void getMutatedGenesFiltered() {
         StudyViewGeneFilter mutationStudyViewGeneFilter = new StudyViewGeneFilter();
         mutationStudyViewGeneFilter.setMolecularProfileIds(new HashSet<>(Arrays.asList("msk_impact_2017_mutations")));
         
-        mutationStudyViewGeneFilter.setGeneQueries(getFilters.apply("moo"));
+        mutationStudyViewGeneFilter.setGeneQueries(generateGeneFilters(List.of("SMARCD1", "TP53"), false));
 
         studyViewGeneFilters.add(mutationStudyViewGeneFilter);
         
@@ -147,8 +148,8 @@ private ClinicalDataFilter generateClinicalDataFilter(String attributeId, String
         return dataFilterValue;
     };
     
-    private final Function<String,List<List<GeneFilterQuery>>> getFilters = v -> {
-
+    private List<List<GeneFilterQuery>> generateGeneFilters(List<String> genesToFilter, boolean createOrRelationship) {
+        
         boolean includeDriver = true;
         boolean includeVUS = true;
         boolean includeUnknownOncogenicity = true;
@@ -157,27 +158,25 @@ private ClinicalDataFilter generateClinicalDataFilter(String attributeId, String
         boolean includeUnknownStatus = true;
         Select<String> selectedTiers = Select.none();
         boolean includeUnknownTier = true;
-
-        GeneFilterQuery geneFilterQuery1 = new GeneFilterQuery("SMARCD1", null,
-            null, includeDriver, includeVUS, includeUnknownOncogenicity,  selectedTiers, includeUnknownTier,
-            includeGermline, includeSomatic, includeUnknownStatus);
-
-        GeneFilterQuery geneFilterQuery2 = new GeneFilterQuery("TP53", null,
-            null, includeDriver, includeVUS, includeUnknownOncogenicity,  selectedTiers, includeUnknownTier,
-            includeGermline, includeSomatic, includeUnknownStatus);
-
-        List<List<GeneFilterQuery>> q1 = new ArrayList<>();
-        List<GeneFilterQuery> q2 = new ArrayList<>();
-        List<GeneFilterQuery> q3 = new ArrayList<>();
         
-        q2.add(geneFilterQuery1);
-        q3.add(geneFilterQuery2);
-        q1.add(q2);
-        q1.add(q3);
-        return q1;
-        
-    };
-    
+        if(createOrRelationship) {
+            List<GeneFilterQuery> ordGeneFilters = genesToFilter.stream().map(geneToFilter -> new GeneFilterQuery(geneToFilter,
+                    null, null, includeDriver, includeVUS, includeUnknownOncogenicity, selectedTiers,
+                    includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus))
+                .collect(Collectors.toList());
+
+            return List.of(ordGeneFilters);
+        } else {
+            List<List<GeneFilterQuery>> filter = new ArrayList<>();
+            for (String geneToFilter : genesToFilter) {
+               
+                filter.add(List.of( new GeneFilterQuery(geneToFilter, null,
+                    null, includeDriver, includeVUS, includeUnknownOncogenicity,  selectedTiers, includeUnknownTier,
+                    includeGermline, includeSomatic, includeUnknownStatus)));
+            }
+            return filter;
+        }
+    }
     
     private final Function<String, DataFilterValue> mapNumericalValues = v -> {
         DataFilterValue dataFilterValue = new DataFilterValue();
@@ -312,4 +311,45 @@ public void getClinicalDataCounts() {
         
         Assert.assertEquals(counts.size(), 2);
     }
+    
+    @Test
+    public void getFilteredSamplesWithGeneFilters() {
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(new String[]{"msk_impact_2017"}, null);
+
+        List<StudyViewGeneFilter> studyViewGeneFilters = new ArrayList<>();
+        StudyViewGeneFilter mutationStudyViewGeneFilter = new StudyViewGeneFilter();
+        mutationStudyViewGeneFilter.setMolecularProfileIds(new HashSet<>(List.of("msk_impact_2017_mutations")));
+        mutationStudyViewGeneFilter.setGeneQueries(generateGeneFilters(List.of("KRAS", "TP53"), false));
+        studyViewGeneFilters.add(mutationStudyViewGeneFilter);
+
+        studyViewFilter.setGeneFilters(studyViewGeneFilters);
+        
+        List<Sample> samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build());
+        Assert.assertEquals(845, samples.size());
+
+        mutationStudyViewGeneFilter.setGeneQueries(generateGeneFilters(List.of("SMARCD1", "TP53"), true));
+        List<Sample> samplesFilteredViaOrRelationship = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build());
+        Assert.assertEquals(4561, samplesFilteredViaOrRelationship.size()); 
+    }
+
+    @Test
+    public void getFilteredSamplesWithMultipleStudyViewGeneFilters() {
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(new String[]{"msk_impact_2017"}, null);
+
+        List<StudyViewGeneFilter> studyViewGeneFilters = new ArrayList<>();
+        StudyViewGeneFilter mutationStudyViewGeneFilter = new StudyViewGeneFilter();
+        mutationStudyViewGeneFilter.setMolecularProfileIds(new HashSet<>(List.of("msk_impact_2017_mutations")));
+        mutationStudyViewGeneFilter.setGeneQueries(generateGeneFilters(List.of("TP53"), false));
+        
+        StudyViewGeneFilter cnaStudyViewGeneFilter = new StudyViewGeneFilter();
+        cnaStudyViewGeneFilter.setMolecularProfileIds(new HashSet<>(List.of("msk_impact_2017_structural_variants")));
+        cnaStudyViewGeneFilter.setGeneQueries(generateGeneFilters(List.of("BRAF"), true));
+        studyViewGeneFilters.add(mutationStudyViewGeneFilter);
+        studyViewGeneFilters.add(cnaStudyViewGeneFilter);
+
+        studyViewFilter.setGeneFilters(studyViewGeneFilters);
+
+        List<Sample> samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build());
+        Assert.assertEquals(16, samples.size()); 
+    }
 }
\ No newline at end of fileueu(2f8a81d4f01744367eb6f59d0ff9da8c3885ea90}(sha(2f8a81d4f01744367eb6f59d0ff9da8c3885ea90node_idEC_kwDOAe-hB9oAKDJmOGE4MWQ0ZjAxNzQ0MzY3ZWI2ZjU5ZDBmZjlkYThjMzg4NWVhOTAcommit}(author}(name
Beking0912emailsbqoo@qq.comdate2023-08-17T18:27:20Zu	committer}(j  
Beking0912j  sbqoo@qq.comj  2023-08-17T18:27:20Zumessageadd property show_web_tourstree}(j  (853bd059a37ed6bf747c13a10077c210fd40ef5durlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/853bd059a37ed6bf747c13a10077c210fd40ef5duj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/2f8a81d4f01744367eb6f59d0ff9da8c3885ea90
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2f8a81d4f01744367eb6f59d0ff9da8c3885ea90html_urlXhttps://github.com/cBioPortal/cbioportal/commit/2f8a81d4f01744367eb6f59d0ff9da8c3885ea90comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/2f8a81d4f01744367eb6f59d0ff9da8c3885ea90/commentsj  }(login
Beking0912idJ);j  MDQ6VXNlcjM3NDMxNzky
avatar_url4https://avatars.githubusercontent.com/u/37431792?v=4gravatar_idh5j  'https://api.github.com/users/Beking0912j  https://github.com/Beking0912
followers_url1https://api.github.com/users/Beking0912/followers
following_url>https://api.github.com/users/Beking0912/following{/other_user}	gists_url7https://api.github.com/users/Beking0912/gists{/gist_id}starred_url>https://api.github.com/users/Beking0912/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/Beking0912/subscriptionsorganizations_url,https://api.github.com/users/Beking0912/orgs	repos_url-https://api.github.com/users/Beking0912/repos
events_url8https://api.github.com/users/Beking0912/events{/privacy}received_events_url7https://api.github.com/users/Beking0912/received_eventstypeUser
site_adminuj  }(j  
Beking0912j  J);j  MDQ6VXNlcjM3NDMxNzkyj  4https://avatars.githubusercontent.com/u/37431792?v=4j  h5j  'https://api.github.com/users/Beking0912j  https://github.com/Beking0912j  1https://api.github.com/users/Beking0912/followersj  >https://api.github.com/users/Beking0912/following{/other_user}j  7https://api.github.com/users/Beking0912/gists{/gist_id}j  >https://api.github.com/users/Beking0912/starred{/owner}{/repo}j  5https://api.github.com/users/Beking0912/subscriptionsj  ,https://api.github.com/users/Beking0912/orgsj  -https://api.github.com/users/Beking0912/reposj  8https://api.github.com/users/Beking0912/events{/privacy}j  7https://api.github.com/users/Beking0912/received_eventsj  Userj  uparents]}(j  (643cfcdb15b3649e6160c6e8bb6f80fcf4df3338j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/643cfcdb15b3649e6160c6e8bb6f80fcf4df3338j  Xhttps://github.com/cBioPortal/cbioportal/commit/643cfcdb15b3649e6160c6e8bb6f80fcf4df3338uastats}(totalK	additionsK	deletionsK ufiles](}(j  (88fbcf4a8efca7addd3afc42448276c2eca47d97filenameCcore/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.javastatusmodifiedj  Kj  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/2f8a81d4f01744367eb6f59d0ff9da8c3885ea90/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/2f8a81d4f01744367eb6f59d0ff9da8c3885ea90/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.java?ref=2f8a81d4f01744367eb6f59d0ff9da8c3885ea90patchX  @@ -122,6 +122,7 @@ public class GlobalProperties {
     public static final String SKIN_RIGHT_NAV_SHOW_EXAMPLES = "skin.right_nav.show_examples";
     public static final String SKIN_RIGHT_NAV_SHOW_TESTIMONIALS = "skin.right_nav.show_testimonials";
     public static final String SKIN_RIGHT_NAV_SHOW_WHATS_NEW = "skin.right_nav.show_whats_new";
+    public static final String SKIN_RIGHT_NAV_SHOW_WEB_TOURS = "skin.right_nav.show_web_tours";
     private static String skinAuthorizationMessage;
     @Value("${skin.authorization_message:Access to this portal is only available to authorized users.}")
     public void setSkinAuthorizationMessage(String property) { skinAuthorizationMessage = property; }
@@ -805,6 +806,12 @@ public static boolean showRightNavWhatsNew()
         return showFlag == null || Boolean.parseBoolean(showFlag);
     }
 
+    public static boolean showRightNavWebTours()
+    {
+        String showFlag = portalProperties.getProperty(SKIN_RIGHT_NAV_SHOW_WEB_TOURS);
+        return showFlag == null || Boolean.parseBoolean(showFlag);
+    }
+
     public static String getAuthorizationMessage()
     {
         return skinAuthorizationMessage;u}(j  (1f389f4159d5b043d463a79b2fa1c0d26cb72275j
  Hdocs/deployment/customization/Customizing-your-instance-of-cBioPortal.mdj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/2f8a81d4f01744367eb6f59d0ff9da8c3885ea90/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdj  https://github.com/cBioPortal/cbioportal/raw/2f8a81d4f01744367eb6f59d0ff9da8c3885ea90/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdj  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.md?ref=2f8a81d4f01744367eb6f59d0ff9da8c3885ea90j  X  @@ -145,6 +145,12 @@ Below you can find the complete list of all the available skin properties.
 			<td>Text for public cBioPortal.org.</td>
 			<td>Any HTML text</td>
 		</tr>
+        <tr>
+			<td>skin.right_nav.show_web_tours</td>
+			<td>set the "Interactive Tours" section in the right navigation bar</td>
+			<td>true</td>
+			<td>true / false</td>
+		</tr>
 		<tr>
 			<td>skin.show_about_tab</td>
 			<td>show the "ABOUT" tab in the header</td>u}(j  (89cadeee479ebc2c7c0dc918d3db918984dcf343j
  <docs/deployment/customization/portal.properties-Reference.mdj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/2f8a81d4f01744367eb6f59d0ff9da8c3885ea90/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdj  https://github.com/cBioPortal/cbioportal/raw/2f8a81d4f01744367eb6f59d0ff9da8c3885ea90/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdj  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.md?ref=2f8a81d4f01744367eb6f59d0ff9da8c3885ea90j  Xx  @@ -100,6 +100,9 @@ skin.right_nav.show_whats_new=
 skin.right_nav.show_twitter=
 ```
 
+#Interactive tours section
+skin.right_nav.show_web_tours=
+
 ### Control the content of specific sections
 
 Setting controlling the blurb: you can add any HTML code here that you want to visualize. This will be shown between the cBioPortal menu and the Query selector in the main page.u}(j  (0d20e91ebde0e5440f8a6a740c6ff6c2910ec892j
  =portal/src/main/webapp/WEB-INF/jsp/global/frontend_config.jspj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/2f8a81d4f01744367eb6f59d0ff9da8c3885ea90/portal%2Fsrc%2Fmain%2Fwebapp%2FWEB-INF%2Fjsp%2Fglobal%2Ffrontend_config.jspj  https://github.com/cBioPortal/cbioportal/raw/2f8a81d4f01744367eb6f59d0ff9da8c3885ea90/portal%2Fsrc%2Fmain%2Fwebapp%2FWEB-INF%2Fjsp%2Fglobal%2Ffrontend_config.jspj  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2FWEB-INF%2Fjsp%2Fglobal%2Ffrontend_config.jsp?ref=2f8a81d4f01744367eb6f59d0ff9da8c3885ea90j  X  @@ -30,6 +30,7 @@ window.legacySupportFrontendConfig = {
     skinRightNavShowExamples : <%=GlobalProperties.showRightNavExamples()%>,
     skinRightNavShowTestimonials : <%=GlobalProperties.showRightNavTestimonials()%>,
     skinRightNavShowWhatsNew : <%=GlobalProperties.showRightNavWhatsNew()%>,
+    skinRightNavShowWebTours: <%=GlobalProperties.showRightNavInteractiveTour()%>,
     skinRightNavExamplesHTML : '<%=GlobalProperties.getExamplesRightColumnHtml()%>',
     skinRightNavExamplesHTML : '<%=GlobalProperties.getExamplesRightColumnHtml()%>',
     skinRightNavWhatsNewBlurb : '<%=GlobalProperties.getRightNavWhatsNewBlurb()%>',u}(j  (1fe5079ae3adc05da94f4540043eb101c02d42ddj
  )portal/src/main/webapp/config_service.jspj  modifiedj  Kj  K j  Kj  https://github.com/cBioPortal/cbioportal/blob/2f8a81d4f01744367eb6f59d0ff9da8c3885ea90/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj  https://github.com/cBioPortal/cbioportal/raw/2f8a81d4f01744367eb6f59d0ff9da8c3885ea90/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=2f8a81d4f01744367eb6f59d0ff9da8c3885ea90     j  X2  @@ -98,6 +98,7 @@
             "skin.right_nav.show_whats_new",
             "skin.right_nav.show_twitter",
             "skin.right_nav.whats_new_blurb",
+            "skin.right_nav.show_web_tours",
             "skin.show_about_tab",
             "skin.show_data_tab",
             "skin.show_faqs_tab",ueu(d19eb32959d37c72a5f50e1ecc60e81f5d000dd9}(sha(d19eb32959d37c72a5f50e1ecc60e81f5d000dd9node_idEC_kwDOAe-hB9oAKGQxOWViMzI5NTlkMzdjNzJhNWY1MGUxZWNjNjBlODFmNWQwMDBkZDkcommit}(author}(nameKarthikemailkalletlakarthik@gmail.comdate2023-07-03T04:15:09Zu	committer}(jD  KarthikjF  kalletlakarthik@gmail.comjH  2023-07-18T22:22:45Zumessage!Changes related to download grouptree}(j<  (c91adea004559bc5c6d3f630484cdb85d57ea866urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c91adea004559bc5c6d3f630484cdb85d57ea866ujT  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/d19eb32959d37c72a5f50e1ecc60e81f5d000dd9
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujT  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d19eb32959d37c72a5f50e1ecc60e81f5d000dd9html_urlXhttps://github.com/cBioPortal/cbioportal/commit/d19eb32959d37c72a5f50e1ecc60e81f5d000dd9comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/d19eb32959d37c72a5f50e1ecc60e81f5d000dd9/commentsjB  }(login	kalletlakidJƴ j>  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5jT  &https://api.github.com/users/kalletlakj`  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminujJ  }(je  	kalletlakjg  Jƴ j>  MDQ6VXNlcjEyOTU2ODcwji  4https://avatars.githubusercontent.com/u/12956870?v=4jk  h5jT  &https://api.github.com/users/kalletlakj`  https://github.com/kalletlakjn  0https://api.github.com/users/kalletlak/followersjp  =https://api.github.com/users/kalletlak/following{/other_user}jr  6https://api.github.com/users/kalletlak/gists{/gist_id}jt  =https://api.github.com/users/kalletlak/starred{/owner}{/repo}jv  4https://api.github.com/users/kalletlak/subscriptionsjx  +https://api.github.com/users/kalletlak/orgsjz  ,https://api.github.com/users/kalletlak/reposj|  7https://api.github.com/users/kalletlak/events{/privacy}j~  6https://api.github.com/users/kalletlak/received_eventsj  Userj  uparents]}(j<  (a3794f7cd5a60974b8c04938d5b3d784a5bfb09ajT  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/a3794f7cd5a60974b8c04938d5b3d784a5bfb09aj`  Xhttps://github.com/cBioPortal/cbioportal/commit/a3794f7cd5a60974b8c04938d5b3d784a5bfb09auastats}(totalK,	additionsK	deletionsKufiles](}(j<  (f9df86ed8afd28abb0a6972640e3b73c1c6b931bfilenameCcore/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.javastatusmodifiedj  Kj  KchangesK&blob_urlhttps://github.com/cBioPortal/cbioportal/blob/d19eb32959d37c72a5f50e1ecc60e81f5d000dd9/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/d19eb32959d37c72a5f50e1ecc60e81f5d000dd9/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.java?ref=d19eb32959d37c72a5f50e1ecc60e81f5d000dd9patchX  @@ -50,11 +50,13 @@
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.commons.lang.StringUtils;
 import org.cbioportal.security.spring.authentication.PortalUserDetails;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Component;
 import org.springframework.util.ResourceUtils;
@@ -362,6 +364,10 @@ public static String parseUrl(String url)
     @Value("${frontend.url.runtime:}") 
     public void setFrontendUrlRuntime(String property) { frontendUrlRuntime = property; }
 
+    private static String downloadGroup;
+    @Value("${download_group:}") // default is empty string
+    public void setDownloadGroup(String property) { downloadGroup = property; }
+
     private static Logger LOG = LoggerFactory.getLogger(GlobalProperties.class);
     private static ConfigPropertyResolver portalProperties = new ConfigPropertyResolver();
     private static Properties mavenProperties = initializeProperties(MAVEN_PROPERTIES_FILE_NAME);
@@ -1264,18 +1270,26 @@ public static String getOncoKbToken()  {
     }
 
     public static String getDownloadControl() {
-        String downloadControlOption = getProperty("skin.hide_download_controls");
-        /*
-            skin.hide_download_controls   return_value
-                    true                    hide
-                    false                   show
-                    data                    data
-                    null/empty              show
-         */
-        switch ((downloadControlOption != null) ? downloadControlOption.trim().toLowerCase() : "false") {
-            case "true" : return "hide";
-            case "data" : return "data";
-            default: return "show";
+        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+
+        if(authentication != null &&
+            StringUtils.isNotEmpty(downloadGroup) &&
+            authentication.getAuthorities().contains(new SimpleGrantedAuthority(downloadGroup))) {
+            return "show";
+        }else {
+            String downloadControlOption = getProperty("skin.hide_download_controls");
+            /*
+                skin.hide_download_controls   return_value
+                        true                    hide
+                        false                   show
+                        data                    data
+                        null/empty              show
+             */
+            switch ((downloadControlOption != null) ? downloadControlOption.trim().toLowerCase() : "false") {
+                case "true" : return "hide";
+                case "data" : return "data";
+                default: return "show";
+            }
         }
     }
 }u}(j<  (ab5bbf48c3e1265677a20e9b240c0521c4e4da03j  )portal/src/main/webapp/config_service.jspj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/d19eb32959d37c72a5f50e1ecc60e81f5d000dd9/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj  https://github.com/cBioPortal/cbioportal/raw/d19eb32959d37c72a5f50e1ecc60e81f5d000dd9/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=d19eb32959d37c72a5f50e1ecc60e81f5d000dd9j  Xp  @@ -202,7 +202,7 @@
         obj.put("oncoKbTokenDefined", !StringUtils.isEmpty(GlobalProperties.getOncoKbToken()));
 
         obj.put("sessionServiceEnabled", !StringUtils.isEmpty(GlobalProperties.getSessionServiceUrl()));
-        
+
         obj.put("skin_hide_download_controls", GlobalProperties.getDownloadControl());
 
         out.println(obj.toJSONString());u}(j<  (efae1b8c7946f5f768afae5b44f7b2585dab18b9j  ,src/main/resources/portal.properties.EXAMPLEj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/d19eb32959d37c72a5f50e1ecc60e81f5d000dd9/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj  https://github.com/cBioPortal/cbioportal/raw/d19eb32959d37c72a5f50e1ecc60e81f5d000dd9/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=d19eb32959d37c72a5f50e1ecc60e81f5d000dd9j  X-  @@ -433,4 +433,6 @@ persistence.cache_type=no-cache
 
 # Set StudyDownloadLinkUrl
 # Allows download links within DataSets Tab (See Portal.Properties documentation for more info)
-# study_download_url=
\ No newline at end of file
+# study_download_url=
+
+# download_group=
\ No newline at end of fileueu(30bcbce525990c58a30c63febd9591103857fd9b}(sha(30bcbce525990c58a30c63febd9591103857fd9bnode_idEC_kwDOAe-hB9oAKDMwYmNiY2U1MjU5OTBjNThhMzBjNjNmZWJkOTU5MTEwMzg1N2ZkOWIcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-08T02:19:31Zu	committer}(j  Djokovic0311j  .55948986+Djokovic0311@users.noreply.github.comj  2023-08-08T02:19:31Zumessagerefactor some variablestree}(j  (c6135c9a669f138d01a45cb98ee43533b86cea7furlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c6135c9a669f138d01a45cb98ee43533b86cea7fuj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/30bcbce525990c58a30c63febd9591103857fd9b
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/30bcbce525990c58a30c63febd9591103857fd9bhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/30bcbce525990c58a30c63febd9591103857fd9bcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/30bcbce525990c58a30c63febd9591103857fd9b/commentsj  }(loginDjokovic0311idJUj  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5j  )https://api.github.com/users/Djokovic0311j  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminuj  }(j  Djokovic0311j  JUj  MDQ6VXNlcjU1OTQ4OTg2j  4https://avatars.githubusercontent.com/u/55948986?v=4j  h5j  )https://api.github.com/users/Djokovic0311j  https://github.com/Djokovic0311j  3https://api.github.com/users/Djokovic0311/followersj  @https://api.github.com/users/Djokovic0311/following{/other_user}j  9https://api.github.com/users/Djokovic0311/gists{/gist_id}j  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}j  7https://api.github.com/users/Djokovic0311/subscriptionsj  .https://api.github.com/users/Djokovic0311/orgsj  /https://api.github.com/users/Djokovic0311/reposj   :https://api.github.com/users/Djokovic0311/events{/privacy}j   9https://api.github.com/users/Djokovic0311/received_eventsj   Userj   uparents]}(j  (5f66fc71561db67918e3fc100131a6b64bbdd8f4j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/5f66fc71561db67918e3fc100131a6b64bbdd8f4j  Xhttps://github.com/cBioPortal/cbioportal/commit/5f66fc71561db67918e3fc100131a6b64bbdd8f4uastats}(totalK	additionsK	deletionsKufiles](}(j  (5034109d2ce6d288a6e5b1f403651b5454583d10filenameXservice/src/main/java/org/cbioportal/service/impl/GenericAssayBinaryDataServiceImpl.javastatusmodifiedj!   Kj"   KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/30bcbce525990c58a30c63febd9591103857fd9b/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImpl.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/30bcbce525990c58a30c63febd9591103857fd9b/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImpl.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImpl.java?ref=30bcbce525990c58a30c63febd9591103857fd9bpatchX5  @@ -101,8 +101,7 @@ public int compare(GenericAssayBinaryEnrichment c1, GenericAssayBinaryEnrichment
         });
 
         // Extract pValues and calculate qValues.
-        BigDecimal[] pValues = genericAssayBinaryEnrichments.stream().map(a -> a.getpValue()).toArray(BigDecimal[]::new);
-
+        BigDecimal[] pValues = genericAssayBinaryEnrichments.stream().map(GenericAssayBinaryEnrichment ::getpValue).toArray(BigDecimal[]::new);
         BigDecimal[] qValues = fisherExactTestCalculator.calcqValue(pValues);
 
         // Assign qValues back to the objects.u}(j  (a740211647cc8ce79c33b5de15b7e7f62e2fd32cj'   \service/src/test/java/org/cbioportal/service/impl/GenericAssayBinaryDataServiceImplTest.javaj)   modifiedj!   K j"   Kj+   Kj,   https://github.com/cBioPortal/cbioportal/blob/30bcbce525990c58a30c63febd9591103857fd9b/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImplTest.javaj.   https://github.com/cBioPortal/cbioportal/raw/30bcbce525990c58a30c63febd9591103857fd9b/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImplTest.javaj0   https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImplTest.java?ref=30bcbce525990c58a30c63febd9591103857fd9bj2   XK  @@ -38,9 +38,6 @@ public class GenericAssayBinaryDataServiceImplTest extends BaseServiceImplTest{
     @Mock
     private MolecularDataRepository molecularDataRepository;
 
-    @Spy
-    @InjectMocks
-    private ExpressionEnrichmentUtil expressionEnrichmentUtil;
     @Mock
     private GenericAssayService genericAssayService;
 ueu(b3400e6aa562d5b7c093300cc94398e5ad0e9e84}(sha(b3400e6aa562d5b7c093300cc94398e5ad0e9e84node_idEC_kwDOAe-hB9oAKGIzNDAwZTZhYTU2MmQ1YjdjMDkzMzAwY2M5NDM5OGU1YWQwZTllODQcommit}(author}(name	Karthik Kemailkalletlakarthik@gmail.comdate2023-07-13T15:07:30Zu	committer}(jF   GitHubjH   noreply@github.comjJ   2023-07-13T15:07:30ZumessagemMerge pull request #10261 from kalletlak/timeline-performance

Improve study-view treatment api's performancetree}(j>   (7b5592aa395cf40b4548b736c9771c78caee0ef9urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/7b5592aa395cf40b4548b736c9771c78caee0ef9ujV   ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/b3400e6aa562d5b7c093300cc94398e5ad0e9e84
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJksBMyCRBK7hj4Ov3rIwAAvEgIAF1FHwIQ9mtndcEq5Gvk6yut
ht8HpTGFpwtEzIOKD/LB3S3YlDcaC9gvW2JXubPopOWWys1Xpa4lcsVb+nVQbutA
Z3UOH7p+14Yny6ksjPYpuwxel20FYJxOxmuNHose7mBmcY1ZMhM3cSJvfrbMiME0
M/HWO+WsRU9fMi4hYxM97yq4xyyPHX5eKCxgNwrpxnRdXrxedH6Pg/hgxYgFTTWr
/ezfO3SSjNP9jgwVboX1X388CiJbMpJooFocN8Abq7fIb4WN08cgFosn8RENZwg6
Vr4OjUCxCQC0dKlYTX87OQnVsNn5z7aiK3MVAoXk0fk6O46bT3nao7eSTBGIpdY=
=04ZA
-----END PGP SIGNATURE-----
payloadXq  tree 7b5592aa395cf40b4548b736c9771c78caee0ef9
parent 2712b20be8520460d71e154f155412422f7ba22f
parent dc487c2831b6152397ab9be6baded7b2264369eb
author Karthik K <kalletlakarthik@gmail.com> 1689260850 -0400
committer GitHub <noreply@github.com> 1689260850 -0400

Merge pull request #10261 from kalletlak/timeline-performance

Improve study-view treatment api's performanceuujV   chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b3400e6aa562d5b7c093300cc94398e5ad0e9e84html_urlXhttps://github.com/cBioPortal/cbioportal/commit/b3400e6aa562d5b7c093300cc94398e5ad0e9e84comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/commentsjD   }(login	kalletlakidJƴ j@   MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5jV   &https://api.github.com/users/kalletlakjd   https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminujL   }(ji   web-flowjk   J/j@   MDQ6VXNlcjE5ODY0NDQ3jm   4https://avatars.githubusercontent.com/u/19864447?v=4jo   h5jV   %https://api.github.com/users/web-flowjd   https://github.com/web-flowjr   /https://api.github.com/users/web-flow/followersjt   <https://api.github.com/users/web-flow/following{/other_user}jv   5https://api.github.com/users/web-flow/gists{/gist_id}jx   <https://api.github.com/users/web-flow/starred{/owner}{/repo}jz   3https://api.github.com/users/web-flow/subscriptionsj|   *https://api.github.com/users/web-flow/orgsj~   +https://api.github.com/users/web-flow/reposj   6https://api.github.com/users/web-flow/events{/privacy}j   5https://api.github.com/users/web-flow/received_eventsj   Userj   uparents](}(j>   (2712b20be8520460d71e154f155412422f7ba22fjV   chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2712b20be8520460d71e154f155412422f7ba22fjd   Xhttps://github.com/cBioPortal/cbioportal/commit/2712b20be8520460d71e154f155412422f7ba22fu}(j>   (dc487c2831b6152397ab9be6baded7b2264369ebjV   chttps://api.github.com/repos/cBioPortal/cbioportal/commits/dc487c2831b6152397ab9be6baded7b2264369ebjd   Xhttps://github.com/cBioPortal/cbioportal/commit/dc487c2831b6152397ab9be6baded7b2264369ebuestats}(totalM	additionsK]	deletionsKufiles](}(j>   (2971b3d1be6774b44ec9f00955ceec64e0585d89filename&db-scripts/src/main/resources/cgds.sqlstatusmodifiedj   Kj   KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/db-scripts%2Fsrc%2Fmain%2Fresources%2Fcgds.sqlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/db-scripts%2Fsrc%2Fmain%2Fresources%2Fcgds.sqlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/db-scripts%2Fsrc%2Fmain%2Fresources%2Fcgds.sql?ref=b3400e6aa562d5b7c093300cc94398e5ad0e9e84patch@@ -755,5 +755,5 @@ CREATE TABLE `resource_study` (
 );
 
 -- THIS MUST BE KEPT IN SYNC WITH db.version PROPERTY IN pom.xml
-INSERT INTO info VALUES ('2.13.0', NULL);
+INSERT INTO info VALUES ('2.13.1', NULL);
 u}(j>   (78c0d25ea145313cff22c9e578cdf84f8c3be307j   +db-scripts/src/main/resources/migration.sqlj   modifiedj   Kj   K j   Kj   https://github.com/cBioPortal/cbioportal/blob/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/db-scripts%2Fsrc%2Fmain%2Fresources%2Fmigration.sqlj   https://github.com/cBioPortal/cbioportal/raw/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/db-scripts%2Fsrc%2Fmain%2Fresources%2Fmigration.sqlj   https://api.github.com/repos/cBioPortal/cbioportal/contents/db-scripts%2Fsrc%2Fmain%2Fresources%2Fmigration.sql?ref=b3400e6aa562d5b7c093300cc94398e5ad0e9e84j   Xz  @@ -1021,3 +1021,10 @@ ALTER TABLE `mutation_event` CHANGE COLUMN `ONCOTATOR_PROTEIN_POS_START` `PROTEI
 ALTER TABLE `mutation_event` CHANGE COLUMN `ONCOTATOR_PROTEIN_POS_END` `PROTEIN_POS_END` int(11);
 UPDATE `info` SET `DB_SCHEMA_VERSION`="2.13.0";
 
+
+##version: 2.13.1
+ALTER TABLE `clinical_event_data` MODIFY COLUMN `VALUE` varchar(3000) NOT NULL;
+CREATE INDEX idx_clinical_event_key ON clinical_event_data (`KEY`);
+CREATE INDEX idx_clinical_event_value ON clinical_event_data (`VALUE`);
+CREATE INDEX idx_sample_stable_id ON sample (`STABLE_ID`);
+UPDATE `info` SET `DB_SCHEMA_VERSION`="2.13.1";
\ No newline at end of fileu}(j>   (bc2e0705b16aced08aedf3ca718aa898c0f66540j   ]persistence/persistence-api/src/main/java/org/cbioportal/persistence/TreatmentRepository.javaj   modifiedj   Kj   Kj   Kj   https://github.com/cBioPortal/cbioportal/blob/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FTreatmentRepository.javaj   https://github.com/cBioPortal/cbioportal/raw/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FTreatmentRepository.javaj   https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FTreatmentRepository.java?ref=b3400e6aa562d5b7c093300cc94398e5ad0e9e84j   X  @@ -14,20 +14,18 @@ public interface TreatmentRepository {
     public Map<String, List<Treatment>> getTreatmentsByPatientId(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    public Map<String, List<ClinicalEventSample>> getSamplesByPatientId(List<String> sampleIds, List<String> studyIds);
+    public List<Treatment> getTreatments(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    public Map<String, List<ClinicalEventSample>> getShallowSamplesByPatientId(List<String> sampleIds, List<String> studyIds);
+    public Map<String, List<ClinicalEventSample>> getSamplesByPatientId(List<String> sampleIds, List<String> studyIds);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    public Set<String> getAllUniqueTreatments(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key);
+    public Map<String, List<ClinicalEventSample>> getShallowSamplesByPatientId(List<String> sampleIds, List<String> studyIds);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    public Integer getTreatmentCount(List<String> studies, String key);
+    public Boolean hasTreatmentData(List<String> studies, ClinicalEventKeyCode key);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    public Integer getSampleCount(List<String> studies);
+    public Boolean hasSampleTimelineData(List<String> studies);
 
-    @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    public Boolean studyIdHasTreatments(String studyId, ClinicalEventKeyCode key);
 }u}(j>   (44e4f8560796675a7d390a369d10fb581e91e38aj   epersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/TreatmentMapper.javaj   modifiedj   Kj   Kj   Kj   https://github.com/cBioPortal/cbioportal/blob/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.javaj   https://github.com/cBioPortal/cbioportal/raw/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.javaj   https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.java?ref=b3400e6aa562d5b7c093300cc94398e5ad0e9e84j   X  @@ -13,11 +13,7 @@ public interface TreatmentMapper {
     
     List<ClinicalEventSample> getAllShallowSamples(List<String> sampleIds, List<String> studyIds);
 
-    Set<String> getAllUniqueTreatments(List<String> sampleIds, List<String> studyIds, String key);
+    Boolean hasTreatmentData(List<String> sampleIds, List<String> studyIds, String key);
 
-    Integer getTreatmentCount(List<String> sampleIds, List<String> studyIds, String key);
-
-    Integer getSampleCount(List<String> sampleIds, List<String> studyIds);
-
-    Boolean studyIdHasTreatments(String studyId, String key);
+    Boolean hasSampleTimelineData(List<String> sampleIds, List<String> studyIds);
 }u}(j>   (d44bdfc808a4d8e643815463b763592a624dd61bj   ppersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/TreatmentMyBatisRepository.javaj   modifiedj   Kj   Kj   K&j   https://github.com/cBioPortal/cbioportal/blob/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepository.javaj   https://github.com/cBioPortal/cbioportal/raw/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepository.javaj   https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepository.java?ref=b3400e6aa562d5b7c093300cc94398e5ad0e9e84j   X	  @@ -18,12 +18,17 @@ public class TreatmentMyBatisRepository implements TreatmentRepository {
     
     @Override
     public Map<String, List<Treatment>> getTreatmentsByPatientId(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key) {
+        return getTreatments(sampleIds, studyIds, key)
+            .stream()
+            .collect(groupingBy(Treatment::getPatientId));
+    }
+
+    @Override
+    public List<Treatment> getTreatments(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key) {
         return treatmentMapper.getAllTreatments(sampleIds, studyIds, key.getKey())
             .stream()
             .flatMap(treatment -> splitIfDelimited(treatment, key))
-            .collect(groupingBy(Treatment::getPatientId));
-        
-        
+            .collect(Collectors.toList());
     }
 
     private Stream<Treatment> splitIfDelimited(Treatment unsplitTreatment, ClinicalEventKeyCode key) {
@@ -61,31 +66,12 @@ public Map<String, List<ClinicalEventSample>> getShallowSamplesByPatientId(List<
     }
 
     @Override
-    public Set<String> getAllUniqueTreatments(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key) {
-        return treatmentMapper.getAllUniqueTreatments(sampleIds, studyIds, key.getKey())
-            .stream()
-            .flatMap(treatment -> {
-                if (key.isDelimited()) {
-                    return Arrays.stream(treatment.split(key.getDelimiter()));
-                } else {
-                    return Stream.of(treatment);
-                }
-            })
-            .collect(Collectors.toSet());
-    }
-
-    @Override
-    public Integer getTreatmentCount(List<String> studies, String key) {
-        return treatmentMapper.getTreatmentCount(null, studies, key);
-    }
-
-    @Override
-    public Integer getSampleCount(List<String> studies) {
-        return treatmentMapper.getSampleCount(null, studies);
+    public Boolean hasTreatmentData(List<String> studies, ClinicalEventKeyCode key) {
+        return treatmentMapper.hasTreatmentData(null, studies, key.getKey());
     }
 
     @Override
-    public Boolean studyIdHasTreatments(String studyId, ClinicalEventKeyCode key) {
-        return treatmentMapper.studyIdHasTreatments(studyId, key.getKey());
+    public Boolean hasSampleTimelineData(List<String> studies) {
+        return treatmentMapper.hasSampleTimelineData(null, studies);
     }
 }u}(j>   (de633ab7f55b0f7c85a4ddf6d633ec17c43e9158j   ipersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatis/TreatmentMapper.xmlj   modifiedj   Kj   K"j   K-j   https://github.com/cBioPortal/cbioportal/blob/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.xmlj   https://github.com/cBioPortal/cbioportal/raw/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.xmlj   https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.xml?ref=b3400e6aa562d5b7c093300cc94398e5ad0e9e84j   X
  @@ -16,6 +16,7 @@
             INNER JOIN sample ON patient.INTERNAL_ID = sample.PATIENT_ID
             INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
         <include refid="where"/>
+        AND clinical_event.EVENT_TYPE = 'TREATMENT'
         AND clinical_event_data.KEY = #{key}
     </select>
 
@@ -48,35 +49,24 @@
         <include refid="where"/>
     </select>
 
-    <select id="getAllUniqueTreatments" resultType="java.lang.String">
-        SELECT 
-            DISTINCT clinical_event_data.VALUE
+    <select id="hasTreatmentData" resultType="java.lang.Boolean">
+        SELECT EXISTS(SELECT
+            *
         FROM
             clinical_event
             INNER JOIN clinical_event_data ON clinical_event.CLINICAL_EVENT_ID = clinical_event_data.CLINICAL_EVENT_ID
             INNER JOIN patient ON clinical_event.PATIENT_ID = patient.INTERNAL_ID
             INNER JOIN sample ON patient.INTERNAL_ID = sample.PATIENT_ID
             INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
         <include refid="where"/>
-            AND clinical_event_data.KEY = #{key}
+            AND clinical_event.EVENT_TYPE = 'TREATMENT'
+            AND clinical_event_data.KEY = #{key} LIMIT 1
+        )
     </select>
 
-    <select id="getTreatmentCount" resultType="java.lang.Integer">
-        SELECT
-            COUNT(clinical_event.PATIENT_ID)
-        FROM
-            clinical_event
-            INNER JOIN clinical_event_data ON clinical_event.CLINICAL_EVENT_ID = clinical_event_data.CLINICAL_EVENT_ID
-            INNER JOIN patient ON clinical_event.PATIENT_ID = patient.INTERNAL_ID
-            INNER JOIN sample ON patient.INTERNAL_ID = sample.PATIENT_ID
-            INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
-        <include refid="where"/>
-            AND clinical_event_data.KEY = #{key}
-    </select>
-
-    <select id="getSampleCount" resultType="java.lang.Integer">
-        SELECT
-            COUNT(sample.STABLE_ID)
+    <select id="hasSampleTimelineData" resultType="java.lang.Boolean">
+        SELECT EXISTS(SELECT
+            *
         FROM
             clinical_event
             INNER JOIN clinical_event_data ON clinical_event.CLINICAL_EVENT_ID = clinical_event_data.CLINICAL_EVENT_ID
@@ -85,20 +75,7 @@
             INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
         <include refid="where"/>
             AND clinical_event_data.KEY = 'SAMPLE_ID'
-            AND (clinical_event.EVENT_TYPE LIKE 'Sample Acquisition' OR clinical_event.EVENT_TYPE LIKE 'SPECIMEN')
-    </select>
-    
-    <select id="studyIdHasTreatments" resultType="java.lang.Boolean">
-        SELECT
-            count(cancer_study.CANCER_STUDY_IDENTIFIER) > 0
-        FROM
-            clinical_event
-            INNER JOIN clinical_event_data ON clinical_event.CLINICAL_EVENT_ID = clinical_event_data.CLINICAL_EVENT_ID
-            INNER JOIN patient ON clinical_event.PATIENT_ID = patient.INTERNAL_ID
-            INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
-        WHERE
-            clinical_event_data.KEY = #{key}
-            AND cancer_study.CANCER_STUDY_IDENTIFIER = #{studyId}
+            AND (clinical_event.EVENT_TYPE LIKE 'Sample Acquisition' OR clinical_event.EVENT_TYPE LIKE 'SPECIMEN') LIMIT 1)
     </select>
 
     <sql id="where">u}(j>   (e61e23cb8074ac5fdf46548fa33505965d089f72j   tpersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/TreatmentMyBatisRepositoryTest.javaj   modifiedj   K
j   Kj   K j   https://github.com/cBioPortal/cbioportal/blob/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepositoryTest.javaj   https://github.com/cBioPortal/cbioportal/raw/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepositoryTest.javaj   https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepositoryTest.java?ref=b3400e6aa562d5b7c093300cc94398e5ad0e9e84j   X  @@ -134,32 +134,20 @@ public void getShallowSamplesByPatientId() {
     }
 
     @Test
-    public void getAllUniqueTreatments() {
-        HashSet<String> expected = new HashSet<>(Collections.singletonList("Madeupanib"));
-        
-        Set<String> actual = treatmentRepository.getAllUniqueTreatments(
-            Collections.singletonList("TCGA-A1-A0SD-01"),
-            Collections.singletonList("study_tcga_pub"),
-            ClinicalEventKeyCode.Agent
-        );
-        
-        Assert.assertEquals(actual, expected);
-    }
+    public void hasTreatmentData() {
+
+        Assert.assertEquals(true, treatmentRepository.hasTreatmentData(Collections.singletonList("study_tcga_pub"), ClinicalEventKeyCode.Agent));
+
+        Assert.assertEquals(false, treatmentRepository.hasTreatmentData(Collections.singletonList("acc_tcga"), ClinicalEventKeyCode.Agent));
 
-    @Test
-    public void getTreatmentCount() {
-        Integer expected = 1;
-        Integer actual = treatmentRepository.getTreatmentCount(Collections.singletonList("study_tcga_pub"), ClinicalEventKeyCode.Agent.getKey());
-        
-        Assert.assertEquals(actual, expected);
     }
 
     @Test
-    public void getSampleCount() {
-        Integer expected = 2;
-        Integer actual = treatmentRepository.getSampleCount(Collections.singletonList("study_tcga_pub"));
-        
-        Assert.assertEquals(actual, expected);
+    public void hasSampleTimelineData() {
+
+        Assert.assertEquals(true, treatmentRepository.hasSampleTimelineData(Collections.singletonList("study_tcga_pub")));
+
+        Assert.assertEquals(false, treatmentRepository.hasSampleTimelineData(Collections.singletonList("acc_tcga")));
     }
     
 }
\ No newline at end of fileu}(j>   (ce9685c8f5f72940bbc3e7d7563d5c53bdfd9f14j   pom.xmlj   modifiedj   Kj   Kj   Kj   ^https://github.com/cBioPortal/cbioportal/blob/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/pom.xmlj   ]https://github.com/cBioPortal/cbioportal/raw/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/pom.xmlj   phttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=b3400e6aa562d5b7c093300cc94398e5ad0e9e84j   @@ -314,7 +314,7 @@
     <tomcat.session.timeout>720</tomcat.session.timeout>
 
     <!-- THIS SHOULD BE KEPT IN SYNC TO VERSION IN CGDS.SQL -->
-    <db.version>2.13.0</db.version>
+    <db.version>2.13.1</db.version>
   </properties>
 
   <modules>u}(j>   (75784a01c150196e8496cfbec4e9e15e064817dej   Kservice/src/main/java/org/cbioportal/service/impl/TreatmentServiceImpl.javaj   modifiedj   Kj   K3j   KPj   https://github.com/cBioPortal/cbioportal/blob/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImpl.javaj   https://github.com/cBioPortal/cbioportal/raw/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImpl.javaj   https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImpl.java?ref=b3400e6aa562d5b7c093300cc94398e5ad0e9e84j   X  @@ -12,8 +12,6 @@
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
-import static java.util.stream.Collectors.toList;
-
 @Service
 public class TreatmentServiceImpl implements TreatmentService {
     @Autowired
@@ -25,7 +23,7 @@ private Pair<List<String>, List<String>> filterIds(List<String> sampleIds, List<
         }
         Set<String> studiesWithTreatments = studyIds.stream()
             .distinct()
-            .filter(studyId -> treatmentRepository.studyIdHasTreatments(studyId, key))
+            .filter(studyId -> treatmentRepository.hasTreatmentData(Collections.singletonList(studyId), key))
             .collect(Collectors.toSet());
         
         ArrayList<String> filteredSampleIds = new ArrayList<>();
@@ -40,16 +38,16 @@ private Pair<List<String>, List<String>> filterIds(List<String> sampleIds, List<
         }
         return new ImmutablePair<>(filteredSampleIds, filteredStudyIds);
     }
-    
+
     @Override
     public List<SampleTreatmentRow> getAllSampleTreatmentRows(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key) {
         Pair<List<String>, List<String>> filteredIds = filterIds(sampleIds, studyIds, key);
         sampleIds = filteredIds.getLeft();
         studyIds = filteredIds.getRight();
 
-        Map<String, List<ClinicalEventSample>> samplesByPatient = 
+        Map<String, List<ClinicalEventSample>> samplesByPatient =
             treatmentRepository.getSamplesByPatientId(sampleIds, studyIds);
-        Map<String, List<Treatment>> treatmentsByPatient = 
+        Map<String, List<Treatment>> treatmentsByPatient =
             treatmentRepository.getTreatmentsByPatientId(sampleIds, studyIds, key);
 
         Stream<SampleTreatmentRow> rows = samplesByPatient.keySet().stream()
@@ -150,71 +148,51 @@ Stream<SampleTreatmentRow> toRows() {
             );
         }
     }
-
     @Override
     public List<PatientTreatmentRow> getAllPatientTreatmentRows(
         List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key
     ) {
         Pair<List<String>, List<String>> filteredIds = filterIds(sampleIds, studyIds, key);
         sampleIds = filteredIds.getLeft();
         studyIds = filteredIds.getRight();
-        
-        Map<String, List<Treatment>> treatmentsByPatient = 
-            treatmentRepository.getTreatmentsByPatientId(sampleIds, studyIds, key);
-        Map<String, List<ClinicalEventSample>> samplesByPatient = treatmentRepository
-            .getShallowSamplesByPatientId(sampleIds, studyIds)
-            .entrySet()
-            .stream()
-            .filter(e -> treatmentsByPatient.containsKey(e.getKey()))
-            .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
-        Set<String> treatments = treatmentRepository.getAllUniqueTreatments(sampleIds, studyIds, key);
-
-        return treatments.stream()
-            .map(t -> createPatientTreatmentRowForTreatment(t, treatmentsByPatient, samplesByPatient))
-            .collect(Collectors.toList());
-    }
 
-    private PatientTreatmentRow createPatientTreatmentRowForTreatment(
-        String treatment,
-        Map<String, List<Treatment>> treatmentsByPatient,
-        Map<String, List<ClinicalEventSample>> samplesByPatient
-    ) {
-        // find all the patients that have received this treatment
-        List<Map.Entry<String, List<Treatment>>> matchingPatients = matchingPatients(treatment, treatmentsByPatient);
+        Map<String, List<ClinicalEventSample>> samplesByPatient = treatmentRepository
+            .getShallowSamplesByPatientId(sampleIds, studyIds);
 
-        // from those patients, extract the unique samples
-        Set<ClinicalEventSample> samples = matchingPatients
+        Map<String, List<Treatment>> treatmentSet = treatmentRepository.getTreatments(sampleIds, studyIds, key)
             .stream()
-            .map(Map.Entry::getKey)
-            .flatMap(patient -> samplesByPatient.getOrDefault(patient, new ArrayList<>()).stream())
-            .collect(Collectors.toSet());
-
-
-        return new PatientTreatmentRow(treatment, matchingPatients.size(), samples);
-    }
+            .collect(Collectors.groupingBy(Treatment::getTreatment));
 
-    private List<Map.Entry<String, List<Treatment>>> matchingPatients(
-        String treatment,
-        Map<String, List<Treatment>> treatmentsByPatient
-    ) {
-        return treatmentsByPatient.entrySet().stream()
-            .filter(p -> p.getValue().stream().anyMatch(t -> t.getTreatment().equals(treatment)))
-            .collect(toList());
+        /*
+            This logic transforms treatmentSet to list of PatientTreatmentRow. transformation steps:
+            - key in treatmentSet is going to be treatment
+            - get all unique patient ids -> this is going to give count
+            - get all clinicalEventSamples using above unique patient ids
+         */
+        return treatmentSet.entrySet()
+            .stream()
+            .map(entry -> {
+                String treatment = entry.getKey();
+                Set<String> patientIds = entry.getValue().stream().map(Treatment::getPatientId).collect(Collectors.toSet());
+                Set<ClinicalEventSample> clinicalEventSamples = patientIds
+                    .stream()
+                    .flatMap(patientId -> samplesByPatient.getOrDefault(patientId, new ArrayList<>()).stream())
+                    .collect(Collectors.toSet());
+                return new PatientTreatmentRow(treatment, patientIds.size(), clinicalEventSamples);
+            })
+            .collect(Collectors.toList());
     }
 
     @Override
     public Boolean containsTreatmentData(List<String> studies, ClinicalEventKeyCode key) {
-        return treatmentRepository.getTreatmentCount(studies, key.getKey()) > 0;
+        return treatmentRepository.hasTreatmentData(studies, key);
     }
 
     @Override
     public Boolean containsSampleTreatmentData(List<String> studyIds, ClinicalEventKeyCode key) {
         studyIds = studyIds.stream()
-            .filter(studyId -> treatmentRepository.studyIdHasTreatments(studyId, key))
+            .filter(studyId -> treatmentRepository.hasTreatmentData(Collections.singletonList(studyId), key))
             .collect(Collectors.toList());
-        Integer sampleCount = treatmentRepository.getSampleCount(studyIds);
-        Integer treatmentCount = treatmentRepository.getTreatmentCount(studyIds, key.getKey());
-        
-        return sampleCount * treatmentCount > 0;
+        return studyIds.size() > 0 && treatmentRepository.hasSampleTimelineData(studyIds);
     }
 }u}(j>   (8a86e465d3ffc60b71b738730098e6c85ace3286j   Oservice/src/test/java/org/cbioportal/service/impl/TreatmentServiceImplTest.javaj   modifiedj   Kj   Kj   K&j   https://github.com/cBioPortal/cbioportal/blob/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImplTest.javaj   https://github.com/cBioPortal/cbioportal/raw/b3400e6aa562d5b7c093300cc94398e5ad0e9e84/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImplTest.javaj   https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImplTest.java?ref=b3400e6aa562d5b7c093300cc94398e5ad0e9e84j   X=  @@ -26,14 +26,11 @@ public class TreatmentServiceImplTest {
     private TreatmentRepository treatmentRepository;
     
     @Test
-    public void getAllSampleTreatmentsSingleRow() {
-        mockTreatmentsByPatient(
-            makeTreatment("madeupanib", "P0", 0, 10)
-        );
+    public void getAllPatientTreatmentRows() {
         mockSamplesByPatient(
             makeSample("S0", "P0", 5)
         );
-        mockAllTreatments("madeupanib");
+        mockTreatments(makeTreatment("madeupanib", "P0", 0, 10));
 
         PatientTreatmentRow rowA = makePatientRow("madeupanib", 1, Collections.singletonList("S0"), Collections.singletonList("P0"));
         List<PatientTreatmentRow> expected = Collections.singletonList(rowA);
@@ -43,15 +40,14 @@ public void getAllSampleTreatmentsSingleRow() {
     }
 
     @Test
-    public void getAllSampleTreatmentsOneSampleTwoTreatmentsOnePatient() {
-        mockTreatmentsByPatient(
+    public void getAllPatientTreatmentRowsOneSampleTwoTreatmentsOnePatient() {
+        mockTreatments(
             makeTreatment("madeupanib", "P0", 0, 10),
             makeTreatment("fakedrugazol", "P0", 0, 10)
         );
         mockSamplesByPatient(
             makeSample("S0", "P0", 5)
         );
-        mockAllTreatments("madeupanib", "fakedrugazol");
 
 
         PatientTreatmentRow rowA = makePatientRow("fakedrugazol", 1, Collections.singletonList("S0"), Collections.singletonList("P0"));
@@ -63,15 +59,14 @@ public void getAllSampleTreatmentsOneSampleTwoTreatmentsOnePatient() {
     }
 
     @Test
-    public void getAllSampleTreatmentsTwoSamplesOnePatientOneTreatment() {
-        mockTreatmentsByPatient(
+    public void getAllPatientTreatmentRowsTwoSamplesOnePatientOneTreatment() {
+        mockTreatments(
             makeTreatment("fakedrugazol", "P0", 0, 10)
         );
         mockSamplesByPatient(
             makeSample("S0", "P0", 5),
             makeSample("S1", "P0", 10)
         );
-        mockAllTreatments("fakedrugazol");
 
         // even though there are two samples, you expect a count of 1,
         // because this is from the patient level, and both samples are for the same patient
@@ -83,16 +78,15 @@ public void getAllSampleTreatmentsTwoSamplesOnePatientOneTreatment() {
     }
 
     @Test
-    public void getAllSampleTreatmentsTwoSamplesTwoPatientsTwoTreatments() {
-        mockTreatmentsByPatient(
+    public void getAllPatientTreatmentRowsTwoSamplesTwoPatientsTwoTreatments() {
+        mockTreatments(
             makeTreatment("fakedrugazol", "P0", 0, 10),
             makeTreatment("fakedrugazol", "P1", 0, 10)
         );
         mockSamplesByPatient(
             makeSample("S0", "P0", 5),
             makeSample("S1", "P1", 10)
         );
-        mockAllTreatments("fakedrugazol");
 
         // now there are two patients, so you expect a count of two
         PatientTreatmentRow rowA = makePatientRow("fakedrugazol", 2, Arrays.asList("S0", "S1"), Arrays.asList("P0", "P1"));
@@ -103,16 +97,15 @@ public void getAllSampleTreatmentsTwoSamplesTwoPatientsTwoTreatments() {
     }
 
     @Test
-    public void getAllSampleTreatmentsTwoSamplesTwoPatientsTwoDifferentTreatments() {
-        mockTreatmentsByPatient(
+    public void getAllPatientTreatmentRowsTwoSamplesTwoPatientsTwoDifferentTreatments() {
+        mockTreatments(
             makeTreatment("fakedrugazol", "P0", 0, 10),
             makeTreatment("madeupanib", "P1", 0, 10)
         );
         mockSamplesByPatient(
             makeSample("S0", "P0", 5),
             makeSample("S1", "P1", 10)
         );
-        mockAllTreatments("fakedrugazol", "madeupanib");
 
         PatientTreatmentRow rowA = makePatientRow("fakedrugazol", 1, Collections.singletonList("S0"), Collections.singletonList("P0"));
         PatientTreatmentRow rowB = makePatientRow("madeupanib", 1, Collections.singletonList("S1"), Collections.singletonList("P1"));
@@ -252,6 +245,11 @@ private void mockTreatmentsByPatient(Treatment... treatments) {
             .thenReturn(treatmentsByPatient);
     }
 
+    private void mockTreatments(Treatment... treatments) {
+        Mockito.when(treatmentRepository.getTreatments(Mockito.any(), Mockito.any(), Mockito.any()))
+            .thenReturn(Arrays.stream(treatments).collect(Collectors.toList()));
+    }
+
     private void mockSamplesByPatient(ClinicalEventSample... samples) {
         Map<String, List<ClinicalEventSample>> samplesByPatient = Arrays.stream(samples)
             .collect(Collectors.groupingBy(ClinicalEventSample::getPatientId));
@@ -261,12 +259,6 @@ private void mockSamplesByPatient(ClinicalEventSample... samples) {
             .thenReturn(samplesByPatient);
     }
 
-    private void mockAllTreatments(String... treatments) {
-        Set<String> allTreatments = new HashSet<>(Arrays.asList(treatments));
-        Mockito.when(treatmentRepository.getAllUniqueTreatments(Mockito.any(), Mockito.any(), Mockito.any()))
-            .thenReturn(allTreatments);
-    }
-
     private Treatment makeTreatment(String treatment, String patientId, Integer start, Integer stop) {
         Treatment t = new Treatment();
         t.setTreatment(treatment);ueu(788b2185d3324ec8a4b23e43aa665d2f68551f69}(sha(788b2185d3324ec8a4b23e43aa665d2f68551f69node_idEC_kwDOAe-hB9oAKDc4OGIyMTg1ZDMzMjRlYzhhNGIyM2U0M2FhNjY1ZDJmNjg1NTFmNjkcommit}(author}(namePim van Nieropemailpim@thehyve.nldate2023-04-14T09:16:54Zu	committer}(j	!  
pvannieropj!  pim@thehyve.nlj
!  2023-06-06T06:56:29Zumessage)Correct variable name

PR feedback Gaofeitree}(j!  (96759a9f3f1006af5e132e0c3564f50efe6f5ec2urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/96759a9f3f1006af5e132e0c3564f50efe6f5ec2uj!  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/788b2185d3324ec8a4b23e43aa665d2f68551f69
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj!  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/788b2185d3324ec8a4b23e43aa665d2f68551f69html_urlXhttps://github.com/cBioPortal/cbioportal/commit/788b2185d3324ec8a4b23e43aa665d2f68551f69comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/788b2185d3324ec8a4b23e43aa665d2f68551f69/commentsj!  }(login
pvannieropidJa j!  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5j!  'https://api.github.com/users/pvannieropj%!  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminuj!  }(j*!  
pvannieropj,!  Ja j!  MDQ6VXNlcjc0NTg4NQ==j.!  2https://avatars.githubusercontent.com/u/745885?v=4j0!  h5j!  'https://api.github.com/users/pvannieropj%!  https://github.com/pvannieropj3!  1https://api.github.com/users/pvannierop/followersj5!  >https://api.github.com/users/pvannierop/following{/other_user}j7!  7https://api.github.com/users/pvannierop/gists{/gist_id}j9!  >https://api.github.com/users/pvannierop/starred{/owner}{/repo}j;!  5https://api.github.com/users/pvannierop/subscriptionsj=!  ,https://api.github.com/users/pvannierop/orgsj?!  -https://api.github.com/users/pvannierop/reposjA!  8https://api.github.com/users/pvannierop/events{/privacy}jC!  7https://api.github.com/users/pvannierop/received_eventsjE!  UserjG!  uparents]}(j!  (ac854a9d65f05b81772016333c8be1e1aea75fd9j!  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ac854a9d65f05b81772016333c8be1e1aea75fd9j%!  Xhttps://github.com/cBioPortal/cbioportal/commit/ac854a9d65f05b81772016333c8be1e1aea75fd9uastats}(totalK	additionsK	deletionsKufiles]}(j!  (0b2b0183c8155b1b6402ca45d8d5417ac30500fbfilenameOservice/src/main/java/org/cbioportal/service/util/AlterationEnrichmentUtil.javastatusmodifiedja!  Kjb!  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/788b2185d3324ec8a4b23e43aa665d2f68551f69/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/788b2185d3324ec8a4b23e43aa665d2f68551f69/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.java?ref=788b2185d3324ec8a4b23e43aa665d2f68551f69patchX  @@ -168,7 +168,7 @@ public long includeFrequencyForSamples(
         // These are arrays of equal length, where every index
         // represents a sample id / profile id-combination
         List<String> sampleIds = new ArrayList<>();
-        List<String> molecularProfileIds = new ArrayList<>();
+        List<String> molecularProfileIds = new ArrayList<>();   
         molecularProfileCaseIdentifiers.forEach(pair -> {
             sampleIds.add(pair.getCaseId());
             molecularProfileIds.add(pair.getMolecularProfileId());
@@ -190,7 +190,7 @@ public long includeFrequencyForSamples(
 
     public long includeFrequencyForPatients(
             List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers,
-            List<T> AlterationCountBases,
+            List<T> alterationCounts,
             boolean includeMissingAlterationsFromGenePanel) {
 
         // Collect profile id and sample id arrays.
@@ -206,7 +206,7 @@ public long includeFrequencyForPatients(
         List<GenePanelData> genePanelDataList = genePanelService
             .fetchGenePanelDataInMultipleMolecularProfilesByPatientIds(molecularProfileCaseIdentifiers);
 
-        profiledCasesCounter.calculate(AlterationCountBases, genePanelDataList,
+        profiledCasesCounter.calculate(alterationCounts, genePanelDataList,
             includeMissingAlterationsFromGenePanel, profiledCasesCounter.patientUniqueIdentifier);
 
         return genePanelDataListuau(077a0b3d89d6556626f8b167a387592ea23926d3}(sha(077a0b3d89d6556626f8b167a387592ea23926d3node_idEC_kwDOAe-hB9oAKDA3N2EwYjNkODlkNjU1NjYyNmY4YjE2N2EzODc1OTJlYTIzOTI2ZDMcommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-06-13T09:28:18Zu	committer}(j~!  
Bas Leenknegtj!  basleenknegt@thehyve.nlj!  2023-06-20T11:41:50ZumessageMChange missing site1 or site2 gene for SV to INFO log level

Was WARN before.tree}(jv!  (471b93ff53563804599a7fbdcb07d86487cd3643urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/471b93ff53563804599a7fbdcb07d86487cd3643uj!  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/077a0b3d89d6556626f8b167a387592ea23926d3
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj!  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/077a0b3d89d6556626f8b167a387592ea23926d3html_urlXhttps://github.com/cBioPortal/cbioportal/commit/077a0b3d89d6556626f8b167a387592ea23926d3comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/077a0b3d89d6556626f8b167a387592ea23926d3/commentsj|!  }(login
pvannieropidJa jx!  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5j!  'https://api.github.com/users/pvannieropj!  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminuj!  }(j!  BasLeej!  J~2 jx!  MDQ6VXNlcjMzMjMwMDY=j!  3https://avatars.githubusercontent.com/u/3323006?v=4j!  h5j!  #https://api.github.com/users/BasLeej!  https://github.com/BasLeej!  -https://api.github.com/users/BasLee/followersj!  :https://api.github.com/users/BasLee/following{/other_user}j!  3https://api.github.com/users/BasLee/gists{/gist_id}j!  :https://api.github.com/users/BasLee/starred{/owner}{/repo}j!  1https://api.github.com/users/BasLee/subscriptionsj!  (https://api.github.com/users/BasLee/orgsj!  )https://api.github.com/users/BasLee/reposj!  4https://api.github.com/users/BasLee/events{/privacy}j!  3https://api.github.com/users/BasLee/received_eventsj!  Userj!  uparents]}(jv!  (804aa0b89ff01c1303106314d1f0d1fa13af5b56j!  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/804aa0b89ff01c1303106314d1f0d1fa13af5b56j!  Xhttps://github.com/cBioPortal/cbioportal/commit/804aa0b89ff01c1303106314d1f0d1fa13af5b56uastats}(totalK	additionsK	deletionsKufiles]}(jv!  (28d2d07b4292906aa5f5c5a7745074960a37f3d2filename.core/src/main/scripts/importer/validateData.pystatusmodifiedj!  Kj!  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/077a0b3d89d6556626f8b167a387592ea23926d3/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.pyraw_urlhttps://github.com/cBioPortal/cbioportal/raw/077a0b3d89d6556626f8b167a387592ea23926d3/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.pycontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.py?ref=077a0b3d89d6556626f8b167a387592ea23926d3patchX  @@ -3270,12 +3270,12 @@ def checkSVstatus(sv_status):
                     'No Entrez gene id or gene symbol provided for site 1 and site 2',
                     extra={'line_number': self.line_number})
         elif site1_gene is None and site2_gene is not None:
-            self.logger.warning(
+            self.logger.info(
                 'No Entrez gene id or gene symbol provided for site 1. '
                 'Assuming either the intragenic, deletion, duplication, translocation or inversion variant',
                 extra={'line_number': self.line_number})
         elif site2_gene is None and site1_gene is not None:
-            self.logger.warning(
+            self.logger.info(
                 'No Entrez gene id or gene symbol provided for site 2. '
                 'Assuming either the intragenic, deletion, duplication, translocation or inversion variant',
                 extra={'line_number': self.line_number})uau(5b9bafaa11d96f397f91f3daf93fd8c39b0b84b3}(sha(5b9bafaa11d96f397f91f3daf93fd8c39b0b84b3node_idEC_kwDOAe-hB9oAKDViOWJhZmFhMTFkOTZmMzk3ZjkxZjNkYWY5M2ZkOGMzOWIwYjg0YjMcommit}(author}(nameKarthikemailkalletlakarthik@gmail.comdate2023-08-08T13:39:53Zu	committer}(j!  Karthikj!  kalletlakarthik@gmail.comj!  2023-08-08T13:39:53ZumessageUpdatestree}(j!  (6f926177c5ead11146c2afc7dba041850d603a0curlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/6f926177c5ead11146c2afc7dba041850d603a0cuj"  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/5b9bafaa11d96f397f91f3daf93fd8c39b0b84b3
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj"  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/5b9bafaa11d96f397f91f3daf93fd8c39b0b84b3html_urlXhttps://github.com/cBioPortal/cbioportal/commit/5b9bafaa11d96f397f91f3daf93fd8c39b0b84b3comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/5b9bafaa11d96f397f91f3daf93fd8c39b0b84b3/commentsj!  }(login	kalletlakidJƴ j!  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5j"  &https://api.github.com/users/kalletlakj"  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminuj!  }(j"  	kalletlakj"  Jƴ j!  MDQ6VXNlcjEyOTU2ODcwj"  4https://avatars.githubusercontent.com/u/12956870?v=4j"  h5j"  &https://api.github.com/users/kalletlakj"  https://github.com/kalletlakj"  0https://api.github.com/users/kalletlak/followersj"  =https://api.github.com/users/kalletlak/following{/other_user}j!"  6https://api.github.com/users/kalletlak/gists{/gist_id}j#"  =https://api.github.com/users/kalletlak/starred{/owner}{/repo}j%"  4https://api.github.com/users/kalletlak/subscriptionsj'"  +https://api.github.com/users/kalletlak/orgsj)"  ,https://api.github.com/users/kalletlak/reposj+"  7https://api.github.com/users/kalletlak/events{/privacy}j-"  6https://api.github.com/users/kalletlak/received_eventsj/"  Userj1"  uparents]}(j!  (276534c6605bfd5a05b925465eb1b178bc7e296fj"  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/276534c6605bfd5a05b925465eb1b178bc7e296fj"  Xhttps://github.com/cBioPortal/cbioportal/commit/276534c6605bfd5a05b925465eb1b178bc7e296fuastats}(totalK	additionsK	deletionsKufiles](}(j!  (f56a51727b02e8666ff8e488ef65a6fa437382d3filenameVweb/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.javastatusmodifiedjK"  KjL"  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/5b9bafaa11d96f397f91f3daf93fd8c39b0b84b3/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/5b9bafaa11d96f397f91f3daf93fd8c39b0b84b3/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.java?ref=5b9bafaa11d96f397f91f3daf93fd8c39b0b84b3patchX  @@ -494,7 +494,7 @@ private boolean extractAttributesFromGenomicDataCountFilter(HttpServletRequest r
                 request.setAttribute("involvedCancerStudies", cancerStudyIdCollection);
             }
         } catch (Exception e) {
-            LOG.error("exception thrown during extraction of genomicDataBinCountFilter: " + e);
+            LOG.error("exception thrown during extraction of genomicDataCountFilter: " + e);
             return false;
         }
         return true;u}(j!  (0b97b6df9543ab021cea2f48c0727c7b578a7517jQ"  Eweb/src/main/java/org/cbioportal/web/util/StudyViewFilterApplier.javajS"  modifiedjK"  KjL"  KjU"  KjV"  https://github.com/cBioPortal/cbioportal/blob/5b9bafaa11d96f397f91f3daf93fd8c39b0b84b3/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.javajX"  https://github.com/cBioPortal/cbioportal/raw/5b9bafaa11d96f397f91f3daf93fd8c39b0b84b3/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.javajZ"  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.java?ref=5b9bafaa11d96f397f91f3daf93fd8c39b0b84b3j\"  XG  @@ -909,7 +909,7 @@ public <S extends DataFilter> List<SampleIdentifier> filterExpressionData(
 
             List<SampleIdentifier> newSampleIdentifiers = new ArrayList<>();
             for (SampleIdentifier sampleIdentifier : sampleIdentifiers) {
-                int count =  clinicalDataFilterApplier.apply(attributes, clinicalDataMap,
+                int count = clinicalDataFilterApplier.apply(attributes, clinicalDataMap,
                     sampleIdentifier.getSampleId(), sampleIdentifier.getStudyId(), negateFilters);
 
                 if (count == attributes.size()) {ueuC     (276534c6605bfd5a05b925465eb1b178bc7e296f}(sha(276534c6605bfd5a05b925465eb1b178bc7e296fnode_idEC_kwDOAe-hB9oAKDI3NjUzNGM2NjA1YmZkNWEwNWI5MjU0NjVlYjFiMTc4YmM3ZTI5NmYcommit}(author}(name
Qi-Xuan Luemailqlu@carisls.comdate2023-08-02T02:00:12Zu	committer}(jp"  
Qi-Xuan Lujr"  qlu@carisls.comjt"  2023-08-02T02:01:15Zumessagecount NA and clean up codestree}(jh"  (cb1200f59721dffbcfb05834d03993a75e4d5990urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/cb1200f59721dffbcfb05834d03993a75e4d5990uj"  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/276534c6605bfd5a05b925465eb1b178bc7e296f
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj"  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/276534c6605bfd5a05b925465eb1b178bc7e296fhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/276534c6605bfd5a05b925465eb1b178bc7e296fcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/276534c6605bfd5a05b925465eb1b178bc7e296f/commentsjn"  Njv"  Nparents]}(jh"  (d74089aaea5ef64d73966ce4dca969672e29ce84j"  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d74089aaea5ef64d73966ce4dca969672e29ce84j"  Xhttps://github.com/cBioPortal/cbioportal/commit/d74089aaea5ef64d73966ce4dca969672e29ce84uastats}(totalK	additionsK	deletionsKufiles](}(jh"  (67191ea758842520498fa65865633766fcae06dbfilenameBservice/src/main/java/org/cbioportal/service/StudyViewService.javastatusmodifiedj"  Kj"  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/276534c6605bfd5a05b925465eb1b178bc7e296f/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/276534c6605bfd5a05b925465eb1b178bc7e296f/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.java?ref=276534c6605bfd5a05b925465eb1b178bc7e296fpatchX4  @@ -21,8 +21,7 @@ List<AlterationCountByGene> getStructuralVariantAlterationCountByGenes(List<Stri
     List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> studyIds, List<String> sampleIds, AlterationFilter annotationFilter)
         throws StudyNotFoundException;
 
-    List<GenomicDataCountItem> getCNAAlterationCountsByGeneSpecific(List<String> studyIds, List<String> sampleIds, List<Pair<String, String>> genomicDataFilters) 
-        throws StudyNotFoundException;
+    List<GenomicDataCountItem> getCNAAlterationCountsByGeneSpecific(List<String> studyIds, List<String> sampleIds, List<Pair<String, String>> genomicDataFilters);
 
     List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String> sampleIds, List<String> studyIds, List<String> stableIds, List<String> profileTypes);
 u}(jh"  (510fa8f0206c012b5da48c56b46b1b5332445673j"  Kservice/src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.javaj"  modifiedj"  Kj"  Kj"  Kj"  https://github.com/cBioPortal/cbioportal/blob/276534c6605bfd5a05b925465eb1b178bc7e296f/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj"  https://github.com/cBioPortal/cbioportal/raw/276534c6605bfd5a05b925465eb1b178bc7e296f/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj"  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.java?ref=276534c6605bfd5a05b925465eb1b178bc7e296fj"  X  @@ -197,7 +197,7 @@ public List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> stu
     @Override
     public List<GenomicDataCountItem> getCNAAlterationCountsByGeneSpecific(List<String> studyIds, 
                                                                            List<String> sampleIds,
-                                                                           List<Pair<String, String>> genomicDataFilters) throws StudyNotFoundException {
+                                                                           List<Pair<String, String>> genomicDataFilters) {
         
         List<MolecularProfile> molecularProfiles = molecularProfileService.getMolecularProfilesInStudies(studyIds,
             "SUMMARY");
@@ -246,13 +246,13 @@ public List<GenomicDataCountItem> getCNAAlterationCountsByGeneSpecific(List<Stri
 
                 List<GeneMolecularData> geneMolecularDataList = molecularDataService.getMolecularDataInMultipleMolecularProfiles(mappedProfileIds, mappedSampleIds,
                         stableIds.stream().map(Integer::parseInt).collect(Collectors.toList()), "SUMMARY");
-                    
+                
                 List<GenomicDataCount> genomicDataCounts = geneMolecularDataList
                     .stream()
+                    .filter(g -> StringUtils.isNotEmpty(g.getValue()) && !g.getValue().equals("NA"))
                     .collect(Collectors.groupingBy(GeneMolecularData::getValue))
                     .entrySet()
                     .stream()
-                    .filter(entry -> entry.getKey() != null && !entry.getKey().equals("NA") && entry.getValue().size() > 0)
                     .map(entry -> {
                         Integer alteration = Integer.valueOf(entry.getKey());
                         List<GeneMolecularData> geneMolecularData = entry.getValue();
@@ -268,6 +268,17 @@ public List<GenomicDataCountItem> getCNAAlterationCountsByGeneSpecific(List<Stri
                         return genomicDataCount;
                     }).collect(Collectors.toList());
 
+                int totalCount = genomicDataCounts.stream().mapToInt(GenomicDataCount::getCount).sum();
+                int naCount = sampleIds.size() - totalCount;
+                
+                if (naCount > 0) {
+                    GenomicDataCount genomicDataCount = new GenomicDataCount();
+                    genomicDataCount.setLabel("NA");
+                    genomicDataCount.setValue("NA");
+                    genomicDataCount.setCount(naCount);
+                    genomicDataCounts.add(genomicDataCount);
+                }
+                
                 genomicDataCountItem.setCounts(genomicDataCounts);
                 return Stream.of(genomicDataCountItem);
             }).collect(Collectors.toList());
@@ -348,5 +359,4 @@ public List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String>
             })
             .collect(Collectors.toList());
     }
-
 }u}(jh"  (f4ca464cf50123869269b7357a228fd1745d50f4j"  =web/src/main/java/org/cbioportal/web/StudyViewController.javaj"  modifiedj"  Kj"  Kj"  K	j"  https://github.com/cBioPortal/cbioportal/blob/276534c6605bfd5a05b925465eb1b178bc7e296f/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj"  https://github.com/cBioPortal/cbioportal/raw/276534c6605bfd5a05b925465eb1b178bc7e296f/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj"  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=276534c6605bfd5a05b925465eb1b178bc7e296fj"  X  @@ -27,14 +27,19 @@
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
+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 springfox.documentation.annotations.ApiIgnore;
 
 import javax.annotation.PostConstruct;
 import javax.validation.Valid;
 import javax.validation.constraints.Max;
 import javax.validation.constraints.Min;
-import javax.validation.constraints.Size;
 import java.math.BigDecimal;
 import java.util.*;
 import java.util.function.Function;ueu(2f807e84986ad81fbb099ac1e45e559147a16268}(sha(2f807e84986ad81fbb099ac1e45e559147a16268node_idEC_kwDOAe-hB9oAKDJmODA3ZTg0OTg2YWQ4MWZiYjA5OWFjMWU0NWU1NTkxNDdhMTYyNjgcommit}(author}(namePim van Nieropemailpim@thehyve.nldate2022-12-01T09:55:41Zu	committer}(j"  
pvannieropj"  pim@thehyve.nlj"  2023-06-08T10:09:19ZumessageDImpl. Struct Var filter queries for /filtered-samples/fetch endpointtree}(j"  (d3c424828b50ad1c0608443164f2182e0badec02urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/d3c424828b50ad1c0608443164f2182e0badec02uj"  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/2f807e84986ad81fbb099ac1e45e559147a16268
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj"  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2f807e84986ad81fbb099ac1e45e559147a16268html_urlXhttps://github.com/cBioPortal/cbioportal/commit/2f807e84986ad81fbb099ac1e45e559147a16268comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/2f807e84986ad81fbb099ac1e45e559147a16268/commentsj"  }(login
pvannieropidJa j"  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5j"  'https://api.github.com/users/pvannieropj"  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminuj"  }(j"  
pvannieropj"  Ja j"  MDQ6VXNlcjc0NTg4NQ==j"  2https://avatars.githubusercontent.com/u/745885?v=4j"  h5j"  'https://api.github.com/users/pvannieropj"  https://github.com/pvannieropj"  1https://api.github.com/users/pvannierop/followersj"  >https://api.github.com/users/pvannierop/following{/other_user}j"  7https://api.github.com/users/pvannierop/gists{/gist_id}j"  >https://api.github.com/users/pvannierop/starred{/owner}{/repo}j"  5https://api.github.com/users/pvannierop/subscriptionsj"  ,https://api.github.com/users/pvannierop/orgsj"  -https://api.github.com/users/pvannierop/reposj"  8https://api.github.com/users/pvannierop/events{/privacy}j #  7https://api.github.com/users/pvannierop/received_eventsj#  Userj#  uparents]}(j"  (79e373b9c42ffd1d25dca9e0dc309ea94692eaadj"  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/79e373b9c42ffd1d25dca9e0dc309ea94692eaadj"  Xhttps://github.com/cBioPortal/cbioportal/commit/79e373b9c42ffd1d25dca9e0dc309ea94692eaaduastats}(totalM	additionsM	deletionsKBufiles](}(j"  (cfaf5276389a88bd787261abb93c4bada12ddafefilenameBmodel/src/main/java/org/cbioportal/model/StructVarFilterQuery.javastatusaddedj#  K0j#  K changesK0blob_urlhttps://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructVarFilterQuery.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructVarFilterQuery.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructVarFilterQuery.java?ref=2f807e84986ad81fbb099ac1e45e559147a16268patchX  @@ -0,0 +1,48 @@
+package org.cbioportal.model;
+
+import org.cbioportal.model.util.Select;
+import org.springframework.lang.Nullable;
+
+import java.io.Serializable;
+
+public class StructVarFilterQuery extends BaseAlterationFilter implements Serializable {
+    
+    private StructuralVariantGeneSubQuery gene1Query;
+    private StructuralVariantGeneSubQuery gene2Query;
+    
+    public StructVarFilterQuery() {}
+
+    public StructVarFilterQuery(String gene1HugoSymbol,
+                                @Nullable Integer gene1EntrezId,
+                                String gene2HugoSymbol,
+                                @Nullable Integer gene2EntrezId,
+                                boolean includeDriver,
+                                boolean includeVUS,
+                                boolean includeUnknownOncogenicity,
+                                Select<String> tiersSelect,
+                                boolean includeUnknownTier,
+                                boolean includeGermline,
+                                boolean includeSomatic,
+                                boolean includeUnknownStatus) {
+        super(includeDriver, includeVUS, includeUnknownOncogenicity, includeGermline, includeSomatic, includeUnknownStatus, tiersSelect, includeUnknownTier);
+        this.gene1Query = new StructuralVariantGeneSubQuery(gene1HugoSymbol, gene1EntrezId);
+        this.gene2Query = new StructuralVariantGeneSubQuery(gene2HugoSymbol, gene2EntrezId);
+    }
+
+    public StructuralVariantGeneSubQuery getGene1Query() {
+        return gene1Query;
+    }
+
+    public void setGene1Query(StructuralVariantGeneSubQuery gene1Query) {
+        this.gene1Query = gene1Query;
+    }
+
+    public StructuralVariantGeneSubQuery getGene2Query() {
+        return gene2Query;
+    }
+
+    public void setGene2Query(StructuralVariantGeneSubQuery gene2Query) {
+        this.gene2Query = gene2Query;
+    }
+    
+}u}(j"  (e393e0c2d584440dc0fe2432fd2506071f60efcej$#  Kmodel/src/main/java/org/cbioportal/model/StructuralVariantGeneSubQuery.javaj&#  modifiedj#  Kj#  K j(#  Kj)#  https://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantGeneSubQuery.javaj+#  https://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantGeneSubQuery.javaj-#  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantGeneSubQuery.java?ref=2f807e84986ad81fbb099ac1e45e559147a16268j/#  X  @@ -49,6 +49,10 @@ public StructuralVariantGeneSubQuery(StructuralVariantSpecialValue specialValue)
 
     public StructuralVariantGeneSubQuery(String hugoSymbol, Integer entrezId) {
         this.entrezId = entrezId;
+        this.hugoSymbol = hugoSymbol;
+        if (hugoSymbol == null && entrezId == null) {
+            this.specialValue = StructuralVariantSpecialValue.NO_GENE;
+        }
     }
 
     @Nullableu}(j"  (ee431956c23918e8a0447b4f58fc6c5e035d5616j$#  Nmodel/src/main/java/org/cbioportal/model/StudyViewStructuralVariantFilter.javaj&#  addedj#  K?j#  K j(#  K?j)#  https://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStudyViewStructuralVariantFilter.javaj+#  https://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStudyViewStructuralVariantFilter.javaj-#  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStudyViewStructuralVariantFilter.java?ref=2f807e84986ad81fbb099ac1e45e559147a16268j/#  X
  @@ -0,0 +1,63 @@
+package org.cbioportal.model;
+
+import javax.validation.constraints.AssertTrue;
+import java.io.Serializable;
+import java.util.List;
+import java.util.Set;
+
+public class StudyViewStructuralVariantFilter implements Serializable {
+
+    private Set<String> molecularProfileIds;
+    private List<List<StructVarFilterQuery>> structVarQueries;
+
+    @AssertTrue(message = "'specialValue' field of gene1/gene2 StructVarGeneSubQueries cannot be both ANY_GENE or NO_GENE.")
+    private boolean isGeneQueriesSpecialValueCorrect() {
+        return structVarQueries.stream()
+            .flatMap(queryList -> queryList.stream())
+            .filter(structVarFilterQuery -> structVarFilterQuery.getGene1Query().getSpecialValue() != null
+                && structVarFilterQuery.getGene2Query().getSpecialValue() != null
+            )
+            .noneMatch(structVarFilterQuery -> 
+                structVarFilterQuery.getGene1Query().getSpecialValue() == 
+                structVarFilterQuery.getGene2Query().getSpecialValue()
+            );
+    }
+
+    @AssertTrue(message = "'geneId' field of gene1/gene2 StructVarGeneSubQueries cannot be both null.")
+    private boolean isGeneQueriesGeneIdCorrect() {
+        return structVarQueries.stream()
+            .flatMap(queryList -> queryList.stream())
+            .noneMatch(structVarFilterQuery -> 
+                structVarFilterQuery.getGene1Query().getHugoSymbol() == null &&
+                structVarFilterQuery.getGene2Query().getHugoSymbol() == null
+            );
+    }
+                
+    @AssertTrue(message = "'geneId' field of gene1/gene2 StructVarGeneSubQueries cannot be null when no specialValue set.")
+    private boolean isGeneQueriesHasGeneIdWhenSpecialValueNull() {
+        return structVarQueries.stream()
+            .flatMap(queryList -> queryList.stream())
+            .noneMatch(structVarFilterQuery ->
+                (structVarFilterQuery.getGene1Query().getHugoSymbol() == null &&
+                structVarFilterQuery.getGene1Query().getSpecialValue() == null)
+                || (structVarFilterQuery.getGene2Query().getHugoSymbol() == null &&
+                    structVarFilterQuery.getGene2Query().getSpecialValue() == null)
+            );
+    }
+
+    public Set<String> getMolecularProfileIds() {
+        return molecularProfileIds;
+    }
+
+    public void setMolecularProfileIds(Set<String> molecularProfileIds) {
+        this.molecularProfileIds = molecularProfileIds;
+    }
+
+    public List<List<StructVarFilterQuery>> getStructVarQueries() {
+        return structVarQueries;
+    }
+
+    public void setStructVarQueries(List<List<StructVarFilterQuery>> structVarQueries) {
+        this.structVarQueries = structVarQueries;
+    }
+}
\ No newline at end of fileu}(j"  (f9210170bf171261acf72b108bfe3d2b884eaa89j$#  epersistence/persistence-api/src/main/java/org/cbioportal/persistence/StructuralVariantRepository.javaj&#  modifiedj#  Kj#  K j(#  Kj)#  https://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStructuralVariantRepository.javaj+#  https://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStructuralVariantRepository.javaj-#  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStructuralVariantRepository.java?ref=2f807e84986ad81fbb099ac1e45e559147a16268j/#  XP  @@ -3,6 +3,7 @@
 import java.util.List;
 
 import org.cbioportal.model.GeneFilterQuery;
+import org.cbioportal.model.StructVarFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 import org.springframework.cache.annotation.Cacheable;
@@ -20,4 +21,9 @@ List<StructuralVariant> fetchStructuralVariants(List<String> molecularProfileIds
     List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String> molecularProfileIds,
                                                                  List<String> sampleIds,
                                                                  List<GeneFilterQuery> geneQueries);
+
+    @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
+    List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
+                                                             List<String> sampleIds,
+                                                             List<StructVarFilterQuery> structVarQueries);
 }u}(j"  (1a05145feb6dad2f7229d4ae9ab8c330afe1c7f6j$#  mpersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/StructuralVariantMapper.javaj&#  modifiedj#  Kj#  K j(#  Kj)#  https://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.javaj+#  https://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.javaj-#  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.java?ref=2f807e84986ad81fbb099ac1e45e559147a16268j/#  X  @@ -26,6 +26,7 @@
 import java.util.List;
 
 import org.cbioportal.model.GeneFilterQuery;
+import org.cbioportal.model.StructVarFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 
@@ -39,4 +40,8 @@ List<StructuralVariant> fetchStructuralVariants(List<String> molecularProfileIds
     List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String> molecularProfileIds,
                                                                  List<String> sampleIds,
                                                                  List<GeneFilterQuery> geneQueries);
+
+    List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
+                                                                      List<String> sampleIds,
+                                                                      List<StructVarFilterQuery> structVarQueries);
 }u}(j"  (f1d997f9891fa2fdf6df601ec2e7e60e89e9d800j$#  xpersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/StructuralVariantMyBatisRepository.javaj&#  modifiedj#  Kj#  K j(#  Kj)#  https://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepository.javaj+#  https://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepository.javaj-#  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepository.java?ref=2f807e84986ad81fbb099ac1e45e559147a16268j/#  X  @@ -24,6 +24,7 @@
 package org.cbioportal.persistence.mybatis;
 
 import org.cbioportal.model.GeneFilterQuery;
+import org.cbioportal.model.StructVarFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 import org.cbioportal.persistence.StructuralVariantRepository;
@@ -73,6 +74,21 @@ public List<StructuralVariant> fetchStructuralVariants(List<String> molecularPro
     public List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String>  molecularProfileIds,
                                                                         List<String> sampleIds,
                                                                         List<GeneFilterQuery> geneQueries) {
+        if (geneQueries == null || geneQueries.isEmpty()
+            || molecularProfileIds == null || molecularProfileIds.isEmpty()) {
+            return new ArrayList<>();
+        }
         return structuralVariantMapper.fetchStructuralVariantsByGeneQueries(molecularProfileIds, sampleIds, geneQueries);
     }
+
+    @Override
+    public List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
+                                                                             List<String> sampleIds,
+                                                                             List<StructVarFilterQuery> structVarQueries) {
+        if (structVarQueries == null || structVarQueries.isEmpty()
+            || molecularProfileIds == null || molecularProfileIds.isEmpty()) {
+            return new ArrayList<>();
+        }
+        return structuralVariantMapper.fetchStructuralVariantsByStructVarQueries(molecularProfileIds, sampleIds, structVarQueries);
+    }
 }u}(j"  (0fe8bbe89551d679b2fcefd12196b917508e7556j$#  qpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatis/StructuralVariantMapper.xmlj&#  modifiedj#  Kj#  K.j(#  Kj)#  https://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.xmlj+#  https://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.xmlj-#  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.xml?ref=2f807e84986ad81fbb099ac1e45e559147a16268j/#  X/  @@ -82,13 +82,67 @@
 
     <sql id="whereWithGeneQueries">
         AND
-        <foreach item="geneFilterQuery" collection="geneQueries" open="(" separator=" OR " close=")">
-            (( structural_variant.SITE1_ENTREZ_GENE_ID = '${geneFilterQuery.getEntrezGeneId()}'
-            OR structural_variant.SITE2_ENTREZ_GENE_ID = '${geneFilterQuery.getEntrezGeneId()}')
-            <bind name="allDriverAnnotationsSelected" value="geneFilterQuery.getIncludeDriver() and geneFilterQuery.getIncludeVUS() and geneFilterQuery.getIncludeUnknownOncogenicity()" />
-            <bind name="noDriverAnnotationsSelected" value="not geneFilterQuery.getIncludeDriver() and not geneFilterQuery.getIncludeVUS() and not geneFilterQuery.getIncludeUnknownOncogenicity()" />
-            <choose>
-                <when test="not allDriverAnnotationsSelected and not noDriverAnnotationsSelected">
+        <foreach item="geneFilterQuery" collection="${queries}" open="(" separator=" OR " close=")">
+        (
+        <choose>
+            <when test="${singleGeneMode}">
+                (structural_variant.SITE1_ENTREZ_GENE_ID = ${geneFilterQuery.getEntrezGeneId()}
+                OR structural_variant.SITE2_ENTREZ_GENE_ID = ${geneFilterQuery.getEntrezGeneId()})
+            </when>
+            <otherwise>
+                <trim prefix="" prefixOverrides="AND">
+                     <choose>
+                        <when test="geneFilterQuery.getGene1Query().getSpecialValue() == @org.cbioportal.model.StructuralVariantSpecialValue@NO_GENE">
+                            AND structural_variant.SITE1_ENTREZ_GENE_ID IS NULL
+                        </when>
+                        <when test="geneFilterQuery.getGene1Query().getSpecialValue() == @org.cbioportal.model.StructuralVariantSpecialValue@ANY_GENE" />
+                        <otherwise>
+                            AND structural_variant.SITE1_ENTREZ_GENE_ID = ${geneFilterQuery.getGene1Query().getEntrezId()}
+                        </otherwise>
+                    </choose>
+                    <choose>
+                        <when test="geneFilterQuery.getGene2Query().getSpecialValue() == @org.cbioportal.model.StructuralVariantSpecialValue@NO_GENE">
+                            AND
+                            structural_variant.SITE2_ENTREZ_GENE_ID IS NULL
+                        </when>
+                        <when test="geneFilterQuery.getGene2Query().getSpecialValue() == @org.cbioportal.model.StructuralVariantSpecialValue@ANY_GENE" />
+                        <otherwise>
+                            AND
+                            structural_variant.SITE2_ENTREZ_GENE_ID = ${geneFilterQuery.getGene2Query().getEntrezId()}
+                        </otherwise>
+                    </choose>
+                </trim>       
+            </otherwise>
+        </choose>
+        <bind name="allStructVarStatusSelected" value="geneFilterQuery.getIncludeGermline() and geneFilterQuery.getIncludeSomatic() and geneFilterQuery.getIncludeUnknownStatus()" />
+        <bind name="noStructVarStatusSelected" value="not geneFilterQuery.getIncludeGermline() and not geneFilterQuery.getIncludeSomatic() and not geneFilterQuery.getIncludeUnknownStatus()" />
+        <choose>
+            <when test="not allStructVarStatusSelected and not noStructVarStatusSelected">
+                <trim prefix="AND (" prefixOverrides="OR">
+                    <if test="geneFilterQuery.getIncludeGermline()">
+                        OR LOWER(structural_variant.SV_STATUS) = 'germline'
+                    </if>
+                    <if test="geneFilterQuery.getIncludeSomatic()">
+                        OR LOWER(structural_variant.SV_STATUS) = 'somatic'
+                    </if>
+                    <if test="geneFilterQuery.getIncludeUnknownStatus()">
+                        OR LOWER(structural_variant.SV_STATUS) NOT IN ('somatic', 'germline')
+                    </if>
+                </trim>
+                )
+            </when>
+            <when test="noStructVarStatusSelected">
+                AND NULL
+            </when>
+            <otherwise>
+                <!--when allStructVarStatusSelected do not filter-->
+            </otherwise>
+        </choose>
+        <bind name="allDriverAnnotationsSelected" value="geneFilterQuery.getIncludeDriver() and geneFilterQuery.getIncludeVUS() and geneFilterQuery.getIncludeUnknownOncogenicity()" />
+        <bind name="noDriverAnnotationsSelected" value="not geneFilterQuery.getIncludeDriver() and not geneFilterQuery.getIncludeVUS() and not geneFilterQuery.getIncludeUnknownOncogenicity()" />
+        <choose>
+            <when test="not allDriverAnnotationsSelected and not noDriverAnnotationsSelected">
+                <trim prefix="" prefixOverrides="AND ( )">
                     <trim prefix="AND (" suffix=")" prefixOverrides="OR">
                         <if test="geneFilterQuery.getIncludeDriver()">
                             OR LOWER(alteration_driver_annotation.DRIVER_FILTER) = 'putative_driver'
@@ -101,44 +155,45 @@
                             OR LOWER(alteration_driver_annotation.DRIVER_FILTER) IN ('unknown', 'na', '')
                         </if>
                     </trim>
-                </when>
-                <when test="noDriverAnnotationsSelected">
-                    AND NULL
-                </when>
-                <otherwise>
-                    <!--when allDriverAnnotationsSelected do not filter-->
-                </otherwise>
-            </choose>
-            <bind name="allTierOptionsSelected" value="(geneFilterQuery.getSelectedTiers() != null and geneFilterQuery.getSelectedTiers().hasAll()) and geneFilterQuery.getIncludeUnknownTier()" />
-            <bind name="noTierOptionsSelected" value="(geneFilterQuery.getSelectedTiers() == null or geneFilterQuery.getSelectedTiers().hasNone()) and not geneFilterQuery.getIncludeUnknownTier()" />
-            <bind name="allExceptUnknownTierOptionsSelected" value="(geneFilterQuery.getSelectedTiers() != null and geneFilterQuery.getSelectedTiers().hasAll()) and not geneFilterQuery.getIncludeUnknownTier()" />
-            <choose>
-                <when test="allExceptUnknownTierOptionsSelected">
-                    AND NOT alteration_driver_annotation.DRIVER_TIERS_FILTER IS NULL
-                    AND NOT LOWER(alteration_driver_annotation.DRIVER_TIERS_FILTER) IN ('', 'na', 'unknown')
-                </when>
-                <when test="not allTierOptionsSelected and not noTierOptionsSelected">
-                    <trim prefix="AND (" suffix=")" prefixOverrides="OR">
-                        <if test="geneFilterQuery.getSelectedTiers() != null and geneFilterQuery.getSelectedTiers().hasValues()">
-                            OR alteration_driver_annotation.DRIVER_TIERS_FILTER IN
-                            <foreach item="item" collection="geneFilterQuery.getSelectedTiers()" open="(" separator="," close=")">
-                                #{item}
-                            </foreach>
-                        </if>
-                        <if test="geneFilterQuery.getIncludeUnknownTier()">
-                            OR alteration_driver_annotation.DRIVER_TIERS_FILTER IS NULL
-                            OR LOWER(alteration_driver_annotation.DRIVER_TIERS_FILTER) IN ('', 'na', 'unknown')
-                        </if>
-                    </trim>
-                </when>
-                <when test="noTierOptionsSelected">
-                    AND NULL
-                </when>
-                <otherwise>
-                    <!--when allTierOptionsSelected do not filter-->
-                </otherwise>
-            </choose>
-            )
+                </trim>
+            </when>
+            <when test="noDriverAnnotationsSelected">
+                AND NULL
+            </when>
+            <otherwise>
+                <!--when allDriverAnnotationsSelected do not filter-->
+            </otherwise>
+        </choose>
+        <bind name="allTierOptionsSelected" value="(geneFilterQuery.getSelectedTiers() != null and geneFilterQuery.getSelectedTiers().hasAll()) and geneFilterQuery.getIncludeUnknownTier()" />
+        <bind name="noTierOptionsSelected" value="(geneFilterQuery.getSelectedTiers() == null or geneFilterQuery.getSelectedTiers().hasNone()) and not geneFilterQuery.getIncludeUnknownTier()" />
+        <bind name="allExceptUnknownTierOptionsSelected" value="(geneFilterQuery.getSelectedTiers() != null and geneFilterQuery.getSelectedTiers().hasAll()) and not geneFilterQuery.getIncludeUnknownTier()" />
+        <choose>
+            <when test="allExceptUnknownTierOptionsSelected">
+                AND NOT alteration_driver_annotation.DRIVER_TIERS_FILTER IS NULL
+                AND NOT LOWER(alteration_driver_annotation.DRIVER_TIERS_FILTER) IN ('', 'na', 'unknown')
+            </when>
+            <when test="not allTierOptionsSelected and not noTierOptionsSelected">
+                <trim prefix="AND (" suffix=")" prefixOverrides="OR">
+                    <if test="geneFilterQuery.getSelectedTiers() != null and geneFilterQuery.getSelectedTiers().hasValues()">
+                        OR alteration_driver_annotation.DRIVER_TIERS_FILTER IN
+                        <foreach item="item" collection="geneFilterQuery.getSelectedTiers()" open="(" separator="," close=")">
+                            #{item}
+                        </foreach>
+                    </if>
+                    <if test="geneFilterQuery.getIncludeUnknownTier()">
+                        OR alteration_driver_annotation.DRIVER_TIERS_FILTER IS NULL
+                        OR LOWER(alteration_driver_annotation.DRIVER_TIERS_FILTER) IN ('', 'na', 'unknown')
+                    </if>
+                </trim>
+            </when>
+            <when test="noTierOptionsSelected">
+                AND NULL
+            </when>
+            <otherwise>
+                <!--when allTierOptionsSelected do not filter-->
+            </otherwise>
+        </choose>
+        )
         </foreach>
     </sql>
     
@@ -232,7 +287,36 @@
         and structural_variant.INTERNAL_ID = alteration_driver_annotation.ALTERATION_EVENT_ID
         <where>
             <include refid="whereInMultipleMolecularProfiles" />
-            <include refid="whereWithGeneQueries" />
+            <include refid="whereWithGeneQueries">
+                <property name="singleGeneMode" value="true" />
+                <property name="queries" value="geneQueries" />
+            </include>
+        </where>
+        ORDER BY gene1.HUGO_GENE_SYMBOL, gene2.HUGO_GENE_SYMBOL
+    </select>
+    
+    <select id="fetchStructuralVariantsByStructVarQueries" resultType="org.cbioportal.model.StructuralVariant">
+        SELECT
+        <include refid="select">
+            <property name="prefix" value=""/>
+        </include>
+        FROM structural_variant
+        JOIN genetic_profile ON structural_variant.GENETIC_PROFILE_ID = genetic_profile.GENETIC_PROFILE_ID
+        LEFT JOIN gene gene1 ON structural_variant.SITE1_ENTREZ_GENE_ID = gene1.ENTREZ_GENE_ID
+        LEFT JOIN gene gene2 ON structural_variant.SITE2_ENTREZ_GENE_ID = gene2.ENTREZ_GENE_ID
+        JOIN sample ON structural_variant.SAMPLE_ID = sample.INTERNAL_ID
+        JOIN patient ON sample.PATIENT_ID = patient.INTERNAL_ID
+        JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID AND genetic_profile.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
+        LEFT JOIN alteration_driver_annotation ON
+        structural_variant.GENETIC_PROFILE_ID = alteration_driver_annotation.GENETIC_PROFILE_ID
+        AND structural_variant.SAMPLE_ID = alteration_driver_annotation.SAMPLE_ID
+        AND structural_variant.INTERNAL_ID = alteration_driver_annotation.ALTERATION_EVENT_ID
+        <where>
+            <include refid="whereInMultipleMolecularProfiles" />
+            <include refid="whereWithGeneQueries">
+                <property name="singleGeneMode" value="false" />
+                <property name="queries" value="structVarQueries" />
+            </include>
         </where>
         ORDER BY gene1.HUGO_GENE_SYMBOL, gene2.HUGO_GENE_SYMBOL
     </select>u}(j"  (89a3fe0dbbfdf72c6fb2617258eb3872a46999a0j$#  }persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/DiscreteCopyNumberMyBatisRepositoryTest.javaj&#  modifiedj#  Kj#  Kj(#  K
j)#  https://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FDiscreteCopyNumberMyBatisRepositoryTest.javaj+#  https://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FDiscreteCopyNumberMyBatisRepositoryTest.javaj-#  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FDiscreteCopyNumberMyBatisRepositoryTest.java?ref=2f807e84986ad81fbb099ac1e45e559147a16268j/#  X	  @@ -27,7 +27,7 @@
 @Configurable
 public class DiscreteCopyNumberMyBatisRepositoryTest {
 
-    //    mutation and cna events in testSql.sql
+    //    mutation, cna and struct var events in testSql.sql
     //        SAMPLE_ID, ENTREZ_GENE_ID, HUGO_GENE_SYMBOL, GENETIC_PROFILE_ID, TYPE, MUTATION_TYPE, DRIVER_FILTER, DRIVER_TIERS_FILTER, PATIENT_ID, MUTATION_TYPE
     //        1	    207	AKT1	2	CNA         -2	                Putative_Driver	    Tier 1  TCGA-A1-A0SB    germline
     //        2	    207	AKT1	2	CNA         2	                Putative_Passenger	Tier 2  TCGA-A1-A0SD    germline
@@ -40,6 +40,17 @@ public class DiscreteCopyNumberMyBatisRepositoryTest {
     //        7	    672	BRCA1	6	MUTATION    Nonsense_Mutation	Putative_Driver	    Tier 2  TCGA-A1-A0SI    germline
     //        12	672	BRCA1	6	MUTATION    Splice_Site	        Putative_Passenger	Tier 1  TCGA-A1-A0SO    germline
     //        13	672	BRCA1	6	MUTATION    Splice_Site	        Putative_Driver	    Tier 1  TCGA-A1-A0SP    germline
+    //        1     27436-238   EML4-ALK    7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    germline
+    //        2     27436-238   EML4-ALK    7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //        1     57670-673   KIAA..-BRAF 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //        2     57670-673   KIAA..-BRAF 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    germline
+    //        2     57670-673   KIAA..-BRAF 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //       15     57670-673   KIAA..-BRAF 13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //        1     8031-5979   NCOA4-RET   7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-5979   NCOA4-RET   13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //        1     7113-2078   TMPRSS2-ERG 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-NULL   NCOA4-      13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+
 
     @Autowired
     private DiscreteCopyNumberMyBatisRepository discreteCopyNumberMyBatisRepository;u}(j"  (6f13f7b9ff35d712fd1618a14be019e844f6526aj$#  spersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/MutationMyBatisRepositoryTest.javaj&#  modifiedj#  Kj#  Kj(#  K
j)#  https://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FMutationMyBatisRepositoryTest.javaj+#  https://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FMutationMyBatisRepositoryTest.javaj-#  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FMutationMyBatisRepositoryTest.java?ref=2f807e84986ad81fbb099ac1e45e559147a16268j/#  Xl	  @@ -25,7 +25,7 @@
 @Configurable
 public class MutationMyBatisRepositoryTest {
 
-    //    mutation and cna events in testSql.sql
+    //    mutation, cna and struct var events in testSql.sql
     //        SAMPLE_ID, ENTREZ_GENE_ID, HUGO_GENE_SYMBOL, GENETIC_PROFILE_ID, TYPE, MUTATION_TYPE, DRIVER_FILTER, DRIVER_TIERS_FILTER, PATIENT_ID, MUTATION_TYPE
     //        1	    207	AKT1	2	CNA         -2	                Putative_Driver	    Tier 1  TCGA-A1-A0SB    germline
     //        2	    207	AKT1	2	CNA         2	                Putative_Passenger	Tier 2  TCGA-A1-A0SD    germline
@@ -38,6 +38,17 @@ public class MutationMyBatisRepositoryTest {
     //        7	    672	BRCA1	6	MUTATION    Nonsense_Mutation	Putative_Driver	    Tier 2  TCGA-A1-A0SI    germline
     //        12	672	BRCA1	6	MUTATION    Splice_Site	        Putative_Passenger	Tier 1  TCGA-A1-A0SO    germline
     //        13	672	BRCA1	6	MUTATION    Splice_Site	        Putative_Driver	    Tier 1  TCGA-A1-A0SP    germline
+    //        1     27436-238   EML4-ALK    7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    germline
+    //        2     27436-238   EML4-ALK    7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //        1     57670-673   KIAA..-BRAF 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //        2     57670-673   KIAA..-BRAF 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    germline
+    //        2     57670-673   KIAA..-BRAF 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //       15     57670-673   KIAA..-BRAF 13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //        1     8031-5979   NCOA4-RET   7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-5979   NCOA4-RET   13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //        1     7113-2078   TMPRSS2-ERG 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-NULL   NCOA4-      13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+
 
     @Autowired
     private MutationMyBatisRepository mutationMyBatisRepository;u}(j"  (2a1e4ca4c1cf745f6397f475aa682fb7c9797015j$#  |persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/StructuralVariantMyBatisRepositoryTest.javaj&#  modifiedj#  Kj#  Kj(#  Kj)#  https://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepositoryTest.javaj+#  https://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepositoryTest.javaj-#  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepositoryTest.java?ref=2f807e84986ad81fbb099ac1e45e559147a16268j/#  X9  @@ -24,10 +24,11 @@
 package org.cbioportal.persistence.mybatis;
 
 import org.cbioportal.model.GeneFilterQuery;
+import org.cbioportal.model.StructVarFilterQuery;
 import org.cbioportal.model.StructuralVariant;
-import org.cbioportal.model.StructuralVariantSpecialValue;
 import org.cbioportal.model.StructuralVariantGeneSubQuery;
 import org.cbioportal.model.StructuralVariantQuery;
+import org.cbioportal.model.StructuralVariantSpecialValue;
 import org.cbioportal.model.util.Select;
 import org.junit.Assert;
 import org.junit.Before;
@@ -50,6 +51,20 @@
 @Configurable
 public class StructuralVariantMyBatisRepositoryTest {
 
+    //    struct var events in testSql.sql
+    //        SAMPLE_ID,        ENTREZ_GENE_ID, HUGO_GENE_SYMBOL, GENETIC_PROFILE_ID, GENETIC PRODFILE, TYPE, MUTATION_TYPE, DRIVER_FILTER, DRIVER_TIERS_FILTER, PATIENT_ID, MUTATION_TYPE
+    //        1     27436-238   EML4-ALK    7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    germline
+    //        2     27436-238   EML4-ALK    7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //        1     57670-673   KIAA..-BRAF 7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //        2     57670-673   KIAA..-BRAF 7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    germline
+    //        2     57670-673   KIAA..-BRAF 7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //       15     57670-673   KIAA..-BRAF 13  acc_tcga_sv         SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //        1     8031-5979   NCOA4-RET   7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-5979   NCOA4-RET   13  acc_tcga_sv         SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //        1     7113-2078   TMPRSS2-ERG 7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-NULL   NCOA4-      13  acc_tcga_sv        SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+
+
     @Autowired
     StructuralVariantMyBatisRepository structuralVariantMyBatisRepository;
 
@@ -82,6 +97,12 @@ public void init() {
             includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
         geneQueries =  Arrays.asList(geneFilterQuery1, geneFilterQuery2, geneFilterQuery3, geneFilterQuery4);
 
+        // Only search for the KIAA1549-BRAF and EML4-ALK fusions.
+        structVarFilterQuery1 = new StructVarFilterQuery("KIAA1549", 57670, "BRAF", 673, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
+        structVarFilterQuery2 = new StructVarFilterQuery("EML4", 27436, "ALK", 238, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
+        structVarQueries = Arrays.asList(structVarFilterQuery1, structVarFilterQuery2);
+        structVarFilterQueryNullGene1 = new StructVarFilterQuery(null, null, "BRAF", 673, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
+        structVarFilterQueryNullGene2 = new StructVarFilterQuery("NCOA4", 8031, null, null, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
     }
 
     List<String> molecularProfileIds = new ArrayList<>();
@@ -95,15 +116,20 @@ public void init() {
     boolean includeSomatic;
     boolean includeUnknownStatus;
     private List<GeneFilterQuery> geneQueries;
+    List<Integer> noEntrezIds = Collections.emptyList();
     private List<StructuralVariantQuery> noStructVars = Collections.emptyList();
+    private List<StructVarFilterQuery> structVarQueries;
+    private StructVarFilterQuery structVarFilterQuery1;
+    private StructVarFilterQuery structVarFilterQuery2;
+    private StructVarFilterQuery structVarFilterQueryNullGene1;
+    private StructVarFilterQuery structVarFilterQueryNullGene2;
 
     @Test
     public void fetchStructuralVariantsNoSampleIdentifiers() {
 
         List<String> molecularProfileIds = new ArrayList<>();
         List<Integer> entrezGeneIds = new ArrayList<>();
         List<String> sampleIds = new ArrayList<>();
-        
         molecularProfileIds.add("study_tcga_pub_sv");
         entrezGeneIds.add(57670);
 
@@ -299,18 +325,16 @@ public void fetchStructuralVariantsMultiStudyWithSampleIdentifiers() throws Exce
     @Test
     public void fetchStructuralVariantsMultiStudyNoGeneIdentifiers() throws Exception {
 
-        List<Integer> noEntrezGeneIds = new ArrayList<>();
         List<String> molecularProfileIds = new ArrayList<>();
         List<String> sampleIds = new ArrayList<>();
-
         molecularProfileIds.add("study_tcga_pub_sv");
         sampleIds.add("TCGA-A1-A0SB-01");
         molecularProfileIds.add("acc_tcga_sv");
         sampleIds.add("TCGA-A1-B0SO-01");
 
         List<StructuralVariant> result =
             structuralVariantMyBatisRepository.fetchStructuralVariants(molecularProfileIds,
-                sampleIds, noEntrezGeneIds, noStructVars);
+                sampleIds, noEntrezIds, noStructVars);
 
         Assert.assertEquals(8,  result.size());
     }
@@ -369,7 +393,7 @@ public void fetchStructuralVariantsMultiStudyByGeneQueriesWithSampleIdentifiersE
     @Test
     public void fetchStructuralVariantsMultiStudyByGeneQueriesWithSampleIdentifiersSelectUnknownOncogenicity() throws Exception {
 
-        // There is one passenger event in 'study_tcga_pub_sv', the rest is unannotated
+        // There is one passenger event in 'study_tcga_pub_sv', the rest is unannotatedd
         geneQueries.stream().forEach(
             q -> {
                 q.setIncludeDriver(false);
@@ -397,7 +421,7 @@ public void fetchStructuralVariantsMultiStudyByGeneQueriesWithSampleIdentifiersS
     }
 
     @Test
-    public void fetchStructuralVariantsMultiStudyByGeneQueriesWithSampleIdentifiersSelectPassenger() throws Exception {
+    public void fetchStructuralVariantsMultiStudyByGeneQueriesWithSampleIdentifiersExcludeUnknownOncogenicity() throws Exception {
 
         // There is one passenger event in 'study_tcga_pub_sv', the rest is unannotated
 
@@ -490,8 +514,6 @@ public void fetchStructuralVariantsWithSingleStructuralVariantQueries() throws E
             new StructuralVariantGeneSubQuery(238)
         ));
         
-        List<Integer> noEntrezIds = Collections.emptyList();
-        
         List<StructuralVariant> result = 
                 structuralVariantMyBatisRepository.fetchStructuralVariants(
                     molecularProfileIds,
@@ -522,8 +544,6 @@ public void fetchStructuralVariantsWithStructuralVariantQueryAndGeneId() throws
             new StructuralVariantGeneSubQuery(238)
         ));
 
-        List<Integer> noEntrezIds = Collections.emptyList();
-
         List<StructuralVariant> result =
             structuralVariantMyBatisRepository.fetchStructuralVariants(
                 molecularProfileIds,
@@ -551,7 +571,6 @@ public void fetchStructuralVariantsWithMultipleStructuralVariantQueries() throws
             new StructuralVariantGeneSubQuery(57670),
             new StructuralVariantGeneSubQuery(673)
         ));
-        List<Integer> noEntrezIds = Collections.emptyList();
         
         List<StructuralVariant> result = 
                 structuralVariantMyBatisRepository.fetchStructuralVariants(molecularProfileIds,
@@ -594,8 +613,6 @@ public void fetchStructuralVariantsWithMultipleStructuralVariantIdentifierWildca
         );
         structVarQueries.add(svId2);
         
-        List<Integer> noEntrezIds = Collections.emptyList();
-
         List<StructuralVariant> result = 
                 structuralVariantMyBatisRepository.fetchStructuralVariants(molecularProfileIds,
                     sampleIds, noEntrezIds, structVarQueries
@@ -629,7 +646,6 @@ public void fetchStructuralVariantsWithMultipleStructuralVariantQueryNullQueryVa
             new StructuralVariantGeneSubQuery(StructuralVariantSpecialValue.NO_GENE)
         );
         structVarQueries.add(structVarWithNull);
-        List<Integer> noEntrezIds = Collections.emptyList();
 
         List<StructuralVariant> result = 
                 structuralVariantMyBatisRepository.fetchStructuralVariants(molecularProfileIds,
@@ -641,4 +657,125 @@ public void fetchStructuralVariantsWithMultipleStructuralVariantQueryNullQueryVa
         Assert.assertEquals("ENST00000340058_NULL",  result.get(0).getSite2EnsemblTranscriptId());
     }
 
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesAll() throws Exception {
+
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, structVarQueries);
+
+        Assert.assertEquals(6,  result.size());
+
+        List<String> resultTcgaPubVariants = result.stream()
+            .filter(s -> "study_tcga_pub_sv".equals(s.getMolecularProfileId()))
+            .map(StructuralVariant::getAnnotation)
+            .collect(Collectors.toList());
+        List<String> resultTcgaVariants = result.stream()
+            .filter(s -> "acc_tcga_sv".equals(s.getMolecularProfileId()))
+            .map(StructuralVariant::getAnnotation)
+            .collect(Collectors.toList());
+
+        Assert.assertArrayEquals(new String[] {"EML4-ALK.E6bA20.AB374362", "EML4-ALK.E6bA20.AB374362-2", "KIAA1549-BRAF.K16B10.COSF509", "KIAA1549-BRAF.K16B10.COSF509", "KIAA1549-BRAF.K16B10.COSF509"}, resultTcgaPubVariants.toArray());
+        Assert.assertArrayEquals(new String[] {"KIAA1549-BRAF.K16B10.COSF509"}, resultTcgaVariants.toArray());
+    }
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesNoGermline() throws Exception {
+
+        structVarFilterQuery1.setIncludeGermline(false);
+        structVarFilterQuery2.setIncludeGermline(false);
+        
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, structVarQueries);
+
+        Assert.assertEquals(4,  result.size());
+
+        List<String> resultTcgaPubVariants = result.stream()
+            .filter(s -> "study_tcga_pub_sv".equals(s.getMolecularProfileId()))
+            .map(StructuralVariant::getAnnotation)
+            .collect(Collectors.toList());
+        List<String> resultTcgaVariants = result.stream()
+            .filter(s -> "acc_tcga_sv".equals(s.getMolecularProfileId()))
+            .map(StructuralVariant::getAnnotation)
+            .collect(Collectors.toList());
+
+        Assert.assertArrayEquals(new String[] {"EML4-ALK.E6bA20.AB374362-2", "KIAA1549-BRAF.K16B10.COSF509", "KIAA1549-BRAF.K16B10.COSF509"}, resultTcgaPubVariants.toArray());
+        Assert.assertArrayEquals(new String[] {"KIAA1549-BRAF.K16B10.COSF509"}, resultTcgaVariants.toArray());
+    }
+
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesNoSomatic() throws Exception {
+
+        structVarFilterQuery1.setIncludeSomatic(false);
+        structVarFilterQuery2.setIncludeSomatic(false);
+        
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, structVarQueries);
+
+        Assert.assertEquals(2,  result.size());
+
+        List<String> resultTcgaPubVariants = result.stream()
+            .filter(s -> "study_tcga_pub_sv".equals(s.getMolecularProfileId()))
+            .map(StructuralVariant::getAnnotation)
+            .collect(Collectors.toList());
+        List<String> resultTcgaVariants = result.stream()
+            .filter(s -> "acc_tcga_sv".equals(s.getMolecularProfileId()))
+            .map(StructuralVariant::getAnnotation)
+            .collect(Collectors.toList());
+
+        Assert.assertArrayEquals(new String[] {"EML4-ALK.E6bA20.AB374362", "KIAA1549-BRAF.K16B10.COSF509"}, resultTcgaPubVariants.toArray());
+        Assert.assertEquals(0, resultTcgaVariants.size());
+    }
+
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesAnyGene1() throws Exception {
+
+        structVarFilterQuery1.getGene1Query()
+            .setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        structVarFilterQuery2.getGene1Query()
+            .setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, structVarQueries);
+
+        Assert.assertEquals(6,  result.size());
+    }
+
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesAnyGene2() throws Exception {
+
+        structVarFilterQuery1.getGene2Query()
+            .setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        structVarFilterQuery2.getGene2Query()
+            .setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, structVarQueries);
+
+        Assert.assertEquals(6,  result.size());
+    }
+    
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesNullGene1() throws Exception {
+
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, Arrays.asList(structVarFilterQueryNullGene1));
+
+        Assert.assertEquals(0,  result.size());
+    }
+    
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesNullGene2() throws Exception {
+
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, Arrays.asList(structVarFilterQueryNullGene2));
+
+        Assert.assertEquals(1,  result.size());
+    }
+
 }u}(j"  (f7047bdbdf707cd4c932acac690cbad2f787a7cdj$#  >persistence/persistence-mybatis/src/test/resources/testSql.sqlj&#  modifiedj#  Kj#  K j(#  Kj)#  https://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestSql.sqlj+#  https://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestSql.sqlj-#  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestSql.sql?ref=2f807e84986ad81fbb099ac1e45e559147a16268j/#  X
  @@ -140,6 +140,7 @@ INSERT INTO alteration_driver_annotation (ALTERATION_EVENT_ID,GENETIC_PROFILE_ID
 INSERT INTO alteration_driver_annotation (ALTERATION_EVENT_ID,GENETIC_PROFILE_ID,SAMPLE_ID, DRIVER_FILTER, DRIVER_FILTER_ANNOTATION, DRIVER_TIERS_FILTER, DRIVER_TIERS_FILTER_ANNOTATION) VALUES (2040,6,1, 'Putative_Driver', 'Pathogenic', 'Tier 1', 'Highly Actionable');
 INSERT INTO alteration_driver_annotation (ALTERATION_EVENT_ID,GENETIC_PROFILE_ID,SAMPLE_ID, DRIVER_FILTER, DRIVER_FILTER_ANNOTATION, DRIVER_TIERS_FILTER, DRIVER_TIERS_FILTER_ANNOTATION) VALUES (2041,6,2, 'Putative_Passenger', 'Pathogenic', 'Tier 2', 'Potentially Actionable');
 INSERT INTO alteration_driver_annotation (ALTERATION_EVENT_ID,GENETIC_PROFILE_ID,SAMPLE_ID, DRIVER_FILTER, DRIVER_FILTER_ANNOTATION, DRIVER_TIERS_FILTER, DRIVER_TIERS_FILTER_ANNOTATION) VALUES (2042,6,3, 'Putative_Passenger', 'Pathogenic', 'Tier 1', 'Highly Actionable');
+INSERT INTO alteration_driver_annotation (ALTERATION_EVENT_ID,GENETIC_PROFILE_ID,SAMPLE_ID, DRIVER_FILTER, DRIVER_FILTER_ANNOTATION, DRIVER_TIERS_FILTER, DRIVER_TIERS_FILTER_ANNOTATION) VALUES (2042,8,15, 'Putative_Driver', 'Pathogenic', 'Tier 1', 'Highly Actionable');
 
 INSERT INTO mutation (MUTATION_EVENT_ID,GENETIC_PROFILE_ID,SAMPLE_ID,ENTREZ_GENE_ID,CENTER,SEQUENCER,MUTATION_STATUS,VALIDATION_STATUS,TUMOR_SEQ_ALLELE1,TUMOR_SEQ_ALLELE2,MATCHED_NORM_SAMPLE_BARCODE,MATCH_NORM_SEQ_ALLELE1,MATCH_NORM_SEQ_ALLELE2,TUMOR_VALIDATION_ALLELE1,TUMOR_VALIDATION_ALLELE2,MATCH_NORM_VALIDATION_ALLELE1,MATCH_NORM_VALIDATION_ALLELE2,VERIFICATION_STATUS,SEQUENCING_PHASE,SEQUENCE_SOURCE,VALIDATION_METHOD,SCORE,BAM_FILE,TUMOR_ALT_COUNT,TUMOR_REF_COUNT,NORMAL_ALT_COUNT,NORMAL_REF_COUNT,AMINO_ACID_CHANGE,ANNOTATION_JSON) VALUES (2038,6,6,672,'genome.wustl.edu','IlluminaGAIIx','NA','Unknown','G','A','TCGA-A1-A0SH-10A-03D-A099-09','G','A','NA','NA','NA','NA','Unknown','Phase_IV','Capture','NA','1','dbGAP',1,0,-1,-1,'cyclases/Protein','{"zygosity":{"status": "heterozygous"}}');
 INSERT INTO mutation (MUTATION_EVENT_ID,GENETIC_PROFILE_ID,SAMPLE_ID,ENTREZ_GENE_ID,CENTER,SEQUENCER,MUTATION_STATUS,VALIDATION_STATUS,TUMOR_SEQ_ALLELE1,TUMOR_SEQ_ALLELE2,MATCHED_NORM_SAMPLE_BARCODE,MATCH_NORM_SEQ_ALLELE1,MATCH_NORM_SEQ_ALLELE2,TUMOR_VALIDATION_ALLELE1,TUMOR_VALIDATION_ALLELE2,MATCH_NORM_VALIDATION_ALLELE1,MATCH_NORM_VALIDATION_ALLELE2,VERIFICATION_STATUS,SEQUENCING_PHASE,SEQUENCE_SOURCE,VALIDATION_METHOD,SCORE,BAM_FILE,TUMOR_ALT_COUNT,TUMOR_REF_COUNT,NORMAL_ALT_COUNT,NORMAL_REF_COUNT,AMINO_ACID_CHANGE,ANNOTATION_JSON) VALUES (22604,6,6,672,'genome.wustl.edu','IlluminaGAIIx','Germline','Unknown','A','C','TCGA-A1-A0SH-10A-03D-A099-09','A','C','NA','NA','NA','NA','Unknown','Phase_IV','Capture','NA','1','dbGAP',-1,-1,-1,-1,'cyclases/Protein','{"zygosity":{"status": "heterozygous"}}');u}(j"  (d74e4088063da48d982c27ebdb0d216adf7ff6c9j$#  Jservice/src/main/java/org/cbioportal/service/StructuralVariantService.javaj&#  modifiedj#  Kj#  K j(#  Kj)#  https://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStructuralVariantService.javaj+#  https://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStructuralVariantService.javaj-#  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStructuralVariantService.java?ref=2f807e84986ad81fbb099ac1e45e559147a16268j/#  Xt  @@ -26,6 +26,7 @@
 import java.util.List;
 
 import org.cbioportal.model.GeneFilterQuery;
+import org.cbioportal.model.StructVarFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 
@@ -42,4 +43,7 @@ List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String> molecu
                                                                  List<String> sampleIds,
                                                                  List<GeneFilterQuery> geneQueries);
 
+    List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
+                                                                      List<String> sampleIds,
+                                                                      List<StructVarFilterQuery> structVarQueries);
 }
\ No newline at end of fileu5      }(j"  (7a114dac693fade396dab8d2b487d4d8474a023fj$#  Sservice/src/main/java/org/cbioportal/service/impl/StructuralVariantServiceImpl.javaj&#  modifiedj#  K
j#  K j(#  K
j)#  https://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStructuralVariantServiceImpl.javaj+#  https://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStructuralVariantServiceImpl.javaj-#  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStructuralVariantServiceImpl.java?ref=2f807e84986ad81fbb099ac1e45e559147a16268j/#  X  @@ -24,10 +24,12 @@
 package org.cbioportal.service.impl;
 
 import org.cbioportal.model.GeneFilterQuery;
+import org.cbioportal.model.StructVarFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 import org.cbioportal.persistence.StructuralVariantRepository;
 import org.cbioportal.service.StructuralVariantService;
+import org.springframework.beans.PropertyValues;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import java.util.List;
@@ -59,4 +61,12 @@ public List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String>
             molecularProfileIds, sampleIds, geneQueries);
     }
 
+    @Override
+    public List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
+                                                                             List<String> sampleIds,
+                                                                             List<StructVarFilterQuery> structVarQueries) {
+        return structuralVariantRepository.fetchStructuralVariantsByStructVarQueries(
+            molecularProfileIds, sampleIds, structVarQueries);
+    }
+
 }u}(j"  (e41392ecd469a7228c9f0476044f458adff404f2j$#  =web/src/main/java/org/cbioportal/web/StudyViewController.javaj&#  modifiedj#  Kj#  Kj(#  Kj)#  https://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj+#  https://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj-#  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=2f807e84986ad81fbb099ac1e45e559147a16268j/#  X  @@ -440,6 +440,7 @@ private static double parseValueLinear(ClinicalData c) {
     @RequestMapping(value = "/clinical-data-density-plot/fetch", method = RequestMethod.POST,
         consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Fetch clinical data density plot bins by study view filter")
+    @Validated
     public ResponseEntity<DensityPlotData> fetchClinicalDataDensityPlot(
         @ApiParam(required = true, value = "Clinical Attribute ID of the X axis")
         @RequestParam String xAxisAttributeId,
@@ -466,7 +467,7 @@ public ResponseEntity<DensityPlotData> fetchClinicalDataDensityPlot(
         @ApiIgnore // 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,
         @ApiParam(required = true, value = "Study view filter")
-        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter) {
+        @RequestBody(required = false) StudyViewFilter studyViewFilter) {
 
         List<String> studyIds = new ArrayList<>();
         List<String> sampleIds = new ArrayList<>();u}(j"  (3559fc5a476c9d2a348ec2eb68f2d77c067593c4j$#  Cweb/src/main/java/org/cbioportal/web/parameter/StudyViewFilter.javaj&#  modifiedj#  K
j#  Kj(#  Kj)#  https://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FStudyViewFilter.javaj+#  https://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FStudyViewFilter.javaj-#  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FStudyViewFilter.java?ref=2f807e84986ad81fbb099ac1e45e559147a16268j/#  X  @@ -4,6 +4,7 @@
 import java.util.List;
 import java.util.Objects;
 
+import javax.validation.Valid;
 import javax.validation.constraints.AssertTrue;
 import javax.validation.constraints.Size;
 
@@ -12,10 +13,11 @@
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import org.cbioportal.model.AlterationFilter;
 import org.cbioportal.model.GeneFilter;
+import org.cbioportal.model.StudyViewStructuralVariantFilter;
 import org.cbioportal.web.parameter.filter.*;
 
 @JsonIgnoreProperties(ignoreUnknown = true)
-@JsonInclude(Include.NON_NULL)
+@JsonInclude(Include.ALWAYS)
 public class StudyViewFilter implements Serializable {
 
     @Size(min = 1)
@@ -24,6 +26,8 @@ public class StudyViewFilter implements Serializable {
     private List<String> studyIds;
     private List<ClinicalDataFilter> clinicalDataFilters;
     private List<GeneFilter> geneFilters;
+    @Valid
+    private List<StudyViewStructuralVariantFilter> structuralVariantFilters;
     private AndedSampleTreatmentFilters sampleTreatmentFilters;
     private AndedSampleTreatmentFilters sampleTreatmentGroupFilters;
     private AndedSampleTreatmentFilters sampleTreatmentTargetFilters;
@@ -110,6 +114,14 @@ public void setGeneFilters(List<GeneFilter> geneFilters) {
         this.geneFilters = geneFilters;
     }
 
+    public List<StudyViewStructuralVariantFilter> getStructuralVariantFilters() {
+        return structuralVariantFilters;
+    }
+
+    public void setStructuralVariantFilters(List<StudyViewStructuralVariantFilter> structuralVariantFilters) {
+        this.structuralVariantFilters = structuralVariantFilters;
+    }
+
     public List<List<String>> getGenomicProfiles() {
         return genomicProfiles;
     }u}(j"  (ff5c7aaf4ca8f52a87e547f200b7d9c2e963d0e2j$#  Vweb/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.javaj&#  modifiedj#  Kj#  K j(#  Kj)#  https://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaj+#  https://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaj-#  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.java?ref=2f807e84986ad81fbb099ac1e45e559147a16268j/#  XM  @@ -566,6 +566,11 @@ private boolean extractAttributesFromStudyViewFilter(HttpServletRequest request)
                 // when the AlterationFilter is not part of the request.
                 studyViewFilter.setAlterationFilter(new AlterationFilter());
             }
+            if (studyViewFilter.getStructuralVariantFilters() == null) {
+                // For backwards compatibility an inactive filter is set
+                // when the StructuralVariantFilters are not part of the request.
+                studyViewFilter.setStructuralVariantFilters(new ArrayList<>());
+            }
             LOG.debug("extracted studyViewFilter: " + studyViewFilter.toString());
             LOG.debug("setting interceptedStudyViewFilter to " + studyViewFilter);
             request.setAttribute("interceptedStudyViewFilter", studyViewFilter);u}(j"  (8d330b9b13724dd6b2fe99fa71a79e1035132967j$#  Bweb/src/main/java/org/cbioportal/web/util/StudyViewFilterUtil.javaj&#  modifiedj#  KTj#  Kj(#  KUj)#  https://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javaj+#  https://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javaj-#  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.java?ref=2f807e84986ad81fbb099ac1e45e559147a16268j/#  X}  @@ -2,6 +2,7 @@
 
 import java.util.*;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.map.MultiKeyMap;
@@ -10,8 +11,13 @@
 import org.cbioportal.model.ClinicalDataCount;
 import org.cbioportal.model.ClinicalDataCountItem;
 import org.cbioportal.model.DataBin;
+import org.cbioportal.model.Gene;
+import org.cbioportal.model.GeneFilterQuery;
 import org.cbioportal.model.Patient;
 import org.cbioportal.model.SampleList;
+import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariantSpecialValue;
+import org.cbioportal.service.GeneService;
 import org.cbioportal.service.util.CustomDataSession;
 import org.cbioportal.service.util.CustomDataValue;
 import org.cbioportal.service.util.MolecularProfileUtil;
@@ -23,6 +29,9 @@
 public class StudyViewFilterUtil {
     @Autowired
     private MolecularProfileUtil molecularProfileUtil;
+
+    @Autowired
+    private GeneService geneService;
     
     public void extractStudyAndSampleIds(
         List<SampleIdentifier> sampleIdentifiers, 
@@ -254,7 +263,80 @@ public List<Binnable> filterClinicalData(
 
         return combinedResult;
     }
-    
+
+    public List<GeneFilterQuery> cleanQueryGeneIds(List<GeneFilterQuery> geneQueries) {
+        List<String> hugoGeneSymbols = geneQueries
+            .stream()
+            .map(GeneFilterQuery::getHugoGeneSymbol)
+            .collect(Collectors.toList());
+
+        Map<String, Integer> symbolToEntrezGeneId = getStringIntegerMap(hugoGeneSymbols);
+
+        geneQueries.removeIf(
+            q -> !symbolToEntrezGeneId.containsKey(q.getHugoGeneSymbol())
+        );
+
+        geneQueries.stream().forEach(
+            q -> q.setEntrezGeneId(symbolToEntrezGeneId.get(q.getHugoGeneSymbol()))
+        );
+
+        return geneQueries;
+    }
+
+    private Map<String, Integer> getStringIntegerMap(List<String> hugoGeneSymbols) {
+        Map<String, Integer> symbolToEntrezGeneId = geneService
+            .fetchGenes(new ArrayList<>(hugoGeneSymbols),
+                GeneIdType.HUGO_GENE_SYMBOL.name(), Projection.SUMMARY.name())
+            .stream()
+            .collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
+        return symbolToEntrezGeneId;
+    }
+
+    // TODO Pim test this logic.
+    // TODO Pim write test.
+    public List<StructVarFilterQuery> addEntrezGeneIds(List<StructVarFilterQuery> structVarQueries) {
+
+        List<String> hugoGeneSymbols = structVarQueries
+            .stream()
+            .flatMap(q -> Stream.of(q.getGene1Query(), q.getGene2Query()))
+            .filter(structVarIdentifier -> structVarIdentifier.getHugoSymbol() != null)
+            .map(structVarIdentifier -> structVarIdentifier.getHugoSymbol())
+            .collect(Collectors.toList());
+
+        Map<String, Integer> symbolToEntrezGeneId = getStringIntegerMap(hugoGeneSymbols);
+
+        // Add Entrez gene ids to the queries.
+        structVarQueries.forEach(structVarQuery -> {
+            structVarQuery.getGene1Query().setEntrezId(
+                symbolToEntrezGeneId.getOrDefault(structVarQuery.getGene1Query().getHugoSymbol(), null)
+            );
+            structVarQuery.getGene2Query().setEntrezId(
+                symbolToEntrezGeneId.getOrDefault(structVarQuery.getGene2Query().getHugoSymbol(), null)
+            );
+        });
+
+        // Remove any genes where the Entrez gene id is needed, but translation failed.
+        structVarQueries.removeIf(
+            q ->   (q.getGene1Query().getSpecialValue() != StructuralVariantSpecialValue.NO_GENE
+                && q.getGene1Query().getSpecialValue() != StructuralVariantSpecialValue.ANY_GENE
+                && q.getGene1Query().getEntrezId() == null)
+                || (q.getGene2Query().getSpecialValue() != StructuralVariantSpecialValue.NO_GENE
+                && q.getGene2Query().getSpecialValue() != StructuralVariantSpecialValue.ANY_GENE
+                && q.getGene2Query().getEntrezId() == null)
+        );
+
+        return structVarQueries;
+    }
+
+    private Map<String, Integer> getHugoToEntrezQueryMap(List<String> hugoGeneSymbols) {
+        Map<String, Integer> 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<Binnable> filterClinicalDataByStudyAndSampleAndAttribute(
         List<Binnable> clinicalData,
         Map<String, String> sampleToStudyId,
@@ -311,4 +393,5 @@ private String generatePatientToStudyKey(Binnable clinicalData) {
     private String generateCaseToStudyKey(String studyId, String caseId) {
         return studyId + ":" + caseId;
     }
+    
 }u}(j"  (8e71d0a93365fee4a5b0b1e37ed7adb8d37ec51dj$#  Yweb/src/main/java/org/cbioportal/web/util/appliers/StructuralVariantSubFilterApplier.javaj&#  addedj#  Kpj#  K j(#  Kpj)#  https://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.javaj+#  https://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.javaj-#  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.java?ref=2f807e84986ad81fbb099ac1e45e559147a16268j/#  X  @@ -0,0 +1,112 @@
+package org.cbioportal.web.util.appliers;
+
+import org.cbioportal.model.MolecularProfile;
+import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StudyViewStructuralVariantFilter;
+import org.cbioportal.service.MolecularProfileService;
+import org.cbioportal.service.StructuralVariantService;
+import org.cbioportal.web.parameter.SampleIdentifier;
+import org.cbioportal.web.parameter.StudyViewFilter;
+import org.cbioportal.web.util.StudyViewFilterUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+@Component
+public class StructuralVariantSubFilterApplier implements StudyViewSubFilterApplier {
+
+    @Autowired
+    private MolecularProfileService molecularProfileService;
+
+    @Autowired
+    private StructuralVariantService structuralVariantService;
+
+    @Autowired
+    private StudyViewFilterUtil studyViewFilterUtil;
+    
+    @Override
+    public List<SampleIdentifier> filter(List<SampleIdentifier> toFilter, StudyViewFilter filters) {
+
+        final List<StudyViewStructuralVariantFilter> structVarFilters = getStructVarFilters(filters);
+
+        List<String> includedStudyIds = toFilter.stream()
+            .map(SampleIdentifier::getStudyId)
+            .distinct()
+            .collect(Collectors.toList());
+
+        List<MolecularProfile> molecularProfiles = molecularProfileService.getMolecularProfilesInStudies(includedStudyIds, "SUMMARY");
+        
+        Map<String, MolecularProfile> molecularProfileMap = molecularProfiles.stream()
+            .collect(Collectors.toMap(MolecularProfile::getStableId, Function.identity()));
+
+        List<SampleIdentifier> remainingSampleIdentifiers = toFilter;
+        
+        for (StudyViewStructuralVariantFilter structuralVariantFilter : structVarFilters) {
+
+            // Collect molecular profiles referenced in gene filter.
+            List<MolecularProfile> filteredMolecularProfiles = structuralVariantFilter
+                .getMolecularProfileIds()
+                .stream()
+                .map(molecularProfileId -> molecularProfileMap.get(molecularProfileId))
+                .collect(Collectors.toList());
+
+            Map<String, List<MolecularProfile>> mapByStudyId = filteredMolecularProfiles
+                .stream()
+                .collect(Collectors.groupingBy(MolecularProfile::getCancerStudyIdentifier));
+
+            for (List<StructVarFilterQuery> structVarQueries: structuralVariantFilter.getStructVarQueries()) {
+
+                // Remove samples in remainingSampleIdentifiers that belong to a study that is not accessible to the current user
+                // (do not appear in the molecularProfileMap argument). 
+                final List<SampleIdentifier> filteredSampleIdentifiers = remainingSampleIdentifiers.stream()
+                    .filter(i -> mapByStudyId.containsKey(i.getStudyId())).collect(Collectors.toList());
+
+                final List<String> molecularProfileIds = filteredSampleIdentifiers.stream()
+                    .map(i -> mapByStudyId.get(i.getStudyId()).get(0).getStableId())
+                    .distinct()
+                    .collect(Collectors.toList());
+                
+                final List<String> sampleIds = filteredSampleIdentifiers.stream()
+                        .map(SampleIdentifier::getSampleId)
+                        .collect(Collectors.toList());
+
+                final List<StructVarFilterQuery> entrezIdEnhancedSvQueries = studyViewFilterUtil.addEntrezGeneIds(structVarQueries);
+                remainingSampleIdentifiers = structuralVariantService
+                    .fetchStructuralVariantsByStructVarQueries(molecularProfileIds, sampleIds, entrezIdEnhancedSvQueries)
+                    .stream()
+                    .map(m -> {
+                        SampleIdentifier sampleIdentifier = new SampleIdentifier();
+                        sampleIdentifier.setSampleId(m.getSampleId());
+                        sampleIdentifier.setStudyId(m.getStudyId());
+                        return sampleIdentifier;
+                    })
+                    .distinct()
+                    .collect(Collectors.toList());
+            }
+
+        }
+        return remainingSampleIdentifiers;
+    }
+
+    @Override
+    public boolean shouldApplyFilter(StudyViewFilter studyViewFilter) {
+        return !getStructVarFilters(studyViewFilter).isEmpty();
+    }
+
+    private static List<StudyViewStructuralVariantFilter> getStructVarFilters(StudyViewFilter filters) {
+        final List<StudyViewStructuralVariantFilter> structuralVariantFilters = filters.getStructuralVariantFilters();
+        if (structuralVariantFilters == null || structuralVariantFilters.isEmpty()) {
+            return new ArrayList<>();
+        }
+        final List<StudyViewStructuralVariantFilter> structVarFilters = structuralVariantFilters.stream()
+            .filter(structuralVariantFilter -> !structuralVariantFilter.getStructVarQueries().isEmpty())
+            .collect(Collectors.toList());
+        return structVarFilters;
+    }
+    
+}u}(j"  (662b438804c6274f24994c3b2889d4e8d8efd77fj$#  Aweb/src/test/java/org/cbioportal/web/StudyViewControllerTest.javaj&#  modifiedj#  Kj#  K j(#  Kj)#  https://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj+#  https://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj-#  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.java?ref=2f807e84986ad81fbb099ac1e45e559147a16268j/#  X&  @@ -2,6 +2,7 @@
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.cbioportal.model.*;
+import org.cbioportal.model.util.Select;
 import org.cbioportal.persistence.AlterationRepository;
 import org.cbioportal.service.*;
 import org.cbioportal.service.util.MolecularProfileUtil;
@@ -128,6 +129,9 @@ public ViolinPlotService violinPlotService() {
         return mock(ViolinPlotService.class);
     }
 
+
+    private ArrayList<Sample> filteredSamples = new ArrayList<>();
+
     @Before
     public void setUp() throws Exception {
 
@@ -136,6 +140,17 @@ public void setUp() throws Exception {
         sampleIdentifier.setStudyId(TEST_STUDY_ID);
         filteredSampleIdentifiers.add(sampleIdentifier);
 
+        Sample sample1 = new Sample();
+        sample1.setStableId(TEST_SAMPLE_ID_1);
+        sample1.setPatientStableId(TEST_PATIENT_ID_1);
+        sample1.setCancerStudyIdentifier(TEST_STUDY_ID);
+        Sample sample2 = new Sample();
+        sample2.setStableId(TEST_SAMPLE_ID_2);
+        sample2.setPatientStableId(TEST_PATIENT_ID_2);
+        sample2.setCancerStudyIdentifier(TEST_STUDY_ID);
+        filteredSamples.add(sample1);
+        filteredSamples.add(sample2);
+
         ClinicalData clinicalData1 = new ClinicalData();
         clinicalData1.setAttrId(TEST_ATTRIBUTE_ID);
         clinicalData1.setAttrValue(TEST_CLINICAL_DATA_VALUE_1);
@@ -820,4 +835,154 @@ public void fetchClinicalEventTypeCounts() throws Exception
             .andExpect(MockMvcResultMatchers.jsonPath("$[0].count").value(TEST_CLINICAL_EVENT_TYPE_COUNT));
     }
 
+    @Test
+    public void validateStructVarFilter() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+        when(studyViewFilterApplier.apply(any(), eq(false))).thenReturn(filteredSampleIdentifiers);
+
+        List<Sample> filteredSamples = new ArrayList<>();
+        Sample sample1 = new Sample();
+        sample1.setStableId(TEST_SAMPLE_ID_1);
+        sample1.setPatientStableId(TEST_PATIENT_ID_1);
+        sample1.setCancerStudyIdentifier(TEST_STUDY_ID);
+        filteredSamples.add(sample1);
+        Sample sample2 = new Sample();
+        sample2.setStableId(TEST_SAMPLE_ID_2);
+        sample2.setPatientStableId(TEST_PATIENT_ID_2);
+        sample2.setCancerStudyIdentifier(TEST_STUDY_ID);
+        filteredSamples.add(sample2);
+
+        when(sampleService.fetchSamples(anyList(), anyList(),
+            anyString())).thenReturn(filteredSamples);
+
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+
+        final StructVarFilterQuery structVarFilterQuery = new StructVarFilterQuery("A", null, "B", null,
+            true, true, true, Select.all(),
+            true, true, true, true);
+        final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
+        structuralVariantFilter.setStructVarQueries(Arrays.asList(Arrays.asList(structVarFilterQuery)));
+        studyViewFilter.setStructuralVariantFilters(Arrays.asList(structuralVariantFilter));
+
+        // Test case:
+        structVarFilterQuery.getGene1Query().setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        structVarFilterQuery.getGene2Query().setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        
+        mockMvc.perform(MockMvcRequestBuilders.post("/filtered-samples/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(studyViewFilter)))
+            .andExpect(MockMvcResultMatchers.status().isBadRequest());
+    }
+    @Test
+    public void validateStructVarFilterBothAnyGene() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+        when(studyViewFilterApplier.apply(any(), eq(false))).thenReturn(filteredSampleIdentifiers);
+        when(sampleService.fetchSamples(anyList(), anyList(), anyString())).thenReturn(filteredSamples);
+
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+
+        final StructVarFilterQuery structVarFilterQuery = new StructVarFilterQuery("A", null, "B", null,
+            true, true, true, Select.all(),
+            true, true, true, true);
+        final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
+        structuralVariantFilter.setStructVarQueries(Arrays.asList(Arrays.asList(structVarFilterQuery)));
+        studyViewFilter.setStructuralVariantFilters(Arrays.asList(structuralVariantFilter));
+
+        // Test case:
+        structVarFilterQuery.getGene1Query().setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        structVarFilterQuery.getGene2Query().setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        
+        mockMvc.perform(MockMvcRequestBuilders.post("/filtered-samples/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(studyViewFilter)))
+            .andExpect(MockMvcResultMatchers.status().isBadRequest());
+    }
+    
+    @Test
+    public void validateStructVarFilterBothNoGene() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+        when(studyViewFilterApplier.apply(any(), eq(false))).thenReturn(filteredSampleIdentifiers);
+        when(sampleService.fetchSamples(anyList(), anyList(), anyString())).thenReturn(filteredSamples);
+
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+
+        final StructVarFilterQuery structVarFilterQuery = new StructVarFilterQuery("A", null, "B", null,
+            true, true, true, Select.all(),
+            true, true, true, true);
+        final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
+        structuralVariantFilter.setStructVarQueries(Arrays.asList(Arrays.asList(structVarFilterQuery)));
+        studyViewFilter.setStructuralVariantFilters(Arrays.asList(structuralVariantFilter));
+
+        // Test case:
+        structVarFilterQuery.getGene1Query().setSpecialValue(StructuralVariantSpecialValue.NO_GENE);
+        structVarFilterQuery.getGene2Query().setSpecialValue(StructuralVariantSpecialValue.NO_GENE);
+        
+        mockMvc.perform(MockMvcRequestBuilders.post("/filtered-samples/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(studyViewFilter)))
+            .andExpect(MockMvcResultMatchers.status().isBadRequest());
+    }
+    
+    @Test
+    public void validateStructVarFilterBothNoGeneId() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+        when(studyViewFilterApplier.apply(any(), eq(false))).thenReturn(filteredSampleIdentifiers);
+        when(sampleService.fetchSamples(anyList(), anyList(), anyString())).thenReturn(filteredSamples);
+
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+
+        // Test case:
+        final StructVarFilterQuery structVarFilterQuery = new StructVarFilterQuery(null, null, null, null,
+            true, true, true, Select.all(),
+            true, true, true, true);
+            
+        final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
+        structuralVariantFilter.setStructVarQueries(Arrays.asList(Arrays.asList(structVarFilterQuery)));
+        studyViewFilter.setStructuralVariantFilters(Arrays.asList(structuralVariantFilter));
+
+        mockMvc.perform(MockMvcRequestBuilders.post("/filtered-samples/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(studyViewFilter)))
+            .andExpect(MockMvcResultMatchers.status().isBadRequest());
+    }
+    
+    @Test
+    public void validateStructVarFilterBothGeneIdAndSpecialValueNull() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+        when(studyViewFilterApplier.apply(any(), eq(false))).thenReturn(filteredSampleIdentifiers);
+        when(sampleService.fetchSamples(anyList(), anyList(), anyString())).thenReturn(filteredSamples);
+
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+
+        // Test case:
+        final StructVarFilterQuery structVarFilterQuery = new StructVarFilterQuery(null, null, "B", null,
+            true, true, true, Select.all(),
+            true, true, true, true);
+        structVarFilterQuery.getGene1Query().setSpecialValue(null);
+
+        final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
+        structuralVariantFilter.setStructVarQueries(Arrays.asList(Arrays.asList(structVarFilterQuery)));
+        studyViewFilter.setStructuralVariantFilters(Arrays.asList(structuralVariantFilter));
+
+        mockMvc.perform(MockMvcRequestBuilders.post("/filtered-samples/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(studyViewFilter)))
+            .andExpect(MockMvcResultMatchers.status().isBadRequest());
+    }
+
 }u}(j"  (a5bcd948c8acb47e2f26b38c17d805602d012f5aj$#  ]web/src/test/java/org/cbioportal/web/util/appliers/StructuralVariantSubFilterApplierTest.javaj&#  addedj#  Kj#  K j(#  Kj)#  https://github.com/cBioPortal/cbioportal/blob/2f807e84986ad81fbb099ac1e45e559147a16268/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.javaj+#  https://github.com/cBioPortal/cbioportal/raw/2f807e84986ad81fbb099ac1e45e559147a16268/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.javaj-#  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.java?ref=2f807e84986ad81fbb099ac1e45e559147a16268j/#  X  @@ -0,0 +1,143 @@
+package org.cbioportal.web.util.appliers;
+
+import org.cbioportal.model.MolecularProfile;
+import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariant;
+import org.cbioportal.model.StudyViewStructuralVariantFilter;
+import org.cbioportal.model.util.Select;
+import org.cbioportal.service.MolecularProfileService;
+import org.cbioportal.service.impl.StructuralVariantServiceImpl;
+import org.cbioportal.web.parameter.SampleIdentifier;
+import org.cbioportal.web.parameter.StudyViewFilter;
+import org.cbioportal.web.util.StudyViewFilterUtil;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.junit.MockitoJUnitRunner;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import static org.mockito.ArgumentMatchers.anyList;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.when;
+
+@RunWith(MockitoJUnitRunner.Silent.class)
+public class StructuralVariantSubFilterApplierTest {
+
+    static final String ST_1_ID = "ST_1_ID";
+    static final String MP_1_ID = "MP_1_ID";
+    static final String G1 = "G1";
+    static final String G2 = "G2";
+    
+    @InjectMocks
+    StructuralVariantSubFilterApplier subject;
+
+    @Mock
+    MolecularProfileService molecularProfileService;
+
+    @Mock
+    StructuralVariantServiceImpl structuralVariantService;
+
+    @Mock
+    StudyViewFilterUtil studyViewFilterUtil;
+
+    private StudyViewFilter emptyStudyViewFilter = new StudyViewFilter();
+    private StudyViewFilter structVarStudyViewFilter = new StudyViewFilter();
+
+    @Before
+    public void setUp() throws Exception {
+
+        // For the test this arrangement does not matter much. What is more important
+        // is the SVs returned by the structuralVariantService service mock in response to
+        // subsequent query filter calls.
+        List<StructVarFilterQuery> svA = Arrays.asList(createQuery(G1, G2));
+        List<StructVarFilterQuery> svB = Arrays.asList(createQuery(G1, G2));
+        List<List<StructVarFilterQuery>> svA_and_svB_filterQuery = Arrays.asList(svA, svB);
+
+        final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
+        structuralVariantFilter.setStructVarQueries(svA_and_svB_filterQuery);
+        structuralVariantFilter.setMolecularProfileIds(new HashSet<>(Arrays.asList(MP_1_ID)));
+        structVarStudyViewFilter.setStructuralVariantFilters(Arrays.asList(structuralVariantFilter));
+
+        MolecularProfile molecularProfile1 = new MolecularProfile();
+        molecularProfile1.setStableId(MP_1_ID);
+        molecularProfile1.setCancerStudyIdentifier(ST_1_ID);
+        molecularProfile1.setMolecularAlterationType(MolecularProfile.MolecularAlterationType.STRUCTURAL_VARIANT);
+
+        when(molecularProfileService.getMolecularProfilesInStudies(anyList(), eq("SUMMARY")))
+            .thenReturn(Arrays.asList(molecularProfile1));
+
+        final List<StructuralVariant> structuralVariantsQuerySvA = Arrays.asList(
+            createStructVar("1", ST_1_ID),
+            createStructVar("2", ST_1_ID),
+            createStructVar("3", ST_1_ID),
+            createStructVar("4", ST_1_ID),
+            createStructVar("5", ST_1_ID)
+        );
+        // This result determines the final result.
+        final List<StructuralVariant> structuralVariantsQuerySvB = Arrays.asList(
+            createStructVar("4", ST_1_ID),
+            createStructVar("5", ST_1_ID)
+        );
+        // Subsequently, return results for svA and svB queries.
+        when(studyViewFilterUtil.addEntrezGeneIds(anyList()))
+            .thenReturn(svA, svB);
+        when(structuralVariantService.fetchStructuralVariantsByStructVarQueries(anyList(), anyList(), anyList())
+        ).thenReturn(structuralVariantsQuerySvA, structuralVariantsQuerySvB);
+    }
+
+    // Does the function return OR relations between genes in the sv query filter?
+    @Test
+    public void filter() {
+        List<SampleIdentifier> sampleIdentifiers = Arrays.asList(
+            createSampleId("1", ST_1_ID),
+            createSampleId("2", ST_1_ID),
+            createSampleId("3", ST_1_ID),
+            createSampleId("4", ST_1_ID),
+            createSampleId("5", ST_1_ID),
+            createSampleId("6", ST_1_ID),
+            createSampleId("7", ST_1_ID),
+            createSampleId("8", ST_1_ID),
+            createSampleId("9", ST_1_ID),
+            createSampleId("10", ST_1_ID)
+        );
+        List<SampleIdentifier> expected = Arrays.asList(
+            createSampleId("4", ST_1_ID),
+            createSampleId("5", ST_1_ID)
+        );
+        Assert.assertEquals(expected, subject.filter(sampleIdentifiers, structVarStudyViewFilter));
+    }
+
+    @Test
+    public void shouldApplyFilter() {
+        Assert.assertFalse(subject.shouldApplyFilter(emptyStudyViewFilter));
+        Assert.assertTrue(subject.shouldApplyFilter(structVarStudyViewFilter)); 
+    }
+    
+    private StructVarFilterQuery createQuery(String gene1, String gene2) {
+        return new StructVarFilterQuery(gene1, null, gene2, null,
+            true, true, true, Select.all(),
+            true, true, true, true);
+    }
+    
+    private SampleIdentifier createSampleId(String samplId, String studyId) {
+        final SampleIdentifier sampleIdentifier = new SampleIdentifier();
+        sampleIdentifier.setStudyId(studyId);
+        sampleIdentifier.setSampleId(samplId);
+        return sampleIdentifier;
+    }
+    
+    private StructuralVariant createStructVar(String samplId, String studyId) {
+        final StructuralVariant structuralVariant = new StructuralVariant();
+        structuralVariant.setStudyId(studyId);
+        structuralVariant.setSampleId(samplId);
+        return structuralVariant;
+    }
+
+}
\ No newline at end of fileueu(fae6d16f09e538cde5d59d2adc274cafbbb419e2}(sha(fae6d16f09e538cde5d59d2adc274cafbbb419e2node_idEC_kwDOAe-hB9oAKGZhZTZkMTZmMDllNTM4Y2RlNWQ1OWQyYWRjMjc0Y2FmYmJiNDE5ZTIcommit}(author}(name	Bryan Laiemaillaib1@mskcc.orgdate2023-07-19T20:48:03Zu	committer}(j#  Gaofei Zhaoj#  ,15748980+dippindots@users.noreply.github.comj#  2023-07-20T18:22:27Zumessage)update one-sided fisher test to two-sidedtree}(j#  (6b741d7e5f4a535d49e5cee352175f7bc8e35178urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/6b741d7e5f4a535d49e5cee352175f7bc8e35178uj#  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/fae6d16f09e538cde5d59d2adc274cafbbb419e2
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj#  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/fae6d16f09e538cde5d59d2adc274cafbbb419e2html_urlXhttps://github.com/cBioPortal/cbioportal/commit/fae6d16f09e538cde5d59d2adc274cafbbb419e2comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/fae6d16f09e538cde5d59d2adc274cafbbb419e2/commentsj#  Nj#  }(login
dippindotsidJtO j#  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j#  'https://api.github.com/users/dippindotsj#  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuparents]}(j#  (7339191fc545e3a3626aaf96cc2e6e7f63bc2292j#  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7339191fc545e3a3626aaf96cc2e6e7f63bc2292j#  Xhttps://github.com/cBioPortal/cbioportal/commit/7339191fc545e3a3626aaf96cc2e6e7f63bc2292uastats}(totalKM	additionsK>	deletionsKufiles](}(j#  (16073e48ff0caa8feab78e54ecfb5919ca20eb91filenameIcore/src/main/java/org/mskcc/cbio/portal/servlet/CalcFisherExactTest.javastatusmodifiedj$  Kj$  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/fae6d16f09e538cde5d59d2adc274cafbbb419e2/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/fae6d16f09e538cde5d59d2adc274cafbbb419e2/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.java?ref=fae6d16f09e538cde5d59d2adc274cafbbb419e2patchX'  @@ -44,13 +44,13 @@
 import org.mskcc.cbio.portal.stats.FisherExact;
 
 /**
- * Calculate the cumulative (one-tail) p-value out of fisher exact test
+ * Calculate the cumulative (two-tail) p-value out of fisher exact test
  * 
  * @param a a, b, c, d are the four cells in a 2x2 matrix
  * @param b
  * @param c
  * @param d
- * @return one-tailed P-value (right or left, whichever is smallest)
+ * @return two-tailed P-value (right or left, whichever is smallest)
  * 
  */
 public class CalcFisherExactTest extends HttpServlet  {
@@ -86,7 +86,7 @@ protected void doPost(HttpServletRequest httpServletRequest,
                 int c = Integer.parseInt(dataSet.split(" ")[2]);
                 int d = Integer.parseInt(dataSet.split(" ")[3]);    
                 FisherExact fisher = new FisherExact(a + b + c + d);
-                double pValue = fisher.getCumlativeP(a, b, c, d);
+                double pValue = fisher.getTwoTailedP(a, b, c, d);
                 result = result.concat(String.valueOf(pValue) + " ");                
             }
         }u}(j#  (92f8f83955924145d906564446465c5750ab3d2fj!$  =core/src/main/java/org/mskcc/cbio/portal/stats/OddsRatio.javaj#$  modifiedj$  Kj$  Kj%$  Kj&$  https://github.com/cBioPortal/cbioportal/blob/fae6d16f09e538cde5d59d2adc274cafbbb419e2/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.javaj($  https://github.com/cBioPortal/cbioportal/raw/fae6d16f09e538cde5d59d2adc274cafbbb419e2/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.javaj*$  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.java?ref=fae6d16f09e538cde5d59d2adc274cafbbb419e2j,$  X  @@ -87,7 +87,7 @@ public OddsRatio(ProfileDataSummary pDataSummary, String geneA, String geneB) {
 
         oddsRatio = ((double) (a * d)) / ((double) (b * c));
         FisherExact fisher = new FisherExact(a + b + c + d);
-        pValue = fisher.getCumlativeP(a, b, c, d);
+        pValue = fisher.getTwoTailedP(a, b, c, d);
         lowerConfidenceInterval = Math.exp(Math.log(oddsRatio) - 1.96 * (Math.sqrt(1 / (double) a
                 + 1 / (double) b + 1 / (double) c + 1 / (double) d)));
         upperConfidenceInterval = Math.exp(Math.log(oddsRatio) + 1.96 * (Math.sqrt(1 / (double) a
@@ -103,7 +103,7 @@ public double getOddsRatio() {
         return oddsRatio;
     }
 
-    public double getCumulativeP() {
+    public double getTwoTailedP() {
         return pValue;
     }
 u}(j#  (c1c4adac53791a81208af5b00182bdaa40e6f0fej!$  Jcore/src/main/java/org/mskcc/cbio/portal/util/EnrichmentsAnalysisUtil.javaj#$  modifiedj$  Kj$  Kj%$  Kj&$  https://github.com/cBioPortal/cbioportal/blob/fae6d16f09e538cde5d59d2adc274cafbbb419e2/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FEnrichmentsAnalysisUtil.javaj($  https://github.com/cBioPortal/cbioportal/raw/fae6d16f09e538cde5d59d2adc274cafbbb419e2/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FEnrichmentsAnalysisUtil.javaj*$  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FEnrichmentsAnalysisUtil.java?ref=fae6d16f09e538cde5d59d2adc274cafbbb419e2j,$  X  @@ -652,7 +652,7 @@ private double runFisherExactTest(HashMap<Integer, String> singleGeneCaseValueMa
             }
         }
         FisherExact fisher = new FisherExact(a + b + c + d);
-        return fisher.getCumlativeP(a, b, c, d);
+        return fisher.getTwoTailedP(a, b, c, d);
     }
 
     private String getCytoband(int geneticEntityId, String geneticProfileStableId) {u}(j#  (06377765dfed89750dc17672a9cb7f4cfefca759j!$  Ccore/src/test/java/org/mskcc/cbio/portal/stats/TestFisherExact.javaj#$  modifiedj$  Kj$  Kj%$  Kj&$  https://github.com/cBioPortal/cbioportal/blob/fae6d16f09e538cde5d59d2adc274cafbbb419e2/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestFisherExact.javaj($  https://github.com/cBioPortal/cbioportal/raw/fae6d16f09e538cde5d59d2adc274cafbbb419e2/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestFisherExact.javaj*$  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestFisherExact.java?ref=fae6d16f09e538cde5d59d2adc274cafbbb419e2j,$  XO  @@ -39,7 +39,7 @@ public class TestFisherExact extends TestCase {
 
     public void testFisherExact() {
         FisherExact fisher = new FisherExact(43 + 2 + 17 + 7);
-        double p = fisher.getCumlativeP(43, 2, 17, 7);
+        double p = fisher.getTwoTailedP(43, 2, 17, 7);
         assertEquals(0.006653, p, 0.00001);
     }
 }u}(j#  (108fdb5785e60048a79f3c23d5bfb4f01dc550e2j!$  Acore/src/test/java/org/mskcc/cbio/portal/stats/TestOddsRatio.javaj#$  modifiedj$  Kj$  Kj%$  Kj&$  https://github.com/cBioPortal/cbioportal/blob/fae6d16f09e538cde5d59d2adc274cafbbb419e2/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.javaj($  https://github.com/cBioPortal/cbioportal/raw/fae6d16f09e538cde5d59d2adc274cafbbb419e2/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.javaj*$  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.java?ref=fae6d16f09e538cde5d59d2adc274cafbbb419e2j,$  X  @@ -70,9 +70,9 @@ public void testFisherExact() throws IOException {
 
         OddsRatio oddsRatio = new OddsRatio(pDataSummary, "BRCA1", "BRCA2");
         double oddsRatioValue = oddsRatio.getOddsRatio();
-        double p = oddsRatio.getCumulativeP();
+        double p = oddsRatio.getTwoTailedP();
         assertEquals(0.16666, oddsRatioValue, 0.0001);
-        assertEquals(0.0849, p, 0.0001);
+        assertEquals(0.1698, p, 0.0001);
         //System.out.println (oddsRatio.getRCommand());
     }
 }u}(j#  (ea7d3d653e00ae80f179717fa6f02d7409dfba19j!$  docs/user-guide/faq.mdj#$  modifiedj$  Kj$  Kj%$  Kj&$  qhttps://github.com/cBioPortal/cbioportal/blob/fae6d16f09e538cde5d59d2adc274cafbbb419e2/docs%2Fuser-guide%2Ffaq.mdj($  phttps://github.com/cBioPortal/cbioportal/raw/fae6d16f09e538cde5d59d2adc274cafbbb419e2/docs%2Fuser-guide%2Ffaq.mdj*$  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fuser-guide%2Ffaq.md?ref=fae6d16f09e538cde5d59d2adc274cafbbb419e2j,$  X  @@ -146,7 +146,7 @@ Group Comparison is a suite of analysis features which allows a user to compare
 - Other tabs
     - 2 groups
         - Continuous data: one-sided t-test
-        - Categorical data: one-sided Fisher's exact test
+        - Categorical data: two-sided Fisher's exact test
     - 3 or more groups
         - Continuous data: one-way ANOVA
         - Categorical data: Chi-squared testu}(j#  (3ea53acf77ec5c9fdaefb19fc9864e431e4b655ej!$  upersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/AlterationMyBatisRepositoryTest.javaj#$  modifiedj$  Kj$  Kj%$  Kj&$  https://github.com/cBioPortal/cbioportal/blob/fae6d16f09e538cde5d59d2adc274cafbbb419e2/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.javaj($  https://github.com/cBioPortal/cbioportal/raw/fae6d16f09e538cde5d59d2adc274cafbbb419e2/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.javaj*$  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.java?ref=fae6d16f09e538cde5d59d2adc274cafbbb419e2j,$  X  @@ -1034,7 +1034,7 @@ public void getPatientStructuralVariantCountIncludeCustomDriverAnnotationsInclud
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        alterationFilter.setSelectedTiers(Select.byValues(List.of("Class 2")));
+        alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Class 2")));
         alterationFilter.setIncludeUnknownTier(true);
         List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,
@@ -1049,7 +1049,7 @@ public void getPatientStructuralVariantCountIncludeCustomDriverAnnotationsExclud
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        alterationFilter.setSelectedTiers(Select.byValues(List.of("Class 2")));
+        alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Class 2")));
         alterationFilter.setIncludeUnknownTier(false);
         List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,u}(j#  (8113cc63f7380d8cff4cb9026990fc7050114c95j!$  Oservice/src/main/java/org/cbioportal/service/util/AlterationEnrichmentUtil.javaj#$  modifiedj$  Kj$  Kj%$  Kj&$  https://github.com/cBioPortal/cbioportal/blob/fae6d16f09e538cde5d59d2adc274cafbbb419e2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javaj($  https://github.com/cBioPortal/cbioportal/raw/fae6d16f09e538cde5d59d2adc274cafbbb419e2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javaj*$  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.java?ref=fae6d16f09e538cde5d59d2adc274cafbbb419e2j,$  X  @@ -132,7 +132,7 @@ public List<AlterationEnrichment> createAlterationEnrichments(Map<String, Pair<L
                         int alteredOnlyInQueryGenesCount = counts.get(0).getProfiledCount()
                             - counts.get(0).getAlteredCount();
 
-                        pValue = fisherExactTestCalculator.getCumulativePValue(alteredInNoneCount,
+                        pValue = fisherExactTestCalculator.getTwoTailedPValue(alteredInNoneCount,
                             counts.get(1).getAlteredCount(), alteredOnlyInQueryGenesCount,
                             counts.get(0).getAlteredCount());
                     } else {u}(j#  (ed94cad2b5bfc09610d8c17eae97a74684a109ddj!$  Pservice/src/main/java/org/cbioportal/service/util/FisherExactTestCalculator.javaj#$  modifiedj$  K/j$  K j%$  K/j&$  https://github.com/cBioPortal/cbioportal/blob/fae6d16f09e538cde5d59d2adc274cafbbb419e2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javaj($  https://github.com/cBioPortal/cbioportal/raw/fae6d16f09e538cde5d59d2adc274cafbbb419e2/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javaj*$  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.java?ref=fae6d16f09e538cde5d59d2adc274cafbbb419e2j,$  X(  @@ -40,4 +40,51 @@ public double getCumulativePValue(int a, int b, int c, int d) {
         }
         return p;
     }
+
+    public double getTwoTailedPValue(int a, int b, int c, int d) {
+        
+        int min, i;
+        int n = a + b + c + d;
+        double p = 0;
+        double[] f = new double[n + 1];
+        f[0] = 0.0;
+
+        for (int j = 1; j <= n; j++) {
+            f[j] = f[j - 1] + Math.log(j);
+        }
+
+        double baseP = getPValue(a, b, c, d, f);
+//         in order for a table under consideration to have its p-value included
+//         in the final result, it must have a p-value less than the baseP, i.e.
+//         Fisher's exact test computes the probability, given the observed marginal
+//         frequencies, of obtaining exactly the frequencies observed and any configuration more extreme.
+//         By "more extreme," we mean any configuration (given observed marginals) with a smaller probability of
+//         occurrence in the same direction (one-tailed) or in both directions (two-tailed).
+        
+        int initialA = a, initialB = b, initialC = c, initialD = d;
+        p += baseP;
+        
+        min = (c < b) ? c : b;
+        for (i = 0; i < min; i++) {
+            double tempP = getPValue(++a, --b, --c, ++d, f);
+            if (tempP <= baseP) {
+                p += tempP;
+            }
+        }
+
+        // reset the values to their original so we can repeat this process for the other side
+        a = initialA;
+        b = initialB;
+        c = initialC;
+        d = initialD;
+        
+        min = (a < d) ? a : d;
+        for (i = 0; i < min; i++) {
+            double pTemp = getPValue(--a, ++b, ++c, --d, f);
+            if (pTemp <= baseP) {
+                p += pTemp;
+            }
+        }
+        return p;
+    }
 }u}(j#  (7020d01ef0eaf51b229e44889e165bd1a5b7955bj!$  Sservice/src/test/java/org/cbioportal/service/util/AlterationEnrichmentUtilTest.javaj#$  modifiedj$  Kj$  Kj%$  Kj&$  https://github.com/cBioPortal/cbioportal/blob/fae6d16f09e538cde5d59d2adc274cafbbb419e2/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.javaj($  https://github.com/cBioPortal/cbioportal/raw/fae6d16f09e538cde5d59d2adc274cafbbb419e2/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.javaj*$  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.java?ref=fae6d16f09e538cde5d59d2adc274cafbbb419e2j,$  X  @@ -101,8 +101,8 @@ public void createAlterationEnrichments() throws Exception {
 
         // START: for 2 groups
 
-        Mockito.when(fisherExactTestCalculator.getCumulativePValue(1, 1, 2, 0)).thenReturn(1.0);
-        Mockito.when(fisherExactTestCalculator.getCumulativePValue(2, 0, 0, 2)).thenReturn(0.3);
+        Mockito.when(fisherExactTestCalculator.getTwoTailedPValue(1, 1, 2, 0)).thenReturn(1.0);
+        Mockito.when(fisherExactTestCalculator.getTwoTailedPValue(2, 0, 0, 2)).thenReturn(0.3);
 
         List<AlterationEnrichment> result = alterationEnrichmentUtil.createAlterationEnrichments(
                 mutationCountsbyEntrezGeneIdAndGroup);ueu(2aa31017f1bc83b95f850b6c106d834e4b3538e8}(sha(2aa31017f1bc83b95f850b6c106d834e4b3538e8node_idEC_kwDOAe-hB9oAKDJhYTMxMDE3ZjFiYzgzYjk1Zjg1MGI2YzEwNmQ4MzRlNGIzNTM4ZTgcommit}(author}(namehaynescdemailhaynescd@chop.edudate2023-07-10T17:37:26Zu	committer}(j$  haynescdj$  haynescd@chop.eduj$  2023-07-10T17:37:26Zumessage8Update mutated-genes api to use filtered samples from chtree}(jx$  (c50d0599d069643a93e95ead08b5959246cee818urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c50d0599d069643a93e95ead08b5959246cee818uj$  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/2aa31017f1bc83b95f850b6c106d834e4b3538e8
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj$  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2aa31017f1bc83b95f850b6c106d834e4b3538e8html_urlXhttps://github.com/cBioPortal/cbioportal/commit/2aa31017f1bc83b95f850b6c106d834e4b3538e8comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/2aa31017f1bc83b95f850b6c106d834e4b3538e8/commentsj~$  }(loginhaynescdidJ jz$  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5j$  %https://api.github.com/users/haynescdj$  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminuj$  }(j$  haynescdj$  J jz$  MDQ6VXNlcjMzNjA4OTIwj$  4https://avatars.githubusercontent.com/u/33608920?v=4j$  h5j$  %https://api.github.com/users/haynescdj$  https://github.com/haynescdj$  /https://api.github.com/users/haynescd/followersj$  <https://api.github.com/users/haynescd/following{/other_user}j$  5https://api.github.com/users/haynescd/gists{/gist_id}j$  <https://api.github.com/users/haynescd/starred{/owner}{/repo}j$  3https://api.github.com/users/haynescd/subscriptionsj$  *https://api.github.com/users/haynescd/orgsj$  +https://api.github.com/users/haynescd/reposj$  6https://api.github.com/users/haynescd/events{/privacy}j$  5https://api.github.com/users/haynescd/received_eventsj$  Userj$  uparents]}(jx$  (4fa24f18218de011474ba7b2786977e6c3c9f458j$  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4fa24f18218de011474ba7b2786977e6c3c9f458j$  Xhttps://github.com/cBioPortal/cbioportal/commit/4fa24f18218de011474ba7b2786977e6c3c9f458uastats}(totalK	additionsK	deletionsKufiles]}(jx$  (a7f9383a3f01bfb6a72cb04ac3011212ba97c69bfilenameTweb/src/main/java/org/cbioportal/web/columnstore/StudyViewColumnStoreController.javastatusmodifiedj$  Kj$  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/2aa31017f1bc83b95f850b6c106d834e4b3538e8/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/2aa31017f1bc83b95f850b6c106d834e4b3538e8/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.java?ref=2aa31017f1bc83b95f850b6c106d834e4b3538e8patchXV  @@ -4,9 +4,11 @@
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.AlterationFilter;
 import org.cbioportal.model.ClinicalDataCountItem;
 import org.cbioportal.model.Sample;
 import org.cbioportal.service.StudyViewService;
+import org.cbioportal.service.exception.StudyNotFoundException;
 import org.cbioportal.web.columnstore.util.NewStudyViewFilterUtil;
 import org.cbioportal.web.config.annotation.InternalApi;
 import org.cbioportal.webparam.ClinicalDataCountFilter;
@@ -73,9 +75,17 @@ public ResponseEntity<List<AlterationCountByGene>> fetchMutatedGenes(
         @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
         @ApiIgnore // 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
-    ) {
+    ) throws StudyNotFoundException {
+        AlterationFilter annotationFilters = interceptedStudyViewFilter.getAlterationFilter();
+        List<Sample> samples = studyViewService.getFilteredSamplesFromColumnstore(interceptedStudyViewFilter);
+        List<String> studyIds = new ArrayList<>();
+        List<String> sampleIds = new ArrayList<>();
+        for(Sample sample : samples) {
+            studyIds.add(sample.getCancerStudyIdentifier());
+            sampleIds.add(sample.getStableId());
+        }
         return new ResponseEntity<>(
-            studyViewService.getMutatedGenesFromColumnstore(interceptedStudyViewFilter),
+            studyViewService.getMutationAlterationCountByGenes(studyIds, sampleIds, annotationFilters),
             HttpStatus.OK
         );
     }uau(1acb7a1a32c4f851ce36201d6484d6755586ce35}(sha(1acb7a1a32c4f851ce36201d6484d6755586ce35node_idEC_kwDOAe-hB9oAKDFhY2I3YTFhMzJjNGY4NTFjZTM2MjAxZDY0ODRkNjc1NTU4NmNlMzUcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-08T22:02:16Zu	committer}(j$  GitHubj$  noreply@github.comj$  2023-08-08T22:02:16ZumessageRMerge pull request #10292 from cBioPortal/dippindots-patch-1

Update about us pagetree}(j$  (1a2cf2bb5a1dddff91979d26a6b5a5d034e12ee2urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/1a2cf2bb5a1dddff91979d26a6b5a5d034e12ee2uj%  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/1acb7a1a32c4f851ce36201d6484d6755586ce35
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk0rtoCRBK7hj4Ov3rIwAA3zIIADDpWXAqzxrUHtxHhREdsEXt
/vvRRebGp0DRqpDafl475AwAtHrCwW4zwZvScuXynFsBGiVLXfxel1W8UTwfEFzk
rbzdCeMixOA6AZ4od3DwUaH1dWIfkpC3RMfn8OUKQn1iXbnaCdLPXuPCGtJ2KUc3
Oc/hZj9B+9wbq4x+yhhN3qWPzPjOGVDHRPVDJm5uvpOBsKDdwzwcQnPbZ4VS+Uhb
kayL8OxIX26wZbQhFOeRXxSobgeNIApXfA8PWZvtG36iM16bJXG8A0lhbtiWTc8D
3YIzMQIKp7u5u2FOgL6t9LmJnpNiYRXYEyKG693TKYXnWTvejsaE19REoG5MK1c=
=alGA
-----END PGP SIGNATURE-----
payloadXk  tree 1a2cf2bb5a1dddff91979d26a6b5a5d034e12ee2
parent ca2bdff949965b3628bc5a96d379074d21546de6
parent 173cb579d47f8d69785473d32d7458e758b0f0a3
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1691532136 -0400
committer GitHub <noreply@github.com> 1691532136 -0400

Merge pull request #10292 from cBioPortal/dippindots-patch-1

Update about us pageuuj%  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1acb7a1a32c4f851ce36201d6484d6755586ce35html_urlXhttps://github.com/cBioPortal/cbioportal/commit/1acb7a1a32c4f851ce36201d6484d6755586ce35comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/1acb7a1a32c4f851ce36201d6484d6755586ce35/commentsj$  }(login
dippindotsidJtO j$  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j%  'https://api.github.com/users/dippindotsj%  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj$  }(j%  web-flowj%  J/j$  MDQ6VXNlcjE5ODY0NDQ3j%  4https://avatars.githubusercontent.com/u/19864447?v=4j%  h5j%  %https://api.github.com/users/web-flowj%  https://github.com/web-flowj!%  /https://api.github.com/users/web-flow/followersj#%  <https://api.github.com/users/web-flow/following{/other_user}j%%  5https://api.github.com/users/web-flow/gists{/gist_id}j'%  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j)%  3https://api.github.com/users/web-flow/subscriptionsj+%  *https://api.github.com/users/web-flow/orgsj-%  +https://api.github.com/users/web-flow/reposj/%  6https://api.github.com/users/web-flow/events{/privacy}j1%  5https://api.github.com/users/web-flow/received_eventsj3%  Userj5%  uparents](}(j$  (ca2bdff949965b3628bc5a96d379074d21546de6j%  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ca2bdff949965b3628bc5a96d379074d21546de6j%  Xhttps://github.com/cBioPortal/cbioportal/commit/ca2bdff949965b3628bc5a96d379074d21546de6u}(j$  (173cb579d47f8d69785473d32d7458e758b0f0a3j%  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/173cb579d47f8d69785473d32d7458e758b0f0a3j%  Xhttps://github.com/cBioPortal/cbioportal/commit/173cb579d47f8d69785473d32d7458e758b0f0a3uestats}(totalK	additionsK	deletionsKufiles]}(j$  (eb821670a42a3e0d37dbe90f7b61cee4379dbdc7filenamedocs/About-Us.mdstatusmodifiedjS%  KjT%  KchangesKblob_urlihttps://github.com/cBioPortal/cbioportal/blob/1acb7a1a32c4f851ce36201d6484d6755586ce35/docs%2FAbout-Us.md0      raw_urlhhttps://github.com/cBioPortal/cbioportal/raw/1acb7a1a32c4f851ce36201d6484d6755586ce35/docs%2FAbout-Us.mdcontents_url{https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FAbout-Us.md?ref=1acb7a1a32c4f851ce36201d6484d6755586ce35patchX  @@ -42,6 +42,7 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 ## Caris Life Sciences
 * Jianjiong Gao
 * Priti Kumari
+* Karthik Kalletla
 
 ## The Hyve
 * Oleguer Plantalech
@@ -82,7 +83,6 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 * Zachary Heins
 * Michael Heuer
 * Anders Jacobsen
-* Karthik Kalletla
 * Peter Kok
 * Erik Larsson
 * Dong Liuau(dccd592e35e54b891efb602fec8a0eb207a90ec7}(sha(dccd592e35e54b891efb602fec8a0eb207a90ec7node_idEC_kwDOAe-hB9oAKGRjY2Q1OTJlMzVlNTRiODkxZWZiNjAyZmVjOGEwZWIyMDdhOTBlYzccommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-07-18T16:24:54Zu	committer}(jp%  GitHubjr%  noreply@github.comjt%  2023-07-18T16:24:54ZumessageFrontend v5.3.14tree}(jh%  (ceffb8ed8234a19d8145e4fefe6260f02fc8802burlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/ceffb8ed8234a19d8145e4fefe6260f02fc8802buj%  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/dccd592e35e54b891efb602fec8a0eb207a90ec7
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJktrzWCRBK7hj4Ov3rIwAA/5MIAD9k/oXAw7L7BH+X/F8eUKFB
eniQlw0Sgf4A5ZqLUsDkC++MIVBtu+Ld0bcYXJjcbcFHJA6HyD40KrRmFlJaeBW3
jsPzu9ZN5PQ8A2zEAeuU4vTmRTZfKhgFwx8tnl6XxxxgEqwaZ+FEC/txoK8oMbK+
NByBRiTPPV99C/7iq0SATf504IbYUFlGS747xJJmuqEiCd+qSxpVR1kOQovHNtaO
LUtPs4T8j3FHzCGnsU9HjN/qFXU6wyg3/A13tah2lV6ZcF+OBQ/1YUj3xTRGGB04
kvOmnTlCycVHCHz3i1llY079Ow7aoT+1DgplpmeTmZZPzjZdqYm58NMUyh92JSo=
=0lAa
-----END PGP SIGNATURE-----
payloadtree ceffb8ed8234a19d8145e4fefe6260f02fc8802b
parent 9e90a2ab3e943f9840acbd6e607ca3912a45f210
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1689697494 -0400
committer GitHub <noreply@github.com> 1689697494 -0400

Frontend v5.3.14uuj%  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/dccd592e35e54b891efb602fec8a0eb207a90ec7html_urlXhttps://github.com/cBioPortal/cbioportal/commit/dccd592e35e54b891efb602fec8a0eb207a90ec7comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/dccd592e35e54b891efb602fec8a0eb207a90ec7/commentsjn%  }(login
dippindotsidJtO jj%  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j%  'https://api.github.com/users/dippindotsj%  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminujv%  }(j%  web-flowj%  J/jj%  MDQ6VXNlcjE5ODY0NDQ3j%  4https://avatars.githubusercontent.com/u/19864447?v=4j%  h5j%  %https://api.github.com/users/web-flowj%  https://github.com/web-flowj%  /https://api.github.com/users/web-flow/followersj%  <https://api.github.com/users/web-flow/following{/other_user}j%  5https://api.github.com/users/web-flow/gists{/gist_id}j%  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j%  3https://api.github.com/users/web-flow/subscriptionsj%  *https://api.github.com/users/web-flow/orgsj%  +https://api.github.com/users/web-flow/reposj%  6https://api.github.com/users/web-flow/events{/privacy}j%  5https://api.github.com/users/web-flow/received_eventsj%  Userj%  uparents]}(jh%  (9e90a2ab3e943f9840acbd6e607ca3912a45f210j%  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9e90a2ab3e943f9840acbd6e607ca3912a45f210j%  Xhttps://github.com/cBioPortal/cbioportal/commit/9e90a2ab3e943f9840acbd6e607ca3912a45f210uastats}(totalK	additionsK	deletionsKufiles]}(jh%  (7e4f1b32518ea8c65e2325854dd92b65564f558cfilenamepom.xmlstatusmodifiedj%  Kj%  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/dccd592e35e54b891efb602fec8a0eb207a90ec7/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/dccd592e35e54b891efb602fec8a0eb207a90ec7/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=dccd592e35e54b891efb602fec8a0eb207a90ec7patchXY  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.13</frontend.version>
+    <frontend.version>v5.3.14</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(d3a508c19ebf16f3698c7f7a9170cf4eb53873e4}(sha(d3a508c19ebf16f3698c7f7a9170cf4eb53873e4node_idEC_kwDOAe-hB9oAKGQzYTUwOGMxOWViZjE2ZjM2OThjN2Y3YTkxNzBjZjRlYjUzODczZTQcommit}(author}(namezhajiaemailzhajia@umich.edudate2023-04-05T18:37:01Zu	committer}(j%  Gaofei Zhaoj%  ,15748980+dippindots@users.noreply.github.comj%  2023-06-01T21:39:34ZumessageAdded in documentationtree}(j%  (0dcca366a45d853aafe0af924e8797b3dae92ed2urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/0dcca366a45d853aafe0af924e8797b3dae92ed2uj%  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/d3a508c19ebf16f3698c7f7a9170cf4eb53873e4
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj%  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d3a508c19ebf16f3698c7f7a9170cf4eb53873e4html_urlXhttps://github.com/cBioPortal/cbioportal/commit/d3a508c19ebf16f3698c7f7a9170cf4eb53873e4comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/d3a508c19ebf16f3698c7f7a9170cf4eb53873e4/commentsj%  Nj%  }(login
dippindotsidJtO j%  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j%  'https://api.github.com/users/dippindotsj&  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuparents]}(j%  (b5232201cd56c521e0e5aa86fdc2c3224236ac6ej%  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b5232201cd56c521e0e5aa86fdc2c3224236ac6ej&  Xhttps://github.com/cBioPortal/cbioportal/commit/b5232201cd56c521e0e5aa86fdc2c3224236ac6euastats}(totalK	additionsK	deletionsKufiles](}(j%  (ad4cd35d10f1cdc331d387334a182b5655c38597filenameIcore/src/main/java/org/mskcc/cbio/portal/servlet/CalcFisherExactTest.javastatusmodifiedj/&  Kj0&  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/d3a508c19ebf16f3698c7f7a9170cf4eb53873e4/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/d3a508c19ebf16f3698c7f7a9170cf4eb53873e4/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.java?ref=d3a508c19ebf16f3698c7f7a9170cf4eb53873e4patchX  @@ -90,6 +90,7 @@ protected void doPost(HttpServletRequest httpServletRequest,
                 int c = Integer.parseInt(dataSet.split(" ")[2]);
                 int d = Integer.parseInt(dataSet.split(" ")[3]);    
                 FisherExact fisher = new FisherExact(a + b + c + d);
+                // We generally use the two tailed Fisher's exact test for calculations
                 double pValue = fisher.getTwoTailedP(a, b, c, d);
                 result = result.concat(String.valueOf(pValue) + " ");                
             }u}(j%  (21a5b5018f5971792035ef7a27d97789378ae49aj5&  ?core/src/main/java/org/mskcc/cbio/portal/stats/FisherExact.javaj7&  modifiedj/&  Kj0&  Kj9&  Kj:&  https://github.com/cBioPortal/cbioportal/blob/d3a508c19ebf16f3698c7f7a9170cf4eb53873e4/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FFisherExact.javaj<&  https://github.com/cBioPortal/cbioportal/raw/d3a508c19ebf16f3698c7f7a9170cf4eb53873e4/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FFisherExact.javaj>&  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FFisherExact.java?ref=d3a508c19ebf16f3698c7f7a9170cf4eb53873e4j@&  X  @@ -235,7 +235,9 @@ public final double getLeftTailedP(int a, int b, int c, int d) {
      * @param b
      * @param c
      * @param d
-     * @return two-tailed P-value
+     * @return two-tailed P-value, 
+     * we generally prefer to use this value for research purposes
+     * consult with statisticians on if a new feature is going to use a one-sided Fisher's test value
      */
     public final double getTwoTailedP(int a, int b, int c, int d) {
         int min, i;ueu(732f24e0861891c1a446a2d0f5dc0ffa564c976f}(sha(732f24e0861891c1a446a2d0f5dc0ffa564c976fnode_idEC_kwDOAe-hB9oAKDczMmYyNGUwODYxODkxYzFhNDQ2YTJkMGY1ZGMwZmZhNTY0Yzk3NmYcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-16T16:54:41Zu	committer}(jT&  Djokovic0311jV&  .55948986+Djokovic0311@users.noreply.github.comjX&  2023-08-16T16:54:41Zumessagemodify importstree}(jL&  (ce0ed2176dd757f69b2ad194e1a0c3d0a444aeaeurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/ce0ed2176dd757f69b2ad194e1a0c3d0a444aeaeujd&  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/732f24e0861891c1a446a2d0f5dc0ffa564c976f
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujd&  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/732f24e0861891c1a446a2d0f5dc0ffa564c976fhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/732f24e0861891c1a446a2d0f5dc0ffa564c976fcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/732f24e0861891c1a446a2d0f5dc0ffa564c976f/commentsjR&  }(loginDjokovic0311idJUjN&  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5jd&  )https://api.github.com/users/Djokovic0311jp&  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminujZ&  }(ju&  Djokovic0311jw&  JUjN&  MDQ6VXNlcjU1OTQ4OTg2jy&  4https://avatars.githubusercontent.com/u/55948986?v=4j{&  h5jd&  )https://api.github.com/users/Djokovic0311jp&  https://github.com/Djokovic0311j~&  3https://api.github.com/users/Djokovic0311/followersj&  @https://api.github.com/users/Djokovic0311/following{/other_user}j&  9https://api.github.com/users/Djokovic0311/gists{/gist_id}j&  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}j&  7https://api.github.com/users/Djokovic0311/subscriptionsj&  .https://api.github.com/users/Djokovic0311/orgsj&  /https://api.github.com/users/Djokovic0311/reposj&  :https://api.github.com/users/Djokovic0311/events{/privacy}j&  9https://api.github.com/users/Djokovic0311/received_eventsj&  Userj&  uparents]}(jL&  (b1420144361284ea024062c5f0b35bd96e9b3038jd&  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b1420144361284ea024062c5f0b35bd96e9b3038jp&  Xhttps://github.com/cBioPortal/cbioportal/commit/b1420144361284ea024062c5f0b35bd96e9b3038uastats}(totalK	additionsK	deletionsKufiles]}(jL&  (79c4ace75a7d37995df135bdbf467389d08608adfilenameOservice/src/main/java/org/cbioportal/service/util/ExpressionEnrichmentUtil.javastatusmodifiedj&  Kj&  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/732f24e0861891c1a446a2d0f5dc0ffa564c976f/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FExpressionEnrichmentUtil.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/732f24e0861891c1a446a2d0f5dc0ffa564c976f/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FExpressionEnrichmentUtil.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FExpressionEnrichmentUtil.java?ref=732f24e0861891c1a446a2d0f5dc0ffa564c976fpatchX  @@ -1,21 +1,38 @@
 package org.cbioportal.service.util;
 
 import java.math.BigDecimal;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.List;
 import java.util.Map.Entry;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
 
-import io.swagger.models.auth.In;
+import org.cbioportal.model.EnrichmentType;
+import org.cbioportal.model.ExpressionEnrichment;
+import org.cbioportal.model.GenericAssayEnrichment;
+import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
+import org.cbioportal.model.GenericAssayMolecularAlteration;
+import org.cbioportal.model.GenomicEnrichment;
+import org.cbioportal.model.GroupStatistics;
+import org.cbioportal.model.GenericAssayCountSummary;
+import org.cbioportal.model.MolecularAlteration;
+import org.cbioportal.model.MolecularProfile;
+import org.cbioportal.model.MolecularProfileCaseIdentifier;
+import org.cbioportal.model.MolecularProfileSamples;
+import org.cbioportal.model.Sample;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.math.NumberUtils;
 import org.apache.commons.math3.stat.StatUtils;
 import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
 import org.apache.commons.math3.stat.inference.ChiSquareTest;
 import org.apache.commons.math3.stat.inference.OneWayAnova;
 import org.apache.commons.math3.stat.inference.TestUtils;
-import org.cbioportal.model.*;
 import org.cbioportal.persistence.MolecularDataRepository;
 import org.cbioportal.service.SampleService;
 import org.springframework.beans.factory.annotation.Autowired;uau(6bb14d78b1f951c4f6d6db29c068a5e8d049855d}(sha(6bb14d78b1f951c4f6d6db29c068a5e8d049855dnode_idEC_kwDOAe-hB9oAKDZiYjE0ZDc4YjFmOTUxYzRmNmQ2ZGIyOWMwNjhhNWU4ZDA0OTg1NWQcommit}(author}(name
Onur Sumeremails.onur.sumer@gmail.comdate2023-06-08T19:13:02Zu	committer}(j&  
Onur Sumerj&  s.onur.sumer@gmail.comj&  2023-06-08T19:13:02ZumessageOrevert study view controller original endpoints and rename clickhouse endpointstree}(j&  (4b37c3000868282b40c7dd49dcd66d13244757aeurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/4b37c3000868282b40c7dd49dcd66d13244757aeuj&  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/6bb14d78b1f951c4f6d6db29c068a5e8d049855d
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj&  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/6bb14d78b1f951c4f6d6db29c068a5e8d049855dhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/6bb14d78b1f951c4f6d6db29c068a5e8d049855dcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/6bb14d78b1f951c4f6d6db29c068a5e8d049855d/commentsj&  }(login	onursumeridJ6 j&  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5j&  &https://api.github.com/users/onursumerj&  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminuj&  }(j&  	onursumerj&  J6 j&  MDQ6VXNlcjM2MDQxOTg=j&  3https://avatars.githubusercontent.com/u/3604198?v=4j&  h5j&  &https://api.github.com/users/onursumerj&  https://github.com/onursumerj&  0https://api.github.com/users/onursumer/followersj&  =https://api.github.com/users/onursumer/following{/other_user}j&  6https://api.github.com/users/onursumer/gists{/gist_id}j&  =https://api.github.com/users/onursumer/starred{/owner}{/repo}j&  4https://api.github.com/users/onursumer/subscriptionsj&  +https://api.github.com/users/onursumer/orgsj&  ,https://api.github.com/users/onursumer/reposj'  7https://api.github.com/users/onursumer/events{/privacy}j'  6https://api.github.com/users/onursumer/received_eventsj'  Userj'  uparents]}(j&  (0bf78c91d2b9dab7f3c71f71ada3f0a159b9405fj&  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/0bf78c91d2b9dab7f3c71f71ada3f0a159b9405fj&  Xhttps://github.com/cBioPortal/cbioportal/commit/0bf78c91d2b9dab7f3c71f71ada3f0a159b9405fuastats}(totalK,	additionsK,	deletionsK ufiles]}(j&  (43ccd35dc6fed10857f3493f242a85773cfead5bfilename=web/src/main/java/org/cbioportal/web/StudyViewController.javastatusmodifiedj!'  K,j"'  K changesK,blob_urlhttps://github.com/cBioPortal/cbioportal/blob/6bb14d78b1f951c4f6d6db29c068a5e8d049855d/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/6bb14d78b1f951c4f6d6db29c068a5e8d049855d/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=6bb14d78b1f951c4f6d6db29c068a5e8d049855dpatchX  @@ -203,6 +203,23 @@ public ResponseEntity<List<AlterationCountByGene>> fetchMutatedGenes(
         @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
         @ApiIgnore // 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
+    ) throws StudyNotFoundException {
+        boolean singleStudyUnfiltered = studyViewFilterUtil.isSingleStudyUnfiltered(interceptedStudyViewFilter);
+        List<AlterationCountByGene> alterationCountByGenes = instance.cachedFetchMutatedGenes(interceptedStudyViewFilter, singleStudyUnfiltered);
+        return new ResponseEntity<>(alterationCountByGenes, HttpStatus.OK);
+    }
+    
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @RequestMapping(value = "/column-store/mutated-genes/fetch", method = RequestMethod.POST,
+        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch mutated genes by study view filter")
+    public ResponseEntity<List<AlterationCountByGene>> fetchMutatedGenesFromColumnStore(
+        @ApiParam(required = true, value = "Study view filter")
+        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiIgnore // 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<>(
             studyViewService.getMutatedGenesFromColumnstore(interceptedStudyViewFilter),
@@ -319,6 +336,33 @@ public ResponseEntity<List<Sample>> fetchFilteredSamples(
         @ApiParam(required = true, value = "Study view filter")
         @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter) {
 
+        List<String> studyIds = new ArrayList<>();
+        List<String> sampleIds = new ArrayList<>();
+
+        studyViewFilterUtil.extractStudyAndSampleIds(
+            studyViewFilterApplier.apply(interceptedStudyViewFilter, negateFilters), studyIds, sampleIds);
+
+        List<Sample> result = new ArrayList<>();
+        if (!sampleIds.isEmpty()) {
+            result = sampleService.fetchSamples(studyIds, sampleIds, Projection.ID.name());
+        }
+        return new ResponseEntity<>(result, HttpStatus.OK);
+    }
+
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @RequestMapping(value = "/column-store/filtered-samples/fetch", method = RequestMethod.POST,
+        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch sample IDs by study view filter")
+    public ResponseEntity<List<Sample>> fetchFilteredSamplesFromColumnStore(
+        @ApiParam("Whether to negate the study view filters")
+        @RequestParam(defaultValue = "false") Boolean negateFilters,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiIgnore // 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,
+        @ApiParam(required = true, value = "Study view filter")
+        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter) {
+
         return new ResponseEntity<>(
             studyViewService.getFilteredSamplesFromColumnstore(interceptedStudyViewFilter),
             HttpStatus.OKuau(f004fad033d4d7d55a0d7ec49fc91b9f147ee63e}(sha(f004fad033d4d7d55a0d7ec49fc91b9f147ee63enode_idEC_kwDOAe-hB9oAKGYwMDRmYWQwMzNkNGQ3ZDU1YTBkN2VjNDlmYzkxYjlmMTQ3ZWU2M2Ucommit}(author}(nameJJ Gaoemailjianjiong.gao@gmail.comdate2023-05-26T15:25:10Zu	committer}(j>'  GitHubj@'  noreply@github.comjB'  2023-05-26T15:25:10Zumessage*add statistical tests in FAQ

Fixed #10198tree}(j6'  (b3df8bc60b4d64a8610b16683c5f993be21fda2aurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/b3df8bc60b4d64a8610b16683c5f993be21fda2aujN'  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/f004fad033d4d7d55a0d7ec49fc91b9f147ee63e
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkcM9WCRBK7hj4Ov3rIwAAjOIIAHGtOXnZ+2OeTlSAOyd/oMyI
Q0peVayr4yhTaCA5y+TVYErxbh3aHTMO87HlF5J+plXG4Fojwrs2lxB+h6YQATdv
MO0W44HmILnGFyCaxIKKyLW4BlTpCSpMcAWFrCydTsajCmtOoeGU4xzPqw09yJ2S
n2ZgV0L/akR8ZCedrUx3o3p2nADpwbUsIZr+bXe5nJu3oFGSJjhk83iNuS+SEnlK
yMlc8qeHOqfmk5nQu1oKfyqBt/1/QZmLE71J6dALbfwnr7NkYbeqzlV68yiQhR41
IcR5O6iLEfsOEb4PZj/AaMjltty2mFhf4dttK6cgT0KeEy186yS5Dgc0avgxGHE=
=ug6q
-----END PGP SIGNATURE-----
payloadtree b3df8bc60b4d64a8610b16683c5f993be21fda2a
parent d0b7a1df2962cfc6d762dff57daca0bcdc4684ce
author JJ Gao <jianjiong.gao@gmail.com> 1685114710 -0400
committer GitHub <noreply@github.com> 1685114710 -0400

add statistical tests in FAQ

Fixed #10198uujN'  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/f004fad033d4d7d55a0d7ec49fc91b9f147ee63ehtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/f004fad033d4d7d55a0d7ec49fc91b9f147ee63ecomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/f004fad033d4d7d55a0d7ec49fc91b9f147ee63e/commentsj<'  }(loginjjgaoidJ j8'  MDQ6VXNlcjg0MDg5NQ==
avatar_url2https://avatars.githubusercontent.com/u/840895?v=4gravatar_idh5jN'  "https://api.github.com/users/jjgaoj\'  https://github.com/jjgao
followers_url,https://api.github.com/users/jjgao/followers
following_url9https://api.github.com/users/jjgao/following{/other_user}	gists_url2https://api.github.com/users/jjgao/gists{/gist_id}starred_url9https://api.github.com/users/jjgao/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/jjgao/subscriptionsorganizations_url'https://api.github.com/users/jjgao/orgs	repos_url(https://api.github.com/users/jjgao/repos
events_url3https://api.github.com/users/jjgao/events{/privacy}received_events_url2https://api.github.com/users/jjgao/received_eventstypeUser
site_adminujD'  }(ja'  web-flowjc'  J/j8'  MDQ6VXNlcjE5ODY0NDQ3je'  4https://avatars.githubusercontent.com/u/19864447?v=4jg'  h5jN'  %https://api.github.com/users/web-flowj\'  https://github.com/web-flowjj'  /https://api.github.com/users/web-flow/followersjl'  <https://api.github.com/users/web-flow/following{/other_user}jn'  5https://api.github.com/users/web-flow/gists{/gist_id}jp'  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jr'  3https://api.github.com/users/web-flow/subscriptionsjt'  *https://api.github.com/users/web-flow/orgsjv'  +https://api.github.com/users/web-flow/reposjx'  6https://api.github.com/users/web-flow/events{/privacy}jz'  5https://api.github.com/users/web-flow/received_eventsj|'  Userj~'  uparents]}(j6'  (d0b7a1df2962cfc6d762dff57daca0bcdc4684cejN'  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d0b7a1df2962cfc6d762dff57daca0bcdc4684cej\'  Xhttps://github.com/cBioPortal/cbioportal/commit/d0b7a1df2962cfc6d762dff57daca0bcdc4684ceuastats}(totalK	additionsK
	deletionsKufiles]}(j6'  (1e554373167d152b400793ba1284cee3723885e7filenamedocs/user-guide/faq.mdstatusmodifiedj'  K
j'  KchangesKblob_urlqhttps://github.com/cBioPortal/cbioportal/blob/f004fad033d4d7d55a0d7ec49fc91b9f147ee63e/docs%2Fuser-guide%2Ffaq.mdraw_urlphttps://github.com/cBioPortal/cbioportal/raw/f004fad033d4d7d55a0d7ec49fc91b9f147ee63e/docs%2Fuser-guide%2Ffaq.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fuser-guide%2Ffaq.md?ref=f004fad033d4d7d55a0d7ec49fc91b9f147ee63epatchX  @@ -20,6 +20,7 @@
     * [What is a Virtual Study?](/user-guide/faq.md#what-is-a-virtual-study)
     * [Is it necessary to log in to use virtual studies? If I do log in, what additional functionality do I gain?](/user-guide/faq.md#is-it-necessary-to-log-in-to-use-virtual-studies-if-i-do-log-in-what-additional-functionality-do-i-gain)
     * [What is Group Comparison?](/user-guide/faq.md#what-is-group-comparison)
+    * [What are the statistical significance tests in Group Comparison?](/user-guide/faq.md#what-are-the-statistical-significance-tests-in-group-comparison)
 * [Data Questions](/user-guide/faq.md#data-questions)
     * [General Data](/user-guide/faq.md#general-data)
         * [Does the portal contain cancer study X?](/user-guide/faq.md#does-the-portal-contain-cancer-study-x)
@@ -137,7 +138,18 @@ No. A user that has not logged in can create virtual studies and run queries in
 If you log in, you gain the ability to save your virtual study to the list of existing studies on the homepage. This makes a virtual study functionally the same as any other study: you can access your virtual studies in the query builder and you can combine an existing virtual study with any other study to create a new virtual study.
 #### What is Group Comparison?
 Group Comparison is a suite of analysis features which allows a user to compare clinical or genomic features of user-defined groups of samples. These groups can be defined based on any clinical or genomic features. For an overview, see [our tutorial on group comparison](https://www.cbioportal.org/tutorials).
-
+#### What are the statistical significance tests in Group Comparison?
+- Survival tab: Log-rank test
+- Clinical tab:
+    - Continuous data: Chi-squared test
+    - Categorical data: Kruskal Wallis test
+- Other tabs
+    - 2 groups
+        - Continuous data: one-sided t-test
+        - Categorical data: one-sided Fisher's exact test
+    - 3 or more groups
+        - Continuous data: one-way ANOVA
+        - Categorical data: Chi-squared test
 
 ## Data Questions
 ### General Datauau(b870456d016f434ae7295826f93f14ea557068d6}(sha(b870456d016f434ae7295826f93f14ea557068d6node_idEC_kwDOAe-hB9oAKGI4NzA0NTZkMDE2ZjQzNGFlNzI5NTgyNmY5M2YxNGVhNTU3MDY4ZDYcommit}(author}(nameRuslan Forostianovemailruslan@forostianov.comdate2023-06-21T20:31:58Zu	committer}(j'  Ruslan Forostianovj'  ruslan@forostianov.comj'  2023-06-21T20:31:58ZumessageX/  Improve keycloak configuration docs

- document url to download IDP SSO descriptor xml file.
- add complete logback xml file example to turn on DEBUG level
- document how to bind mount the logback xml file to docker container
- document what role name stands for when filter_groups_by_appname=false/truetree}(j'  (0020788ece9d501a184e595983c9fa80135a8758urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/0020788ece9d501a184e595983c9fa80135a8758uj'  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/b870456d016f434ae7295826f93f14ea557068d6
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj'  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b870456d016f434ae7295826f93f14ea557068d6html_urlXhttps://github.com/cBioPortal/cbioportal/commit/b870456d016f434ae7295826f93f14ea557068d6comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/b870456d016f434ae7295826f93f14ea557068d6/commentsj'  }(loginruslan-forostianovidJ
+j'  U_kgDOBiscDQ
avatar_url5https://avatars.githubusercontent.com/u/103488525?v=4gravatar_idh5j'  /https://api.github.com/users/ruslan-forostianovj'  %https://github.com/ruslan-forostianov
followers_url9https://api.github.com/users/ruslan-forostianov/followers
following_urlFhttps://api.github.com/users/ruslan-forostianov/following{/other_user}	gists_url?https://api.github.com/users/ruslan-forostianov/gists{/gist_id}starred_urlFhttps://api.github.com/users/ruslan-forostianov/starred{/owner}{/repo}subscriptions_url=https://api.github.com/users/ruslan-forostianov/subscriptionsorganizations_url4https://api.github.com/users/ruslan-forostianov/orgs	repos_url5https://api.github.com/users/ruslan-forostianov/repos
events_url@https://api.github.com/users/ruslan-forostianov/events{/privacy}received_events_url?https://api.github.com/users/ruslan-forostianov/received_eventstypeUser
site_adminuj'  }(j'  ruslan-forostianovj'  J
+j'  U_kgDOBiscDQj'  5https://avatars.githubusercontent.com/u/103488525?v=4j'  h5j'  /https://api.github.com/users/ruslan-forostianovj'  %https://github.com/ruslan-forostianovj'  9https://api.github.com/users/ruslan-forostianov/followersj'  Fhttps://api.github.com/users/ruslan-forostianov/following{/other_user}j'  ?https://api.github.com/users/ruslan-forostianov/gists{/gist_id}j'  Fhttps://api.github.com/users/ruslan-forostianov/starred{/owner}{/repo}j'  =https://api.github.com/users/ruslan-forostianov/subscriptionsj'  4https://api.github.com/users/ruslan-forostianov/orgsj'  5https://api.github.com/users/ruslan-forostianov/reposj'  @https://api.github.com/users/ruslan-forostianov/events{/privacy}j'  ?https://api.github.com/users/ruslan-forostianov/received_eventsj'  Userj'  uparents]}(j'  (f7189e4f180a9c1a5eb385a1f0a8ee9d648d0065j'  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/f7189e4f180a9c1a5eb385a1f0a8ee9d648d0065j'  Xhttps://github.com/cBioPortal/cbioportal/commit/f7189e4f180a9c1a5eb385a1f0a8ee9d648d0065uastats}(totalKL	additionsK9	deletionsKufiles](}(j'  (a346833f4889b53c02f99b7007d717486e8c8cb4filenameedocs/deployment/authorization-and-authentication/Authenticating-and-Authorizing-Users-via-keycloak.mdstatusmodifiedj
(  Kj(  KchangesK/blob_urlhttps://github.com/cBioPortal/cbioportal/blob/b870456d016f434ae7295826f93f14ea557068d6/docs%2Fdeployment%2Fauthorization-and-authentication%2FAuthenticating-and-Authorizing-Users-via-keycloak.mdraw_urlhttps://github.com/cBioPortal/cbioportal/raw/b870456d016f434ae7295826f93f14ea557068d6/docs%2Fdeployment%2Fauthorization-and-authentication%2FAuthenticating-and-Authorizing-Users-via-keycloak.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fauthorization-and-authentication%2FAuthenticating-and-Authorizing-Users-via-keycloak.md?ref=b870456d016f434ae7295826f93f14ea557068d6patchX  @@ -69,11 +69,33 @@ particular cBioPortal instance are listed in assertions sent to the
 instance, and not any other roles tracked in Keycloak.
 
 ### Export configuration for cBioPortal
+
+There are two known ways to download the keycloak configuration (aka IDP SSO Descriptor) file for cBioPortal.
+
+#### I. Download via link
+
+The file can be fetched by the following url:
+
+```
+http(s)://{KEYCLOAK-URL}/auth/realms/{REALM-NAME}/protocol/saml/descriptor
+```
+
+For example:
+
+```
+curl -o client-tailored-saml-idp-metadata.xml "http://localhost:8081/auth/realms/cbioportal/protocol/saml/descriptor"
+```
+
+**Note:** if you use https protocol with self-signed protocol you need to add `--insecure` option to the above curl command.
+
+#### II. Export via GUI (legacy)
 1. Next, navigate to the **Installation** tab for the same client.
 2. Select _SAML Metadata IDPSSODescriptor_ as the Format Option and click the **Download** button.
-4. Move the downloaded XML file to `portal/src/main/resources/` if you're compiling cBioPortal yourself or if you're using the Docker container, mount the file in the `/cbioportal-webapp` folder with `-v /path/to/client-tailored-saml-idp-metadata.xml:/cbioportal-webapp/WEB-INF/classes/client-tailored-saml-idp-metadata.xml`.
+**Note:** This GUI option removed from the newer versions of keycloak.
 ![](/images/previews/download-IDPSSODescriptor-file.png)
 
+After you've downloaded the XML file with one of the above ways, move it to `portal/src/main/resources/` if you're compiling cBioPortal yourself or if you're using the Docker container, mount the file in the `/cbioportal-webapp` folder with `-v /path/to/client-tailored-saml-idp-metadata.xml:/cbioportal-webapp/WEB-INF/classes/client-tailored-saml-idp-metadata.xml`.
+
 ## Create a signing key for cBioPortal
 
 Use the Java '`keytool`' command to generate keystore, as described
@@ -208,6 +230,8 @@ for the role and hit the **Save** button.
 
 ![](/images/previews/add-role-for-study.png)
 
+**Note:** if `filter_groups_by_appname` is set to `false` as specified above, the `Role Name` has to match with an id of the study you would give access to by assigning this role. Otherwise, if `filter_groups_by_appname` is set to `true` (**DEFAULT**), you have to add the application name (`app.name`) followed by the colon as a prefix to the study id. e.g. `cbioportal:brca_tcga_pub`
+
 #### Groups
 
 Keycloak allows you to create Groups for easy mapping of multiple
@@ -347,27 +371,12 @@ More information on configuration of the cBioPortal backend can be found in [Aut
 #### Logging
 
 Getting this to work requires many steps, and can be a bit tricky.  If you get stuck or get an obscure error message, your best bet is to turn on all DEBUG logging.
-This can be done via `src/main/resources/logback.xml`.  For example:
-
-```
-<root level="debug">
-    <appender-ref ref="STDOUT" />
-    <appender-ref ref="FILE" />
-</root>
-
-<logger name="org.mskcc" level="debug">
-    <appender-ref ref="STDOUT" />
-    <appender-ref ref="FILE" />
-</logger>
-
-<logger name="org.cbioportal.security" level="debug">
-    <appender-ref ref="STDOUT" />
-    <appender-ref ref="FILE" />
-</logger>
-```
+This can be done via `src/main/resources/logback.xml`. See [logback.DEBUG.EXAMPLE.xml](./logback.DEBUG.EXAMPLE.xml) file for an example of how to configure debug levels for cbioportal.
 
 Then, rebuild the WAR, redeploy, and try to authenticate again.  Your log file will then include hundreds of SAML-specific messages, even the full XML of each SAML message, and this should help you debug the error.
 
+if you're using the Docker container, mount the file instead with `-v ./logback.xml:/cbioportal-webapp/WEB-INF/classes/logback.xml`.
+
 #### Determining jwtRolesPath for OAuth2 Token
 By default user-roles are extracted from path `resource_access::cbioportal::roles` in the JWT json. Changes to the configuration of roles at the realm and client level in Keycloak instance can alter this path and must be set acordingly with the `dat.oauth2.jwtRolesPath` property in the `portal.properties` file. 
 u}(j'  (c4faf8c54129e67c6446944e39a0b9b5eb7eac3ej(  Jdocs/deployment/authorization-and-authentication/logback.DEBUG.EXAMPLE.xmlj(  addedj
(  Kj(  K j(  Kj(  https://github.com/cBioPortal/cbioportal/blob/b870456d016f434ae7295826f93f14ea557068d6/docs%2Fdeployment%2Fauthorization-and-authentication%2Flogback.DEBUG.EXAMPLE.xmlj(  https://github.com/cBioPortal/cbioportal/raw/b870456d016f434ae7295826f93f14ea557068d6/docs%2Fdeployment%2Fauthorization-and-authentication%2Flogback.DEBUG.EXAMPLE.xmlj(  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fauthorization-and-authentication%2Flogback.DEBUG.EXAMPLE.xml?ref=b870456d016f434ae7295826f93f14ea557068d6j(  X  @@ -0,0 +1,29 @@
+<configuration>
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+        <file>/tmp/cbioportal.log</file>
+        <encoder>
+            <pattern>%date %level [%thread] %logger{10} [%file:%line] %msg%n</pattern>
+        </encoder>
+    </appender>
+
+    <root level="debug">
+        <appender-ref ref="STDOUT" />
+        <appender-ref ref="FILE" />
+    </root>
+
+    <logger name="org.mskcc" level="debug">
+        <appender-ref ref="STDOUT" />
+        <appender-ref ref="FILE" />
+    </logger>
+
+    <logger name="org.cbioportal.security" level="debug">
+        <appender-ref ref="STDOUT" />
+        <appender-ref ref="FILE" />
+    </logger>
+</configuration>ueu(952d17cc7286c728df3b3844923d354716bab454}(sha(952d17cc7286c728df3b3844923d354716bab454node_idEC_kwDOAe-hB9oAKDk1MmQxN2NjNzI4NmM3MjhkZjNiMzg0NDkyM2QzNTQ3MTZiYWI0NTQcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-10T04:38:31Zu	committer}(j2(  GitHubj4(  noreply@github.comj6(  2023-08-10T04:38:31ZumessageUpdate texttree}(j*(  (236d69762e24c4a65dd7eb05a62111a33ac6bf69urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/236d69762e24c4a65dd7eb05a62111a33ac6bf69ujB(  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/952d17cc7286c728df3b3844923d354716bab454
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk1GnHCRBK7hj4Ov3rIwAANLwIAAhdRxVhRMXOt4OVQ4ieKu99
oO8yBeGEkZqZXUXXZPQMSR3gfpXwK8eVCCL8x8VlfUUEV0aMUDXlAaZdYJfyzi/d
TArObL4WJ9KWHL7qDB8D2875+GDtbyibdu2v0yryYzgf/vLynTLtnayk3nIehUoT
69z6LCbFwoJRRl2MTUhx6LqDbpZlw875MZvIAjxEhz+7bzL3VDNi+c51F1ZDKE7R
diQ6D+i2HdXCCwwzLxJlc/Ed5/cCFpsEx+VynvGdsIemWPG5GZvXAdnM4/PjF+vt
m+5FkB3jAHT4TlnUm5cNJOb89uHfmwYMT1xcBMYziYu5/SF40PSu/y8qyfmzNeg=
=v0vP
-----END PGP SIGNATURE-----
payloadtree 236d69762e24c4a65dd7eb05a62111a33ac6bf69
parent b408e9cf6343ee0a4b0c1bf95ff401fd0b2d0ecd
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1691642311 -0400
committer GitHub <noreply@github.com> 1691642311 -0400

Update textuujB(  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/952d17cc7286c728df3b3844923d354716bab454html_urlXhttps://github.com/cBioPortal/cbioportal/commit/952d17cc7286c728df3b3844923d354716bab454comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/952d17cc7286c728df3b3844923d354716bab454/commentsj0(  }(login
dippindotsidJtO j,(  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5jB(  'https://api.github.com/users/dippindotsjP(  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj8(  }(jU(  web-flowjW(  J/j,(  MDQ6VXNlcjE5ODY0NDQ3jY(  4https://avatars.githubusercontent.com/u/19864447?v=4j[(  h5jB(  %https://api.github.com/users/web-flowjP(  https://github.com/web-flowj^(  /https://api.github.com/users/web-flow/followersj`(  <https://api.github.com/users/web-flow/following{/other_user}jb(  5https://api.github.com/users/web-flow/gists{/gist_id}jd(  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jf(  3https://api.github.com/users/web-flow/subscriptionsjh(  *https://api.github.com/users/web-flow/orgsjj(  +https://api.github.com/users/web-flow/reposjl(  6https://api.github.com/users/web-flow/events{/privacy}jn(  5https://api.github.com/users/web-flow/received_eventsjp(  Userjr(  uparents]}(j*(  (b408e9cf6343ee0a4b0c1bf95ff401fd0b2d0ecdjB(  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b408e9cf6343ee0a4b0c1bf95ff401fd0b2d0ecdjP(  Xhttps://github.com/cBioPortal/cbioportal/commit/b408e9cf6343ee0a4b0c1bf95ff401fd0b2d0ecduastats}(totalK	additionsK	deletionsKufiles]}(j*(  (5eca5c5988b006a97d11dcb98c8c0462d401182bfilename<docs/deployment/customization/portal.properties-Reference.mdstatusmodifiedj(  Kj(  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/952d17cc7286c728df3b3844923d354716bab454/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdraw_urlhttps://github.com/cBioPortal/cbioportal/raw/952d17cc7286c728df3b3844923d354716bab454/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.md?ref=952d17cc7286c728df3b3844923d354716bab454patchX  @@ -154,7 +154,7 @@ skin.patientview.filter_genes_profiled_all_samples=
 ```
 
 ### Control default settings of the VAF line chart in the genomic evolution tab of patient view
-If you want to enablelog scale and sequential mode by default, set this property to `true`:
+If you want to enable log scale and sequential mode by default, set this property to `true`:
 ```
 vaf.log_scale.default=true|false
 vaf.sequential_mode.default=true|falseuau(bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78}(sha(bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78node_idEC_kwDOAe-hB9oAKGJiOWE0OGZmZWQ0NjQ0Y2U1ZmY1YjRjNDllZTRmZjhhZDM4MTFmNzgcommit}(author}(nameKarthikemailkalletlakarthik@gmail.comdate2023-08-07T18:21:27Zu	committer}(j(  Karthikj(  kalletlakarthik@gmail.comj(  2023-08-07T20:04:44Zumessage.Add data access token user role filter featuretree}(j(  (e2ce5e67b101abfd151737fd6c4b67c63566b45durlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/e2ce5e67b101abfd151737fd6c4b67c63566b45duj(  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj(  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78html_urlXhttps://github.com/cBioPortal/cbioportal/commit/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78/commentsj(  }(login	kalletlakidJƴ j(  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5j(  &https://api.github.com/users/kalletlakj(  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminuj(  }(j(  	kalletlakj(  Jƴ j(  MDQ6VXNlcjEyOTU2ODcwj(  4https://avatars.githubusercontent.com/u/12956870?v=4j(  h5j(  &https://api.github.com/users/kalletlakj(  https://github.com/kalletlakj(  0https://api.github.com/users/kalletlak/followersj(  =https://api.github.com/users/kalletlak/following{/other_user}j(  6https://api.github.com/users/kalletlak/gists{/gist_id}j(  =https://api.github.com/users/kalletlak/starred{/owner}{/repo}j(  4https://api.github.com/users/kalletlak/subscriptionsj(  +https://api.github.com/users/kalletlak/orgsj(  ,https://api.github.com/users/kalletlak/reposj(  7https://api.github.com/users/kalletlak/events{/privacy}j(  6https://api.github.com/users/kalletlak/received_eventsj(  Userj(  uparents]}(j(  (d035bb17653da699592fd650682c3ef35db16fccj(  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d035bb17653da699592fd650682c3ef35db16fccj(  Xhttps://github.com/cBioPortal/cbioportal/commit/d035bb17653da699592fd650682c3ef35db16fccuastats}(totalKU	additionsKS	deletionsKufiles](}(j(  (5ad1ddb54e8cd10305f110a74e5ef4c08da1b231filenameCcore/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.javastatusmodifiedj)  Kj)  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.java?ref=bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78patchX  @@ -368,6 +368,12 @@ public static String parseUrl(String url)
     @Value("${download_group:}") // default is empty string
     public void setDownloadGroup(String property) { downloadGroup = property; }
 
+    public static final String DEFAULT_DAT_METHOD = "none";
+    
+    private static String tokenAccessUserRole;
+    @Value("${dat.filter_user_role:}") // default is empty string
+    public void setTokenAccessUserRole(String property) { tokenAccessUserRole = property; }
+    
     private static Logger LOG = LoggerFactory.getLogger(GlobalProperties.class);
     private static ConfigPropertyResolver portalProperties = new ConfigPropertyResolver();
     private static Properties mavenProperties = initializeProperties(MAVEN_PROPERTIES_FILE_NAME);
@@ -1296,4 +1302,16 @@ public static String getDownloadControl() {
             }
         }
     }
+
+    public static String getDataAccessTokenMethod() {
+        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+        String dataAccessTokenMethod = getProperty("dat.method");
+        
+        if (authentication != null &&
+            StringUtils.isNotEmpty(tokenAccessUserRole)) {
+            return authentication.getAuthorities().contains(new SimpleGrantedAuthority(tokenAccessUserRole)) ? dataAccessTokenMethod : DEFAULT_DAT_METHOD;
+        } else {
+            return dataAccessTokenMethod;
+        }
+    }
 }u}(j(  (8925135b62501db83c02d0517598245c8b9f3473j)  Sdocs/deployment/authorization-and-authentication/Authenticating-Users-via-Tokens.mdj	)  modifiedj)  Kj)  K j)  Kj)  https://github.com/cBioPortal/cbioportal/blob/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78/docs%2Fdeployment%2Fauthorization-and-authentication%2FAuthenticating-Users-via-Tokens.mdj)  https://github.com/cBioPortal/cbioportal/raw/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78/docs%2Fdeployment%2Fauthorization-and-authentication%2FAuthenticating-Users-via-Tokens.mdj)  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fauthorization-and-authentication%2FAuthenticating-Users-via-Tokens.md?ref=bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78j)  X{  @@ -45,6 +45,12 @@ The following properties must be present in portal.properties in order to allow
 * **Permissible Values**: jwt, uuid, oauth2, none
 * **Default Value**: none
 
+**Property**: dat.filter\_user\_role (optional)
+
+* **Description**: This property determines users access in token generation. If present, this role will be checked in user roles before generating a token.
+* **Permissible Values**: A string value.
+* **Default Value**: none
+
 **Property**: dat.unauth\_users (optional, not used for dat.method = oauth2)
 
 * **Description**: A list of users that should not be allowed to download a data access token.u}(j(  (a34b50522bca8990d7e22e0d3d2c87f4e8f1c7a6j)  )portal/src/main/webapp/config_service.jspj	)  modifiedj)  Kj)  Kj)  Kj)  https://github.com/cBioPortal/cbioportal/blob/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj)  https://github.com/cBioPortal/cbioportal/raw/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj)  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78j)  X_  @@ -31,7 +31,6 @@
         String[] propNameArray = {
             "app.version",
             "app.name",
-            "dat.method",
             "oncoprint.custom_driver_annotation.binary.menu_label",
             "disabled_tabs",
             "civic.url",
@@ -204,6 +203,8 @@
         obj.put("sessionServiceEnabled", !StringUtils.isEmpty(GlobalProperties.getSessionServiceUrl()));
 
         obj.put("skin_hide_download_controls", GlobalProperties.getDownloadControl());
+        
+        obj.put("dat_method", GlobalProperties.getDataAccessTokenMethod());
 
         out.println(obj.toJSONString());
 u}(j(  (78b02eb08ac99fb1e2186eacbac4e2afe355e241j)  ,src/main/resources/portal.properties.EXAMPLEj	)  modifiedj)  Kj)  K j)  Kj)  https://github.com/cBioPortal/cbioportal/blob/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj)  https://github.com/cBioPortal/cbioportal/raw/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj)  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78j)  @@ -171,6 +171,7 @@ dat.method=none
 dat.ttl_seconds=2592000
 dat.uuid.max_number_per_user=1
 dat.jwt.secret_key=
+dat.filter_user_role=
 
 # OAuth2 token data access settings
 #dat.oauth2.clientId=<client-id>u}(j(  (06ddc00f27ea6953d884de6b76256699baec9c38j)  Cweb/src/main/java/org/cbioportal/web/DataAccessTokenController.javaj	)  modifiedj)  K
j)  Kj)  Kj)  https://github.com/cBioPortal/cbioportal/blob/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenController.javaj)  https://github.com/cBioPortal/cbioportal/raw/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenController.javaj)  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenController.java?ref=bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78j)  X"  @@ -20,7 +20,7 @@
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
-import io.swagger.models.HttpMethod;
+import org.apache.commons.lang3.StringUtils;
 import org.cbioportal.model.DataAccessToken;
 import org.cbioportal.service.DataAccessTokenService;
 import org.cbioportal.service.exception.DataAccessTokenNoUserIdentityException;
@@ -32,6 +32,7 @@
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.client.HttpClientErrorException;
@@ -54,6 +55,10 @@ public class DataAccessTokenController {
     @Value("${dat.unauth_users:anonymousUser}")
     private String[] USERS_WHO_CANNOT_USE_TOKENS;
 
+    private static String userRoleToAccessToken;
+    @Value("${download_group:}") // default is empty string
+    public void setUserRoleToAccessToken(String property) { userRoleToAccessToken = property; }
+
     @Autowired
     private DataAccessTokenService tokenService;
     private Set<String> usersWhoCannotUseTokenSet;
@@ -130,6 +135,10 @@ private String getAuthenticatedUser(Authentication authentication) {
         if (usersWhoCannotUseTokenSet.contains(username)) {
             throw new DataAccessTokenProhibitedUserException();
         }
+        if(StringUtils.isNotEmpty(userRoleToAccessToken) &&
+            !authentication.getAuthorities().contains(new SimpleGrantedAuthority(userRoleToAccessToken))) {
+            throw new DataAccessTokenProhibitedUserException();
+        }
         return username;
     }
 }u}(j(  (1b98a12abbc09460ae98599d036c7caab0612b09j)  Iweb/src/main/java/org/cbioportal/web/OAuth2DataAccessTokenController.javaj	)  modifiedj)  Kj)  K j)  Kj)  https://github.com/cBioPortal/cbioportal/blob/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FOAuth2DataAccessTokenController.javaj)  https://github.com/cBioPortal/cbioportal/raw/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FOAuth2DataAccessTokenController.javaj)  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FOAuth2DataAccessTokenController.java?ref=bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78j)  X	  @@ -35,8 +35,10 @@
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
+import org.apache.commons.lang3.StringUtils;
 import org.cbioportal.model.DataAccessToken;
 import org.cbioportal.service.DataAccessTokenService;
+import org.cbioportal.service.exception.DataAccessTokenNoUserIdentityException;
 import org.cbioportal.service.exception.DataAccessTokenProhibitedUserException;
 import org.cbioportal.web.config.annotation.InternalApi;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -46,6 +48,7 @@
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.client.HttpClientErrorException;
@@ -76,6 +79,9 @@ public class OAuth2DataAccessTokenController {
     @Value("${dat.oauth2.clientId}")
     private String clientId;
 
+    @Value("${dat.filter_user_role:}") // default is empty string
+    private String userRoleToAccessToken;
+
     @Autowired
     private DataAccessTokenService tokenService;
     private String authorizationUrl;
@@ -98,6 +104,8 @@ public void postConstruct() throws UnsupportedEncodingException {
     public ResponseEntity<String> downloadDataAccessToken(Authentication authentication,
         HttpServletRequest request, HttpServletResponse response) throws IOException {
 
+        isUserAuthorizedToAccess(authentication);
+
         // redirect to authentication endpoint
         HttpHeaders headers = new HttpHeaders();
         headers.add("Location", authorizationUrl);
@@ -156,4 +164,15 @@ public void revokeDataAccessToken(@ApiParam(required = true, value = "token") @P
         throw new UnsupportedOperationException("this endpoint is does not apply to OAuth2 data access token method.");
     }
 
+    private void isUserAuthorizedToAccess(Authentication authentication) {
+        if (authentication == null || !authentication.isAuthenticated()) {
+            throw new DataAccessTokenNoUserIdentityException();
+        }
+
+        if(StringUtils.isNotEmpty(userRoleToAccessToken) &&
+            !authentication.getAuthorities().contains(new SimpleGrantedAuthority(userRoleToAccessToken))) {
+            throw new DataAccessTokenProhibitedUserException();
+        }
+    }
+
 }u}(j(  (03aaa17d1fcb335c55827adb82b3d77f75e7503cj)  Gweb/src/test/java/org/cbioportal/web/DataAccessTokenControllerTest.javaj	)  modifiedj)  Kj)  K j)  Kj)  https://github.com/cBioPortal/cbioportal/blob/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenControllerTest.javaj)  https://github.com/cBioPortal/cbioportal/raw/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenControllerTest.javaj)  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenControllerTest.java?ref=bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78j)  X  @@ -37,6 +37,7 @@
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 import org.springframework.test.context.web.WebAppConfiguration;
+import org.springframework.test.util.ReflectionTestUtils;
 import org.springframework.test.web.servlet.MockMvc;
 import org.springframework.test.web.servlet.MvcResult;
 import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
@@ -190,6 +191,32 @@ public void createTokenValidUserTest() throws Exception {
             .andReturn();
     }
 
+    @Test
+    public void createTokenValidUserTestWithUserRole() throws Exception {
+        ReflectionTestUtils.setField(DataAccessTokenController.class, "userRoleToAccessToken", "PLACEHOLDER_ROLE");
+        Mockito.when(tokenService.createDataAccessToken(ArgumentMatchers.anyString())).thenReturn(MOCK_TOKEN_INFO);
+        HttpSession session = getSession(MOCK_USER, MOCK_PASSWORD);
+        MvcResult result = mockMvc.perform(MockMvcRequestBuilders.post("/data-access-tokens")
+                .session((MockHttpSession) session)
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON))
+            .andExpect(MockMvcResultMatchers.status().isCreated())
+            .andReturn();
+    }
+
+    @Test
+    public void createTokenUnauthorizedUserTestWithUserRole() throws Exception {
+        ReflectionTestUtils.setField(DataAccessTokenController.class, "userRoleToAccessToken", "TEST");
+        Mockito.when(tokenService.createDataAccessToken(ArgumentMatchers.anyString())).thenReturn(MOCK_TOKEN_INFO);
+        HttpSession session = getSession(MOCK_USER, MOCK_PASSWORD);
+        MvcResult result = mockMvc.perform(MockMvcRequestBuilders.post("/data-access-tokens")
+                .session((MockHttpSession) session)
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON))
+            .andExpect(MockMvcResultMatchers.status().isUnauthorized())
+            .andReturn();
+    }
+
     /* Tests mapping for DELETE /data-access-tokens
      * Checks response status code is 200 success
      * Checks that correct username argument is passed to service classueu(e7d98136a131a8fc613301237674e0fa6fa06b26}(sha(e7d98136a131a8fc613301237674e0fa6fa06b26node_idEC_kwDOAe-hB9oAKGU3ZDk4MTM2YTEzMWE4ZmM2MTMzMDEyMzc2NzRlMGZhNmZhMDZiMjYcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-08T17:32:04Zu	committer}(jN)  Djokovic0311jP)  .55948986+Djokovic0311@users.noreply.github.comjR)  2023-08-08T17:32:04ZumessagekMerge branch 'GenericAssay-Jiahang' of https://github.com/Djokovic0311/cbioportal into GenericAssay-Jiahangtree}(jF)  (29cb7e3dce8710afd3c3d66b4ef34be723f25f7curlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/29cb7e3dce8710afd3c3d66b4ef34be723f25f7cuj^)  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/e7d98136a131a8fc613301237674e0fa6fa06b26
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj^)  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/e7d98136a131a8fc613301237674e0fa6fa06b26html_urlXhttps://github.com/cBioPortal/cbioportal/commit/e7d98136a131a8fc613301237674e0fa6fa06b26comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/e7d98136a131a8fc613301237674e0fa6fa06b26/commentsjL)  }(loginDjokovic0311idJUjH)  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5j^)  )https://api.github.com/users/Djokovic0311jj)  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos     
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminujT)  }(jo)  Djokovic0311jq)  JUjH)  MDQ6VXNlcjU1OTQ4OTg2js)  4https://avatars.githubusercontent.com/u/55948986?v=4ju)  h5j^)  )https://api.github.com/users/Djokovic0311jj)  https://github.com/Djokovic0311jx)  3https://api.github.com/users/Djokovic0311/followersjz)  @https://api.github.com/users/Djokovic0311/following{/other_user}j|)  9https://api.github.com/users/Djokovic0311/gists{/gist_id}j~)  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}j)  7https://api.github.com/users/Djokovic0311/subscriptionsj)  .https://api.github.com/users/Djokovic0311/orgsj)  /https://api.github.com/users/Djokovic0311/reposj)  :https://api.github.com/users/Djokovic0311/events{/privacy}j)  9https://api.github.com/users/Djokovic0311/received_eventsj)  Userj)  uparents](}(jF)  (c1c2012b531483a1601586292b56b368507da535j^)  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/c1c2012b531483a1601586292b56b368507da535jj)  Xhttps://github.com/cBioPortal/cbioportal/commit/c1c2012b531483a1601586292b56b368507da535u}(jF)  (3c736f9da04830593ff1899f0dc6a3df1a12e799j^)  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/3c736f9da04830593ff1899f0dc6a3df1a12e799jj)  Xhttps://github.com/cBioPortal/cbioportal/commit/3c736f9da04830593ff1899f0dc6a3df1a12e799uestats}(totalM	additionsM+	deletionsK]ufiles](}(jF)  (bd9ae14cdaf137a97c116177c885b70a16bf7d34filenameBmodel/src/main/java/org/cbioportal/model/GenomicDataCountItem.javastatusaddedj)  K#j)  K changesK#blob_urlhttps://github.com/cBioPortal/cbioportal/blob/e7d98136a131a8fc613301237674e0fa6fa06b26/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenomicDataCountItem.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/e7d98136a131a8fc613301237674e0fa6fa06b26/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenomicDataCountItem.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenomicDataCountItem.java?ref=e7d98136a131a8fc613301237674e0fa6fa06b26patchXL  @@ -0,0 +1,35 @@
+package org.cbioportal.model;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class GenomicDataCountItem implements Serializable {
+
+    private String hugoGeneSymbol;
+    private String profileType;
+    private List<GenomicDataCount> counts;
+
+    public String getHugoGeneSymbol() {
+        return hugoGeneSymbol;
+    }
+
+    public void setHugoGeneSymbol(String hugoGeneSymbol) {
+        this.hugoGeneSymbol = hugoGeneSymbol;
+    }
+
+    public String getProfileType() {
+        return profileType;
+    }
+
+    public void setProfileType(String profileType) {
+        this.profileType = profileType;
+    }
+
+    public List<GenomicDataCount> getCounts() {
+        return counts;
+    }
+
+    public void setCounts(List<GenomicDataCount> counts) {
+        this.counts = counts;
+    }
+}u}(jF)  (67191ea758842520498fa65865633766fcae06dbj)  Bservice/src/main/java/org/cbioportal/service/StudyViewService.javaj)  modifiedj)  Kj)  K j)  Kj)  https://github.com/cBioPortal/cbioportal/blob/e7d98136a131a8fc613301237674e0fa6fa06b26/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javaj)  https://github.com/cBioPortal/cbioportal/raw/e7d98136a131a8fc613301237674e0fa6fa06b26/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javaj)  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.java?ref=e7d98136a131a8fc613301237674e0fa6fa06b26j)  X  @@ -1,6 +1,8 @@
 package org.cbioportal.service;
 
+import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
+import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.exception.StudyNotFoundException;
 
 import java.util.List;
@@ -19,6 +21,8 @@ List<AlterationCountByGene> getStructuralVariantAlterationCountByGenes(List<Stri
     List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> studyIds, List<String> sampleIds, AlterationFilter annotationFilter)
         throws StudyNotFoundException;
 
+    List<GenomicDataCountItem> getCNAAlterationCountsByGeneSpecific(List<String> studyIds, List<String> sampleIds, List<Pair<String, String>> genomicDataFilters);
+
     List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String> sampleIds, List<String> studyIds, List<String> stableIds, List<String> profileTypes);
 
 }u}(jF)  (510fa8f0206c012b5da48c56b46b1b5332445673j)  Kservice/src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.javaj)  modifiedj)  Kcj)  Kj)  Kej)  https://github.com/cBioPortal/cbioportal/blob/e7d98136a131a8fc613301237674e0fa6fa06b26/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj)  https://github.com/cBioPortal/cbioportal/raw/e7d98136a131a8fc613301237674e0fa6fa06b26/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj)  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.java?ref=e7d98136a131a8fc613301237674e0fa6fa06b26j)  X  @@ -2,6 +2,7 @@
 
 import org.apache.commons.collections4.map.MultiKeyMap;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
 import org.cbioportal.model.util.Select;
 import org.cbioportal.persistence.AlterationRepository;
@@ -15,6 +16,7 @@
 import java.util.*;
 import java.util.function.Function;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 @Service
 public class StudyViewServiceImpl implements StudyViewService {
@@ -37,6 +39,12 @@ public class StudyViewServiceImpl implements StudyViewService {
     @Autowired
     private AlterationRepository alterationRepository;
 
+    @Autowired
+    private GeneService geneService;
+    
+    @Autowired 
+    private MolecularDataService molecularDataService;
+    
     @Override
     public List<GenomicDataCount> getGenomicDataCounts(List<String> studyIds, List<String> sampleIds) {
         List<MolecularProfileCaseIdentifier> molecularProfileSampleIdentifiers =
@@ -154,7 +162,7 @@ public List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> stu
         throws StudyNotFoundException {
         List<MolecularProfileCaseIdentifier> caseIdentifiers =
             molecularProfileService.getFirstDiscreteCNAProfileCaseIdentifiers(studyIds, sampleIds);
-        Select<CNA> cnaTypes = Select.byValues(CNA_TYPES_AMP_AND_HOMDEL);
+        
         List<CopyNumberCountByGene> copyNumberCountByGenes = alterationCountService.getSampleCnaGeneCounts(
             caseIdentifiers,
             Select.all(),
@@ -186,6 +194,96 @@ public List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> stu
         return copyNumberCountByGenes;
     }
 
+    @Override
+    public List<GenomicDataCountItem> getCNAAlterationCountsByGeneSpecific(List<String> studyIds, 
+                                                                           List<String> sampleIds,
+                                                                           List<Pair<String, String>> genomicDataFilters) {
+        
+        List<MolecularProfile> molecularProfiles = molecularProfileService.getMolecularProfilesInStudies(studyIds,
+            "SUMMARY");
+
+        Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
+            .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
+
+        Set<String> hugoGeneSymbols = genomicDataFilters.stream().map(Pair::getKey)
+            .collect(Collectors.toSet());
+
+        Map<String, Integer> geneSymbolIdMap = geneService
+            .fetchGenes(new ArrayList<>(hugoGeneSymbols), "HUGO_GENE_SYMBOL",
+                "SUMMARY")
+            .stream().collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
+        
+        return genomicDataFilters
+            .stream()
+            .flatMap(gdFilter -> {
+                GenomicDataCountItem genomicDataCountItem = new GenomicDataCountItem();
+                String hugoGeneSymbol = gdFilter.getKey();
+                String profileType = gdFilter.getValue();
+                genomicDataCountItem.setHugoGeneSymbol(hugoGeneSymbol);
+                genomicDataCountItem.setProfileType(profileType);
+                
+                List<String> stableIds = Arrays.asList(geneSymbolIdMap.get(hugoGeneSymbol).toString());
+
+                Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
+                    .getOrDefault(profileType, new ArrayList<MolecularProfile>()).stream()
+                    .collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
+                        MolecularProfile::getStableId));
+                
+                List<String> mappedSampleIds = new ArrayList<>();
+                List<String> mappedProfileIds = new ArrayList<>();
+
+                for (int i = 0; i < sampleIds.size(); i++) {
+                    String studyId = studyIds.get(i);
+                    if (studyIdToMolecularProfileIdMap.containsKey(studyId)) {
+                        mappedSampleIds.add(sampleIds.get(i));
+                        mappedProfileIds.add(studyIdToMolecularProfileIdMap.get(studyId));
+                    }
+                }
+
+                if (mappedSampleIds.isEmpty()) {
+                    return Stream.of();
+                }
+
+                List<GeneMolecularData> geneMolecularDataList = molecularDataService.getMolecularDataInMultipleMolecularProfiles(mappedProfileIds, mappedSampleIds,
+                        stableIds.stream().map(Integer::parseInt).collect(Collectors.toList()), "SUMMARY");
+                
+                List<GenomicDataCount> genomicDataCounts = geneMolecularDataList
+                    .stream()
+                    .filter(g -> StringUtils.isNotEmpty(g.getValue()) && !g.getValue().equals("NA"))
+                    .collect(Collectors.groupingBy(GeneMolecularData::getValue))
+                    .entrySet()
+                    .stream()
+                    .map(entry -> {
+                        Integer alteration = Integer.valueOf(entry.getKey());
+                        List<GeneMolecularData> geneMolecularData = entry.getValue();
+                        int count = geneMolecularData.size();
+
+                        String label = CNA.getByCode(alteration.shortValue()).getDescription();
+
+                        GenomicDataCount genomicDataCount = new GenomicDataCount();
+                        genomicDataCount.setLabel(label);
+                        genomicDataCount.setValue(String.valueOf(alteration));
+                        genomicDataCount.setCount(count);
+
+                        return genomicDataCount;
+                    }).collect(Collectors.toList());
+
+                int totalCount = genomicDataCounts.stream().mapToInt(GenomicDataCount::getCount).sum();
+                int naCount = sampleIds.size() - totalCount;
+                
+                if (naCount > 0) {
+                    GenomicDataCount genomicDataCount = new GenomicDataCount();
+                    genomicDataCount.setLabel("NA");
+                    genomicDataCount.setValue("NA");
+                    genomicDataCount.setCount(naCount);
+                    genomicDataCounts.add(genomicDataCount);
+                }
+                
+                genomicDataCountItem.setCounts(genomicDataCounts);
+                return Stream.of(genomicDataCountItem);
+            }).collect(Collectors.toList());
+    };
+
     @Override
     public List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String> sampleIds, List<String> studyIds,
                                                                List<String> stableIds, List<String> profileTypes) {
@@ -261,5 +359,4 @@ public List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String>
             })
             .collect(Collectors.toList());
     }
-
 }u}(jF)  (827a7b752a515684801b8188ec8e397a80da98bfj)  Jservice/src/test/java/org/cbioportal/service/impl/BaseServiceImplTest.javaj)  modifiedj)  Kj)  Kj)  Kj)  https://github.com/cBioPortal/cbioportal/blob/e7d98136a131a8fc613301237674e0fa6fa06b26/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.javaj)  https://github.com/cBioPortal/cbioportal/raw/e7d98136a131a8fc613301237674e0fa6fa06b26/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.javaj)  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.java?ref=e7d98136a131a8fc613301237674e0fa6fa06b26j)  X  @@ -59,5 +59,7 @@ public class BaseServiceImplTest {
     public static final String CATEGORY_VALUE_1 = "category_value1";
     public static final String CATEGORY_VALUE_2 = "category_value2";
     public static final String EMPTY_VALUE_1 = "";
-    public static final String EMPTY_VALUE_2 = "NA";    
+    public static final String EMPTY_VALUE_2 = "NA";
+    public static final String PROFILE_TYPE_1 = "profile_type1";
+    public static final String PROFILE_TYPE_2 = "profile_type2";
 }u}(jF)  (801ab8afebfc5a1dbd192628acb1791f70a2338aj)  Oservice/src/test/java/org/cbioportal/service/impl/StudyViewServiceImplTest.javaj)  modifiedj)  KNj)  Kj)  KRj)  https://github.com/cBioPortal/cbioportal/blob/e7d98136a131a8fc613301237674e0fa6fa06b26/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javaj)  https://github.com/cBioPortal/cbioportal/raw/e7d98136a131a8fc613301237674e0fa6fa06b26/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javaj)  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.java?ref=e7d98136a131a8fc613301237674e0fa6fa06b26j)  Xv  @@ -14,10 +14,7 @@
 import org.mockito.Spy;
 import org.mockito.junit.MockitoJUnitRunner;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
+import java.util.*;
 
 import static org.mockito.ArgumentMatchers.*;
 
@@ -41,6 +38,10 @@ public class StudyViewServiceImplTest extends BaseServiceImplTest {
     private SignificantCopyNumberRegionService significantCopyNumberRegionService;
     @Mock
     private GenericAssayService genericAssayService;
+    @Mock
+    private MolecularDataService molecularDataService;
+    @Mock
+    private GeneService geneService;
     private AlterationFilter alterationFilter = new AlterationFilter();
 
     @Test
@@ -255,6 +256,79 @@ public void getCNAAlterationCountByGenes() throws Exception {
         Assert.assertEquals(1, result.size());
     }
 
+    @Test
+    public void getCNAAlterationCountByGeneSpecific() throws Exception {
+
+        List<String> sampleIds = Arrays.asList(BaseServiceImplTest.SAMPLE_ID1, BaseServiceImplTest.SAMPLE_ID2, BaseServiceImplTest.SAMPLE_ID3);
+        List<String> studyIds = Collections.nCopies(3, BaseServiceImplTest.STUDY_ID);
+        List<Pair<String, String>> genomicDataFilters = new ArrayList<>();
+        Pair<String, String> genomicDataFilter1 = new Pair<>(BaseServiceImplTest.HUGO_GENE_SYMBOL_1, BaseServiceImplTest.PROFILE_TYPE_1);
+        Pair<String, String> genomicDataFilter2 = new Pair<>(BaseServiceImplTest.HUGO_GENE_SYMBOL_2, BaseServiceImplTest.PROFILE_TYPE_2);
+        genomicDataFilters.add(genomicDataFilter1);
+        genomicDataFilters.add(genomicDataFilter2);
+
+        List<MolecularProfile> molecularProfiles = new ArrayList<>();
+        MolecularProfile molecularProfile = new MolecularProfile();
+        molecularProfile.setCancerStudyIdentifier(BaseServiceImplTest.STUDY_ID);
+        molecularProfile.setStableId(BaseServiceImplTest.STUDY_ID + "_" + BaseServiceImplTest.MOLECULAR_PROFILE_ID_A);
+        molecularProfiles.add(molecularProfile);
+        
+        Mockito.when(molecularProfileService.getMolecularProfilesInStudies(studyIds, "SUMMARY"))
+            .thenReturn(molecularProfiles);
+        
+        Map<String, List<MolecularProfile>> molecularProfileMap = new HashMap<>();
+        molecularProfileMap.put(BaseServiceImplTest.PROFILE_TYPE_1, molecularProfiles);
+        molecularProfileMap.put(BaseServiceImplTest.PROFILE_TYPE_2, molecularProfiles);
+   
+        Mockito.when(molecularProfileUtil.categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles))
+            .thenReturn(molecularProfileMap);
+        
+        List<Gene> genes = new ArrayList<>();
+        Gene gene1 = new Gene();
+        gene1.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
+        gene1.setHugoGeneSymbol(BaseServiceImplTest.HUGO_GENE_SYMBOL_1);
+        Gene gene2 = new Gene();
+        gene2.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_2);
+        gene2.setHugoGeneSymbol(BaseServiceImplTest.HUGO_GENE_SYMBOL_2);
+        genes.add(gene1);
+        genes.add(gene2);
+
+        Mockito.when(geneService.fetchGenes(anyList(), anyString(), anyString()))
+                .thenReturn(genes);
+
+        List<GeneMolecularData> geneMolecularData = new ArrayList<>();
+        GeneMolecularData geneMolecularData1 = new GeneMolecularData();
+        geneMolecularData1.setValue("-2");
+        GeneMolecularData geneMolecularData2 = new GeneMolecularData();
+        geneMolecularData2.setValue("-2");
+        GeneMolecularData geneMolecularData3 = new GeneMolecularData();
+        geneMolecularData3.setValue("2");
+        GeneMolecularData geneMolecularData4 = new GeneMolecularData();
+        geneMolecularData4.setValue("2");
+        geneMolecularData.add(geneMolecularData1);
+        geneMolecularData.add(geneMolecularData2);
+        geneMolecularData.add(geneMolecularData3);
+        geneMolecularData.add(geneMolecularData4);
+        
+        Mockito.when(molecularDataService.getMolecularDataInMultipleMolecularProfiles(
+            anyList(),
+            anyList(),
+            anyList(),
+            anyString()))
+            .thenReturn(geneMolecularData);
+        
+        List<GenomicDataCountItem> result = studyViewService.getCNAAlterationCountsByGeneSpecific(studyIds, sampleIds, genomicDataFilters);
+        Assert.assertEquals(2, result.size());
+        Assert.assertEquals(BaseServiceImplTest.HUGO_GENE_SYMBOL_1, result.get(0).getHugoGeneSymbol());
+        Assert.assertEquals(BaseServiceImplTest.PROFILE_TYPE_1, result.get(0).getProfileType());
+        Assert.assertEquals(2, result.get(0).getCounts().get(0).getCount().intValue());
+        Assert.assertEquals(2, result.get(0).getCounts().get(1).getCount().intValue());
+        Assert.assertEquals(BaseServiceImplTest.HUGO_GENE_SYMBOL_2, result.get(1).getHugoGeneSymbol());
+        Assert.assertEquals(BaseServiceImplTest.PROFILE_TYPE_2, result.get(1).getProfileType());
+        Assert.assertEquals(2, result.get(1).getCounts().get(0).getCount().intValue());
+        Assert.assertEquals(2, result.get(1).getCounts().get(1).getCount().intValue());
+    }
+
     @Test
     public void fetchGenericAssayDataCounts() throws Exception {
 u}(jF)  (f4ca464cf50123869269b7357a228fd1745d50f4j)  =web/src/main/java/org/cbioportal/web/StudyViewController.javaj)  modifiedj)  K*j)  Kj)  K+j)  https://github.com/cBioPortal/cbioportal/blob/e7d98136a131a8fc613301237674e0fa6fa06b26/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj)  https://github.com/cBioPortal/cbioportal/raw/e7d98136a131a8fc613301237674e0fa6fa06b26/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj)  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=e7d98136a131a8fc613301237674e0fa6fa06b26j)  Xh  @@ -9,14 +9,14 @@
 import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.commons.math3.stat.correlation.PearsonsCorrelation;
 import org.apache.commons.math3.stat.correlation.SpearmansCorrelation;
+import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
 import org.cbioportal.service.*;
 import org.cbioportal.service.exception.StudyNotFoundException;
 import org.cbioportal.service.util.ClinicalAttributeUtil;
 import org.cbioportal.web.config.annotation.InternalApi;
 import org.cbioportal.model.AlterationFilter;
 import org.cbioportal.web.parameter.*;
-import org.cbioportal.web.parameter.sort.ClinicalDataSortBy;
 import org.cbioportal.web.util.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.Cacheable;
@@ -861,6 +861,47 @@ public ResponseEntity<List<GenomicDataBin>> fetchGenomicDataBinCounts(
         return new ResponseEntity<>(studyViewFilterApplier.getDataBins(dataBinMethod, interceptedGenomicDataBinCountFilter), HttpStatus.OK);
     }
 
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @RequestMapping(value = "/genomic-data-counts/fetch", method = RequestMethod.POST,
+        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch genomic data counts by GenomicDataCountFilter")
+    public ResponseEntity<List<GenomicDataCountItem>> fetchGenomicDataCounts(
+        @ApiParam(required = true, value = "Genomic data count filter") @Valid @RequestBody(required = false) GenomicDataCountFilter genomicDataCountFilter,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiParam(required = true, value = "Intercepted Genomic Data Count Filter")
+        @ApiIgnore
+        @Valid @RequestAttribute(required = false, value = "interceptedGenomicDataCountFilter") GenomicDataCountFilter interceptedGenomicDataCountFilter
+    ) throws StudyNotFoundException {
+        List<GenomicDataFilter> gdFilters = interceptedGenomicDataCountFilter.getGenomicDataFilters();
+        StudyViewFilter studyViewFilter = interceptedGenomicDataCountFilter.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 (gdFilters.size() == 1) {
+            studyViewFilterUtil.removeSelfFromGenomicDataFilter(
+                gdFilters.get(0).getHugoGeneSymbol(), 
+                gdFilters.get(0).getProfileType(), 
+                studyViewFilter);
+        }
+        List<SampleIdentifier> filteredSampleIdentifiers = studyViewFilterApplier.apply(studyViewFilter);
+
+        if (filteredSampleIdentifiers.isEmpty()) {
+            return new ResponseEntity<>(new ArrayList<>(), HttpStatus.OK);
+        }
+
+        List<String> studyIds = new ArrayList<>();
+        List<String> sampleIds = new ArrayList<>();
+        studyViewFilterUtil.extractStudyAndSampleIds(filteredSampleIdentifiers, studyIds, sampleIds);
+        
+        List<GenomicDataCountItem> result = studyViewService.getCNAAlterationCountsByGeneSpecific(
+            studyIds,
+            sampleIds,
+            gdFilters.stream().map(gdFilter -> new Pair<>(gdFilter.getHugoGeneSymbol(), gdFilter.getProfileType())).collect(Collectors.toList()));
+
+        return new ResponseEntity<>(result, HttpStatus.OK);
+    }
+    
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/generic-assay-data-counts/fetch", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Fetch generic assay data counts by study view filter")u}(jF)  (c01ec7696c1c982450178be39d0a178edd3ad3dcj)  Jweb/src/main/java/org/cbioportal/web/parameter/GenomicDataCountFilter.javaj)  addedj)  Kj)  K j)  Kj)  https://github.com/cBioPortal/cbioportal/blob/e7d98136a131a8fc613301237674e0fa6fa06b26/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FGenomicDataCountFilter.javaj)  https://github.com/cBioPortal/cbioportal/raw/e7d98136a131a8fc613301237674e0fa6fa06b26/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FGenomicDataCountFilter.javaj)  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FGenomicDataCountFilter.java?ref=e7d98136a131a8fc613301237674e0fa6fa06b26j)  X  @@ -0,0 +1,26 @@
+package org.cbioportal.web.parameter;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class GenomicDataCountFilter implements Serializable {
+
+    private List<GenomicDataFilter> genomicDataFilters;
+    private StudyViewFilter studyViewFilter;
+
+    public List<GenomicDataFilter> getGenomicDataFilters() {
+        return genomicDataFilters;
+    }
+
+    public void setGenomicDataFilters(List<GenomicDataFilter> genomicDataFilters) {
+        this.genomicDataFilters = genomicDataFilters;
+    }
+
+    public StudyViewFilter getStudyViewFilter() {
+        return studyViewFilter;
+    }
+
+    public void setStudyViewFilter(StudyViewFilter studyViewFilter) {
+        this.studyViewFilter = studyViewFilter;
+    }
+}u}(jF)  (91720ee1f819695a41680c798e7c320a580a0fcaj)  Vweb/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.javaj)  modifiedj)  K j)  Kj)  K!j)  https://github.com/cBioPortal/cbioportal/blob/e7d98136a131a8fc613301237674e0fa6fa06b26/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaj)  https://github.com/cBioPortal/cbioportal/raw/e7d98136a131a8fc613301237674e0fa6fa06b26/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaj)  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.java?ref=e7d98136a131a8fc613301237674e0fa6fa06b26j)  X  @@ -75,6 +75,7 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
     public static final String STUDY_VIEW_CLINICAL_DATA_BIN_COUNTS_PATH = "/clinical-data-bin-counts/fetch";
     public static final String STUDY_VIEW_CUSTOM_DATA_BIN_COUNTS_PATH = "/custom-data-bin-counts/fetch";
     public static final String STUDY_VIEW_GENOMICL_DATA_BIN_COUNTS_PATH = "/genomic-data-bin-counts/fetch";
+    public static final String STUDY_VIEW_GENOMICL_DATA_COUNTS_PATH = "/genomic-data-counts/fetch";
     public static final String STUDY_VIEW_GENERIC_ASSAY_DATA_BIN_COUNTS_PATH = "/generic-assay-data-bin-counts/fetch";
     public static final String STUDY_VIEW_GENERIC_ASSAY_DATA_COUNTS_PATH = "/generic-assay-data-counts/fetch";
     public static final String STUDY_VIEW_CLINICAL_DATA_COUNTS_PATH = "/clinical-data-counts/fetch";
@@ -132,14 +133,16 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
             return extractAttributesFromClinicalDataBinCountFilter(request);
         } else if (requestPathInfo.equals(STUDY_VIEW_GENOMICL_DATA_BIN_COUNTS_PATH)) {
             return extractAttributesFromGenomicDataBinCountFilter(request);
+        } else if (requestPathInfo.equals(STUDY_VIEW_GENOMICL_DATA_COUNTS_PATH)) {
+            return extractAttributesFromGenomicDataCountFilter(request);
         } else if (requestPathInfo.equals(STUDY_VIEW_GENERIC_ASSAY_DATA_BIN_COUNTS_PATH)) {
             return extractAttributesFromGenericAssayDataBinCountFilter(request);
         } else if (requestPathInfo.equals(STUDY_VIEW_GENERIC_ASSAY_DATA_COUNTS_PATH)) {
             return extractAttributesFromGenericAssayDataCountFilter(request);
         } else if (Arrays.asList(STUDY_VIEW_CLINICAL_DATA_COUNTS_PATH, STUDY_VIEW_CUSTOM_DATA_COUNTS_PATH)
                 .contains(requestPathInfo)) {
             return extractAttributesFromClinicalDataCountFilter(request);
-        } else if (Arrays.asList(STUDY_VIEW_CLINICAL_DATA_DENSITY_PATH, STUDY_VIEW_CLINICAL_DATA_VIOLIN_PATH, STUDY_VIEW_CNA_GENES,
+        } 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
@@ -481,6 +484,26 @@ private boolean extractAttributesFromGenomicDataBinCountFilter(HttpServletReques
         return true;
     }
 
+    private boolean extractAttributesFromGenomicDataCountFilter(HttpServletRequest request) {
+        try {
+            GenomicDataCountFilter genomicDataCountFilter = objectMapper.readValue(request.getInputStream(),
+                GenomicDataCountFilter.class);
+            LOG.debug("extracted genomicDataCountFilter: " + genomicDataCountFilter.toString());
+            LOG.debug("setting interceptedGenomicDataCountFilter to " + genomicDataCountFilter);
+            request.setAttribute("interceptedGenomicDataCountFilter", genomicDataCountFilter);
+            if (cacheMapUtil.hasCacheEnabled()) {
+                Collection<String> cancerStudyIdCollection = extractCancerStudyIdsFromGenomicDataCountFilter(
+                    genomicDataCountFilter);
+                LOG.debug("setting involvedCancerStudies to " + cancerStudyIdCollection);
+                request.setAttribute("involvedCancerStudies", cancerStudyIdCollection);
+            }
+        } catch (Exception e) {
+            LOG.error("exception thrown during extraction of genomicDataCountFilter: " + e);
+            return false;
+        }
+        return true;
+    }
+
     private boolean extractAttributesFromGenericAssayDataBinCountFilter(HttpServletRequest request) {
         try {
             GenericAssayDataBinCountFilter genericAssayDataBinCountFilter = objectMapper
@@ -726,6 +749,14 @@ private Set<String> extractCancerStudyIdsFromGenomicDataBinCountFilter(
         return new HashSet<String>();
     }
 
+    private Set<String> extractCancerStudyIdsFromGenomicDataCountFilter(
+        GenomicDataCountFilter genomicDataCountFilter) {
+        if (genomicDataCountFilter.getStudyViewFilter() != null) {
+            return extractCancerStudyIdsFromStudyViewFilter(genomicDataCountFilter.getStudyViewFilter());
+        }
+        return new HashSet<String>();
+    }
+
     private Set<String> extractCancerStudyIdsFromGenericAssayDataBinCountFilter(
             GenericAssayDataBinCountFilter genericAssayDataBinCountFilter) {
         if (genericAssayDataBinCountFilter.getStudyViewFilter() != null) {u}(jF)  (0b97b6df9543ab021cea2f48c0727c7b578a7517j)  Eweb/src/main/java/org/cbioportal/web/util/StudyViewFilterApplier.javaj)  modifiedj)  Kj)  KQj)  Kj)  https://github.com/cBioPortal/cbioportal/blob/e7d98136a131a8fc613301237674e0fa6fa06b26/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.javaj)  https://github.com/cBioPortal/cbioportal/raw/e7d98136a131a8fc613301237674e0fa6fa06b26/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.javaj)  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.java?ref=e7d98136a131a8fc613301237674e0fa6fa06b26j)  Xt?  @@ -166,8 +166,39 @@ public List<SampleIdentifier> apply(StudyViewFilter studyViewFilter, Boolean neg
             molecularProfiles = molecularProfileService.getMolecularProfilesInStudies(studyIds, "SUMMARY");
         }
 
-        sampleIdentifiers = intervalFilterExpressionData(sampleIdentifiers, molecularProfiles,
-                studyViewFilter.getGenomicDataFilters(), negateFilters);
+        List<GenomicDataFilter> genomicDataEqualityFilters = new ArrayList<>();
+        List<GenomicDataFilter> genomicDataIntervalFilters = new ArrayList<>();
+
+        List<GenomicDataFilter> genomicDataFilters = studyViewFilter.getGenomicDataFilters();
+
+        if (!CollectionUtils.isEmpty(genomicDataFilters)) {
+            Map<String, MolecularProfile> molecularProfileMapByType = molecularProfileUtil
+                .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles)
+                .entrySet()
+                .stream()
+                .collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().get(0)));
+
+            genomicDataFilters.forEach(genomicDataFilter -> {
+                String profileType = genomicDataFilter.getProfileType();
+                if (molecularProfileMapByType.containsKey(profileType)) {
+                    if (molecularProfileMapByType.get(profileType).getDatatype().equals("DISCRETE")) {
+                        genomicDataEqualityFilters.add(genomicDataFilter);
+                    } else {
+                        genomicDataIntervalFilters.add(genomicDataFilter);
+                    }
+                }
+            });
+        }
+        
+        if (!CollectionUtils.isEmpty(genomicDataEqualityFilters)) {
+            sampleIdentifiers = equalityFilterExpressionData(sampleIdentifiers, molecularProfiles,
+                genomicDataEqualityFilters, negateFilters);
+        }
+        
+        if (!CollectionUtils.isEmpty(genomicDataIntervalFilters)) {
+            sampleIdentifiers = intervalFilterExpressionData(sampleIdentifiers, molecularProfiles,
+                genomicDataIntervalFilters, negateFilters);
+        }
 
         sampleIdentifiers = intervalFilterExpressionData(sampleIdentifiers, molecularProfiles,
                 studyViewFilter.getGenericAssayDataFilters(), negateFilters);
@@ -847,99 +878,39 @@ private GenericAssayDataBin dataBintoGenericAssayDataBin(GenericAssayDataBinFilt
     }
 
     public <S extends DataFilter> List<SampleIdentifier> intervalFilterExpressionData(
-            List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
-            Boolean negateFilters) {
-
-        if (!CollectionUtils.isEmpty(dataFilters) && !CollectionUtils.isEmpty(sampleIdentifiers)) {
-
-            Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
-                    .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
+        Boolean negateFilters) {
 
-            List<String> studyIds = new ArrayList<>();
-            List<String> sampleIds = new ArrayList<>();
-            studyViewFilterUtil.extractStudyAndSampleIds(sampleIdentifiers, studyIds, sampleIds);
-            List<ClinicalData> clinicalDatas = new ArrayList<>();
-            List<ClinicalDataFilter> attributes = new ArrayList<>();
-            if (dataFilters.get(0) instanceof GenomicDataFilter) {
-                List<GenomicDataFilter> genomicDataIntervalFilters = (List<GenomicDataFilter>) dataFilters;
-                Set<String> hugoGeneSymbols = genomicDataIntervalFilters.stream()
-                        .map(GenomicDataFilter::getHugoGeneSymbol).collect(Collectors.toSet());
-                Map<String, Integer> geneNameIdMap = geneService
-                        .fetchGenes(new ArrayList<>(hugoGeneSymbols), GeneIdType.HUGO_GENE_SYMBOL.name(),
-                                Projection.SUMMARY.name())
-                        .stream().collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
-
-                clinicalDatas = genomicDataIntervalFilters.stream().flatMap(genomicDataFilter -> {
-
-                    Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
-                            .getOrDefault(genomicDataFilter.getProfileType(), new ArrayList<>())
-                            .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
-                                    MolecularProfile::getStableId));
-
-                    GenomicDataBinFilter genomicDataBinFilter = new GenomicDataBinFilter();
-                    genomicDataBinFilter.setHugoGeneSymbol(genomicDataFilter.getHugoGeneSymbol());
-                    genomicDataBinFilter.setProfileType(genomicDataFilter.getProfileType());
-                    return invokeDataFunc(sampleIds, studyIds,
-                            Arrays.asList(geneNameIdMap.get(genomicDataFilter.getHugoGeneSymbol()).toString()),
-                            studyIdToMolecularProfileIdMap, genomicDataBinFilter, fetchMolecularData);
-                }).collect(Collectors.toList());
-
-                attributes = genomicDataIntervalFilters.stream().map(genomicDataIntervalFilter -> {
-                    String attributeId = studyViewFilterUtil.getGenomicDataFilterUniqueKey(
-                            genomicDataIntervalFilter.getHugoGeneSymbol(), genomicDataIntervalFilter.getProfileType());
-                    ClinicalDataFilter clinicalDataIntervalFilter = new ClinicalDataFilter();
-                    clinicalDataIntervalFilter.setAttributeId(attributeId);
-                    clinicalDataIntervalFilter.setValues(genomicDataIntervalFilter.getValues());
-                    return clinicalDataIntervalFilter;
-                }).collect(Collectors.toList());
-            } else {
-                List<GenericAssayDataFilter> genericAssayDataFilters = (List<GenericAssayDataFilter>) dataFilters;
-
-                clinicalDatas = genericAssayDataFilters.stream().flatMap(genericAssayDataFilter -> {
+        return filterExpressionData(sampleIdentifiers, molecularProfiles, dataFilters, negateFilters, clinicalDataIntervalFilterApplier);
+    }
 
-                    Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
-                            .getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>())
-                            .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
-                                    MolecularProfile::getStableId));
-                    GenericAssayDataBinFilter genericAssayDataBinFilter = new GenericAssayDataBinFilter();
-                    genericAssayDataBinFilter.setStableId(genericAssayDataFilter.getStableId());
-                    genericAssayDataBinFilter.setProfileType(genericAssayDataFilter.getProfileType());
+    public <S extends DataFilter> List<SampleIdentifier> equalityFilterExpressionData(
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
+        Boolean negateFilters) {
 
-                    // get original data stream from invokeDataFunc
-                    Stream<ClinicalData> dataStream = invokeDataFunc(sampleIds, studyIds, Arrays.asList(genericAssayDataBinFilter.getStableId()),
-                        studyIdToMolecularProfileIdMap, genericAssayDataBinFilter, fetchGenericAssayData);
-                    // For patient level generic assay profile, only keep the one sample per patient
-                    List<MolecularProfile> profiles = molecularProfileMap.getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>());
-                    if (profiles.size() > 0 && profiles.get(0).getPatientLevel() == true) {
-                        dataStream = dataStream.collect(Collectors.groupingBy(d -> d.getPatientId())).values().stream()
-                            .flatMap(d -> d.stream().limit(1));
-                    }
-                    // don't change anything for non patient level data
-                    return dataStream;
-                }).collect(Collectors.toList());
+        return filterExpressionData(sampleIdentifiers, molecularProfiles, dataFilters, negateFilters, clinicalDataEqualityFilterApplier);
+    }
 
-                attributes = genericAssayDataFilters.stream().map(genericAssayDataFilter -> {
-                    String attributeId = studyViewFilterUtil.getGenericAssayDataFilterUniqueKey(
-                            genericAssayDataFilter.getStableId(), genericAssayDataFilter.getProfileType());
-                    ClinicalDataFilter clinicalDataIntervalFilter = new ClinicalDataFilter();
-                    clinicalDataIntervalFilter.setAttributeId(attributeId);
-                    clinicalDataIntervalFilter.setValues(genericAssayDataFilter.getValues());
-                    return clinicalDataIntervalFilter;
-                }).collect(Collectors.toList());
 
-            }
+    public <S extends DataFilter> List<SampleIdentifier> filterExpressionData(
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
+        Boolean negateFilters, ClinicalDataFilterApplier clinicalDataFilterApplier) {
+        if (!CollectionUtils.isEmpty(dataFilters) && !CollectionUtils.isEmpty(sampleIdentifiers)) {
+            List<ClinicalData> clinicalDatas =
+                fetchDataAndTransformToClinicalDataList(sampleIdentifiers, molecularProfiles, dataFilters);
+            List<ClinicalDataFilter> attributes =transformToClinicalDataFilter(dataFilters);
 
             MultiKeyMap clinicalDataMap = new MultiKeyMap();
 
             clinicalDatas.forEach(clinicalData -> {
                 clinicalDataMap.put(clinicalData.getStudyId(), clinicalData.getSampleId(), clinicalData.getAttrId(),
-                        clinicalData.getAttrValue());
+                    clinicalData.getAttrValue());
             });
 
             List<SampleIdentifier> newSampleIdentifiers = new ArrayList<>();
             for (SampleIdentifier sampleIdentifier : sampleIdentifiers) {
-                int count = clinicalDataIntervalFilterApplier.apply(attributes, clinicalDataMap,
-                        sampleIdentifier.getSampleId(), sampleIdentifier.getStudyId(), negateFilters);
+                int count = clinicalDataFilterApplier.apply(attributes, clinicalDataMap,
+                    sampleIdentifier.getSampleId(), sampleIdentifier.getStudyId(), negateFilters);
 
                 if (count == attributes.size()) {
                     newSampleIdentifiers.add(sampleIdentifier);
@@ -951,4 +922,86 @@ public <S extends DataFilter> List<SampleIdentifier> intervalFilterExpressionDat
 
         return sampleIdentifiers;
     }
+    
+    private <S extends DataFilter> List<ClinicalData> fetchDataAndTransformToClinicalDataList(
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters) {
+        Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
+            .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
+
+        List<String> studyIds = new ArrayList<>();
+        List<String> sampleIds = new ArrayList<>();
+        studyViewFilterUtil.extractStudyAndSampleIds(sampleIdentifiers, studyIds, sampleIds);
+        
+        if (dataFilters.get(0) instanceof GenomicDataFilter) {
+            List<GenomicDataFilter> genomicDataIntervalFilters = (List<GenomicDataFilter>) dataFilters;
+            Set<String> hugoGeneSymbols = genomicDataIntervalFilters.stream()
+                .map(GenomicDataFilter::getHugoGeneSymbol).collect(Collectors.toSet());
+            Map<String, Integer> geneNameIdMap = geneService
+                .fetchGenes(new ArrayList<>(hugoGeneSymbols), GeneIdType.HUGO_GENE_SYMBOL.name(),
+                    Projection.SUMMARY.name())
+                .stream().collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
+
+            return genomicDataIntervalFilters.stream().flatMap(genomicDataFilter -> {
+
+                Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
+                    .getOrDefault(genomicDataFilter.getProfileType(), new ArrayList<>())
+                    .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
+                        MolecularProfile::getStableId));
+
+                GenomicDataBinFilter genomicDataBinFilter = new GenomicDataBinFilter();
+                genomicDataBinFilter.setHugoGeneSymbol(genomicDataFilter.getHugoGeneSymbol());
+                genomicDataBinFilter.setProfileType(genomicDataFilter.getProfileType());
+                return invokeDataFunc(sampleIds, studyIds,
+                    Collections.singletonList(geneNameIdMap.get(genomicDataFilter.getHugoGeneSymbol()).toString()),
+                    studyIdToMolecularProfileIdMap, genomicDataBinFilter, fetchMolecularData);
+            }).collect(Collectors.toList());
+
+        } else {
+
+            return ((List<GenericAssayDataFilter>) dataFilters).stream().flatMap(genericAssayDataFilter -> {
+
+                Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
+                    .getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>())
+                    .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
+                        MolecularProfile::getStableId));
+                GenericAssayDataBinFilter genericAssayDataBinFilter = new GenericAssayDataBinFilter();
+                genericAssayDataBinFilter.setStableId(genericAssayDataFilter.getStableId());
+                genericAssayDataBinFilter.setProfileType(genericAssayDataFilter.getProfileType());
+
+                // get original data stream from invokeDataFunc
+                Stream<ClinicalData> dataStream = invokeDataFunc(sampleIds, studyIds, Collections.singletonList(genericAssayDataBinFilter.getStableId()),
+                    studyIdToMolecularProfileIdMap, genericAssayDataBinFilter, fetchGenericAssayData);
+                // For patient level generic assay profile, only keep the one sample per patient
+                List<MolecularProfile> profiles = molecularProfileMap.getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<>());
+                if (profiles.size() > 0 && profiles.get(0).getPatientLevel()) {
+                    dataStream = dataStream.collect(Collectors.groupingBy(ClinicalData::getPatientId)).values().stream()
+                        .flatMap(d -> d.stream().limit(1));
+                }
+                // don't change anything for non patient level data
+                return dataStream;
+            }).collect(Collectors.toList());
+
+        }
+    }
+
+    private <S extends DataFilter> List<ClinicalDataFilter> transformToClinicalDataFilter(List<S> dataFilters) {
+        List<ClinicalDataFilter> attributes;
+        attributes = dataFilters.stream().map(dataFilter -> {
+            String attributeId;
+            if (dataFilter instanceof GenomicDataFilter) {
+                GenomicDataFilter genomicDataFilter = (GenomicDataFilter) dataFilter;
+                attributeId = studyViewFilterUtil.getGenomicDataFilterUniqueKey(genomicDataFilter.getHugoGeneSymbol(), genomicDataFilter.getProfileType());
+            } else {
+                GenericAssayDataFilter genericAssayDataFilter = (GenericAssayDataFilter) dataFilter;
+                attributeId = studyViewFilterUtil.getGenericAssayDataFilterUniqueKey(
+                    genericAssayDataFilter.getStableId(), genericAssayDataFilter.getProfileType());
+            }
+
+            ClinicalDataFilter clinicalDataFilter = new ClinicalDataFilter();
+            clinicalDataFilter.setAttributeId(attributeId);
+            clinicalDataFilter.setValues(dataFilter.getValues());
+            return clinicalDataFilter;
+        }).collect(Collectors.toList());
+        return attributes;
+    }
 }u}(jF)  (ecf5bdab85cceb359f2f511895ea0a4e26cbd0b9j)  Bweb/src/main/java/org/cbioportal/web/util/StudyViewFilterUtil.javaj)  modifiedj)  Kj)  Kj)  Kj)  https://github.com/cBioPortal/cbioportal/blob/e7d98136a131a8fc613301237674e0fa6fa06b26/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javaj)  https://github.com/cBioPortal/cbioportal/raw/e7d98136a131a8fc613301237674e0fa6fa06b26/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javaj)  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.java?ref=e7d98136a131a8fc613301237674e0fa6fa06b26j)  X  @@ -45,19 +45,27 @@ public void extractStudyAndSampleIds(
     }
 
     public void removeSelfFromFilter(String attributeId, StudyViewFilter studyViewFilter) {
-        if (studyViewFilter!= null && studyViewFilter.getClinicalDataFilters() != null) {
+        if (studyViewFilter != null && studyViewFilter.getClinicalDataFilters() != null) {
             studyViewFilter.getClinicalDataFilters().removeIf(f -> f.getAttributeId().equals(attributeId));
         }
     }
+    
+    public void removeSelfFromGenomicDataFilter(String hugoGeneSymbol, String profileType, StudyViewFilter studyViewFilter) {
+        if (studyViewFilter != null && studyViewFilter.getGenomicDataFilters() != null) {
+            studyViewFilter.getGenomicDataFilters().removeIf(f -> 
+                f.getHugoGeneSymbol().equals(hugoGeneSymbol) && f.getProfileType().equals(profileType)
+            );
+        }
+    }
 
     public void removeSelfFromGenericAssayFilter(String stableId, StudyViewFilter studyViewFilter) {
-        if (studyViewFilter!= null && studyViewFilter.getGenericAssayDataFilters() != null) {
+        if (studyViewFilter != null && studyViewFilter.getGenericAssayDataFilters() != null) {
             studyViewFilter.getGenericAssayDataFilters().removeIf(f -> f.getStableId().equals(stableId));
         }
     }
 
     public void removeSelfCustomDataFromFilter(String attributeId, StudyViewFilter studyViewFilter) {
-        if (studyViewFilter!= null && studyViewFilter.getCustomDataFilters() != null) {
+        if (studyViewFilter != null && studyViewFilter.getCustomDataFilters() != null) {
             studyViewFilter.getCustomDataFilters().removeIf(f -> f.getAttributeId().equals(attributeId));
         }
     }u}(jF)  (3951e57b963be731abed688f002aa194fc2f0793j)  Aweb/src/test/java/org/cbioportal/web/StudyViewControllerTest.javaj)  modifiedj)  K[j)  K j)  K[j)  https://github.com/cBioPortal/cbioportal/blob/e7d98136a131a8fc613301237674e0fa6fa06b26/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj)  https://github.com/cBioPortal/cbioportal/raw/e7d98136a131a8fc613301237674e0fa6fa06b26/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj)  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.java?ref=e7d98136a131a8fc613301237674e0fa6fa06b26j)  X  @@ -62,6 +62,11 @@ public class StudyViewControllerTest {
     private static final String TEST_GENERIC_ASSAY_DATA_VALUE_2 = "value2";
     private static final String TEST_CLINICAL_EVENT_TYPE = "STATUS";
     private static final Integer TEST_CLINICAL_EVENT_TYPE_COUNT = 513;
+    private static final String TEST_CNA_ALTERATION_NAME_1 = "test_cna_event_type_1";
+    private static final String TEST_CNA_ALTERATION_NAME_2 = "test_cna_event_type_2";
+    private static final String TEST_CNA_ALTERATION_VALUE_1 = "2";
+    private static final String TEST_CNA_ALTERATION_VALUE_2 = "-2";
+    private static final String TEST_MOLECULAR_PROFILE_TYPE = "test_molecular_profile_type";
 
     private List<SampleIdentifier> filteredSampleIdentifiers = new ArrayList<>();
     private List<ClinicalData> clinicalData = new ArrayList<>();
@@ -506,6 +511,92 @@ public void fetchSampleCounts() throws Exception {
             .andExpect(MockMvcResultMatchers.jsonPath("$[1].count").value(2));
     }
 
+
+    @Test
+    public void fetchGenomicDataCounts() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+
+        List<GenomicDataCountItem> genomicDataCountItems = new ArrayList<>();
+
+        GenomicDataCount genomicDataCount1 = new GenomicDataCount();
+        genomicDataCount1.setLabel(TEST_CNA_ALTERATION_NAME_1);
+        genomicDataCount1.setValue(TEST_CNA_ALTERATION_VALUE_1);
+        genomicDataCount1.setCount(1);
+        
+        GenomicDataCount genomicDataCount2 = new GenomicDataCount();
+        genomicDataCount2.setLabel(TEST_CNA_ALTERATION_NAME_2);
+        genomicDataCount2.setValue(TEST_CNA_ALTERATION_VALUE_2);
+        genomicDataCount2.setCount(1);
+
+        GenomicDataCountItem genomicDataCountItem1 = new GenomicDataCountItem();
+        List<GenomicDataCount> genomicDataCounts1 = new ArrayList<>();
+        genomicDataCounts1.add(genomicDataCount1);
+        genomicDataCounts1.add(genomicDataCount2);
+        genomicDataCountItem1.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_1);
+        genomicDataCountItem1.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataCountItem1.setCounts(genomicDataCounts1);
+
+        GenomicDataCountItem genomicDataCountItem2 = new GenomicDataCountItem();
+        List<GenomicDataCount> genomicDataCounts2 = new ArrayList<>();
+        genomicDataCounts2.add(genomicDataCount1);
+        genomicDataCounts2.add(genomicDataCount2);
+        genomicDataCountItem2.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_2);
+        genomicDataCountItem2.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataCountItem2.setCounts(genomicDataCounts2);
+
+        genomicDataCountItems.add(genomicDataCountItem1);
+        genomicDataCountItems.add(genomicDataCountItem2);
+
+        when(studyViewService.getCNAAlterationCountsByGeneSpecific(
+            anyList(),
+            anyList(),
+            anyList()))
+            .thenReturn(genomicDataCountItems);
+
+        GenomicDataCountFilter genomicDataCountFilter = new GenomicDataCountFilter();
+        List<GenomicDataFilter> genomicDataFilters = new ArrayList<>();
+        
+        GenomicDataFilter genomicDataFilter1 = new GenomicDataFilter();
+        genomicDataFilter1.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_1);
+        genomicDataFilter1.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataFilters.add(genomicDataFilter1);
+        
+        GenomicDataFilter genomicDataFilter2 = new GenomicDataFilter();
+        genomicDataFilter2.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_2);
+        genomicDataFilter2.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataFilters.add(genomicDataFilter2);
+        
+        genomicDataCountFilter.setGenomicDataFilters(genomicDataFilters);
+        
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+        genomicDataCountFilter.setStudyViewFilter(studyViewFilter);
+
+        mockMvc.perform(MockMvcRequestBuilders.post("/genomic-data-counts/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(genomicDataCountFilter)))
+            .andExpect(MockMvcResultMatchers.status().isOk())
+            .andExpect(MockMvcResultMatchers.content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].hugoGeneSymbol").value(TEST_HUGO_GENE_SYMBOL_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].profileType").value(TEST_MOLECULAR_PROFILE_TYPE))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[0].label").value(TEST_CNA_ALTERATION_NAME_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[0].value").value(TEST_CNA_ALTERATION_VALUE_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[0].count").value(1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[1].label").value(TEST_CNA_ALTERATION_NAME_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[1].value").value(TEST_CNA_ALTERATION_VALUE_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[1].count").value(1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].hugoGeneSymbol").value(TEST_HUGO_GENE_SYMBOL_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].profileType").value(TEST_MOLECULAR_PROFILE_TYPE))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[0].label").value(TEST_CNA_ALTERATION_NAME_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[0].value").value(TEST_CNA_ALTERATION_VALUE_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[0].count").value(1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[1].label").value(TEST_CNA_ALTERATION_NAME_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[1].value").value(TEST_CNA_ALTERATION_VALUE_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[1].count").value(1));
+    }
+    
     @Ignore("Skip StudyViewControllerTest.fetchClinicalDataDensityPlot due to assertion errors")
     @Test
     public void fetchClinicalDataDensityPlot() throws Exception {ueu(b408e9cf6343ee0a4b0c1bf95ff401fd0b2d0ecd}(sha(b408e9cf6343ee0a4b0c1bf95ff401fd0b2d0ecdnode_idEC_kwDOAe-hB9oAKGI0MDhlOWNmNjM0M2VlMGE0YjBjMWJmOTVmZjQwMWZkMGIyZDBlY2Qcommit}(author}(name
Bas Leenknegtemailbasleenknegt@thehyve.nldate2023-08-02T13:46:18Zu	committer}(j*  
Bas Leenknegtj*  basleenknegt@thehyve.nlj*  2023-08-09T07:51:14Zumessage;Add defaults for mutation heatmap and line chart checkboxestree}(j*  (2a3b63077c25c355d0e5b10a063c5262f6ce841eurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/2a3b63077c25c355d0e5b10a063c5262f6ce841euj'*  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/b408e9cf6343ee0a4b0c1bf95ff401fd0b2d0ecd
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj'*  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b408e9cf6343ee0a4b0c1bf95ff401fd0b2d0ecdhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/b408e9cf6343ee0a4b0c1bf95ff401fd0b2d0ecdcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/b408e9cf6343ee0a4b0c1bf95ff401fd0b2d0ecd/commentsj*  }(loginBasLeeidJ~2 j*  MDQ6VXNlcjMzMjMwMDY=
avatar_url3https://avatars.githubusercontent.com/u/3323006?v=4gravatar_idh5j'*  #https://api.github.com/users/BasLeej3*  https://github.com/BasLee
followers_url-https://api.github.com/users/BasLee/followers
following_url:https://api.github.com/users/BasLee/following{/other_user}	gists_url3https://api.github.com/users/BasLee/gists{/gist_id}starred_url:https://api.github.com/users/BasLee/starred{/owner}{/repo}subscriptions_url1https://api.github.com/users/BasLee/subscriptionsorganizations_url(https://api.github.com/users/BasLee/orgs	repos_url)https://api.github.com/users/BasLee/repos
events_url4https://api.github.com/users/BasLee/events{/privacy}received_events_url3https://api.github.com/users/BasLee/received_eventstypeUser
site_adminuj*  }(j8*  BasLeej:*  J~2 j*  MDQ6VXNlcjMzMjMwMDY=j<*  3https://avatars.githubusercontent.com/u/3323006?v=4j>*  h5j'*  #https://api.github.com/users/BasLeej3*  https://github.com/BasLeejA*  -https://api.github.com/users/BasLee/followersjC*  :https://api.github.com/users/BasLee/following{/other_user}jE*  3https://api.github.com/users/BasLee/gists{/gist_id}jG*  :https://api.github.com/users/BasLee/starred{/owner}{/repo}jI*  1https://api.github.com/users/BasLee/subscriptionsjK*  (https://api.github.com/users/BasLee/orgsjM*  )https://api.github.com/users/BasLee/reposjO*  4https://api.github.com/users/BasLee/events{/privacy}jQ*  3https://api.github.com/users/BasLee/received_eventsjS*  UserjU*  uparents]}(j*  (58a9cbe48c327c00913673471442986a42422241j'*  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/58a9cbe48c327c00913673471442986a42422241j3*  Xhttps://github.com/cBioPortal/cbioportal/commit/58a9cbe48c327c00913673471442986a42422241uastats}(totalK	additionsK	deletionsKufiles](}(j*  (c0c1bde41c23b8f23c6768d2d6f574cdd19bb992filename<docs/deployment/customization/portal.properties-Reference.mdstatusmodifiedjo*  Kjp*  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/b408e9cf6343ee0a4b0c1bf95ff401fd0b2d0ecd/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdraw_urlhttps://github.com/cBioPortal/cbioportal/raw/b408e9cf6343ee0a4b0c1bf95ff401fd0b2d0ecd/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.md?ref=b408e9cf6343ee0a4b0c1bf95ff401fd0b2d0ecdpatchXG  @@ -153,6 +153,13 @@ Different samples of a patient may have been analyzed with different gene panels
 skin.patientview.filter_genes_profiled_all_samples=
 ```
 
+### Control default settings of the VAF line chart in the genomic evolution tab of patient view
+If you want to enablelog scale and sequential mode by default, set this property to `true`:
+```
+vaf.log_scale.default=true|false
+vaf.sequential_mode.default=true|false
+```
+
 ### Control unauthorized studies to be displayed on the home page
 
 By default, on an authenticated portal the home page will only show studies for which the current user is authorized. By setting the _skin.home\_page.show\_unauthorized\_studies_ property to _true_ the home page will also show unauthorized studies. The unauthorized studies will appear greyed out and cannot be selected for downstream analysis in Results View or Study View.
@@ -436,6 +443,11 @@ oncoprint.oncokb.default=true|false
 oncoprint.hotspots.default=true|false
 ```
 
+If you want to enable oncoprint heatmap clustering by default, set this property to `true`:
+```
+oncoprint.clustered.default=true|false
+```
+
 **Automatic hiding of variants of unknown significance (VUS)**
 
 By default, the selection box to hide VUS mutations is unchecked. If you want to automatically hide VUS, set this property to `true`. Default is `false`.u}(j*  (5dc3ba8c9feb1ec0fa5ec3a06b512338a51fc459ju*  )portal/src/main/webapp/config_service.jspjw*  modifiedjo*  Kjp*  Kjy*  Kjz*  https://github.com/cBioPortal/cbioportal/blob/b408e9cf6343ee0a4b0c1bf95ff401fd0b2d0ecd/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj|*  https://github.com/cBioPortal/cbioportal/raw/b408e9cf6343ee0a4b0c1bf95ff401fd0b2d0ecd/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj~*  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=b408e9cf6343ee0a4b0c1bf95ff401fd0b2d0ecdj*  X  @@ -38,6 +38,7 @@
             "oncoprint.custom_driver_annotation.binary.default",
             "oncoprint.oncokb.default",
             "oncoprint.hotspots.default",
+            "oncoprint.clustered.default",
             "genomenexus.url",
             "genomenexus.url.grch38",
             "google_analytics_profile_id",
@@ -147,7 +148,9 @@
             "skin.patient_view.structural_variant_table.columns.show_on_init",
             "comparison.categorical_na_values",
             "study_download_url",
-            "skin.home_page.show_reference_genome"
+            "skin.home_page.show_reference_genome",
+            "vaf.sequential_mode.default",
+            "vaf.log_scale.default"
         };
 
 u}(j*  (2d9502892525f321e80ea0c7c530b6d2e3e5f699ju*  ,src/main/resources/portal.properties.EXAMPLEjw*  modifiedjo*  Kjp*  Kjy*  Kjz*  https://github.com/cBioPortal/cbioportal/blob/b408e9cf6343ee0a4b0c1bf95ff401fd0b2d0ecd/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj|*  https://github.com/cBioPortal/cbioportal/raw/b408e9cf6343ee0a4b0c1bf95ff401fd0b2d0ecd/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj~*  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=b408e9cf6343ee0a4b0c1bf95ff401fd0b2d0ecdj*  Xf  @@ -316,6 +316,7 @@ oncoprint.oncokb.default=true
 oncoprint.hotspots.default=true
 # oncoprint.hide_vus.default=true
 # oncoprint.clinical_tracks.config_json=classpath:/oncoprint-default-tracks.json
+# oncoprint.clustered.default=true
 
 # Custom gene sets
 # querypage.setsofgenes.location=file:/<path>
@@ -435,4 +436,7 @@ persistence.cache_type=no-cache
 # Allows download links within DataSets Tab (See Portal.Properties documentation for more info)
 # study_download_url=
 
-# download_group=
\ No newline at end of file
+# download_group=
+
+# vaf.sequential_mode.default=false
+# vaf.log_scale.default=falseueu     (2ef50ef0663dd8da65f8fa8b114af9f68fd313d4}(sha(2ef50ef0663dd8da65f8fa8b114af9f68fd313d4node_idEC_kwDOAe-hB9oAKDJlZjUwZWYwNjYzZGQ4ZGE2NWY4ZmE4YjExNGFmOWY2OGZkMzEzZDQcommit}(author}(namePrasanna Kumar Jagannathanemail+37613906+jagnathan@users.noreply.github.comdate2023-06-27T18:11:56Zu	committer}(j*  Prasanna Kumar Jagannathanj*  +37613906+jagnathan@users.noreply.github.comj*  2023-06-27T18:11:56ZumessageX  Fix 10221 403 error; Unauthorized studies are displayed as authorized

Fix 10221  Unauthorized studies are displayed as authorized due to issue with using RequestParam

adding @RequestParam causes error HTTP 400 error as by default required = true, if set to required = false causes unauthorized studies to be shown as authorized

Swagger validation errors fixed via commit a57c4894bec3a701835f72dbb751b1f66fc4e5e6
caused this issue.tree}(j*  (b9bec510e1e52efd6691ebef2870ca632f07d864urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/b9bec510e1e52efd6691ebef2870ca632f07d864uj*  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/2ef50ef0663dd8da65f8fa8b114af9f68fd313d4
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj*  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2ef50ef0663dd8da65f8fa8b114af9f68fd313d4html_urlXhttps://github.com/cBioPortal/cbioportal/commit/2ef50ef0663dd8da65f8fa8b114af9f68fd313d4comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/2ef50ef0663dd8da65f8fa8b114af9f68fd313d4/commentsj*  }(login	jagnathanidJR=j*  MDQ6VXNlcjM3NjEzOTA2
avatar_url4https://avatars.githubusercontent.com/u/37613906?v=4gravatar_idh5j*  &https://api.github.com/users/jagnathanj*  https://github.com/jagnathan
followers_url0https://api.github.com/users/jagnathan/followers
following_url=https://api.github.com/users/jagnathan/following{/other_user}	gists_url6https://api.github.com/users/jagnathan/gists{/gist_id}starred_url=https://api.github.com/users/jagnathan/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/jagnathan/subscriptionsorganizations_url+https://api.github.com/users/jagnathan/orgs	repos_url,https://api.github.com/users/jagnathan/repos
events_url7https://api.github.com/users/jagnathan/events{/privacy}received_events_url6https://api.github.com/users/jagnathan/received_eventstypeUser
site_adminuj*  }(j*  	jagnathanj*  JR=j*  MDQ6VXNlcjM3NjEzOTA2j*  4https://avatars.githubusercontent.com/u/37613906?v=4j*  h5j*  &https://api.github.com/users/jagnathanj*  https://github.com/jagnathanj*  0https://api.github.com/users/jagnathan/followersj*  =https://api.github.com/users/jagnathan/following{/other_user}j*  6https://api.github.com/users/jagnathan/gists{/gist_id}j*  =https://api.github.com/users/jagnathan/starred{/owner}{/repo}j*  4https://api.github.com/users/jagnathan/subscriptionsj*  +https://api.github.com/users/jagnathan/orgsj*  ,https://api.github.com/users/jagnathan/reposj*  7https://api.github.com/users/jagnathan/events{/privacy}j*  6https://api.github.com/users/jagnathan/received_eventsj*  Userj*  uparents]}(j*  (8bf1312544943ac06a3e7b932ead81a41aa232d0j*  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8bf1312544943ac06a3e7b932ead81a41aa232d0j*  Xhttps://github.com/cBioPortal/cbioportal/commit/8bf1312544943ac06a3e7b932ead81a41aa232d0uastats}(totalK	additionsK	deletionsKufiles]}(j*  (d00b649d3644efc0839f1a9c38aeebe6e73724edfilename9web/src/main/java/org/cbioportal/web/StudyController.javastatusmodifiedj*  Kj*  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/2ef50ef0663dd8da65f8fa8b114af9f68fd313d4/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/2ef50ef0663dd8da65f8fa8b114af9f68fd313d4/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.java?ref=2ef50ef0663dd8da65f8fa8b114af9f68fd313d4patchXZ  @@ -99,9 +99,10 @@ public ResponseEntity<List<CancerStudy>> getAllStudies(
         @RequestParam(required = false) StudySortBy sortBy,
         @ApiParam("Direction of the sort")
         @RequestParam(defaultValue = "ASC") Direction direction,
-        @ApiParam(hidden = true, required = false)
-        @RequestParam(required = false) Authentication authentication) {
-        
+        // adding @RequestParam causes error HTTP 400 error as by default required = true 
+        // if set to required = false causes unauthorized studies to be shown as authorized - see issue 10221
+        @ApiParam(hidden = true)
+        Authentication authentication) {
         // Only use this feature on the public portal and make sure it is never used
         // on portals using auth, as in auth setting, different users will have different
         // results.uau(659bfa94fe6d606649df09acd8a46df4f27c05f8}(sha(659bfa94fe6d606649df09acd8a46df4f27c05f8node_idEC_kwDOAe-hB9oAKDY1OWJmYTk0ZmU2ZDYwNjY0OWRmMDlhY2Q4YTQ2ZGY0ZjI3YzA1Zjgcommit}(author}(namePim van Nieropemailpim@thehyve.nldate2023-04-19T07:55:06Zu	committer}(j+  
pvannieropj+  pim@thehyve.nlj+  2023-07-19T14:29:55Zumessage&Fix database credentials for core testtree}(j	+  (375dfce0d422defb0960174019bf2cb1be7bcc8durlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/375dfce0d422defb0960174019bf2cb1be7bcc8duj!+  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/659bfa94fe6d606649df09acd8a46df4f27c05f8
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj!+  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/659bfa94fe6d606649df09acd8a46df4f27c05f8html_urlXhttps://github.com/cBioPortal/cbioportal/commit/659bfa94fe6d606649df09acd8a46df4f27c05f8comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/659bfa94fe6d606649df09acd8a46df4f27c05f8/commentsj+  }(login
pvannieropidJa j+  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5j!+  'https://api.github.com/users/pvannieropj-+  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminuj+  }(j2+  
pvannieropj4+  Ja j+  MDQ6VXNlcjc0NTg4NQ==j6+  2https://avatars.githubusercontent.com/u/745885?v=4j8+  h5j!+  'https://api.github.com/users/pvannieropj-+  https://github.com/pvannieropj;+  1https://api.github.com/users/pvannierop/followersj=+  >https://api.github.com/users/pvannierop/following{/other_user}j?+  7https://api.github.com/users/pvannierop/gists{/gist_id}jA+  >https://api.github.com/users/pvannierop/starred{/owner}{/repo}jC+  5https://api.github.com/users/pvannierop/subscriptionsjE+  ,https://api.github.com/users/pvannierop/orgsjG+  -https://api.github.com/users/pvannierop/reposjI+  8https://api.github.com/users/pvannierop/events{/privacy}jK+  7https://api.github.com/users/pvannierop/received_eventsjM+  UserjO+  uparents]}(j	+  (970212e4c44471639cad77335494784d8dfae172j!+  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/970212e4c44471639cad77335494784d8dfae172j-+  Xhttps://github.com/cBioPortal/cbioportal/commit/970212e4c44471639cad77335494784d8dfae172uastats}(totalK	additionsK 	deletionsKufiles](}(j	+  (863d73a87d90284cfcf4fd47eb4cdce78c21f527filenameportal/pom.xmlstatusmodifiedji+  K jj+  KchangesKblob_urlghttps://github.com/cBioPortal/cbioportal/blob/659bfa94fe6d606649df09acd8a46df4f27c05f8/portal%2Fpom.xmlraw_urlfhttps://github.com/cBioPortal/cbioportal/raw/659bfa94fe6d606649df09acd8a46df4f27c05f8/portal%2Fpom.xmlcontents_urlyhttps://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fpom.xml?ref=659bfa94fe6d606649df09acd8a46df4f27c05f8patchXN  @@ -215,8 +215,6 @@
             <!-- We neither create nor populate the database here. Instead we rely on DB created for the integration tests in the core module. -->
             <CBIO_TEST_DB_USR>${db.test.username}</CBIO_TEST_DB_USR>
             <CBIO_TEST_DB_PSW>${db.test.password}</CBIO_TEST_DB_PSW>
-            <CBIO_TEST_DB_HOST>127.0.0.1:3306</CBIO_TEST_DB_HOST>
-            <CBIO_TEST_DB_NAME>cgds_test</CBIO_TEST_DB_NAME>
             <CBIO_TEST_DB_CONNECTION_STRING>${db.test.url}</CBIO_TEST_DB_CONNECTION_STRING>
           </environmentVariables>
         </configuration>u}(j	+  (2db2234226472abea7a2a024c3c22c383b437066jo+  6portal/src/integration-tests/saml-oauth2-setup/pom.xmljq+  modifiedji+  K jj+  Kjs+  Kjt+  https://github.com/cBioPortal/cbioportal/blob/659bfa94fe6d606649df09acd8a46df4f27c05f8/portal%2Fsrc%2Fintegration-tests%2Fsaml-oauth2-setup%2Fpom.xmljv+  https://github.com/cBioPortal/cbioportal/raw/659bfa94fe6d606649df09acd8a46df4f27c05f8/portal%2Fsrc%2Fintegration-tests%2Fsaml-oauth2-setup%2Fpom.xmljx+  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fintegration-tests%2Fsaml-oauth2-setup%2Fpom.xml?ref=659bfa94fe6d606649df09acd8a46df4f27c05f8jz+  X  @@ -66,8 +66,6 @@
                             <!-- DB settings -->
                             <db.user>${env.CBIO_TEST_DB_USR}</db.user>
                             <db.password>${env.CBIO_TEST_DB_PSW}</db.password>
-                            <db.host>${env.CBIO_TEST_DB_HOST}</db.host>
-                            <db.portal_db_name>${env.CBIO_TEST_DB_NAME}</db.portal_db_name>
                             <db.connection_string>${env.CBIO_TEST_DB_CONNECTION_STRING}</db.connection_string>
                             <!-- SAML settings -->
                             <saml.keystore.location>file://${project.basedir}/testSamlKeystore.jksueu(f332e687c1d6c03fbbdac1010f78b0077fc93647}(sha(f332e687c1d6c03fbbdac1010f78b0077fc93647node_idEC_kwDOAe-hB9oAKGYzMzJlNjg3YzFkNmMwM2ZiYmRhYzEwMTBmNzhiMDA3N2ZjOTM2NDccommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-07-20T07:50:59Zu	committer}(j+  
pvannieropj+  pim@thehyve.nlj+  2023-07-20T07:50:59ZumessageCorrect formattingtree}(j+  (5639f9d645a2611919dbb56fc4dc3b14d18867baurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/5639f9d645a2611919dbb56fc4dc3b14d18867bauj+  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/f332e687c1d6c03fbbdac1010f78b0077fc93647
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj+  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/f332e687c1d6c03fbbdac1010f78b0077fc93647html_urlXhttps://github.com/cBioPortal/cbioportal/commit/f332e687c1d6c03fbbdac1010f78b0077fc93647comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/f332e687c1d6c03fbbdac1010f78b0077fc93647/commentsj+  }(login
pvannieropidJa j+  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5j+  'https://api.github.com/users/pvannieropj+  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminuj+  }(j+  
pvannieropj+  Ja j+  MDQ6VXNlcjc0NTg4NQ==j+  2https://avatars.githubusercontent.com/u/745885?v=4j+  h5j+  'https://api.github.com/users/pvannieropj+  https://github.com/pvannieropj+  1https://api.github.com/users/pvannierop/followersj+  >https://api.github.com/users/pvannierop/following{/other_user}j+  7https://api.github.com/users/pvannierop/gists{/gist_id}j+  >https://api.github.com/users/pvannierop/starred{/owner}{/repo}j+  5https://api.github.com/users/pvannierop/subscriptionsj+  ,https://api.github.com/users/pvannierop/orgsj+  -https://api.github.com/users/pvannierop/reposj+  8https://api.github.com/users/pvannierop/events{/privacy}j+  7https://api.github.com/users/pvannierop/received_eventsj+  Userj+  uparents]}(j+  (2bad83ff26610548f04f0984e98041ebfe20d2b2j+  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2bad83ff26610548f04f0984e98041ebfe20d2b2j+  Xhttps://github.com/cBioPortal/cbioportal/commit/2bad83ff26610548f04f0984e98041ebfe20d2b2uastats}(totalK	additionsK	deletionsKufiles]}(j+  (f8e2d57976f95ca5f04c7c6c28b82d90654935c4filename=core/src/main/java/org/mskcc/cbio/portal/util/SpringUtil.javastatusmodifiedj+  Kj+  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/f332e687c1d6c03fbbdac1010f78b0077fc93647/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FSpringUtil.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/f332e687c1d6c03fbbdac1010f78b0077fc93647/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FSpringUtil.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FSpringUtil.java?ref=f332e687c1d6c03fbbdac1010f78b0077fc93647patchXe  @@ -88,8 +88,7 @@ public static void setApplicationContext(ApplicationContext context) {
      *
      * @param context
      */
-    public static synchronized void initDataSource(ApplicationContext context)
-    {
+    public static synchronized void initDataSource(ApplicationContext context) {
         SpringUtil.applicationContext = context;
     }
 }uau(c29e0ca7e89a56776a690dd8a62af8fbc87b0524}(sha(c29e0ca7e89a56776a690dd8a62af8fbc87b0524node_idEC_kwDOAe-hB9oAKGMyOWUwY2E3ZTg5YTU2Nzc2YTY5MGRkOGE2MmFmOGZiYzg3YjA1MjQcommit}(author}(name
Onur Sumeremails.onur.sumer@gmail.comdate2023-06-08T23:01:41Zu	committer}(j,  
Onur Sumerj,  s.onur.sumer@gmail.comj,  2023-06-08T23:01:41Zumessageundo revert (temp commit)tree}(j+  (4fc554ea13c7ff1454a0632470d13f8fed6f8ee3urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/4fc554ea13c7ff1454a0632470d13f8fed6f8ee3uj,  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/c29e0ca7e89a56776a690dd8a62af8fbc87b0524
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj,  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/c29e0ca7e89a56776a690dd8a62af8fbc87b0524html_urlXhttps://github.com/cBioPortal/cbioportal/commit/c29e0ca7e89a56776a690dd8a62af8fbc87b0524comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/c29e0ca7e89a56776a690dd8a62af8fbc87b0524/commentsj,  }(login	onursumeridJ6 j+  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5j,  &https://api.github.com/users/onursumerj,  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminuj	,  }(j$,  	onursumerj&,  J6 j+  MDQ6VXNlcjM2MDQxOTg=j(,  3https://avatars.githubusercontent.com/u/3604198?v=4j*,  h5j,  &https://api.github.com/users/onursumerj,  https://github.com/onursumerj-,  0https://api.github.com/users/onursumer/followersj/,  =https://api.github.com/users/onursumer/following{/other_user}j1,  6https://api.github.com/users/onursumer/gists{/gist_id}j3,  =https://api.github.com/users/onursumer/starred{/owner}{/repo}j5,  4https://api.github.com/users/onursumer/subscriptionsj7,  +https://api.github.com/users/onursumer/orgsj9,  ,https://api.github.com/users/onursumer/reposj;,  7https://api.github.com/users/onursumer/events{/privacy}j=,  6https://api.github.com/users/onursumer/received_eventsj?,  UserjA,  uparents]}(j+  (8bca4a72dd6907c58c57320609a7b8492b4b35fcj,  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8bca4a72dd6907c58c57320609a7b8492b4b35fcj,  Xhttps://github.com/cBioPortal/cbioportal/commit/8bca4a72dd6907c58c57320609a7b8492b4b35fcuastats}(totalK,	additionsK 	deletionsK,ufiles]}(j+  (b94dee923142daaf1ca9dbf85e1f9132b5f40e1afilename=web/src/main/java/org/cbioportal/web/StudyViewController.javastatusmodifiedj[,  K j\,  K,changesK,blob_urlhttps://github.com/cBioPortal/cbioportal/blob/c29e0ca7e89a56776a690dd8a62af8fbc87b0524/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/c29e0ca7e89a56776a690dd8a62af8fbc87b0524/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=c29e0ca7e89a56776a690dd8a62af8fbc87b0524patchX  @@ -203,23 +203,6 @@ public ResponseEntity<List<AlterationCountByGene>> fetchMutatedGenes(
         @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
         @ApiIgnore // 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
-    ) throws StudyNotFoundException {
-        boolean singleStudyUnfiltered = studyViewFilterUtil.isSingleStudyUnfiltered(interceptedStudyViewFilter);
-        List<AlterationCountByGene> alterationCountByGenes = instance.cachedFetchMutatedGenes(interceptedStudyViewFilter, singleStudyUnfiltered);
-        return new ResponseEntity<>(alterationCountByGenes, HttpStatus.OK);
-    }
-    
-    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
-    @RequestMapping(value = "/column-store/mutated-genes/fetch", method = RequestMethod.POST,
-        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
-    @ApiOperation("Fetch mutated genes by study view filter")
-    public ResponseEntity<List<AlterationCountByGene>> fetchMutatedGenesFromColumnStore(
-        @ApiParam(required = true, value = "Study view filter")
-        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter,
-        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
-        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
-        @ApiIgnore // 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<>(
             studyViewService.getMutatedGenesFromColumnstore(interceptedStudyViewFilter),
@@ -336,33 +319,6 @@ public ResponseEntity<List<Sample>> fetchFilteredSamples(
         @ApiParam(required = true, value = "Study view filter")
         @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter) {
 
-        List<String> studyIds = new ArrayList<>();
-        List<String> sampleIds = new ArrayList<>();
-
-        studyViewFilterUtil.extractStudyAndSampleIds(
-            studyViewFilterApplier.apply(interceptedStudyViewFilter, negateFilters), studyIds, sampleIds);
-
-        List<Sample> result = new ArrayList<>();
-        if (!sampleIds.isEmpty()) {
-            result = sampleService.fetchSamples(studyIds, sampleIds, Projection.ID.name());
-        }
-        return new ResponseEntity<>(result, HttpStatus.OK);
-    }
-
-    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
-    @RequestMapping(value = "/column-store/filtered-samples/fetch", method = RequestMethod.POST,
-        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
-    @ApiOperation("Fetch sample IDs by study view filter")
-    public ResponseEntity<List<Sample>> fetchFilteredSamplesFromColumnStore(
-        @ApiParam("Whether to negate the study view filters")
-        @RequestParam(defaultValue = "false") Boolean negateFilters,
-        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
-        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
-        @ApiIgnore // 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,
-        @ApiParam(required = true, value = "Study view filter")
-        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter) {
-
         return new ResponseEntity<>(
             studyViewService.getFilteredSamplesFromColumnstore(interceptedStudyViewFilter),
             HttpStatus.OKuau(020655dc919769a707771284ae948a976b410068}(sha(020655dc919769a707771284ae948a976b410068node_idEC_kwDOAe-hB9oAKDAyMDY1NWRjOTE5NzY5YTcwNzc3MTI4NGFlOTQ4YTk3NmI0MTAwNjgcommit}(author}(namesbabyanushaemailsatravab@mskcc.orgdate2023-08-14T23:55:51Zu	committer}(jx,  sbabyanushajz,  satravab@mskcc.orgj|,  2023-08-14T23:55:51ZumessageUpdate News.mdtree}(jp,  (1754626a8fd37921a92a585a6ffe8261e65a254burlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/1754626a8fd37921a92a585a6ffe8261e65a254buj,  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/020655dc919769a707771284ae948a976b410068
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj,  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/020655dc919769a707771284ae948a976b410068html_urlXhttps://github.com/cBioPortal/cbioportal/commit/020655dc919769a707771284ae948a976b410068comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/020655dc919769a707771284ae948a976b410068/commentsjv,  }(loginsbabyanushaidJ`_jr,  MDQ6VXNlcjYxNDMxNjQ4
avatar_url4https://avatars.githubusercontent.com/u/61431648?v=4gravatar_idh5j,  (https://api.github.com/users/sbabyanushaj,  https://github.com/sbabyanusha
followers_url2https://api.github.com/users/sbabyanusha/followers
following_url?https://api.github.com/users/sbabyanusha/following{/other_user}	gists_url8https://api.github.com/users/sbabyanusha/gists{/gist_id}starred_url?https://api.github.com/users/sbabyanusha/starred{/owner}{/repo}subscriptions_url6https://api.github.com/users/sbabyanusha/subscriptionsorganizations_url-https://api.github.com/users/sbabyanusha/orgs	repos_url.https://api.github.com/users/sbabyanusha/repos
events_url9https://api.github.com/users/sbabyanusha/events{/privacy}received_events_url8https://api.github.com/users/sbabyanusha/received_eventstypeUser
site_adminuj~,  }(j,  sbabyanushaj,  J`_jr,  MDQ6VXNlcjYxNDMxNjQ4j,  4https://avatars.githubusercontent.com/u/61431648?v=4j,  h5j,  (https://api.github.com/users/sbabyanushaj,  https://github.com/sbabyanushaj,  2https://api.github.com/users/sbabyanusha/followersj,  ?https://api.github.com/users/sbabyanusha/following{/other_user}j,  8https://api.github.com/users/sbabyanusha/gists{/gist_id}j,  ?https://api.github.com/users/sbabyanusha/starred{/owner}{/repo}j,  6https://api.github.com/users/sbabyanusha/subscriptionsj,  -https://api.github.com/users/sbabyanusha/orgsj,  .https://api.github.com/users/sbabyanusha/reposj,  9https://api.github.com/users/sbabyanusha/events{/privacy}j,  8https://api.github.com/users/sbabyanusha/received_eventsj,  Userj,  uparents]}(jp,  (4b90204f32aa8c76bfa9c1520a22b74a5f537865j,  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4b90204f32aa8c76bfa9c1520a22b74a5f537865j,  Xhttps://github.com/cBioPortal/cbioportal/commit/4b90204f32aa8c76bfa9c1520a22b74a5f537865uastats}(totalK	additionsK	deletionsKufiles]}(jp,  (bac230bfe6fc011fa06858a5757d0de727bd2fdbfilenamedocs/News.mdstatusmodifiedj,  Kj,  KchangesKblob_urlehttps://github.com/cBioPortal/cbioportal/blob/020655dc919769a707771284ae948a976b410068/docs%2FNews.mdraw_urldhttps://github.com/cBioPortal/cbioportal/raw/020655dc919769a707771284ae948a976b410068/docs%2FNews.mdcontents_urlwhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FNews.md?ref=020655dc919769a707771284ae948a976b410068patchX  @@ -1,5 +1,5 @@
 ## Aug 15, 2023
-*   **Added data** consisting of 2,472 samples from 5 studies:
+*   **Added data** consisting of 4,488 samples from 7 studies:
     * [Lung Adenocarcinoma Met Organotropism (MSK, Cancer Cell 2023)](https://www.cbioportal.org/study/summary?id=luad_mskcc_2023_met_organotropism) *2653 samples*
     * [Acute Myeloid Leukemia (OHSU, Cancer Cell 2022)](https://www.cbioportal.org/study/summary?id=aml_ohsu_2022) *942 samples*
     * [Colon Cancer (Sidra-LUMC AC-ICAM, Nat Med 2023)](https://www.cbioportal.org/study/summary?id=coad_silu_2022) *348 samples*
@@ -10,12 +10,19 @@
 
 * **Gene Tables Update** Updated tables of genes (main and alias), based on [Apr 1, 2023 HGNC release](http://ftp.ebi.ac.uk/pub/databases/genenames/hgnc/archive/monthly/tsv/). See seedDB release note [here](https://github.com/cBioPortal/datahub/tree/master/seedDB#latest-seed-database) for details.
 
-* **Data Improvement**
-   * Pan-can studies methylation addition: methylation profile 450K is added to all 32 TCGA Pan-Can studies, in generic assay format. Data source: [GDC](https://gdc.cancer.gov/node/977). Example: Search by gene or probe from dropdown, to add a chart in study view, a track in Oncoprint (single study query only), or plots in plots tab. 
-<img width="1151" alt="Screen Shot 2023-08-14 at 1 57 29 PM" src="https://github.com/cBioPortal/datahub/assets/61431648/80ce4e7f-84c0-4de4-8cec-deaa79236201">
-
-   * Pan-can studies Ancestry addition: Genetic Ancestry data is added to all 32 TCGA Pan-Can studies, in generic assay format. Data source: [GDC](https://gdc.cancer.gov/about-data/publications/CCG-AIM-2020). Example: Search by each ancestry from dropdown, to add a chart in study view, a track in Oncoprint. 
-<img width="1129" alt="Screen Shot 2023-08-14 at 4 26 22 PM" src="https://github.com/cBioPortal/datahub/assets/61431648/1e5a212c-518c-4eb1-add4-330452c28926">
+* **Data Improvements**
+   
+ * Methylation profile 450K is added to all 32 TCGA Pan-Can studies, in generic assay format. Data source: [GDC](https://gdc.cancer.gov/node/977). 
+     * Examples: Query by gene or probe from the dropdown box in the charts tab of the study summary page.
+     * Add a chart in the study view. 
+     * Create a track in Oncoprint (single study query only), or plots in the plots tab.
+<img width="1145" alt="Screen Shot 2023-08-14 at 7 35 42 PM" src="https://github.com/cBioPortal/datahub/assets/61431648/d4841094-cdd0-49bd-b91d-8513014be7d6">
+    
+ * Genetic Ancestry data is added to all 32 TCGA Pan-Can studies, in generic assay format. Data source: [GDC](https://gdc.cancer.gov/about-data/publications/CCG-AIM-2020).
+     * Examples: Query by each ancestry population from the dropdown in the charts tab of the study summary page.
+     * Add an ancestry chart in the study view and can compare it with other populations.
+     * Create a track in Oncoprint (single study query only), or plots in the plots tab. 
+<img width="1121" alt="Screen Shot 2023-08-14 at 7 42 24 PM" src="https://github.com/cBioPortal/datahub/assets/61431648/58394b31-71fb-4326-99c1-989ee0f8bed1">
 
 ## Aug 1, 2023
 *   **Enhancement**: One-sided Fisher's exact tests were changed to be two-sided. The affected pages are:uau(4b76f510ea131b3a2daf7ce9bd3bdecff2e82835}(sha(4b76f510ea131b3a2daf7ce9bd3bdecff2e82835node_idEC_kwDOAe-hB9oAKDRiNzZmNTEwZWExMzFiM2EyZGFmN2NlOWJkM2JkZWNmZjJlODI4MzUcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-01T15:59:30Zu	committer}(j,  GitHubj,  noreply@github.comj,  2023-08-01T15:59:30ZumessageFrontend v5.3.16tree}(j,  (1ea0f392f3ff991d6ae2de9ed1af932bc0ee96b5urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/1ea0f392f3ff991d6ae2de9ed1af932bc0ee96b5uj,  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/4b76f510ea131b3a2daf7ce9bd3bdecff2e82835
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkySviCRBK7hj4Ov3rIwAAZ64IAGeiNg46HlFlRiOoe9MOeHRy
tsvY5zilaOEDMXjfgfUwPr1hzhe9dsrjRM+hoMek3oBykW57uZKah07AEg6NvD+o
gGthiU3PvJDRfc/xiT9nbHP/ZpX3g6L5Xoq/wXksaK3cJBIBbq4VTtpSZgRc9DF1
Bh5ThYJT5v4Q7XMkI1UD8Wzz9ai9Ezsb0WNc4CjKFxTotCY2ULDg8tt68/FDekR+
3j6621pcrhLThWWZ0ZfEOL5DN5420Gf9QszoEwYHNKInCOhH5/4b7QOtsvZOAHo5
azzM6uiv8PrVGoTqRT3uYLLsQ1laWjW9/8j2whiBnvAHdcNqQVsIvkYWqR7EMHs=
=Q6tU
-----END PGP SIGNATURE-----
payloadtree 1ea0f392f3ff991d6ae2de9ed1af932bc0ee96b5
parent 731bd621429536b2c9c10751007c46f5c06d79c5
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1690905570 -0400
committer GitHub <noreply@github.com> 1690905570 -0400

Frontend v5.3.16uuj,  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4b76f510ea131b3a2daf7ce9bd3bdecff2e82835html_urlXhttps://github.com/cBioPortal/cbioportal/commit/4b76f510ea131b3a2daf7ce9bd3bdecff2e82835comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/4b76f510ea131b3a2daf7ce9bd3bdecff2e82835/commentsj,  }(login
dippindotsidJtO j,  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j,  'https://api.github.com/users/dippindotsj-  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj,  }(j-  web-flowj-  J/j,  MDQ6VXNlcjE5ODY0NDQ3j-  4https://avatars.githubusercontent.com/u/19864447?v=4j-  h5j,  %https://api.github.com/users/web-flowj-  https://github.com/web-flowj-  /https://api.github.com/users/web-flow/followersj-  <https://api.github.com/users/web-flow/following{/other_user}j-  5https://api.github.com/users/web-flow/gists{/gist_id}j-  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j!-  3https://api.github.com/users/web-flow/subscriptionsj#-  *https://api.github.com/users/web-flow/orgsj%-  +https://api.github.com/users/web-flow/reposj'-  6https://api.github.com/users/web-flow/events{/privacy}j)-  5https://api.github.com/users/web-flow/received_eventsj+-  Userj--  uparents]}(j,  (731bd621429536b2c9c10751007c46f5c06d79c5j,  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/731bd621429536b2c9c10751007c46f5c06d79c5j-  Xhttps://github.com/cBioPortal/cbioportal/commit/731bd621429536b2c9c10751007c46f5c06d79c5uastats}(totalK	additionsK	deletionsKufiles]}(j,  (3f38fbcb38d59cde6328185e08cd53e0ef836775filenamepom.xmlstatusmodifiedjG-  KjH-  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/4b76f510ea131b3a2daf7ce9bd3bdecff2e82835/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/4b76f510ea131b3a2daf7ce9bd3bdecff2e82835/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=4b76f510ea131b3a2daf7ce9bd3bdecff2e82835patchXY  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.15</frontend.version>
+    <frontend.version>v5.3.16</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(d72a44f36f336ce6047b2af99add25d36aa6db2b}(sha(d72a44f36f336ce6047b2af99add25d36aa6db2bnode_idEC_kwDOAe-hB9oAKGQ3MmE0NGYzNmYzMzZjZTYwNDdiMmFmOTlhZGQyNWQzNmFhNmRiMmIcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-05-31T14:32:20Zu	committer}(jd-  GitHubjf-  noreply@github.comjh-  2023-05-31T14:32:20ZumessageJMerge pull request #10202 from cBioPortal/frontend-v5.3.9

Frontend v5.3.9tree}(j\-  (d17f750d3d99dc820bedb7537487c85215f50239urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/d17f750d3d99dc820bedb7537487c85215f50239ujt-  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/d72a44f36f336ce6047b2af99add25d36aa6db2b
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkd1p0CRBK7hj4Ov3rIwAAsQEIABBuyy+NBgebxSvzHc/E1lBB
L7IRlF9RIpwBQuMfeJQQAEtfYXm7LKjorPek2Renz1YjBMuD6VShSSUt62Hlflt1
z58wHJqukHAlq2r1Iyq0VZsG4gQtMIOTaNg+KdaVQxc1dGrqxHm+CsjQL7rYPuq8
vDc5lgTod2yDoJloNBqF4gSIH6hibSeRMyEHLvYQdYB9xUvSK0VSKap1clCUEV/t
SAf1r69QxCYKNe2udhdcU4z7QtDdkPM0qflDTWSDWowHCNCQz0NPL4FcWhSIe42Y
x/No2mmhYmIc9DKP2aNgTWbkNsuuAlj6GvltbG9Q1j8shWD9AvYI54wuxgEIVrY=
=pPy2
-----END PGP SIGNATURE-----
payloadXc  tree d17f750d3d99dc820bedb7537487c85215f50239
parent 9af6061f6a0c46d7fb3b412ca45b38cc0690b14d
parent c41f29e974f86151f9ec4b7a7447cf66c4efbf6d
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1685543540 -0600
committer GitHub <noreply@github.com> 1685543540 -0600

Merge pull request #10202 from cBioPortal/frontend-v5.3.9

Frontend v5.3.9uujt-  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d72a44f36f336ce6047b2af99add25d36aa6db2bhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/d72a44f36f336ce6047b2af99add25d36aa6db2bcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/d72a44f36f336ce6047b2af99add25d36aa6db2b/commentsjb-  }(login
dippindotsidJtO j^-  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5jt-  'https://api.github.com/users/dippindotsj-  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminujj-  }(j-  web-flowj-  J/j^-  MDQ6VXNlcjE5ODY0NDQ3j-  4https://avatars.githubusercontent.com/u/19864447?v=4j-  h5jt-  %https://api.github.com/users/web-flowj-  https://github.com/web-flowj-  /https://api.github.com/users/web-flow/followersj-  <https://api.github.com/users/web-flow/following{/other_user}j-  5https://api.github.com/users/web-flow/gists{/gist_id}j-  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j-  3https://api.github.com/users/web-flow/subscriptionsj-  *https://api.github.com/users/web-flow/orgsj-  +https://api.github.com/users/web-flow/reposj-  6https://api.github.com/users/web-flow/events{/privacy}j-  5https://api.github.com/users/web-flow/received_eventsj-  Userj-  uparents](}(j\-  (9af6061f6a0c46d7fb3b412ca45b38cc0690b14djt-  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9af6061f6a0c46d7fb3b412ca45b38cc0690b14dj-  Xhttps://github.com/cBioPortal/cbioportal/commit/9af6061f6a0c46d7fb3b412ca45b38cc0690b14du}(j\-  (c41f29e974f86151f9ec4b7a7447cf66c4efbf6djt-  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/c41f29e974f86151f9ec4b7a7447cf66c4efbf6dj-  Xhttps://github.com/cBioPortal/cbioportal/commit/c41f29e974f86151f9ec4b7a7447cf66c4efbf6duestats}(totalK	additionsK	deletionsKufiles]}(j\-  (7ce339184409827728af2851f52e105c108b6ee6filenamepom.xmlstatusmodifiedj-  Kj-  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/d72a44f36f336ce6047b2af99add25d36aa6db2b/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/d72a44f36f336ce6047b2af99add25d36aa6db2b/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=d72a44f36f336ce6047b2af99add25d36aa6db2bpatchXW  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.8</frontend.version>
+    <frontend.version>v5.3.9</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b}(sha(bbf98d2cfffb5d0b96b88a73d5e1b49897eb887bnode_idEC_kwDOAe-hB9oAKGJiZjk4ZDJjZmZmYjVkMGI5NmI4OGE3M2Q1ZTFiNDk4OTdlYjg4N2Icommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-08T16:44:33Zu	committer}(j-  Djokovic0311j-  .55948986+Djokovic0311@users.noreply.github.comj-  2023-08-08T16:44:33Zumessage%refactor the controllers and servicestree}(j-  (70d8fd006f680be5f4067a335eabc6b852c6cdc2urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/70d8fd006f680be5f4067a335eabc6b852c6cdc2uj-  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj-  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887bhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887bcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b/commentsj-  }(loginDjokovic0311idJUj-  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5j-  )https://api.github.com/users/Djokovic0311j-  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminuj-  }(j .  Djokovic0311j.  JUj-  MDQ6VXNlcjU1OTQ4OTg2j.  4https://avatars.githubusercontent.com/u/55948986?v=4j.  h5j-  )https://api.github.com/users/Djokovic0311j-  https://github.com/Djokovic0311j	.  3https://api.github.com/users/Djokovic0311/followersj.  @https://api.github.com/users/Djokovic0311/following{/other_user}j
.  9https://api.github.com/users/Djokovic0311/gists{/gist_id}j.  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}j.  7https://api.github.com/users/Djokovic0311/subscriptionsj.  .https://api.github.com/users/Djokovic0311/orgsj.  /https://api.github.com/users/Djokovic0311/reposj.  :https://api.github.com/users/Djokovic0311/events{/privacy}j.  9https://api.github.com/users/Djokovic0311/received_eventsj.  Userj.  uparents]}(j-  (5e108b7694439ce699c9ae8dae189bb1adba6adaj-  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/5e108b7694439ce699c9ae8dae189bb1adba6adaj-  Xhttps://github.com/cBioPortal/cbioportal/commit/5e108b7694439ce699c9ae8dae189bb1adba6adauastats}(totalMW	additionsKz	deletionsKufiles](}(j-  (f7ccbc7c3b5e22da61912049dcaf06665eee80ddfilenameJmodel/src/main/java/org/cbioportal/model/GenericAssayBinaryEnrichment.javastatusmodifiedj7.  Kj8.  K
changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayBinaryEnrichment.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayBinaryEnrichment.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayBinaryEnrichment.java?ref=bbf98d2cfffb5d0b96b88a73d5e1b49897eb887bpatchXv  @@ -7,8 +7,6 @@
 public class GenericAssayBinaryEnrichment extends GenericAssayEnrichment {
     @NotNull
     private List<GenericAssayCountSummary> counts;
-    @NotNull
-    private BigDecimal qValue;
 
     public List<GenericAssayCountSummary> getCounts() {
         return counts;
@@ -17,12 +15,5 @@ public List<GenericAssayCountSummary> getCounts() {
     public void setCounts(List<GenericAssayCountSummary> counts) {
         this.counts = counts;
     }
-
-    public BigDecimal getqValue() {
-        return qValue;
-    }
-
-    public void setqValue(BigDecimal qValue) {
-        this.qValue = qValue;
-    }
+    
 }u}(j-  (074aa8926d9e77f3e10a3f415399cfd6bee44958j=.  Dmodel/src/main/java/org/cbioportal/model/GenericAssayEnrichment.javaj?.  modifiedj7.  Kj8.  KjA.  KjB.  https://github.com/cBioPortal/cbioportal/blob/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayEnrichment.javajD.  https://github.com/cBioPortal/cbioportal/raw/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayEnrichment.javajF.  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayEnrichment.java?ref=bbf98d2cfffb5d0b96b88a73d5e1b49897eb887bjH.  X  @@ -1,16 +1,19 @@
 package org.cbioportal.model;
 
 import java.io.Serializable;
+import java.math.BigDecimal;
 import java.util.HashMap;
 
 import javax.validation.constraints.NotNull;
 
-public abstract class GenericAssayEnrichment extends ExpressionEnrichment implements Serializable {
+public class GenericAssayEnrichment extends ExpressionEnrichment implements Serializable {
 
 	@NotNull
 	private String stableId;
 	@NotNull
 	private String name;
+    @NotNull
+    private BigDecimal qValue;
 	@NotNull
 	private HashMap<String, String> genericEntityMetaProperties;
 
@@ -41,4 +44,11 @@ public void setGenericEntityMetaProperties(HashMap<String, String> genericEntity
     public static int compare(GenericAssayEnrichment c1, GenericAssayEnrichment c2) {
         return c1.getpValue().compareTo(c2.getpValue());
     }
+    public BigDecimal getqValue() {
+        return qValue;
+    }
+
+    public void setqValue(BigDecimal qValue) {
+        this.qValue = qValue;
+    }
 }u}(j-  (53d67e29cfd646d509e86cc8112d60d3647e4fb4j=.  Tservice/src/main/java/org/cbioportal/service/GenericAssayCategoricalDataService.javaj?.  removedj7.  K j8.  KjA.  KjB.  https://github.com/cBioPortal/cbioportal/blob/5e108b7694439ce699c9ae8dae189bb1adba6ada/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayCategoricalDataService.javajD.  https://github.com/cBioPortal/cbioportal/raw/5e108b7694439ce699c9ae8dae189bb1adba6ada/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayCategoricalDataService.javajF.  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayCategoricalDataService.java?ref=5e108b7694439ce699c9ae8dae189bb1adba6adajH.  X*  @@ -1,17 +0,0 @@
-package org.cbioportal.service;
-
-import org.cbioportal.model.EnrichmentType;
-
-import org.cbioportal.model.GenericAssayCategoricalEnrichment;
-import org.cbioportal.model.MolecularProfileCaseIdentifier;
-import org.cbioportal.service.exception.MolecularProfileNotFoundException;
-import java.util.List;
-import java.util.Map;
-
-public interface GenericAssayCategoricalDataService {
-    List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
-                                                            Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, 
-                                                                       EnrichmentType enrichmentType)
-        throws MolecularProfileNotFoundException;
-
-}u}(j-  (80451d6e7e9f9aae6c5e4647c3259b046ed95cebj=.  Oservice/src/main/java/org/cbioportal/service/GenericAssayEnrichmentService.javaj?.  renamedj7.  Kj8.  KjA.  KjB.  https://github.com/cBioPortal/cbioportal/blob/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayEnrichmentService.javajD.  https://github.com/cBioPortal/cbioportal/raw/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayEnrichmentService.javajF.  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayEnrichmentService.java?ref=bbf98d2cfffb5d0b96b88a73d5e1b49897eb887bjH.  X  @@ -2,17 +2,22 @@
 
 import org.cbioportal.model.EnrichmentType;
 import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 
 import java.util.List;
 import java.util.Map;
 
-public interface GenericAssayBinaryDataService {
+public interface GenericAssayEnrichmentService {
     List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
         String molecularProfileId,
         Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
         EnrichmentType enrichmentType)
         throws MolecularProfileNotFoundException;
 
+    List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
+                                                                                  Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
+                                                                                  EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException;
 }previous_filenameOservice/src/main/java/org/cbioportal/service/GenericAssayBinaryDataService.javau}(j-  (a40d750fb7046238a543ad3f18aaa0ee7a3e240aj=.  ]service/src/main/java/org/cbioportal/service/impl/GenericAssayCategoricalDataServiceImpl.javaj?.  removedj7.  K j8.  KzjA.  KzjB.  https://github.com/cBioPortal/cbioportal/blob/5e108b7694439ce699c9ae8dae189bb1adba6ada/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayCategoricalDataServiceImpl.javajD.  https://github.com/cBioPortal/cbioportal/raw/5e108b7694439ce699c9ae8dae189bb1adba6ada/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayCategoricalDataServiceImpl.javajF.  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayCategoricalDataServiceImpl.java?ref=5e108b7694439ce699c9ae8dae189bb1adba6adajH.  X  @@ -1,122 +0,0 @@
-package org.cbioportal.service.impl;
-
-import org.apache.commons.lang3.BooleanUtils;
-import org.cbioportal.model.*;
-import org.cbioportal.model.meta.GenericAssayMeta;
-import org.cbioportal.persistence.GenericAssayRepository;
-import org.cbioportal.persistence.MolecularDataRepository;
-import org.cbioportal.persistence.SampleListRepository;
-import org.cbioportal.service.*;
-import org.cbioportal.service.exception.MolecularProfileNotFoundException;
-import org.cbioportal.service.util.ExpressionEnrichmentUtil;
-import org.cbioportal.service.util.FisherExactTestCalculator;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.math.BigDecimal;
-import java.util.*;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-@Service
-public class GenericAssayCategoricalDataServiceImpl implements GenericAssayCategoricalDataService {
-
-    @Autowired
-    private MolecularDataRepository molecularDataRepository;
-
-    @Autowired
-    private SampleService sampleService;
-
-    @Autowired
-    private MolecularProfileService molecularProfileService;
-
-    @Autowired
-    private FisherExactTestCalculator fisherExactTestCalculator = new FisherExactTestCalculator();
-
-    @Autowired
-    private ExpressionEnrichmentUtil expressionEnrichmentUtil = new ExpressionEnrichmentUtil();
-    @Autowired
-    private GenericAssayService genericAssayService;
-
-    @Override
-    @Transactional(readOnly = true)
-    public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId, 
-          Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType) 
-        throws MolecularProfileNotFoundException {
-
-            MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
-            validateMolecularProfile(molecularProfile, Arrays.asList(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY));
-
-            Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
-                .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
-
-            Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets;
-            if (BooleanUtils.isTrue(molecularProfile.getPatientLevel())) {
-                List<String> sampleIds = molecularProfileCaseSets.values().stream().flatMap(Collection::stream).map(MolecularProfileCaseIdentifier::getCaseId).collect(Collectors.toList());
-                List<String> studyIds = Collections.nCopies(sampleIds.size(), molecularProfile.getCancerStudyIdentifier());
-                List<Sample> samples = sampleService.fetchSamples(studyIds, sampleIds, "ID");
-
-                Map<String, Integer> sampleIdToPatientIdMap = samples.stream()
-                    .filter(sample -> sample != null && sample.getStableId() != null && sample.getPatientId() != null)
-                    .collect(Collectors.toMap(Sample::getStableId, Sample::getPatientId));
-
-                filteredMolecularProfileCaseSets = new HashMap<>();
-                for (Map.Entry<String, List<MolecularProfileCaseIdentifier>> pair : molecularProfileCaseSets.entrySet()) {
-                    Set<Integer> patientSet = new HashSet<Integer>();
-                    List<MolecularProfileCaseIdentifier> identifierListUniqueByPatientId = new ArrayList<>();
-                    for (MolecularProfileCaseIdentifier caseIdentifier : pair.getValue()) {
-                        if (!patientSet.contains(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()))) {
-                            identifierListUniqueByPatientId.add(caseIdentifier);
-                            patientSet.add(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()));
-                        }
-                    }
-                    filteredMolecularProfileCaseSets.put(pair.getKey(), identifierListUniqueByPatientId);
-                }
-            } else {
-                filteredMolecularProfileCaseSets = molecularProfileCaseSets;
-            }
-            
-            List<GenericAssayCategoricalEnrichment> genericAssayCategoricalEnrichments = expressionEnrichmentUtil.getGenericAssayCategoricalEnrichments(molecularProfile,
-                filteredMolecularProfileCaseSets, enrichmentType, maItr);
-
-            // Sort the list based on pValue.
-            Collections.sort(genericAssayCategoricalEnrichments, GenericAssayEnrichment::compare);
-    
-            // Extract pValues and calculate qValues.
-            BigDecimal[] pValues = genericAssayCategoricalEnrichments.stream().map(a -> a.getpValue()).toArray(BigDecimal[]::new);
-            BigDecimal[] qValues = fisherExactTestCalculator.calcqValue(pValues);
-    
-            // Assign qValues back to the objects.
-            for (int i = 0; i < genericAssayCategoricalEnrichments.size(); i++) {
-                genericAssayCategoricalEnrichments.get(i).setqValue(qValues[i]);
-            }
-            
-            List<String> getGenericAssayStableIds = genericAssayCategoricalEnrichments.stream()
-                .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
-            
-            Map<String, GenericAssayMeta> genericAssayMetaByStableId = genericAssayService
-                .getGenericAssayMetaByStableIdsAndMolecularIds(getGenericAssayStableIds,
-                    getGenericAssayStableIds.stream().map(stableId -> molecularProfileId)
-                        .collect(Collectors.toList()),
-                    "SUMMARY")
-                .stream().collect(Collectors.toMap(GenericAssayMeta::getStableId, Function.identity()));
-            
-            return genericAssayCategoricalEnrichments.stream().map(enrichmentDatum -> {
-                enrichmentDatum.setGenericEntityMetaProperties(
-                    genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
-                return enrichmentDatum;
-            }).collect(Collectors.toList());
-    }
-
-    private void validateMolecularProfile(MolecularProfile molecularProfile,
-                                          List<MolecularProfile.MolecularAlterationType> validMolecularAlterationTypes) throws MolecularProfileNotFoundException {
-        if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
-            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-        }
-        if(!molecularProfile.getGenericAssayType().equals("CATEGORICAL")) {
-            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-        }
-    }
-
-}u}(j-  (00e7f2a22470eb60815e0825326fcab43b4b0046j=.  Xservice/src/main/java/org/cbioportal/service/impl/GenericAssayEnrichmentServiceImpl.javaj?.  renamedj7.  K\j8.  K:jA.  KjB.  https://github.com/cBioPortal/cbioportal/blob/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.javajD.  https://github.com/cBioPortal/cbioportal/raw/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.javajF.  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.java?ref=bbf98d2cfffb5d0b96b88a73d5e1b49897eb887bjH.  X-  @@ -4,7 +4,7 @@
 import org.cbioportal.model.*;
 import org.cbioportal.model.meta.GenericAssayMeta;
 import org.cbioportal.persistence.MolecularDataRepository;
-import org.cbioportal.service.GenericAssayBinaryDataService;
+import org.cbioportal.service.GenericAssayEnrichmentService;
 import org.cbioportal.service.GenericAssayService;
 import org.cbioportal.service.MolecularProfileService;
 import org.cbioportal.service.SampleService;
@@ -16,23 +16,13 @@
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.Map;
-
+import java.util.*;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 
+
 @Service
-public class GenericAssayBinaryDataServiceImpl implements GenericAssayBinaryDataService {
+public class GenericAssayEnrichmentServiceImpl implements GenericAssayEnrichmentService {
 
     @Autowired
     private MolecularDataRepository molecularDataRepository;
@@ -55,25 +45,95 @@ public class GenericAssayBinaryDataServiceImpl implements GenericAssayBinaryData
     @Transactional(readOnly = true)
     public List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
         String molecularProfileId,
-        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType) 
+        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
         throws MolecularProfileNotFoundException {
 
-        MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
+        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, true);
+        Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
+            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
+
+        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets;
+
+        filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
+
+        List<GenericAssayBinaryEnrichment> genericAssayBinaryEnrichments = expressionEnrichmentUtil.getGenericAssayBinaryEnrichments(molecularProfile,
+            filteredMolecularProfileCaseSets, enrichmentType, maItr);
+
+        calcQValues(genericAssayBinaryEnrichments);
+
+        List<String> getGenericAssayStableIds = genericAssayBinaryEnrichments.stream()
+            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
+
+        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
+
+        return genericAssayBinaryEnrichments.stream().map(enrichmentDatum -> {
+            enrichmentDatum.setGenericEntityMetaProperties(
+                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
+            return enrichmentDatum;
+        }).collect(Collectors.toList());
+
+    }
+
+    @Override
+    @Transactional(readOnly = true)
+    public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
+                                                                                         Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException {
 
-        validateMolecularProfile(molecularProfile, Arrays.asList(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY));
+        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, false);
 
         Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
             .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
 
         Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets;
-        
+        filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
+
+        List<GenericAssayCategoricalEnrichment> genericAssayCategoricalEnrichments = expressionEnrichmentUtil.getGenericAssayCategoricalEnrichments(molecularProfile,
+            filteredMolecularProfileCaseSets, enrichmentType, maItr);
+
+        calcQValues(genericAssayCategoricalEnrichments);
+
+        List<String> getGenericAssayStableIds = genericAssayCategoricalEnrichments.stream()
+            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
+        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
+
+        return genericAssayCategoricalEnrichments.stream().map(enrichmentDatum -> {
+            enrichmentDatum.setGenericEntityMetaProperties(
+                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
+            return enrichmentDatum;
+        }).collect(Collectors.toList());
+    }
+
+    private MolecularProfile getAndValidateMolecularProfile(String molecularProfileId, boolean isBinary) throws MolecularProfileNotFoundException {
+        MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
+        validateMolecularProfile(molecularProfile, Arrays.asList(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY), isBinary);
+        return molecularProfile;
+    }
+
+    private void validateMolecularProfile(MolecularProfile molecularProfile,
+                                          List<MolecularProfile.MolecularAlterationType> validMolecularAlterationTypes, boolean isBinary) throws MolecularProfileNotFoundException {
+        if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
+            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+        }
+        if(isBinary) {
+            if(!molecularProfile.getDatatype().equals("BINARY")) {
+                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+            }            
+        } else {
+            if(!molecularProfile.getDatatype().equals("CATEGORICAL")) {
+                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+            }            
+        }
+    }
+
+    private Map<String, List<MolecularProfileCaseIdentifier>> filterMolecularProfileCaseSets(MolecularProfile molecularProfile, Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets) {
         if (BooleanUtils.isTrue(molecularProfile.getPatientLevel())) {
             List<String> sampleIds = molecularProfileCaseSets.values().stream().flatMap(Collection::stream).map(MolecularProfileCaseIdentifier::getCaseId).collect(Collectors.toList());
             List<String> studyIds = Collections.nCopies(sampleIds.size(), molecularProfile.getCancerStudyIdentifier());
             List<Sample> samples = sampleService.fetchSamples(studyIds, sampleIds, "ID");
             Map<String, Integer> sampleIdToPatientIdMap = samples.stream().collect(Collectors.toMap(Sample::getStableId, Sample::getPatientId));
 
-            filteredMolecularProfileCaseSets = new HashMap<>();
+            Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = new HashMap<>();
             for (Map.Entry<String, List<MolecularProfileCaseIdentifier>> pair : molecularProfileCaseSets.entrySet()) {
                 Set<Integer> patientSet = new HashSet<Integer>();
                 List<MolecularProfileCaseIdentifier> identifierListUniqueByPatientId = new ArrayList<>();
@@ -85,51 +145,25 @@ public List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
                 }
                 filteredMolecularProfileCaseSets.put(pair.getKey(), identifierListUniqueByPatientId);
             }
+            return filteredMolecularProfileCaseSets;
         } else {
-            filteredMolecularProfileCaseSets = molecularProfileCaseSets;
+            return molecularProfileCaseSets;
         }
+    }
 
-        List<GenericAssayBinaryEnrichment> genericAssayBinaryEnrichments = expressionEnrichmentUtil.getGenericAssayBinaryEnrichments(molecularProfile,
-            filteredMolecularProfileCaseSets, enrichmentType, maItr);
+    private Map<String, GenericAssayMeta> getGenericAssayMetaByStableId(List<String> stableIds, String molecularProfileId) {
+        return genericAssayService.getGenericAssayMetaByStableIdsAndMolecularIds(stableIds, stableIds.stream().map(sid -> molecularProfileId)
+            .collect(Collectors.toList()), "SUMMARY").stream()
+            .collect(Collectors.toMap(GenericAssayMeta::getStableId, Function.identity()));
+    }
 
-        Collections.sort(genericAssayBinaryEnrichments, GenericAssayEnrichment::compare);
-        // Extract pValues and calculate qValues.
-        BigDecimal[] pValues = genericAssayBinaryEnrichments.stream().map(GenericAssayBinaryEnrichment ::getpValue).toArray(BigDecimal[]::new);
+    private <T extends GenericAssayEnrichment> void calcQValues(List<T> enrichments) {
+        Collections.sort(enrichments, GenericAssayEnrichment::compare);
+        BigDecimal[] pValues = enrichments.stream().map(T::getpValue).toArray(BigDecimal[]::new);
         BigDecimal[] qValues = fisherExactTestCalculator.calcqValue(pValues);
 
-        // Assign qValues back to the objects.
-        for (int i = 0; i < genericAssayBinaryEnrichments.size(); i++) {
-            genericAssayBinaryEnrichments.get(i).setqValue(qValues[i]);
-        }
-
-        List<String> getGenericAssayStableIds = genericAssayBinaryEnrichments.stream()
-            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
-
-        Map<String, GenericAssayMeta> genericAssayMetaByStableId = genericAssayService
-            .getGenericAssayMetaByStableIdsAndMolecularIds(getGenericAssayStableIds,
-                getGenericAssayStableIds.stream().map(stableId -> molecularProfileId)
-                    .collect(Collectors.toList()),
-                "SUMMARY")
-            .stream().collect(Collectors.toMap(GenericAssayMeta::getStableId, Function.identity()));
-
-        return genericAssayBinaryEnrichments.stream().map(enrichmentDatum -> {
-            enrichmentDatum.setGenericEntityMetaProperties(
-                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
-            return enrichmentDatum;
-        }).collect(Collectors.toList());
-
-    }
-
-    
-    private void validateMolecularProfile(MolecularProfile molecularProfile,
-                                          List<MolecularProfile.MolecularAlterationType> validMolecularAlterationTypes) throws MolecularProfileNotFoundException {
-        if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
-            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-        }
-        System.out.println(molecularProfile.getGenericAssayType());
-        if(!molecularProfile.getGenericAssayType().equals("BINARY")) {
-            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+        for (int i = 0; i < enrichments.size(); i++) {
+            enrichments.get(i).setqValue(qValues[i]);
         }
     }
-    
 }q     jb.  Xservice/src/main/java/org/cbioportal/service/impl/GenericAssayBinaryDataServiceImpl.javau}(j-  (fbcaeb2016bc330b53a261cf821945a002d143b3j=.  \service/src/test/java/org/cbioportal/service/impl/GenericAssayBinaryDataServiceImplTest.javaj?.  modifiedj7.  Kj8.  KjA.  KjB.  https://github.com/cBioPortal/cbioportal/blob/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImplTest.javajD.  https://github.com/cBioPortal/cbioportal/raw/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImplTest.javajF.  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImplTest.java?ref=bbf98d2cfffb5d0b96b88a73d5e1b49897eb887bjH.  X  @@ -30,7 +30,7 @@
 public class GenericAssayBinaryDataServiceImplTest extends BaseServiceImplTest{
 
     @InjectMocks
-    private GenericAssayBinaryDataServiceImpl genericAssayBinaryDataServiceImpl;
+    private GenericAssayEnrichmentServiceImpl genericAssayEnrichmentServiceImpl;
     @Mock
     private SampleService sampleService;
     @Mock
@@ -163,7 +163,7 @@ public void getGenericAssayBinaryEnrichments() throws Exception {
             .thenReturn(Arrays.asList(new GenericAssayMeta(HUGO_GENE_SYMBOL_1),
                 new GenericAssayMeta(HUGO_GENE_SYMBOL_2)));
 
-        List<GenericAssayBinaryEnrichment> result = genericAssayBinaryDataServiceImpl.getGenericAssayBinaryEnrichments(MOLECULAR_PROFILE_ID,
+        List<GenericAssayBinaryEnrichment> result = genericAssayEnrichmentServiceImpl.getGenericAssayBinaryEnrichments(MOLECULAR_PROFILE_ID,
             molecularProfileCaseSets, EnrichmentType.SAMPLE);
 
         Assert.assertEquals(2, result.size());u}(j-  (2f6d588c2de0e8c86ec3a26ef3712e7c893dd235j=.  aservice/src/test/java/org/cbioportal/service/impl/GenericAssayCategoricalDataServiceImplTest.javaj?.  modifiedj7.  Kj8.  KjA.  KjB.  https://github.com/cBioPortal/cbioportal/blob/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayCategoricalDataServiceImplTest.javajD.  https://github.com/cBioPortal/cbioportal/raw/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayCategoricalDataServiceImplTest.javajF.  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayCategoricalDataServiceImplTest.java?ref=bbf98d2cfffb5d0b96b88a73d5e1b49897eb887bjH.  X&  @@ -25,7 +25,7 @@
 @RunWith(MockitoJUnitRunner.class)
 public class GenericAssayCategoricalDataServiceImplTest extends BaseServiceImplTest{
     @InjectMocks
-    private GenericAssayCategoricalDataServiceImpl genericAssayCategoricalDataServiceImpl;
+    private GenericAssayEnrichmentServiceImpl genericAssayEnrichmentServiceImpl;
     @Mock
     private SampleService sampleService;
     @Mock
@@ -157,7 +157,7 @@ public void getGenericAssayCategoricalEnrichments() throws MolecularProfileNotFo
             .thenReturn(Arrays.asList(new GenericAssayMeta(HUGO_GENE_SYMBOL_1),
                 new GenericAssayMeta(HUGO_GENE_SYMBOL_2)));
 
-        List<GenericAssayCategoricalEnrichment> result = genericAssayCategoricalDataServiceImpl.getGenericAssayCategoricalEnrichments(MOLECULAR_PROFILE_ID,
+        List<GenericAssayCategoricalEnrichment> result = genericAssayEnrichmentServiceImpl.getGenericAssayCategoricalEnrichments(MOLECULAR_PROFILE_ID,
             molecularProfileCaseSets, EnrichmentType.SAMPLE);
 
         Assert.assertEquals(2, result.size());u}(j-  (e0f6127b3a18118841827747041ceea77710a239j=.  \service/src/test/java/org/cbioportal/service/impl/GenericAssayEnrichmentServiceImplTest.javaj?.  addedj7.  Kj8.  K jA.  KjB.  https://github.com/cBioPortal/cbioportal/blob/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.javajD.  https://github.com/cBioPortal/cbioportal/raw/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.javajF.  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.java?ref=bbf98d2cfffb5d0b96b88a73d5e1b49897eb887bjH.  p@@ -0,0 +1,4 @@
+package org.cbioportal.service.impl;
+
+public class GenericAssayEnrichmentServiceImplTest {
+}u}(j-  (569996ddcf1074142b747b825809019b45f30773j=.  Jweb/src/main/java/org/cbioportal/web/GenericAssayEnrichmentController.javaj?.  modifiedj7.  Kj8.  KjA.  KjB.  https://github.com/cBioPortal/cbioportal/blob/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.javajD.  https://github.com/cBioPortal/cbioportal/raw/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.javajF.  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.java?ref=bbf98d2cfffb5d0b96b88a73d5e1b49897eb887bjH.  X	  @@ -7,10 +7,8 @@
 import org.cbioportal.model.GenericAssayBinaryEnrichment;
 import org.cbioportal.model.GenericAssayCategoricalEnrichment;
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
-import org.cbioportal.service.GenericAssayBinaryDataService;
-import org.cbioportal.service.GenericAssayCategoricalDataService;
+import org.cbioportal.service.GenericAssayEnrichmentService;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
-import org.cbioportal.service.impl.GenericAssayBinaryDataServiceImpl;
 import org.cbioportal.web.config.annotation.InternalApi;
 import org.cbioportal.web.parameter.MolecularProfileCasesGroupFilter;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -35,9 +33,7 @@
 @Api(tags = "Generic Assay Enrichment Data", description = " ")
 public class GenericAssayEnrichmentController {
     @Autowired
-    private GenericAssayCategoricalDataService genericAssayCategoricalDataService;
-    @Autowired
-    private GenericAssayBinaryDataService genericAssayBinaryDataService;
+    private GenericAssayEnrichmentService genericAssayEnrichmentService;
 
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/generic-assay-categorical-enrichments/fetch",
@@ -89,7 +85,7 @@ public ResponseEntity<List<GenericAssayBinaryEnrichment>> fetchGenericAssayBinar
         }
 
         return new ResponseEntity<>(
-            genericAssayBinaryDataService.getGenericAssayBinaryEnrichments(
+            genericAssayEnrichmentService.getGenericAssayBinaryEnrichments(
                 molecularProfileIds.iterator().next(), groupCaseIdentifierSet, enrichmentType),
             HttpStatus.OK);
     }
@@ -109,7 +105,7 @@ private List<GenericAssayCategoricalEnrichment> fetchExpressionEnrichments(Enric
         if (molecularProfileIds.size() > 1) {
             throw new UnsupportedOperationException("Multi-study expression enrichments is not yet implemented");
         }
-        return genericAssayCategoricalDataService.getGenericAssayCategoricalEnrichments(
+        return genericAssayEnrichmentService.getGenericAssayCategoricalEnrichments(
             molecularProfileIds.iterator().next(), groupCaseIdentifierSet, enrichmentType);
     }
 }ueu(0b8e77d1e83a9cb08151d61142cab3bf5fc507ca}(sha(0b8e77d1e83a9cb08151d61142cab3bf5fc507canode_idEC_kwDOAe-hB9oAKDBiOGU3N2QxZTgzYTljYjA4MTUxZDYxMTQyY2FiM2JmNWZjNTA3Y2Ecommit}(author}(namesbabyanushaemailsatravab@mskcc.orgdate2023-08-14T20:49:36Zu	committer}(j.  sbabyanushaj.  satravab@mskcc.orgj.  2023-08-14T20:49:36ZumessageUpdate News.mdtree}(j.  (e457880dc60a9735606e8481a27002eda5da7717urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/e457880dc60a9735606e8481a27002eda5da7717uj.  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/0b8e77d1e83a9cb08151d61142cab3bf5fc507ca
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj.  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/0b8e77d1e83a9cb08151d61142cab3bf5fc507cahtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/0b8e77d1e83a9cb08151d61142cab3bf5fc507cacomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/0b8e77d1e83a9cb08151d61142cab3bf5fc507ca/commentsj.  }(loginsbabyanushaidJ`_j.  MDQ6VXNlcjYxNDMxNjQ4
avatar_url4https://avatars.githubusercontent.com/u/61431648?v=4gravatar_idh5j.  (https://api.github.com/users/sbabyanushaj.  https://github.com/sbabyanusha
followers_url2https://api.github.com/users/sbabyanusha/followers
following_url?https://api.github.com/users/sbabyanusha/following{/other_user}	gists_url8https://api.github.com/users/sbabyanusha/gists{/gist_id}starred_url?https://api.github.com/users/sbabyanusha/starred{/owner}{/repo}subscriptions_url6https://api.github.com/users/sbabyanusha/subscriptionsorganizations_url-https://api.github.com/users/sbabyanusha/orgs	repos_url.https://api.github.com/users/sbabyanusha/repos
events_url9https://api.github.com/users/sbabyanusha/events{/privacy}received_events_url8https://api.github.com/users/sbabyanusha/received_eventstypeUser
site_adminuj.  }(j.  sbabyanushaj.  J`_j.  MDQ6VXNlcjYxNDMxNjQ4j.  4https://avatars.githubusercontent.com/u/61431648?v=4j.  h5j.  (https://api.github.com/users/sbabyanushaj.  https://github.com/sbabyanushaj.  2https://api.github.com/users/sbabyanusha/followersj.  ?https://api.github.com/users/sbabyanusha/following{/other_user}j.  8https://api.github.com/users/sbabyanusha/gists{/gist_id}j.  ?https://api.github.com/users/sbabyanusha/starred{/owner}{/repo}j.  6https://api.github.com/users/sbabyanusha/subscriptionsj.  -https://api.github.com/users/sbabyanusha/orgsj.  .https://api.github.com/users/sbabyanusha/reposj.  9https://api.github.com/users/sbabyanusha/events{/privacy}j.  8https://api.github.com/users/sbabyanusha/received_eventsj.  Userj.  uparents]}(j.  (22c8433b6f5f975d8bad3b22c79940e19fab2efdj.  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/22c8433b6f5f975d8bad3b22c79940e19fab2efdj.  Xhttps://github.com/cBioPortal/cbioportal/commit/22c8433b6f5f975d8bad3b22c79940e19fab2efduastats}(totalK	additionsK	deletionsKufiles]}(j.  (681c443ca861af17b43ae81992336f92713ede8ffilenamedocs/News.mdstatusmodifiedj.  Kj.  KchangesKblob_urlehttps://github.com/cBioPortal/cbioportal/blob/0b8e77d1e83a9cb08151d61142cab3bf5fc507ca/docs%2FNews.mdraw_urldhttps://github.com/cBioPortal/cbioportal/raw/0b8e77d1e83a9cb08151d61142cab3bf5fc507ca/docs%2FNews.mdcontents_urlwhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FNews.md?ref=0b8e77d1e83a9cb08151d61142cab3bf5fc507capatchXJ  @@ -1,5 +1,5 @@
 ## Aug 15, 2023
-*   **Added data** consisting of 2,472 samples from 5 studies:
+*   **Added data** consisting of 4,488 samples from 7 studies:
     * [Lung Adenocarcinoma Met Organotropism (MSK, Cancer Cell 2023)](https://www.cbioportal.org/study/summary?id=luad_mskcc_2023_met_organotropism) *2653 samples*
     * [Acute Myeloid Leukemia (OHSU, Cancer Cell 2022)](https://www.cbioportal.org/study/summary?id=aml_ohsu_2022) *942 samples*
     * [Colon Cancer (Sidra-LUMC AC-ICAM, Nat Med 2023)](https://www.cbioportal.org/study/summary?id=coad_silu_2022) *348 samples*uau(fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c}(sha(fe47dd3cfdfec9ca3522970ec9b65fa03c679a8cnode_idEC_kwDOAe-hB9oAKGZlNDdkZDNjZmRmZWM5Y2EzNTIyOTcwZWM5YjY1ZmEwM2M2NzlhOGMcommit}(author}(nameJeremy R. Easton-Marksemailj.r.eastonmarks@gmail.comdate2023-08-11T18:46:26Zu	committer}(j/  GitHubj/  noreply@github.comj/  2023-08-11T18:46:26Zumessage$Merge branch 'master' into fix-10313tree}(j/  (c52387e706222910df1b9b19de07c3ed2312279burlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c52387e706222910df1b9b19de07c3ed2312279buj$/  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk1oICCRBK7hj4Ov3rIwAA1CUIAIRWyHz03JiM26/TOwlSCm51
+hgrT872HFSEj8NzgpY1G2vAYqD5mLc7yWTzZG8cHh65pQq61yQGBQGMsLBOzZ6p
A/an2bU3FmeerK+U6EqlvdC2ySaMi2qMFndPuw6RLxOxBIxCoz1HW1vhhPmwyFhC
16+9zQIlCNPxCOoKntBEsoSNmKRhJgLW9hCOAvnENRYfNgoQ02GNqsPTjm2WJOW1
zC5szhvQ/9kxf60BtJhUJ0hTq6AtQ3saZQisVxuZASaD3gVu0WVkmOYdSBPA9kzb
34KkhmVZnQ9ZWntrmlQp861Az+69m0MNj0vKpHmJdqCGZ4KNbz+gBX2GH/EiYlk=
=KABH
-----END PGP SIGNATURE-----
payloadX5  tree c52387e706222910df1b9b19de07c3ed2312279b
parent bbf94cbc406ef56ff0abc43794a2ee12f861f81a
parent 7b2bbe2c40efdd42715c4f337cb3959deeb431b2
author Jeremy R. Easton-Marks <j.r.eastonmarks@gmail.com> 1691779586 -0500
committer GitHub <noreply@github.com> 1691779586 -0500

Merge branch 'master' into fix-10313uuj$/  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8chtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8ccomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/commentsj/  }(login
JREastonMarksidJ# 
 j/  MDQ6VXNlcjg1MjAwMw==
avatar_url2https://avatars.githubusercontent.com/u/852003?v=4gravatar_idh5j$/  *https://api.github.com/users/JREastonMarksj2/   https://github.com/JREastonMarks
followers_url4https://api.github.com/users/JREastonMarks/followers
following_urlAhttps://api.github.com/users/JREastonMarks/following{/other_user}	gists_url:https://api.github.com/users/JREastonMarks/gists{/gist_id}starred_urlAhttps://api.github.com/users/JREastonMarks/starred{/owner}{/repo}subscriptions_url8https://api.github.com/users/JREastonMarks/subscriptionsorganizations_url/https://api.github.com/users/JREastonMarks/orgs	repos_url0https://api.github.com/users/JREastonMarks/repos
events_url;https://api.github.com/users/JREastonMarks/events{/privacy}received_events_url:https://api.github.com/users/JREastonMarks/received_eventstypeUser
site_adminuj/  }(j7/  web-flowj9/  J/j/  MDQ6VXNlcjE5ODY0NDQ3j;/  4https://avatars.githubusercontent.com/u/19864447?v=4j=/  h5j$/  %https://api.github.com/users/web-flowj2/  https://github.com/web-flowj@/  /https://api.github.com/users/web-flow/followersjB/  <https://api.github.com/users/web-flow/following{/other_user}jD/  5https://api.github.com/users/web-flow/gists{/gist_id}jF/  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jH/  3https://api.github.com/users/web-flow/subscriptionsjJ/  *https://api.github.com/users/web-flow/orgsjL/  +https://api.github.com/users/web-flow/reposjN/  6https://api.github.com/users/web-flow/events{/privacy}jP/  5https://api.github.com/users/web-flow/received_eventsjR/  UserjT/  uparents](}(j/  (bbf94cbc406ef56ff0abc43794a2ee12f861f81aj$/  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/bbf94cbc406ef56ff0abc43794a2ee12f861f81aj2/  Xhttps://github.com/cBioPortal/cbioportal/commit/bbf94cbc406ef56ff0abc43794a2ee12f861f81au}(j/  (7b2bbe2c40efdd42715c4f337cb3959deeb431b2j$/  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7b2bbe2c40efdd42715c4f337cb3959deeb431b2j2/  Xhttps://github.com/cBioPortal/cbioportal/commit/7b2bbe2c40efdd42715c4f337cb3959deeb431b2uestats}(totalM	additionsMB	deletionsKaufiles](}(j/  (eb821670a42a3e0d37dbe90f7b61cee4379dbdc7filenamedocs/About-Us.mdstatusmodifiedjr/  Kjs/  KchangesKblob_urlihttps://github.com/cBioPortal/cbioportal/blob/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/docs%2FAbout-Us.mdraw_urlhhttps://github.com/cBioPortal/cbioportal/raw/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/docs%2FAbout-Us.mdcontents_url{https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FAbout-Us.md?ref=fe47dd3cfdfec9ca3522970ec9b65fa03c679a8cpatchX  @@ -42,6 +42,7 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 ## Caris Life Sciences
 * Jianjiong Gao
 * Priti Kumari
+* Karthik Kalletla
 
 ## The Hyve
 * Oleguer Plantalech
@@ -82,7 +83,6 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 * Zachary Heins
 * Michael Heuer
 * Anders Jacobsen
-* Karthik Kalletla
 * Peter Kok
 * Erik Larsson
 * Dong Liu}(j/  (5eca5c5988b006a97d11dcb98c8c0462d401182bjx/  <docs/deployment/customization/portal.properties-Reference.mdjz/  modifiedjr/  Kjs/  K j|/  Kj}/  https://github.com/cBioPortal/cbioportal/blob/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdj/  https://github.com/cBioPortal/cbioportal/raw/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdj/  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.md?ref=fe47dd3cfdfec9ca3522970ec9b65fa03c679a8cj/  XH  @@ -153,6 +153,13 @@ Different samples of a patient may have been analyzed with different gene panels
 skin.patientview.filter_genes_profiled_all_samples=
 ```
 
+### Control default settings of the VAF line chart in the genomic evolution tab of patient view
+If you want to enable log scale and sequential mode by default, set this property to `true`:
+```
+vaf.log_scale.default=true|false
+vaf.sequential_mode.default=true|false
+```
+
 ### Control unauthorized studies to be displayed on the home page
 
 By default, on an authenticated portal the home page will only show studies for which the current user is authorized. By setting the _skin.home\_page.show\_unauthorized\_studies_ property to _true_ the home page will also show unauthorized studies. The unauthorized studies will appear greyed out and cannot be selected for downstream analysis in Results View or Study View.
@@ -436,6 +443,11 @@ oncoprint.oncokb.default=true|false
 oncoprint.hotspots.default=true|false
 ```
 
+If you want to enable oncoprint heatmap clustering by default, set this property to `true`:
+```
+oncoprint.clustered.default=true|false
+```
+
 **Automatic hiding of variants of unknown significance (VUS)**
 
 By default, the selection box to hide VUS mutations is unchecked. If you want to automatically hide VUS, set this property to `true`. Default is `false`.u}(j/  (bd9ae14cdaf137a97c116177c885b70a16bf7d34jx/  Bmodel/src/main/java/org/cbioportal/model/GenomicDataCountItem.javajz/  addedjr/  K#js/  K j|/  K#j}/  https://github.com/cBioPortal/cbioportal/blob/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenomicDataCountItem.javaj/  https://github.com/cBioPortal/cbioportal/raw/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenomicDataCountItem.javaj/  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenomicDataCountItem.java?ref=fe47dd3cfdfec9ca3522970ec9b65fa03c679a8cj/  XL  @@ -0,0 +1,35 @@
+package org.cbioportal.model;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class GenomicDataCountItem implements Serializable {
+
+    private String hugoGeneSymbol;
+    private String profileType;
+    private List<GenomicDataCount> counts;
+
+    public String getHugoGeneSymbol() {
+        return hugoGeneSymbol;
+    }
+
+    public void setHugoGeneSymbol(String hugoGeneSymbol) {
+        this.hugoGeneSymbol = hugoGeneSymbol;
+    }
+
+    public String getProfileType() {
+        return profileType;
+    }
+
+    public void setProfileType(String profileType) {
+        this.profileType = profileType;
+    }
+
+    public List<GenomicDataCount> getCounts() {
+        return counts;
+    }
+
+    public void setCounts(List<GenomicDataCount> counts) {
+        this.counts = counts;
+    }
+}u}(j/  (d44663bed5eb628f7a438efc51b83ce32004cab7jx/  pom.xmljz/  modifiedjr/  Kjs/  Kj|/  Kj}/  ^https://github.com/cBioPortal/cbioportal/blob/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/pom.xmlj/  ]https://github.com/cBioPortal/cbioportal/raw/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/pom.xmlj/  phttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=fe47dd3cfdfec9ca3522970ec9b65fa03c679a8cj/  XY  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.16</frontend.version>
+    <frontend.version>v5.3.17</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>u}(j/  (3e7dc6ec00ffe590ba819f7398f0da3b4158e9c8jx/  )portal/src/main/webapp/config_service.jspjz/  modifiedjr/  Kjs/  Kj|/  Kj}/  https://github.com/cBioPortal/cbioportal/blob/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj/  https://github.com/cBioPortal/cbioportal/raw/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj/  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=fe47dd3cfdfec9ca3522970ec9b65fa03c679a8cj/  X  @@ -37,6 +37,7 @@
             "oncoprint.custom_driver_annotation.binary.default",
             "oncoprint.oncokb.default",
             "oncoprint.hotspots.default",
+            "oncoprint.clustered.default",
             "genomenexus.url",
             "genomenexus.url.grch38",
             "google_analytics_profile_id",
@@ -146,7 +147,9 @@
             "skin.patient_view.structural_variant_table.columns.show_on_init",
             "comparison.categorical_na_values",
             "study_download_url",
-            "skin.home_page.show_reference_genome"
+            "skin.home_page.show_reference_genome",
+            "vaf.sequential_mode.default",
+            "vaf.log_scale.default"
         };
 
 u}(j/  (67191ea758842520498fa65865633766fcae06dbjx/  Bservice/src/main/java/org/cbioportal/service/StudyViewService.javajz/  modifiedjr/  Kjs/  K j|/  Kj}/  https://github.com/cBioPortal/cbioportal/blob/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javaj/  https://github.com/cBioPortal/cbioportal/raw/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javaj/  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.java?ref=fe47dd3cfdfec9ca3522970ec9b65fa03c679a8cj/  X  @@ -1,6 +1,8 @@
 package org.cbioportal.service;
 
+import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
+import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.exception.StudyNotFoundException;
 
 import java.util.List;
@@ -19,6 +21,8 @@ List<AlterationCountByGene> getStructuralVariantAlterationCountByGenes(List<Stri
     List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> studyIds, List<String> sampleIds, AlterationFilter annotationFilter)
         throws StudyNotFoundException;
 
+    List<GenomicDataCountItem> getCNAAlterationCountsByGeneSpecific(List<String> studyIds, List<String> sampleIds, List<Pair<String, String>> genomicDataFilters);
+
     List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String> sampleIds, List<String> studyIds, List<String> stableIds, List<String> profileTypes);
 
 }u}(j/  (510fa8f0206c012b5da48c56b46b1b5332445673jx/  Kservice/src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.javajz/  modifiedjr/  Kcjs/  Kj|/  Kej}/  https://github.com/cBioPortal/cbioportal/blob/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj/  https://github.com/cBioPortal/cbioportal/raw/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj/  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.java?ref=fe47dd3cfdfec9ca3522970ec9b65fa03c679a8cj/  X  @@ -2,6 +2,7 @@
 
 import org.apache.commons.collections4.map.MultiKeyMap;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
 import org.cbioportal.model.util.Select;
 import org.cbioportal.persistence.AlterationRepository;
@@ -15,6 +16,7 @@
 import java.util.*;
 import java.util.function.Function;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 @Service
 public class StudyViewServiceImpl implements StudyViewService {
@@ -37,6 +39,12 @@ public class StudyViewServiceImpl implements StudyViewService {
     @Autowired
     private AlterationRepository alterationRepository;
 
+    @Autowired
+    private GeneService geneService;
+    
+    @Autowired 
+    private MolecularDataService molecularDataService;
+    
     @Override
     public List<GenomicDataCount> getGenomicDataCounts(List<String> studyIds, List<String> sampleIds) {
         List<MolecularProfileCaseIdentifier> molecularProfileSampleIdentifiers =
@@ -154,7 +162,7 @@ public List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> stu
         throws StudyNotFoundException {
         List<MolecularProfileCaseIdentifier> caseIdentifiers =
             molecularProfileService.getFirstDiscreteCNAProfileCaseIdentifiers(studyIds, sampleIds);
-        Select<CNA> cnaTypes = Select.byValues(CNA_TYPES_AMP_AND_HOMDEL);
+        
         List<CopyNumberCountByGene> copyNumberCountByGenes = alterationCountService.getSampleCnaGeneCounts(
             caseIdentifiers,
             Select.all(),
@@ -186,6 +194,96 @@ public List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> stu
         return copyNumberCountByGenes;
     }
 
+    @Override
+    public List<GenomicDataCountItem> getCNAAlterationCountsByGeneSpecific(List<String> studyIds, 
+                                                                           List<String> sampleIds,
+                                                                           List<Pair<String, String>> genomicDataFilters) {
+        
+        List<MolecularProfile> molecularProfiles = molecularProfileService.getMolecularProfilesInStudies(studyIds,
+            "SUMMARY");
+
+        Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
+            .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
+
+        Set<String> hugoGeneSymbols = genomicDataFilters.stream().map(Pair::getKey)
+            .collect(Collectors.toSet());
+
+        Map<String, Integer> geneSymbolIdMap = geneService
+            .fetchGenes(new ArrayList<>(hugoGeneSymbols), "HUGO_GENE_SYMBOL",
+                "SUMMARY")
+            .stream().collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
+        
+        return genomicDataFilters
+            .stream()
+            .flatMap(gdFilter -> {
+                GenomicDataCountItem genomicDataCountItem = new GenomicDataCountItem();
+                String hugoGeneSymbol = gdFilter.getKey();
+                String profileType = gdFilter.getValue();
+                genomicDataCountItem.setHugoGeneSymbol(hugoGeneSymbol);
+                genomicDataCountItem.setProfileType(profileType);
+                
+                List<String> stableIds = Arrays.asList(geneSymbolIdMap.get(hugoGeneSymbol).toString());
+
+                Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
+                    .getOrDefault(profileType, new ArrayList<MolecularProfile>()).stream()
+                    .collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
+                        MolecularProfile::getStableId));
+                
+                List<String> mappedSampleIds = new ArrayList<>();
+                List<String> mappedProfileIds = new ArrayList<>();
+
+                for (int i = 0; i < sampleIds.size(); i++) {
+                    String studyId = studyIds.get(i);
+                    if (studyIdToMolecularProfileIdMap.containsKey(studyId)) {
+                        mappedSampleIds.add(sampleIds.get(i));
+                        mappedProfileIds.add(studyIdToMolecularProfileIdMap.get(studyId));
+                    }
+                }
+
+                if (mappedSampleIds.isEmpty()) {
+                    return Stream.of();
+                }
+
+                List<GeneMolecularData> geneMolecularDataList = molecularDataService.getMolecularDataInMultipleMolecularProfiles(mappedProfileIds, mappedSampleIds,
+                        stableIds.stream().map(Integer::parseInt).collect(Collectors.toList()), "SUMMARY");
+                
+                List<GenomicDataCount> genomicDataCounts = geneMolecularDataList
+                    .stream()
+                    .filter(g -> StringUtils.isNotEmpty(g.getValue()) && !g.getValue().equals("NA"))
+                    .collect(Collectors.groupingBy(GeneMolecularData::getValue))
+                    .entrySet()
+                    .stream()
+                    .map(entry -> {
+                        Integer alteration = Integer.valueOf(entry.getKey());
+                        List<GeneMolecularData> geneMolecularData = entry.getValue();
+                        int count = geneMolecularData.size();
+
+                        String label = CNA.getByCode(alteration.shortValue()).getDescription();
+
+                        GenomicDataCount genomicDataCount = new GenomicDataCount();
+                        genomicDataCount.setLabel(label);
+                        genomicDataCount.setValue(String.valueOf(alteration));
+                        genomicDataCount.setCount(count);
+
+                        return genomicDataCount;
+                    }).collect(Collectors.toList());
+
+                int totalCount = genomicDataCounts.stream().mapToInt(GenomicDataCount::getCount).sum();
+                int naCount = sampleIds.size() - totalCount;
+                
+                if (naCount > 0) {
+                    GenomicDataCount genomicDataCount = new GenomicDataCount();
+                    genomicDataCount.setLabel("NA");
+                    genomicDataCount.setValue("NA");
+                    genomicDataCount.setCount(naCount);
+                    genomicDataCounts.add(genomicDataCount);
+                }
+                
+                genomicDataCountItem.setCounts(genomicDataCounts);
+                return Stream.of(genomicDataCountItem);
+            }).collect(Collectors.toList());
+    };
+
     @Override
     public List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String> sampleIds, List<String> studyIds,
                                                                List<String> stableIds, List<String> profileTypes) {
@@ -261,5 +359,4 @@ public List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String>
             })
             .collect(Collectors.toList());
     }
-
 }u}(j/  (827a7b752a515684801b8188ec8e397a80da98bfjx/  Jservice/src/test/java/org/cbioportal/service/impl/BaseServiceImplTest.javajz/  modifiedjr/  Kjs/  Kj|/  Kj}/  https://github.com/cBioPortal/cbioportal/blob/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.javaj/  https://github.com/cBioPortal/cbioportal/raw/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.javaj/  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.java?ref=fe47dd3cfdfec9ca3522970ec9b65fa03c679a8cj/  X  @@ -59,5 +59,7 @@ public class BaseServiceImplTest {
     public static final String CATEGORY_VALUE_1 = "category_value1";
     public static final String CATEGORY_VALUE_2 = "category_value2";
     public static final String EMPTY_VALUE_1 = "";
-    public static final String EMPTY_VALUE_2 = "NA";    
+    public static final String EMPTY_VALUE_2 = "NA";
+    public static final String PROFILE_TYPE_1 = "profile_type1";
+    public static final String PROFILE_TYPE_2 = "profile_type2";
 }u}(j/  (801ab8afebfc5a1dbd192628acb1791f70a2338ajx/  Oservice/src/test/java/org/cbioportal/service/impl/StudyViewServiceImplTest.javajz/  modifiedjr/  KNjs/  Kj|/  KRj}/  https://github.com/cBioPortal/cbioportal/blob/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javaj/  https://github.com/cBioPortal/cbioportal/raw/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javaj/  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.java?ref=fe47dd3cfdfec9ca3522970ec9b65fa03c679a8cj/  Xv  @@ -14,10 +14,7 @@
 import org.mockito.Spy;
 import org.mockito.junit.MockitoJUnitRunner;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
+import java.util.*;
 
 import static org.mockito.ArgumentMatchers.*;
 
@@ -41,6 +38,10 @@ public class StudyViewServiceImplTest extends BaseServiceImplTest {
     private SignificantCopyNumberRegionService significantCopyNumberRegionService;
     @Mock
     private GenericAssayService genericAssayService;
+    @Mock
+    private MolecularDataService molecularDataService;
+    @Mock
+    private GeneService geneService;
     private AlterationFilter alterationFilter = new AlterationFilter();
 
     @Test
@@ -255,6 +256,79 @@ public void getCNAAlterationCountByGenes() throws Exception {
         Assert.assertEquals(1, result.size());
     }
 
+    @Test
+    public void getCNAAlterationCountByGeneSpecific() throws Exception {
+
+        List<String> sampleIds = Arrays.asList(BaseServiceImplTest.SAMPLE_ID1, BaseServiceImplTest.SAMPLE_ID2, BaseServiceImplTest.SAMPLE_ID3);
+        List<String> studyIds = Collections.nCopies(3, BaseServiceImplTest.STUDY_ID);
+        List<Pair<String, String>> genomicDataFilters = new ArrayList<>();
+        Pair<String, String> genomicDataFilter1 = new Pair<>(BaseServiceImplTest.HUGO_GENE_SYMBOL_1, BaseServiceImplTest.PROFILE_TYPE_1);
+        Pair<String, String> genomicDataFilter2 = new Pair<>(BaseServiceImplTest.HUGO_GENE_SYMBOL_2, BaseServiceImplTest.PROFILE_TYPE_2);
+        genomicDataFilters.add(genomicDataFilter1);
+        genomicDataFilters.add(genomicDataFilter2);
+
+        List<MolecularProfile> molecularProfiles = new ArrayList<>();
+        MolecularProfile molecularProfile = new MolecularProfile();
+        molecularProfile.setCancerStudyIdentifier(BaseServiceImplTest.STUDY_ID);
+        molecularProfile.setStableId(BaseServiceImplTest.STUDY_ID + "_" + BaseServiceImplTest.MOLECULAR_PROFILE_ID_A);
+        molecularProfiles.add(molecularProfile);
+        
+        Mockito.when(molecularProfileService.getMolecularProfilesInStudies(studyIds, "SUMMARY"))
+            .thenReturn(molecularProfiles);
+        
+        Map<String, List<MolecularProfile>> molecularProfileMap = new HashMap<>();
+        molecularProfileMap.put(BaseServiceImplTest.PROFILE_TYPE_1, molecularProfiles);
+        molecularProfileMap.put(BaseServiceImplTest.PROFILE_TYPE_2, molecularProfiles);
+   
+        Mockito.when(molecularProfileUtil.categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles))
+            .thenReturn(molecularProfileMap);
+        
+        List<Gene> genes = new ArrayList<>();
+        Gene gene1 = new Gene();
+        gene1.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
+        gene1.setHugoGeneSymbol(BaseServiceImplTest.HUGO_GENE_SYMBOL_1);
+        Gene gene2 = new Gene();
+        gene2.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_2);
+        gene2.setHugoGeneSymbol(BaseServiceImplTest.HUGO_GENE_SYMBOL_2);
+        genes.add(gene1);
+        genes.add(gene2);
+
+        Mockito.when(geneService.fetchGenes(anyList(), anyString(), anyString()))
+                .thenReturn(genes);
+
+        List<GeneMolecularData> geneMolecularData = new ArrayList<>();
+        GeneMolecularData geneMolecularData1 = new GeneMolecularData();
+        geneMolecularData1.setValue("-2");
+        GeneMolecularData geneMolecularData2 = new GeneMolecularData();
+        geneMolecularData2.setValue("-2");
+        GeneMolecularData geneMolecularData3 = new GeneMolecularData();
+        geneMolecularData3.setValue("2");
+        GeneMolecularData geneMolecularData4 = new GeneMolecularData();
+        geneMolecularData4.setValue("2");
+        geneMolecularData.add(geneMolecularData1);
+        geneMolecularData.add(geneMolecularData2);
+        geneMolecularData.add(geneMolecularData3);
+        geneMolecularData.add(geneMolecularData4);
+        
+        Mockito.when(molecularDataService.getMolecularDataInMultipleMolecularProfiles(
+            anyList(),
+            anyList(),
+            anyList(),
+            anyString()))
+            .thenReturn(geneMolecularData);
+        
+        List<GenomicDataCountItem> result = studyViewService.getCNAAlterationCountsByGeneSpecific(studyIds, sampleIds, genomicDataFilters);
+        Assert.assertEquals(2, result.size());
+        Assert.assertEquals(BaseServiceImplTest.HUGO_GENE_SYMBOL_1, result.get(0).getHugoGeneSymbol());
+        Assert.assertEquals(BaseServiceImplTest.PROFILE_TYPE_1, result.get(0).getProfileType());
+        Assert.assertEquals(2, result.get(0).getCounts().get(0).getCount().intValue());
+        Assert.assertEquals(2, result.get(0).getCounts().get(1).getCount().intValue());
+        Assert.assertEquals(BaseServiceImplTest.HUGO_GENE_SYMBOL_2, result.get(1).getHugoGeneSymbol());
+        Assert.assertEquals(BaseServiceImplTest.PROFILE_TYPE_2, result.get(1).getProfileType());
+        Assert.assertEquals(2, result.get(1).getCounts().get(0).getCount().intValue());
+        Assert.assertEquals(2, result.get(1).getCounts().get(1).getCount().intValue());
+    }
+
     @Test
     public void fetchGenericAssayDataCounts() throws Exception {
 u}(j/  (49aecf9c4d5027524a907d9ac6feddc19e39183ejx/  ,src/main/resources/portal.properties.EXAMPLEjz/  modifiedjr/  Kjs/  Kj|/  Kj}/  https://github.com/cBioPortal/cbioportal/blob/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj/  https://github.com/cBioPortal/cbioportal/raw/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj/  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=fe47dd3cfdfec9ca3522970ec9b65fa03c679a8cj/  Xf  @@ -317,6 +317,7 @@ oncoprint.oncokb.default=true
 oncoprint.hotspots.default=true
 # oncoprint.hide_vus.default=true
 # oncoprint.clinical_tracks.config_json=classpath:/oncoprint-default-tracks.json
+# oncoprint.clustered.default=true
 
 # Custom gene sets
 # querypage.setsofgenes.location=file:/<path>
@@ -436,4 +437,7 @@ persistence.cache_type=no-cache
 # Allows download links within DataSets Tab (See Portal.Properties documentation for more info)
 # study_download_url=
 
-# download_group=
\ No newline at end of file
+# download_group=
+
+# vaf.sequential_mode.default=false
+# vaf.log_scale.default=falseu}(j/  (f4ca464cf50123869269b7357a228fd1745d50f4jx/  =web/src/main/java/org/cbioportal/web/StudyViewController.javajz/  modifiedjr/  K*js/  Kj|/  K+j}/  https://github.com/cBioPortal/cbioportal/blob/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj/  https://github.com/cBioPortal/cbioportal/raw/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj/  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=fe47dd3cfdfec9ca3522970ec9b65fa03c679a8cj/  Xh  @@ -9,14 +9,14 @@
 import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.commons.math3.stat.correlation.PearsonsCorrelation;
 import org.apache.commons.math3.stat.correlation.SpearmansCorrelation;
+import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
 import org.cbioportal.service.*;
 import org.cbioportal.service.exception.StudyNotFoundException;
 import org.cbioportal.service.util.ClinicalAttributeUtil;
 import org.cbioportal.web.config.annotation.InternalApi;
 import org.cbioportal.model.AlterationFilter;
 import org.cbioportal.web.parameter.*;
-import org.cbioportal.web.parameter.sort.ClinicalDataSortBy;
 import org.cbioportal.web.util.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.Cacheable;
@@ -861,6 +861,47 @@ public ResponseEntity<List<GenomicDataBin>> fetchGenomicDataBinCounts(
         return new ResponseEntity<>(studyViewFilterApplier.getDataBins(dataBinMethod, interceptedGenomicDataBinCountFilter), HttpStatus.OK);
     }
 
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @RequestMapping(value = "/genomic-data-counts/fetch", method = RequestMethod.POST,
+        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch genomic data counts by GenomicDataCountFilter")
+    public ResponseEntity<List<GenomicDataCountItem>> fetchGenomicDataCounts(
+        @ApiParam(required = true, value = "Genomic data count filter") @Valid @RequestBody(required = false) GenomicDataCountFilter genomicDataCountFilter,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiParam(required = true, value = "Intercepted Genomic Data Count Filter")
+        @ApiIgnore
+        @Valid @RequestAttribute(required = false, value = "interceptedGenomicDataCountFilter") GenomicDataCountFilter interceptedGenomicDataCountFilter
+    ) throws StudyNotFoundException {
+        List<GenomicDataFilter> gdFilters = interceptedGenomicDataCountFilter.getGenomicDataFilters();
+        StudyViewFilter studyViewFilter = interceptedGenomicDataCountFilter.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 (gdFilters.size() == 1) {
+            studyViewFilterUtil.removeSelfFromGenomicDataFilter(
+                gdFilters.get(0).getHugoGeneSymbol(), 
+                gdFilters.get(0).getProfileType(), 
+                studyViewFilter);
+        }
+        List<SampleIdentifier> filteredSampleIdentifiers = studyViewFilterApplier.apply(studyViewFilter);
+
+        if (filteredSampleIdentifiers.isEmpty()) {
+            return new ResponseEntity<>(new ArrayList<>(), HttpStatus.OK);
+        }
+
+        List<String> studyIds = new ArrayList<>();
+        List<String> sampleIds = new ArrayList<>();
+        studyViewFilterUtil.extractStudyAndSampleIds(filteredSampleIdentifiers, studyIds, sampleIds);
+        
+        List<GenomicDataCountItem> result = studyViewService.getCNAAlterationCountsByGeneSpecific(
+            studyIds,
+            sampleIds,
+            gdFilters.stream().map(gdFilter -> new Pair<>(gdFilter.getHugoGeneSymbol(), gdFilter.getProfileType())).collect(Collectors.toList()));
+
+        return new ResponseEntity<>(result, HttpStatus.OK);
+    }
+    
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/generic-assay-data-counts/fetch", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Fetch generic assay data counts by study view filter")u}(j/  (c01ec7696c1c982450178be39d0a178edd3ad3dcjx/  Jweb/src/main/java/org/cbioportal/web/parameter/GenomicDataCountFilter.javajz/  addedjr/  Kjs/  K j|/  Kj}/  https://github.com/cBioPortal/cbioportal/blob/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FGenomicDataCountFilter.javaj/  https://github.com/cBioPortal/cbioportal/raw/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FGenomicDataCountFilter.javaj/  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FGenomicDataCountFilter.java?ref=fe47dd3cfdfec9ca3522970ec9b65fa03c679a8cj/  X  @@ -0,0 +1,26 @@
+package org.cbioportal.web.parameter;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class GenomicDataCountFilter implements Serializable {
+
+    private List<GenomicDataFilter> genomicDataFilters;
+    private StudyViewFilter studyViewFilter;
+
+    public List<GenomicDataFilter> getGenomicDataFilters() {
+        return genomicDataFilters;
+    }
+
+    public void setGenomicDataFilters(List<GenomicDataFilter> genomicDataFilters) {
+        this.genomicDataFilters = genomicDataFilters;
+    }
+
+    public StudyViewFilter getStudyViewFilter() {
+        return studyViewFilter;
+    }
+
+    public void setStudyViewFilter(StudyViewFilter studyViewFilter) {
+        this.studyViewFilter = studyViewFilter;
+    }
+}u}(j/  (f56a51727b02e8666ff8e488ef65a6fa437382d3jx/  Vweb/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.javajz/  modifiedjr/  K js/  Kj|/  K!j}/  https://github.com/cBioPortal/cbioportal/blob/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaj/  https://github.com/cBioPortal/cbioportal/raw/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaj/  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.java?ref=fe47dd3cfdfec9ca3522970ec9b65fa03c679a8cj/  X  @@ -75,6 +75,7 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
     public static final String STUDY_VIEW_CLINICAL_DATA_BIN_COUNTS_PATH = "/clinical-data-bin-counts/fetch";
     public static final String STUDY_VIEW_CUSTOM_DATA_BIN_COUNTS_PATH = "/custom-data-bin-counts/fetch";
     public static final String STUDY_VIEW_GENOMICL_DATA_BIN_COUNTS_PATH = "/genomic-data-bin-counts/fetch";
+    public static final String STUDY_VIEW_GENOMICL_DATA_COUNTS_PATH = "/genomic-data-counts/fetch";
     public static final String STUDY_VIEW_GENERIC_ASSAY_DATA_BIN_COUNTS_PATH = "/generic-assay-data-bin-counts/fetch";
     public static final String STUDY_VIEW_GENERIC_ASSAY_DATA_COUNTS_PATH = "/generic-assay-data-counts/fetch";
     public static final String STUDY_VIEW_CLINICAL_DATA_COUNTS_PATH = "/clinical-data-counts/fetch";
@@ -130,14 +131,16 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
             return extractAttributesFromClinicalDataBinCountFilter(request);
         } else if (requestPathInfo.equals(STUDY_VIEW_GENOMICL_DATA_BIN_COUNTS_PATH)) {
             return extractAttributesFromGenomicDataBinCountFilter(request);
+        } else if (requestPathInfo.equals(STUDY_VIEW_GENOMICL_DATA_COUNTS_PATH)) {
+            return extractAttributesFromGenomicDataCountFilter(request);
         } else if (requestPathInfo.equals(STUDY_VIEW_GENERIC_ASSAY_DATA_BIN_COUNTS_PATH)) {
             return extractAttributesFromGenericAssayDataBinCountFilter(request);
         } else if (requestPathInfo.equals(STUDY_VIEW_GENERIC_ASSAY_DATA_COUNTS_PATH)) {
             return extractAttributesFromGenericAssayDataCountFilter(request);
         } else if (Arrays.asList(STUDY_VIEW_CLINICAL_DATA_COUNTS_PATH, STUDY_VIEW_CUSTOM_DATA_COUNTS_PATH)
                 .contains(requestPathInfo)) {
             return extractAttributesFromClinicalDataCountFilter(request);
-        } else if (Arrays.asList(STUDY_VIEW_CLINICAL_DATA_DENSITY_PATH, STUDY_VIEW_CLINICAL_DATA_VIOLIN_PATH, STUDY_VIEW_CNA_GENES,
+        } 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
@@ -477,6 +480,26 @@ private boolean extractAttributesFromGenomicDataBinCountFilter(HttpServletReques
         return true;
     }
 
+    private boolean extractAttributesFromGenomicDataCountFilter(HttpServletRequest request) {
+        try {
+            GenomicDataCountFilter genomicDataCountFilter = objectMapper.readValue(request.getInputStream(),
+                GenomicDataCountFilter.class);
+            LOG.debug("extracted genomicDataCountFilter: " + genomicDataCountFilter.toString());
+            LOG.debug("setting interceptedGenomicDataCountFilter to " + genomicDataCountFilter);
+            request.setAttribute("interceptedGenomicDataCountFilter", genomicDataCountFilter);
+            if (cacheMapUtil.hasCacheEnabled()) {
+                Collection<String> cancerStudyIdCollection = extractCancerStudyIdsFromGenomicDataCountFilter(
+                    genomicDataCountFilter);
+                LOG.debug("setting involvedCancerStudies to " + cancerStudyIdCollection);
+                request.setAttribute("involvedCancerStudies", cancerStudyIdCollection);
+            }
+        } catch (Exception e) {
+            LOG.error("exception thrown during extraction of genomicDataCountFilter: " + e);
+            return false;
+        }
+        return true;
+    }
+
     private boolean extractAttributesFromGenericAssayDataBinCountFilter(HttpServletRequest request) {
         try {
             GenericAssayDataBinCountFilter genericAssayDataBinCountFilter = objectMapper
@@ -722,6 +745,14 @@ private Set<String> extractCancerStudyIdsFromGenomicDataBinCountFilter(
         return new HashSet<String>();
     }
 
+    private Set<String> extractCancerStudyIdsFromGenomicDataCountFilter(
+        GenomicDataCountFilter genomicDataCountFilter) {
+        if (genomicDataCountFilter.getStudyViewFilter() != null) {
+            return extractCancerStudyIdsFromStudyViewFilter(genomicDataCountFilter.getStudyViewFilter());
+        }
+        return new HashSet<String>();
+    }
+
     private Set<String> extractCancerStudyIdsFromGenericAssayDataBinCountFilter(
             GenericAssayDataBinCountFilter genericAssayDataBinCountFilter) {
         if (genericAssayDataBinCountFilter.getStudyViewFilter() != null) {u}(j/  (0b97b6df9543ab021cea2f48c0727c7b578a7517jx/  Eweb/src/main/java/org/cbioportal/web/util/StudyViewFilterApplier.javajz/  modifiedjr/  Kjs/  KQj|/  Kj}/  https://github.com/cBioPortal/cbioportal/blob/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.javaj/  https://github.com/cBioPortal/cbioportal/raw/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.javaj/  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.java?ref=fe47dd3cfdfec9ca3522970ec9b65fa03c679a8cj/  Xt?  @@ -166,8 +166,39 @@ public List<SampleIdentifier> apply(StudyViewFilter studyViewFilter, Boolean neg
             molecularProfiles = molecularProfileService.getMolecularProfilesInStudies(studyIds, "SUMMARY");
         }
 
-        sampleIdentifiers = intervalFilterExpressionData(sampleIdentifiers, molecularProfiles,
-                studyViewFilter.getGenomicDataFilters(), negateFilters);
+        List<GenomicDataFilter> genomicDataEqualityFilters = new ArrayList<>();
+        List<GenomicDataFilter> genomicDataIntervalFilters = new ArrayList<>();
+
+        List<GenomicDataFilter> genomicDataFilters = studyViewFilter.getGenomicDataFilters();
+
+        if (!CollectionUtils.isEmpty(genomicDataFilters)) {
+            Map<String, MolecularProfile> molecularProfileMapByType = molecularProfileUtil
+                .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles)
+                .entrySet()
+                .stream()
+                .collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().get(0)));
+
+            genomicDataFilters.forEach(genomicDataFilter -> {
+                String profileType = genomicDataFilter.getProfileType();
+                if (molecularProfileMapByType.containsKey(profileType)) {
+                    if (molecularProfileMapByType.get(profileType).getDatatype().equals("DISCRETE")) {
+                        genomicDataEqualityFilters.add(genomicDataFilter);
+                    } else {
+                        genomicDataIntervalFilters.add(genomicDataFilter);
+                    }
+                }
+            });
+        }
+        
+        if (!CollectionUtils.isEmpty(genomicDataEqualityFilters)) {
+            sampleIdentifiers = equalityFilterExpressionData(sampleIdentifiers, molecularProfiles,
+                genomicDataEqualityFilters, negateFilters);
+        }
+        
+        if (!CollectionUtils.isEmpty(genomicDataIntervalFilters)) {
+            sampleIdentifiers = intervalFilterExpressionData(sampleIdentifiers, molecularProfiles,
+                genomicDataIntervalFilters, negateFilters);
+        }
 
         sampleIdentifiers = intervalFilterExpressionData(sampleIdentifiers, molecularProfiles,
                 studyViewFilter.getGenericAssayDataFilters(), negateFilters);
@@ -847,99 +878,39 @@ private GenericAssayDataBin dataBintoGenericAssayDataBin(GenericAssayDataBinFilt
     }
 
     public <S extends DataFilter> List<SampleIdentifier> intervalFilterExpressionData(
-            List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
-            Boolean negateFilters) {
-
-        if (!CollectionUtils.isEmpty(dataFilters) && !CollectionUtils.isEmpty(sampleIdentifiers)) {
-
-            Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
-                    .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
+        Boolean negateFilters) {
 
-            List<String> studyIds = new ArrayList<>();
-            List<String> sampleIds = new ArrayList<>();
-            studyViewFilterUtil.extractStudyAndSampleIds(sampleIdentifiers, studyIds, sampleIds);
-            List<ClinicalData> clinicalDatas = new ArrayList<>();
-            List<ClinicalDataFilter> attributes = new ArrayList<>();
-            if (dataFilters.get(0) instanceof GenomicDataFilter) {
-                List<GenomicDataFilter> genomicDataIntervalFilters = (List<GenomicDataFilter>) dataFilters;
-                Set<String> hugoGeneSymbols = genomicDataIntervalFilters.stream()
-                        .map(GenomicDataFilter::getHugoGeneSymbol).collect(Collectors.toSet());
-                Map<String, Integer> geneNameIdMap = geneService
-                        .fetchGenes(new ArrayList<>(hugoGeneSymbols), GeneIdType.HUGO_GENE_SYMBOL.name(),
-                                Projection.SUMMARY.name())
-                        .stream().collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
-
-                clinicalDatas = genomicDataIntervalFilters.stream().flatMap(genomicDataFilter -> {
-
-                    Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
-                            .getOrDefault(genomicDataFilter.getProfileType(), new ArrayList<>())
-                            .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
-                                    MolecularProfile::getStableId));
-
-                    GenomicDataBinFilter genomicDataBinFilter = new GenomicDataBinFilter();
-                    genomicDataBinFilter.setHugoGeneSymbol(genomicDataFilter.getHugoGeneSymbol());
-                    genomicDataBinFilter.setProfileType(genomicDataFilter.getProfileType());
-                    return invokeDataFunc(sampleIds, studyIds,
-                            Arrays.asList(geneNameIdMap.get(genomicDataFilter.getHugoGeneSymbol()).toString()),
-                            studyIdToMolecularProfileIdMap, genomicDataBinFilter, fetchMolecularData);
-                }).collect(Collectors.toList());
-
-                attributes = genomicDataIntervalFilters.stream().map(genomicDataIntervalFilter -> {
-                    String attributeId = studyViewFilterUtil.getGenomicDataFilterUniqueKey(
-                            genomicDataIntervalFilter.getHugoGeneSymbol(), genomicDataIntervalFilter.getProfileType());
-                    ClinicalDataFilter clinicalDataIntervalFilter = new ClinicalDataFilter();
-                    clinicalDataIntervalFilter.setAttributeId(attributeId);
-                    clinicalDataIntervalFilter.setValues(genomicDataIntervalFilter.getValues());
-                    return clinicalDataIntervalFilter;
-                }).collect(Collectors.toList());
-            } else {
-                List<GenericAssayDataFilter> genericAssayDataFilters = (List<GenericAssayDataFilter>) dataFilters;
-
-                clinicalDatas = genericAssayDataFilters.stream().flatMap(genericAssayDataFilter -> {
+        return filterExpressionData(sampleIdentifiers, molecularProfiles, dataFilters, negateFilters, clinicalDataIntervalFilterApplier);
+    }
 
-                    Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
-                            .getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>())
-                            .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
-                                    MolecularProfile::getStableId));
-                    GenericAssayDataBinFilter genericAssayDataBinFilter = new GenericAssayDataBinFilter();
-                    genericAssayDataBinFilter.setStableId(genericAssayDataFilter.getStableId());
-                    genericAssayDataBinFilter.setProfileType(genericAssayDataFilter.getProfileType());
+    public <S extends DataFilter> List<SampleIdentifier> equalityFilterExpressionData(
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
+        Boolean negateFilters) {
 
-                    // get original data stream from invokeDataFunc
-                    Stream<ClinicalData> dataStream = invokeDataFunc(sampleIds, studyIds, Arrays.asList(genericAssayDataBinFilter.getStableId()),
-                        studyIdToMolecularProfileIdMap, genericAssayDataBinFilter, fetchGenericAssayData);
-                    // For patient level generic assay profile, only keep the one sample per patient
-                    List<MolecularProfile> profiles = molecularProfileMap.getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>());
-                    if (profiles.size() > 0 && profiles.get(0).getPatientLevel() == true) {
-                        dataStream = dataStream.collect(Collectors.groupingBy(d -> d.getPatientId())).values().stream()
-                            .flatMap(d -> d.stream().limit(1));
-                    }
-                    // don't change anything for non patient level data
-                    return dataStream;
-                }).collect(Collectors.toList());
+        return filterExpressionData(sampleIdentifiers, molecularProfiles, dataFilters, negateFilters, clinicalDataEqualityFilterApplier);
+    }
 
-                attributes = genericAssayDataFilters.stream().map(genericAssayDataFilter -> {
-                    String attributeId = studyViewFilterUtil.getGenericAssayDataFilterUniqueKey(
-                            genericAssayDataFilter.getStableId(), genericAssayDataFilter.getProfileType());
-                    ClinicalDataFilter clinicalDataIntervalFilter = new ClinicalDataFilter();
-                    clinicalDataIntervalFilter.setAttributeId(attributeId);
-                    clinicalDataIntervalFilter.setValues(genericAssayDataFilter.getValues());
-                    return clinicalDataIntervalFilter;
-                }).collect(Collectors.toList());
 
-            }
+    public <S extends DataFilter> List<SampleIdentifier> filterExpressionData(
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
+        Boolean negateFilters, ClinicalDataFilterApplier clinicalDataFilterApplier) {
+        if (!CollectionUtils.isEmpty(dataFilters) && !CollectionUtils.isEmpty(sampleIdentifiers)) {
+            List<ClinicalData> clinicalDatas =
+                fetchDataAndTransformToClinicalDataList(sampleIdentifiers, molecularProfiles, dataFilters);
+            List<ClinicalDataFilter> attributes =transformToClinicalDataFilter(dataFilters);
 
             MultiKeyMap clinicalDataMap = new MultiKeyMap();
 
             clinicalDatas.forEach(clinicalData -> {
                 clinicalDataMap.put(clinicalData.getStudyId(), clinicalData.getSampleId(), clinicalData.getAttrId(),
-                        clinicalData.getAttrValue());
+                    clinicalData.getAttrValue());
             });
 
             List<SampleIdentifier> newSampleIdentifiers = new ArrayList<>();
             for (SampleIdentifier sampleIdentifier : sampleIdentifiers) {
-                int count = clinicalDataIntervalFilterApplier.apply(attributes, clinicalDataMap,
-                        sampleIdentifier.getSampleId(), sampleIdentifier.getStudyId(), negateFilters);
+                int count = clinicalDataFilterApplier.apply(attributes, clinicalDataMap,
+                    sampleIdentifier.getSampleId(), sampleIdentifier.getStudyId(), negateFilters);
 
                 if (count == attributes.size()) {
                     newSampleIdentifiers.add(sampleIdentifier);
@@ -951,4 +922,86 @@ public <S extends DataFilter> List<SampleIdentifier> intervalFilterExpressionDat
 
         return sampleIdentifiers;
     }
+    
+    private <S extends DataFilter> List<ClinicalData> fetchDataAndTransformToClinicalDataList(
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters) {
+        Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
+            .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
+
+        List<String> studyIds = new ArrayList<>();
+        List<String> sampleIds = new ArrayList<>();
+        studyViewFilterUtil.extractStudyAndSampleIds(sampleIdentifiers, studyIds, sampleIds);
+        
+        if (dataFilters.get(0) instanceof GenomicDataFilter) {
+            List<GenomicDataFilter> genomicDataIntervalFilters = (List<GenomicDataFilter>) dataFilters;
+            Set<String> hugoGeneSymbols = genomicDataIntervalFilters.stream()
+                .map(GenomicDataFilter::getHugoGeneSymbol).collect(Collectors.toSet());
+            Map<String, Integer> geneNameIdMap = geneService
+                .fetchGenes(new ArrayList<>(hugoGeneSymbols), GeneIdType.HUGO_GENE_SYMBOL.name(),
+                    Projection.SUMMARY.name())
+                .stream().collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
+
+            return genomicDataIntervalFilters.stream().flatMap(genomicDataFilter -> {
+
+                Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
+                    .getOrDefault(genomicDataFilter.getProfileType(), new ArrayList<>())
+                    .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
+                        MolecularProfile::getStableId));
+
+                GenomicDataBinFilter genomicDataBinFilter = new GenomicDataBinFilter();
+                genomicDataBinFilter.setHugoGeneSymbol(genomicDataFilter.getHugoGeneSymbol());
+                genomicDataBinFilter.setProfileType(genomicDataFilter.getProfileType());
+                return invokeDataFunc(sampleIds, studyIds,
+                    Collections.singletonList(geneNameIdMap.get(genomicDataFilter.getHugoGeneSymbol()).toString()),
+                    studyIdToMolecularProfileIdMap, genomicDataBinFilter, fetchMolecularData);
+            }).collect(Collectors.toList());
+
+        } else {
+
+            return ((List<GenericAssayDataFilter>) dataFilters).stream().flatMap(genericAssayDataFilter -> {
+
+                Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
+                    .getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>())
+                    .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
+                        MolecularProfile::getStableId));
+                GenericAssayDataBinFilter genericAssayDataBinFilter = new GenericAssayDataBinFilter();
+                genericAssayDataBinFilter.setStableId(genericAssayDataFilter.getStableId());
+                genericAssayDataBinFilter.setProfileType(genericAssayDataFilter.getProfileType());
+
+                // get original data stream from invokeDataFunc
+                Stream<ClinicalData> dataStream = invokeDataFunc(sampleIds, studyIds, Collections.singletonList(genericAssayDataBinFilter.getStableId()),
+                    studyIdToMolecularProfileIdMap, genericAssayDataBinFilter, fetchGenericAssayData);
+                // For patient level generic assay profile, only keep the one sample per patient
+                List<MolecularProfile> profiles = molecularProfileMap.getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<>());
+                if (profiles.size() > 0 && profiles.get(0).getPatientLevel()) {
+                    dataStream = dataStream.collect(Collectors.groupingBy(ClinicalData::getPatientId)).values().stream()
+                        .flatMap(d -> d.stream().limit(1));
+                }
+                // don't change anything for non patient level data
+                return dataStream;
+            }).collect(Collectors.toList());
+
+        }
+    }
+
+    private <S extends DataFilter> List<ClinicalDataFilter> transformToClinicalDataFilter(List<S> dataFilters) {
+        List<ClinicalDataFilter> attributes;
+        attributes = dataFilters.stream().map(dataFilter -> {
+            String attributeId;
+            if (dataFilter instanceof GenomicDataFilter) {
+                GenomicDataFilter genomicDataFilter = (GenomicDataFilter) dataFilter;
+                attributeId = studyViewFilterUtil.getGenomicDataFilterUniqueKey(genomicDataFilter.getHugoGeneSymbol(), genomicDataFilter.getProfileType());
+            } else {
+                GenericAssayDataFilter genericAssayDataFilter = (GenericAssayDataFilter) dataFilter;
+                attributeId = studyViewFilterUtil.getGenericAssayDataFilterUniqueKey(
+                    genericAssayDataFilter.getStableId(), genericAssayDataFilter.getProfileType());
+            }
+
+            ClinicalDataFilter clinicalDataFilter = new ClinicalDataFilter();
+            clinicalDataFilter.setAttributeId(attributeId);
+            clinicalDataFilter.setValues(dataFilter.getValues());
+            return clinicalDataFilter;
+        }).collect(Collectors.toList());
+        return attributes;
+    }
 }ug     }(j/  (ecf5bdab85cceb359f2f511895ea0a4e26cbd0b9jx/  Bweb/src/main/java/org/cbioportal/web/util/StudyViewFilterUtil.javajz/  modifiedjr/  Kjs/  Kj|/  Kj}/  https://github.com/cBioPortal/cbioportal/blob/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javaj/  https://github.com/cBioPortal/cbioportal/raw/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javaj/  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.java?ref=fe47dd3cfdfec9ca3522970ec9b65fa03c679a8cj/  X  @@ -45,19 +45,27 @@ public void extractStudyAndSampleIds(
     }
 
     public void removeSelfFromFilter(String attributeId, StudyViewFilter studyViewFilter) {
-        if (studyViewFilter!= null && studyViewFilter.getClinicalDataFilters() != null) {
+        if (studyViewFilter != null && studyViewFilter.getClinicalDataFilters() != null) {
             studyViewFilter.getClinicalDataFilters().removeIf(f -> f.getAttributeId().equals(attributeId));
         }
     }
+    
+    public void removeSelfFromGenomicDataFilter(String hugoGeneSymbol, String profileType, StudyViewFilter studyViewFilter) {
+        if (studyViewFilter != null && studyViewFilter.getGenomicDataFilters() != null) {
+            studyViewFilter.getGenomicDataFilters().removeIf(f -> 
+                f.getHugoGeneSymbol().equals(hugoGeneSymbol) && f.getProfileType().equals(profileType)
+            );
+        }
+    }
 
     public void removeSelfFromGenericAssayFilter(String stableId, StudyViewFilter studyViewFilter) {
-        if (studyViewFilter!= null && studyViewFilter.getGenericAssayDataFilters() != null) {
+        if (studyViewFilter != null && studyViewFilter.getGenericAssayDataFilters() != null) {
             studyViewFilter.getGenericAssayDataFilters().removeIf(f -> f.getStableId().equals(stableId));
         }
     }
 
     public void removeSelfCustomDataFromFilter(String attributeId, StudyViewFilter studyViewFilter) {
-        if (studyViewFilter!= null && studyViewFilter.getCustomDataFilters() != null) {
+        if (studyViewFilter != null && studyViewFilter.getCustomDataFilters() != null) {
             studyViewFilter.getCustomDataFilters().removeIf(f -> f.getAttributeId().equals(attributeId));
         }
     }u}(j/  (3951e57b963be731abed688f002aa194fc2f0793jx/  Aweb/src/test/java/org/cbioportal/web/StudyViewControllerTest.javajz/  modifiedjr/  K[js/  K j|/  K[j}/  https://github.com/cBioPortal/cbioportal/blob/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj/  https://github.com/cBioPortal/cbioportal/raw/fe47dd3cfdfec9ca3522970ec9b65fa03c679a8c/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj/  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.java?ref=fe47dd3cfdfec9ca3522970ec9b65fa03c679a8cj/  X  @@ -62,6 +62,11 @@ public class StudyViewControllerTest {
     private static final String TEST_GENERIC_ASSAY_DATA_VALUE_2 = "value2";
     private static final String TEST_CLINICAL_EVENT_TYPE = "STATUS";
     private static final Integer TEST_CLINICAL_EVENT_TYPE_COUNT = 513;
+    private static final String TEST_CNA_ALTERATION_NAME_1 = "test_cna_event_type_1";
+    private static final String TEST_CNA_ALTERATION_NAME_2 = "test_cna_event_type_2";
+    private static final String TEST_CNA_ALTERATION_VALUE_1 = "2";
+    private static final String TEST_CNA_ALTERATION_VALUE_2 = "-2";
+    private static final String TEST_MOLECULAR_PROFILE_TYPE = "test_molecular_profile_type";
 
     private List<SampleIdentifier> filteredSampleIdentifiers = new ArrayList<>();
     private List<ClinicalData> clinicalData = new ArrayList<>();
@@ -506,6 +511,92 @@ public void fetchSampleCounts() throws Exception {
             .andExpect(MockMvcResultMatchers.jsonPath("$[1].count").value(2));
     }
 
+
+    @Test
+    public void fetchGenomicDataCounts() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+
+        List<GenomicDataCountItem> genomicDataCountItems = new ArrayList<>();
+
+        GenomicDataCount genomicDataCount1 = new GenomicDataCount();
+        genomicDataCount1.setLabel(TEST_CNA_ALTERATION_NAME_1);
+        genomicDataCount1.setValue(TEST_CNA_ALTERATION_VALUE_1);
+        genomicDataCount1.setCount(1);
+        
+        GenomicDataCount genomicDataCount2 = new GenomicDataCount();
+        genomicDataCount2.setLabel(TEST_CNA_ALTERATION_NAME_2);
+        genomicDataCount2.setValue(TEST_CNA_ALTERATION_VALUE_2);
+        genomicDataCount2.setCount(1);
+
+        GenomicDataCountItem genomicDataCountItem1 = new GenomicDataCountItem();
+        List<GenomicDataCount> genomicDataCounts1 = new ArrayList<>();
+        genomicDataCounts1.add(genomicDataCount1);
+        genomicDataCounts1.add(genomicDataCount2);
+        genomicDataCountItem1.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_1);
+        genomicDataCountItem1.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataCountItem1.setCounts(genomicDataCounts1);
+
+        GenomicDataCountItem genomicDataCountItem2 = new GenomicDataCountItem();
+        List<GenomicDataCount> genomicDataCounts2 = new ArrayList<>();
+        genomicDataCounts2.add(genomicDataCount1);
+        genomicDataCounts2.add(genomicDataCount2);
+        genomicDataCountItem2.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_2);
+        genomicDataCountItem2.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataCountItem2.setCounts(genomicDataCounts2);
+
+        genomicDataCountItems.add(genomicDataCountItem1);
+        genomicDataCountItems.add(genomicDataCountItem2);
+
+        when(studyViewService.getCNAAlterationCountsByGeneSpecific(
+            anyList(),
+            anyList(),
+            anyList()))
+            .thenReturn(genomicDataCountItems);
+
+        GenomicDataCountFilter genomicDataCountFilter = new GenomicDataCountFilter();
+        List<GenomicDataFilter> genomicDataFilters = new ArrayList<>();
+        
+        GenomicDataFilter genomicDataFilter1 = new GenomicDataFilter();
+        genomicDataFilter1.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_1);
+        genomicDataFilter1.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataFilters.add(genomicDataFilter1);
+        
+        GenomicDataFilter genomicDataFilter2 = new GenomicDataFilter();
+        genomicDataFilter2.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_2);
+        genomicDataFilter2.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataFilters.add(genomicDataFilter2);
+        
+        genomicDataCountFilter.setGenomicDataFilters(genomicDataFilters);
+        
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+        genomicDataCountFilter.setStudyViewFilter(studyViewFilter);
+
+        mockMvc.perform(MockMvcRequestBuilders.post("/genomic-data-counts/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(genomicDataCountFilter)))
+            .andExpect(MockMvcResultMatchers.status().isOk())
+            .andExpect(MockMvcResultMatchers.content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].hugoGeneSymbol").value(TEST_HUGO_GENE_SYMBOL_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].profileType").value(TEST_MOLECULAR_PROFILE_TYPE))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[0].label").value(TEST_CNA_ALTERATION_NAME_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[0].value").value(TEST_CNA_ALTERATION_VALUE_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[0].count").value(1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[1].label").value(TEST_CNA_ALTERATION_NAME_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[1].value").value(TEST_CNA_ALTERATION_VALUE_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[1].count").value(1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].hugoGeneSymbol").value(TEST_HUGO_GENE_SYMBOL_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].profileType").value(TEST_MOLECULAR_PROFILE_TYPE))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[0].label").value(TEST_CNA_ALTERATION_NAME_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[0].value").value(TEST_CNA_ALTERATION_VALUE_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[0].count").value(1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[1].label").value(TEST_CNA_ALTERATION_NAME_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[1].value").value(TEST_CNA_ALTERATION_VALUE_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[1].count").value(1));
+    }
+    
     @Ignore("Skip StudyViewControllerTest.fetchClinicalDataDensityPlot due to assertion errors")
     @Test
     public void fetchClinicalDataDensityPlot() throws Exception {ueu(2e3d886121d0820a23aa6d914638fab898da8f04}(sha(2e3d886121d0820a23aa6d914638fab898da8f04node_idEC_kwDOAe-hB9oAKDJlM2Q4ODYxMjFkMDgyMGEyM2FhNmQ5MTQ2MzhmYWI4OThkYThmMDQcommit}(author}(namealismanemaillisman.aaron@gmail.comdate2023-07-10T17:58:17Zu	committer}(j0  GitHubj	0  noreply@github.comj0  2023-07-10T17:58:17ZumessageFeature/add clinical data counts endpoint (#10262)

Migrate mutated-genes and clinical-data-counts to clickhouse-ish implementations
---------

Co-authored-by: haynescd <haynescd@chop.edu>tree}(j/  (c50d0599d069643a93e95ead08b5959246cee818urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c50d0599d069643a93e95ead08b5959246cee818uj0  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/2e3d886121d0820a23aa6d914638fab898da8f04
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkrEa5CRBK7hj4Ov3rIwAAA5oIAH5xNMKPdiNTi+n1iKYB7K+Q
HNOGDbbgjWuZXkDrqngAMkYQ+TYcF2HbCDCNDOn8AJUFJyUYtKrHkkWcPY4j0D5c
AdJOA5DSsCZzm/iA2GDXpoX8hi/nESd6B52a2K55Uvd3f5ALhNAJ0HC5DTabrKsm
l0Lh6aenx6lbYHZqzS99EnQGUT1Qm0WgFS7y+xb/E+PuT+YGDbFanNvYR28EfyOc
O0exKRDrIbt1ZLFmFNT+bIdpH++HmjlF71JASmH8vLGO4IvKBF7wr1UW8QPQ55eX
DajBw12sgsQiDkic84S79TnLyW8CHTdQgvdXLIW0gmvnwj79f8SrI1v6xEqoFyc=
=eJH2
-----END PGP SIGNATURE-----
payloadX  tree c50d0599d069643a93e95ead08b5959246cee818
parent 18819b109ea7cdcb4ad54e526332806d00cabdf1
author alisman <lisman.aaron@gmail.com> 1689011897 -0400
committer GitHub <noreply@github.com> 1689011897 -0400

Feature/add clinical data counts endpoint (#10262)

Migrate mutated-genes and clinical-data-counts to clickhouse-ish implementations
---------

Co-authored-by: haynescd <haynescd@chop.edu>uuj0  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2e3d886121d0820a23aa6d914638fab898da8f04html_urlXhttps://github.com/cBioPortal/cbioportal/commit/2e3d886121d0820a23aa6d914638fab898da8f04comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/2e3d886121d0820a23aa6d914638fab898da8f04/commentsj0  }(loginalismanidJ j0  MDQ6VXNlcjE4NjUyMQ==
avatar_url2https://avatars.githubusercontent.com/u/186521?v=4gravatar_idh5j0  $https://api.github.com/users/alismanj%0  https://github.com/alisman
followers_url.https://api.github.com/users/alisman/followers
following_url;https://api.github.com/users/alisman/following{/other_user}	gists_url4https://api.github.com/users/alisman/gists{/gist_id}starred_url;https://api.github.com/users/alisman/starred{/owner}{/repo}subscriptions_url2https://api.github.com/users/alisman/subscriptionsorganizations_url)https://api.github.com/users/alisman/orgs	repos_url*https://api.github.com/users/alisman/repos
events_url5https://api.github.com/users/alisman/events{/privacy}received_events_url4https://api.github.com/users/alisman/received_eventstypeUser
site_adminuj
0  }(j*0  web-flowj,0  J/j0  MDQ6VXNlcjE5ODY0NDQ3j.0  4https://avatars.githubusercontent.com/u/19864447?v=4j00  h5j0  %https://api.github.com/users/web-flowj%0  https://github.com/web-flowj30  /https://api.github.com/users/web-flow/followersj50  <https://api.github.com/users/web-flow/following{/other_user}j70  5https://api.github.com/users/web-flow/gists{/gist_id}j90  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j;0  3https://api.github.com/users/web-flow/subscriptionsj=0  *https://api.github.com/users/web-flow/orgsj?0  +https://api.github.com/users/web-flow/reposjA0  6https://api.github.com/users/web-flow/events{/privacy}jC0  5https://api.github.com/users/web-flow/received_eventsjE0  UserjG0  uparents]}(j/  (18819b109ea7cdcb4ad54e526332806d00cabdf1j0  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/18819b109ea7cdcb4ad54e526332806d00cabdf1j%0  Xhttps://github.com/cBioPortal/cbioportal/commit/18819b109ea7cdcb4ad54e526332806d00cabdf1uastats}(totalM	additionsM	deletionsKNufiles](}(j/  (66525e30e1efbde90e81739556bc9062a95b3ad6filename]persistence/persistence-api/src/main/java/org/cbioportal/persistence/StudyViewRepository.javastatusmodifiedja0  Kjb0  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/2e3d886121d0820a23aa6d914638fab898da8f04/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStudyViewRepository.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/2e3d886121d0820a23aa6d914638fab898da8f04/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStudyViewRepository.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStudyViewRepository.java?ref=2e3d886121d0820a23aa6d914638fab898da8f04patchX  @@ -1,13 +1,27 @@
 package org.cbioportal.persistence;
 
 import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.ClinicalData;
+import org.cbioportal.model.ClinicalDataCount;
 import org.cbioportal.model.Sample;
+import org.cbioportal.persistence.enums.ClinicalAttributeDataSource;
+import org.cbioportal.persistence.enums.ClinicalAttributeDataType;
+import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
 import org.cbioportal.webparam.StudyViewFilter;
 
 import java.util.List;
 
 public interface StudyViewRepository {
-    List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter);
+    List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
+
+    List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
+    
+    List<ClinicalDataCount> getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List<String> filteredAttributes);
+    
+    List<ClinicalDataCount> getSampleClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List<String> filteredAttributes);
+    
+    List<ClinicalDataCount> getPatientClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List<String> filteredAttributes);
+
+    List<String> getClinicalDataAttributeNames(ClinicalAttributeDataSource clinicalAttributeDataSource, ClinicalAttributeDataType dataType);
 
-    List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter);
 }u}(j/  (ed320c1cebdeb86e26975a96186b3d90fb93e204jg0  kpersistence/persistence-api/src/main/java/org/cbioportal/persistence/enums/ClinicalAttributeDataSource.javaji0  addedja0  Kjb0  K jk0  Kjl0  https://github.com/cBioPortal/cbioportal/blob/2e3d886121d0820a23aa6d914638fab898da8f04/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fenums%2FClinicalAttributeDataSource.javajn0  https://github.com/cBioPortal/cbioportal/raw/2e3d886121d0820a23aa6d914638fab898da8f04/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fenums%2FClinicalAttributeDataSource.javajp0  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fenums%2FClinicalAttributeDataSource.java?ref=2e3d886121d0820a23aa6d914638fab898da8f04jr0  X`  @@ -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;
+    }
+}u}(j/  (591f67e117d28f576de9bf7566af8ad425820ee4jg0  ipersistence/persistence-api/src/main/java/org/cbioportal/persistence/enums/ClinicalAttributeDataType.javaji0  addedja0  Kjb0  K jk0  Kjl0  https://github.com/cBioPortal/cbioportal/blob/2e3d886121d0820a23aa6d914638fab898da8f04/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fenums%2FClinicalAttributeDataType.javajn0  https://github.com/cBioPortal/cbioportal/raw/2e3d886121d0820a23aa6d914638fab898da8f04/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fenums%2FClinicalAttributeDataType.javajp0  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fenums%2FClinicalAttributeDataType.java?ref=2e3d886121d0820a23aa6d914638fab898da8f04jr0  Xl  @@ -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;
+    }
+}u}(j/  (0440213f5844a68e0873c6ee31663dd699a03862jg0  ppersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.javaji0  modifiedja0  Kjb0  Kjk0  Kjl0  https://github.com/cBioPortal/cbioportal/blob/2e3d886121d0820a23aa6d914638fab898da8f04/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.javajn0  https://github.com/cBioPortal/cbioportal/raw/2e3d886121d0820a23aa6d914638fab898da8f04/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.javajp0  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.java?ref=2e3d886121d0820a23aa6d914638fab898da8f04jr0  X  @@ -1,12 +1,25 @@
 package org.cbioportal.persistence.mybatiscolumnstore;
 
 import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.ClinicalDataCount;
 import org.cbioportal.model.Sample;
+import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
 import org.cbioportal.webparam.StudyViewFilter;
 
 import java.util.List;
 
 public interface StudyViewMapper {
-    List<Sample> getFilteredSamples(StudyViewFilter studyViewFilter);
-    List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter);
+    List<Sample> getFilteredSamples(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters);
+    List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters);
+    
+    List<ClinicalDataCount> getPatientClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter,
+                                                         boolean applyPatientIdFilters,  List<String> attributeIds, List<String> filteredAttributeValues);
+
+    List<ClinicalDataCount> getSampleClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter,
+                                                        boolean applyPatientIdFilters, List<String> attributeIds, List<String> filteredAttributeValues );
+    
+    List<ClinicalDataCount> getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter,
+                                                  boolean applyPatientIdFilters, List<String> attributeIds, List<String> filteredAttributeValues);
+    
+    List<String> getClinicalAttributeNames(String tableName);
 }u}(j/  (c08c2b36ff699f54832d80884004c166147a6aa9jg0  {persistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepository.javaji0  modifiedja0  K(jb0  Kjk0  K,jl0  https://github.com/cBioPortal/cbioportal/blob/2e3d886121d0820a23aa6d914638fab898da8f04/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.javajn0  https://github.com/cBioPortal/cbioportal/raw/2e3d886121d0820a23aa6d914638fab898da8f04/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.javajp0  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.java?ref=2e3d886121d0820a23aa6d914638fab898da8f04jr0  X  @@ -1,8 +1,13 @@
 package org.cbioportal.persistence.mybatiscolumnstore;
 
 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.webparam.CategorizedClinicalDataCountFilter;
 import org.cbioportal.webparam.StudyViewFilter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Repository;
@@ -12,16 +17,47 @@
 @Repository
 public class StudyViewMyBatisRepository implements StudyViewRepository {
 
+    private final List<String> FILTERED_CLINICAL_ATTR_VALUES = List.of("NA", "NAN", "N/A");
     @Autowired
     private StudyViewMapper studyViewMapper;
     
     @Override
-    public List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter) {
-        return studyViewMapper.getFilteredSamples(studyViewFilter);
+    public List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) {
+        
+        return studyViewMapper.getFilteredSamples(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter));
     }
     
     @Override
-    public List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter) {
-        return studyViewMapper.getMutatedGenes(studyViewFilter);
+    public List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) {
+        return studyViewMapper.getMutatedGenes(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter));
+    }
+
+    @Override
+    public List<ClinicalDataCount> getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List<String> filteredAttributes) {
+        return studyViewMapper.getClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter),
+            filteredAttributes, FILTERED_CLINICAL_ATTR_VALUES );
+    }
+
+    @Override
+    public List<ClinicalDataCount> getSampleClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List<String> filteredAttributes) {
+        return studyViewMapper.getSampleClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter),
+           filteredAttributes, FILTERED_CLINICAL_ATTR_VALUES );
+    }
+
+    @Override
+    public List<ClinicalDataCount> getPatientClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List<String> filteredAttributes) {
+        return studyViewMapper.getPatientClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter),
+            filteredAttributes, FILTERED_CLINICAL_ATTR_VALUES);
+    }
+
+    @Override
+    public List<String> getClinicalDataAttributeNames(ClinicalAttributeDataSource clinicalAttributeDataSource, ClinicalAttributeDataType dataType) {
+        String tableName = clinicalAttributeDataSource.getValue().toLowerCase() + "_clinical_attribute_" + dataType.getValue().toLowerCase();
+        return studyViewMapper.getClinicalAttributeNames(tableName);
+    }
+
+    private boolean shouldApplyPatientIdFilters(CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) {
+        return categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters().isEmpty()
+            || categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters().isEmpty();
     }
 }
\ No newline at end of fileu}(j/  (f121f75fd5db65665c8e749961e1c941c94f8502jg0  tpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmlji0  modifiedja0  Kjb0  K;jk0  Kjl0  https://github.com/cBioPortal/cbioportal/blob/2e3d886121d0820a23aa6d914638fab898da8f04/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmljn0  https://github.com/cBioPortal/cbioportal/raw/2e3d886121d0820a23aa6d914638fab898da8f04/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmljp0  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=2e3d886121d0820a23aa6d914638fab898da8f04jr0  X9  @@ -12,10 +12,13 @@
             sample_unique_id_base64 as uniqueSampleKey,
             patient_unique_id_base64 as uniquePatientKey
         FROM sample
-        WHERE sample_unique_id IN (
-            <!-- Study View Filter-->
-            <include refid="sampleUniqueIdsFromStudyViewFilter" />
-        )
+        <where>
+            sample_unique_id IN ( <include refid="sampleUniqueIdsFromStudyViewFilter"/>)
+            
+            <if test="applyPatientIdFilters == true">
+                AND patient_unique_id IN (<include refid="patientUniqueIdsFromStudyViewFilter"/>)
+            </if>
+        </where>
         ORDER BY sample_stable_id ASC;
     </select>
 
@@ -29,103 +32,203 @@
             COUNT(DISTINCT sample_unique_id) as numberOfAlteredCases,
             COUNT(*) as totalCount
         FROM mutation
-        WHERE sample_unique_id IN (
-            <include refid="sampleUniqueIdsFromStudyViewFilter" />
-        )
+        <where>
+           sample_unique_id IN ( <include refid="sampleUniqueIdsFromStudyViewFilter"/>
+            <if test="applyPatientIdFilters == true">
+                INTERSECT <include refid="getSampleIdsFromPatientIds"/>
+            </if> 
+            )
+
+        </where>
         GROUP BY hugo_gene_symbol
         ORDER BY totalCount DESC;
     </select>
+   
+    <!-- for /clinical-data-counts/fetch (returns ClinicalData) which will then be converted to clinicalDataCountItems -->
+    <select id="getClinicalDataCounts" resultType="org.cbioportal.model.ClinicalDataCount">
+        <include refid="getCategoricalClinicalDataCountsQuery">
+            <property name="table_name_prefix" value="patient"/>
+        </include>
+        UNION ALL
+        <include refid="getCategoricalClinicalDataCountsQuery">
+            <property name="table_name_prefix" value="sample"/>
+        </include>
+    </select>
+    <sql id="getCategoricalClinicalDataCountsQuery">
+        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
+        <where>
+            patient_unique_id IN ( <include refid="getPatientIdsFromSampleIdFilters"/>
+            <if test="applyPatientIdFilters == true">
+                INTERSECT <include refid="patientUniqueIdsFromStudyViewFilter"/>
+            </if>
+            )
+            AND UPPER(attribute_value) NOT IN
+            <foreach item="filteredAttributeValue" collection="filteredAttributeValues" open="(" separator="," close=")">
+                #{filteredAttributeValue}
+            </foreach>
+            AND attribute_name IN
+            <foreach item="attributeId" collection="attributeIds" open="(" separator="," close=")">
+                #{attributeId}
+            </foreach>
+        </where>
+        GROUP BY attribute_name,
+        attribute_value
+    </sql>
+    <select id="getPatientClinicalDataCounts" resultType="org.cbioportal.model.ClinicalDataCount">
+        <include refid="getCategoricalClinicalDataCountsQuery">
+            <property name="table_name_prefix" value="patient"/>
+        </include>
+    </select>
+    <select id="getSampleClinicalDataCounts" resultType="org.cbioportal.model.ClinicalDataCount">
+        <include refid="getCategoricalClinicalDataCountsQuery">
+            <property name="table_name_prefix" value="sample"/>
+        </include>
+    </select>
     
     <!-- This block represents the Study View Filter -->
     <sql id="sampleUniqueIdsFromStudyViewFilter">
         <trim prefixOverrides="INTERSECT">
-            <if test="studyIds != null and !studyIds.isEmpty()">
+            <if test="studyViewFilter.studyIds != null and !studyViewFilter.studyIds.isEmpty()">
                 INTERSECT
                 SELECT sample_unique_id
                 FROM sample
                 WHERE cancer_study_identifier IN
-                <foreach item="studyId" collection="studyIds" open="(" separator="," close=")">
+                <foreach item="studyId" collection="studyViewFilter.studyIds" open="(" separator="," close=")">
                     #{studyId}
                 </foreach>
             </if>
-            <if test="sampleIdentifiers != null and !sampleIdentifiers.isEmpty()">
+            <if test="studyViewFilter.sampleIdentifiers != null and !studyViewFilter.sampleIdentifiers.isEmpty()">
                 INTERSECT
                 SELECT sample_unique_id
                 FROM sample
                 WHERE sample_unique_id IN
-                <foreach item="sampleIdentifier" collection="sampleIdentifiers" open="(" separator="," close=")">
+                <foreach item="sampleIdentifier" collection="studyViewFilter.sampleIdentifiers" open="(" separator="," close=")">
                     #{sampleIdentifier.getStudyId()}_#{sampleIdentifier.getSampleId()}
                 </foreach>
             </if>
-            <if test="geneFilters != null and !geneFilters.isEmpty()">
+            <if test="studyViewFilter.geneFilters != null and !studyViewFilter.geneFilters.isEmpty()">
                 INTERSECT
                 SELECT sample_unique_id
                 FROM genomic_event
                 <where>
                     <trim prefixOverrides="OR">
-                        <foreach item="profileGroup" collection="geneFilters" open="OR (" separator="," close=")">
+                        <foreach item="profileGroup" collection="studyViewFilter.geneFilters" open="OR (" separator="," close=")">
                             genetic_profile_stable_id IN
                             <foreach item="molecularProfileId" collection="profileGroup.getMolecularProfileIds()" open="(" separator="," close=")">
                                 #{molecularProfileId}
                             </foreach>
-                            AND hugo_gene_symbol IN
-                            <foreach item="geneFilterQueryList" collection="profileGroup.getGeneQueries()">
-                                <foreach item="geneFilterQuery" collection="geneFilterQueryList" open="(" separator="," close=")">
+                            AND hugo_gene_symbol IN (
+                            <foreach item="geneFilterQueryList" collection="profileGroup.getGeneQueries()" separator=",">
+                                <foreach item="geneFilterQuery" collection="geneFilterQueryList" separator=",">
                                     #{geneFilterQuery.hugoGeneSymbol}
                                 </foreach>
                             </foreach>
+                            )
                         </foreach>
                     </trim>
                 </where>
             </if>
-            <!-- <if test="clinicalDataFilters != null and !clinicalDataFilters.isEmpty()">
-                INTERSECT
-                SELECT sample_unique_id
-                FROM sample
-                WHERE patient_unique_id IN (
-                    SELECT patient_unique_id
-                    FROM patient_clinical_attribute_numeric
-                    WHERE
-                    <trim prefixOverrides="AND">
-                        <foreach item="clinicalDataFilter" collection="clinicalDataFilters" open="(" separator=") AND (" close=")">
-                            <foreach item="dataFilterValue" collection="clinicalDataFilter.values" open="(" separator=") OR (" close=")">
-                                attribute_name = '${clinicalDataFilter.attributeId}'
-                                <if test="dataFilterValue.value eq 'NA'">
-                                    AND attribute_value = -1000000
-                                </if>
-                                <if test="dataFilterValue.start != null">
-                                    AND attribute_value &gt; ${dataFilterValue.start}
-                                </if>
-                                <if test="dataFilterValue.end != null">
-                                    AND attribute_value &lt;= ${dataFilterValue.end}
-                                </if>
-                            </foreach>
-                        </foreach>
-                    </trim>
-                 )
-            </if>  -->
-             <if test="clinicalDataFilters != null and !clinicalDataFilters.isEmpty()">
-                <foreach item="clinicalDataFilter" collection="clinicalDataFilters" open="INTERSECT" separator="INTERSECT">
-                    SELECT sample_unique_id
-                    FROM sample_clinical_attribute_numeric
-                    WHERE attribute_name = '${clinicalDataFilter.attributeId}'
-                    <foreach item="dataFilterValue" collection="clinicalDataFilter.values" open=" AND ((" separator=") OR (" close="))">
-                        <trim prefix="" prefixOverrides="AND">
-                            <if test="dataFilterValue.value eq 'NA'">
-                                AND attribute_value = -1000000
-                            </if>
+            <if test="categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters() != null and !categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters().isEmpty()">
+                <foreach item="clinicalDataFilter" collection="categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters()" open="INTERSECT" separator="INTERSECT">
+                    <include refid="numericalClinicalDataCountFilter">
+                        <property name="unique_id" value="sample_unique_id"/>
+                        <property name="table_name" value="sample_clinical_attribute_numeric"/>
+                    </include>
+                </foreach>
+            </if>
+            <if test="categorizedClinicalDataCountFilter.getSampleCategoricalClinicalDataFilters() != null and !categorizedClinicalDataCountFilter.getSampleCategoricalClinicalDataFilters().isEmpty()">
+                <foreach item="clinicalDataFilter" collection="categorizedClinicalDataCountFilter.getSampleCategoricalClinicalDataFilters()" open="INTERSECT" separator="INTERSECT">
+                    <include refid="categoricalClinicalDataCountFilter">
+                        <property name="unique_id" value="sample_unique_id"/>
+                        <property name="table_name" value="sample_clinical_attribute_categorical"/>
+                    </include>
+                </foreach>
+            </if>
+            <!-- ... extend for other elements of the StudyViewFilter object -->
+        </trim>
+    </sql>
+
+    <sql id="patientUniqueIdsFromStudyViewFilter">
+        <trim prefixOverrides="INTERSECT">
+            <if test="categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters() != null and !categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters().isEmpty()">
+                <foreach item="clinicalDataFilter" collection="categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters()" open="INTERSECT" separator="INTERSECT">
+                    <include refid="numericalClinicalDataCountFilter">
+                        <property name="unique_id" value="patient_unique_id"/>
+                        <property name="table_name" value="patient_clinical_attribute_numeric"/>
+                    </include>
+                </foreach>
+            </if>
+            <if test="categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters() != null and !categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters().isEmpty()">
+                <foreach item="clinicalDataFilter" collection="categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters()" open="INTERSECT" separator="INTERSECT">
+                    <include refid="categoricalClinicalDataCountFilter">
+                        <property name="unique_id" value="patient_unique_id"/>
+                        <property name="table_name" value="patient_clinical_attribute_categorical"/>
+                    </include>
+                </foreach>
+            </if> 
+        </trim>
+    </sql>
+   
+    <sql id="numericalClinicalDataCountFilter">
+            SELECT ${unique_id}
+            FROM ${table_name}
+            WHERE attribute_name = '${clinicalDataFilter.attributeId}'
+            <foreach item="dataFilterValue" collection="clinicalDataFilter.values" open=" AND ((" separator=") OR (" close="))">
+                <trim prefix="" prefixOverrides="AND">
+                    <if test="dataFilterValue.value eq 'NA'">
+                        AND attribute_value = -1000000
+                    </if>
+                    <choose>
+                        <when test="dataFilterValue.start == dataFilterValue.end">
+                            AND ABS(attribute_value - ${dataFilterValue.start}) &lt; EXP(-11)
+                        </when>
+                        <otherwise>
                             <if test="dataFilterValue.start != null">
                                 AND attribute_value &gt; ${dataFilterValue.start}
                             </if>
                             <if test="dataFilterValue.end != null">
                                 AND attribute_value &lt;= ${dataFilterValue.end}
                             </if>
-                        </trim>
-                    </foreach>
-                </foreach>                
-            </if>
-            <!-- ... extend for other elements of the StudyViewFilter object -->
-        </trim>
-    </sql>
+                        </otherwise>
+                    </choose>
+                </trim>
+            </foreach>
 
+    </sql>
+    <sql id="categoricalClinicalDataCountFilter">
+            SELECT ${unique_id}
+            FROM ${table_name}
+            WHERE attribute_name = '${clinicalDataFilter.attributeId}'
+            <foreach item="dataFilterValue" collection="clinicalDataFilter.values" open=" AND ((" separator=") OR (" close="))">
+                <trim prefix="" prefixOverrides="AND">
+                    AND attribute_value = '${dataFilterValue.value}'
+                </trim>
+            </foreach>
+    </sql>
+    
+    <sql id="getSampleIdsFromPatientIds">
+        SELECT sample_unique_id
+        FROM sample
+        <where>
+            patient_unique_id IN (<include refid="patientUniqueIdsFromStudyViewFilter"/>) 
+        </where>
+    </sql>
+    
+    <sql id="getPatientIdsFromSampleIdFilters">
+        SELECT patient_unique_id
+        FROM sample
+        <where>
+            sample_unique_id IN (<include refid="sampleUniqueIdsFromStudyViewFilter"/>)
+        </where>
+    </sql>
+    
+    <select id="getClinicalAttributeNames" resultType="String">
+        SELECT
+        DISTINCT(attribute_name)
+        FROM ${tableName};
+    </select>
 </mapper>u}(j/  (fe72ed27380dc45cf56f07c11cc0fce91da7cd43jg0  persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepositoryTest.javaji0  modifiedja0  Kjb0  Kjk0  Kjl0  https://github.com/cBioPortal/cbioportal/blob/2e3d886121d0820a23aa6d914638fab898da8f04/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javajn0  https://github.com/cBioPortal/cbioportal/raw/2e3d886121d0820a23aa6d914638fab898da8f04/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javajp0  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.java?ref=2e3d886121d0820a23aa6d914638fab898da8f04jr0  X"-  @@ -1,11 +1,14 @@
 package org.cbioportal.persistence.mybatiscolumnstore;
 
 import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.ClinicalDataCount;
 import org.cbioportal.model.Sample;
-import org.cbioportal.webparam.ClinicalDataFilter;
-import org.cbioportal.webparam.DataFilterValue;
-import org.cbioportal.webparam.StudyViewFilter;
+import org.cbioportal.model.util.Select;
+import org.cbioportal.persistence.enums.ClinicalAttributeDataSource;
+import org.cbioportal.persistence.enums.ClinicalAttributeDataType;
+import org.cbioportal.webparam.*;
 import org.junit.Assert;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -15,6 +18,9 @@
 
 import java.math.BigDecimal;
 import java.util.*;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 
@@ -31,7 +37,7 @@ public void getFilteredSamples() {
         StudyViewFilter studyViewFilter = generateStudyViewFilter(new String[]{"msk_ch_2020", "msk_impact_2017"}, null);
         
         // test total number of samples
-        List<Sample> samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter);
+        List<Sample> samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build());
         Assert.assertEquals(11, samples.size());
         
         // test sample numerical clinical attributes
@@ -42,18 +48,35 @@ public void getFilteredSamples() {
             )
         );
 
-        samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter);
+        samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build());
         Assert.assertEquals(2, samples.size());
     }
 
     @Test
     public void getMutatedGenes() {
         StudyViewFilter studyViewFilter = generateStudyViewFilter(new String[]{"msk_ch_2020"}, null);
 
-        List<AlterationCountByGene> mutations = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter);
+        List<AlterationCountByGene> mutations = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build());
         Assert.assertEquals(2, mutations.size());
     }
+    
+    @Test
+    public void getMutatedGenesFiltered() {
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(new String[]{"msk_impact_2017"}, null);
+
+        List<StudyViewGeneFilter> studyViewGeneFilters = new ArrayList<>();
+        StudyViewGeneFilter mutationStudyViewGeneFilter = new StudyViewGeneFilter();
+        mutationStudyViewGeneFilter.setMolecularProfileIds(new HashSet<>(Arrays.asList("msk_impact_2017_mutations")));
+        
+        mutationStudyViewGeneFilter.setGeneQueries(getFilters.apply("moo"));
 
+        studyViewGeneFilters.add(mutationStudyViewGeneFilter);
+        
+        studyViewFilter.setGeneFilters(studyViewGeneFilters);
+        
+        List<AlterationCountByGene> mutations = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build());
+        Assert.assertEquals(414, mutations.size());
+    }
     
     private StudyViewFilter generateStudyViewFilter(
         String[] studyIds,
@@ -90,6 +113,38 @@ private ClinicalDataFilter generateClinicalDataFilter(String attributeId, String
         return dataFilterValue;
     };
     
+    private final Function<String,List<List<GeneFilterQuery>>> getFilters = v -> {
+
+        boolean includeDriver = true;
+        boolean includeVUS = true;
+        boolean includeUnknownOncogenicity = true;
+        boolean includeGermline = true;
+        boolean includeSomatic = true;
+        boolean includeUnknownStatus = true;
+        Select<String> selectedTiers = Select.none();
+        boolean includeUnknownTier = true;
+
+        GeneFilterQuery geneFilterQuery1 = new GeneFilterQuery("SMARCD1", null,
+            null, includeDriver, includeVUS, includeUnknownOncogenicity,  selectedTiers, includeUnknownTier,
+            includeGermline, includeSomatic, includeUnknownStatus);
+
+        GeneFilterQuery geneFilterQuery2 = new GeneFilterQuery("TP53", null,
+            null, includeDriver, includeVUS, includeUnknownOncogenicity,  selectedTiers, includeUnknownTier,
+            includeGermline, includeSomatic, includeUnknownStatus);
+
+        List<List<GeneFilterQuery>> q1 = new ArrayList<>();
+        List<GeneFilterQuery> q2 = new ArrayList<>();
+        List<GeneFilterQuery> q3 = new ArrayList<>();
+        
+        q2.add(geneFilterQuery1);
+        q3.add(geneFilterQuery2);
+        q1.add(q2);
+        q1.add(q3);
+        return q1;
+        
+    };
+    
+    
     private final Function<String, DataFilterValue> mapNumericalValues = v -> {
         DataFilterValue dataFilterValue = new DataFilterValue();
 
@@ -101,4 +156,123 @@ private ClinicalDataFilter generateClinicalDataFilter(String attributeId, String
         
         return dataFilterValue;
     };
+    @Test
+    @Ignore
+    public void getClinicalAttributeNames() {
+        List<String> names = studyViewMyBatisRepository.getClinicalDataAttributeNames(ClinicalAttributeDataSource.PATIENT, ClinicalAttributeDataType.CATEGORICAL);
+        Assert.assertTrue(names.size() > 0);
+        Assert.assertTrue(names.contains("OS_STATUS"));
+    }
+    
+    @Test
+    @Ignore
+    public void getFilterSamplesWithClinicalDataFilter() {
+        ClinicalDataFilter clinicalDataFilter = new ClinicalDataFilter();
+        clinicalDataFilter.setAttributeId("TMB_NONSYNONYMOUS");
+        DataFilterValue filterValue = new DataFilterValue();
+        filterValue.setStart(BigDecimal.valueOf(0.033333333));
+        filterValue.setEnd(BigDecimal.valueOf(0.033333333));
+        clinicalDataFilter.setValues(List.of(filterValue));
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = CategorizedClinicalDataCountFilter.getBuilder()
+            .setSampleNumericalClinicalDataFilters(List.of(clinicalDataFilter))
+            .build();
+
+        List<String> studyIds = new ArrayList<>();
+        studyIds.add("msk_ch_2020");
+        studyViewFilter.setStudyIds(studyIds);
+        
+        List<ClinicalDataFilter> test = categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters();
+        List<Sample> samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, categorizedClinicalDataCountFilter);
+        Assert.assertEquals(4507, samples.size()); 
+    }
+    
+    @Test
+    //@Ignore
+    public void getFilterSamplesWithCategoricalSampleClinicalDataFilter() {
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(
+            new String[]{"msk_ch_2020"},null
+        );
+        CategorizedClinicalDataCountFilter clincalDataCountFilters = CategorizedClinicalDataCountFilter.getBuilder()
+            .setSampleCategoricalClinicalDataFilters(Arrays.asList(generateCategoricalClinicalDataFilter("CANCER_TYPE", new String[]{"Bladder Cancer", "Breast Cancer"})))
+            .build();
+        
+        List<Sample> filteredSamples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, clincalDataCountFilters);
+        Assert.assertEquals(1435, filteredSamples.size());
+    }
+    @Test
+    @Ignore
+    public void getFilterSamplesWithNumericPatientClinicalDataFilter() {
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(
+            new String[]{"msk_ch_2020"},null
+        );
+        CategorizedClinicalDataCountFilter clincalDataCountFilters = CategorizedClinicalDataCountFilter.getBuilder()
+            .setPatientNumericalClinicalDataFilters(Arrays.asList(generateNumericalClinicalDataFilter("AGE", new String[]{"60-65"})))
+            .build();
+
+        List<Sample> filteredSamples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, clincalDataCountFilters);
+        Assert.assertEquals(3343, filteredSamples.size());
+    }
+    @Test
+    @Ignore
+    public void getFilterSamplesWithPatientClinicalDataFilterAndSampleClinicalDataFilter() {
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(
+            new String[]{"msk_ch_2020"},null
+        );
+
+        ClinicalDataFilter clinicalDataFilter = new ClinicalDataFilter();
+        clinicalDataFilter.setAttributeId("TMB_NONSYNONYMOUS");
+        DataFilterValue filterValue = new DataFilterValue();
+        filterValue.setStart(BigDecimal.valueOf(0.033333333));
+        filterValue.setEnd(BigDecimal.valueOf(0.033333333));
+        clinicalDataFilter.setValues(List.of(filterValue));
+        
+        CategorizedClinicalDataCountFilter clincalDataCountFilters = CategorizedClinicalDataCountFilter.getBuilder()
+            .setPatientNumericalClinicalDataFilters(List.of(generateNumericalClinicalDataFilter("AGE", new String[]{"60-65"})))
+            .setSampleNumericalClinicalDataFilters(List.of(clinicalDataFilter))
+            .setSampleCategoricalClinicalDataFilters(List.of(generateCategoricalClinicalDataFilter("CANCER_TYPE", new String[]{"Bladder Cancer"})))
+            .build();
+
+        List<Sample> filteredSamples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, clincalDataCountFilters);
+        Assert.assertEquals(21, filteredSamples.size());
+    }
+
+    @Test
+    @Ignore
+    public void getMutatedGenesWithPatientClinicalDataFilterAndSampleClinicalDataFilter() {
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(
+            new String[]{"msk_ch_2020"},null
+        );
+
+        ClinicalDataFilter clinicalDataFilter = new ClinicalDataFilter();
+        clinicalDataFilter.setAttributeId("TMB_NONSYNONYMOUS");
+        DataFilterValue filterValue = new DataFilterValue();
+        filterValue.setStart(BigDecimal.valueOf(0.033333333));
+        filterValue.setEnd(BigDecimal.valueOf(0.033333333));
+        clinicalDataFilter.setValues(List.of(filterValue));
+
+        CategorizedClinicalDataCountFilter clincalDataCountFilters = CategorizedClinicalDataCountFilter.getBuilder()
+            .setPatientNumericalClinicalDataFilters(List.of(generateNumericalClinicalDataFilter("AGE", new String[]{"60-65"})))
+            .setSampleNumericalClinicalDataFilters(List.of(clinicalDataFilter))
+            .setSampleCategoricalClinicalDataFilters(List.of(generateCategoricalClinicalDataFilter("CANCER_TYPE", new String[]{"Bladder Cancer"})))
+            .build();
+
+        List<AlterationCountByGene> mutatedGenes = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter, clincalDataCountFilters);
+        Assert.assertEquals(16, mutatedGenes.size());
+    }
+    
+    @Test
+    @Ignore
+    public void getClinicalDataCounts() {
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(
+            new String[]{"msk_ch_2020"},null
+        ); 
+        
+        List<ClinicalDataCount> counts = studyViewMyBatisRepository.getClinicalDataCounts(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build(),
+            List.of("CANCER_TYPE"));
+        
+        Assert.assertEquals(counts.size(), 50);
+        
+        
+    }
 }
\ No newline at end of fileu}(j/  (f1dfadfe10c16164f74ca78ff5dac0939fdd9054jg0  Bservice/src/main/java/org/cbioportal/service/StudyViewService.javaji0  modifiedja0  Kjb0  K jk0  Kjl0  https://github.com/cBioPortal/cbioportal/blob/2e3d886121d0820a23aa6d914638fab898da8f04/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javajn0  https://github.com/cBioPortal/cbioportal/raw/2e3d886121d0820a23aa6d914638fab898da8f04/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javajp0  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.java?ref=2e3d886121d0820a23aa6d914638fab898da8f04jr0  X  @@ -26,4 +26,6 @@ List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> studyIds,
     List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter);
 
     List<AlterationCountByGene> getMutatedGenesFromColumnstore(StudyViewFilter interceptedStudyViewFilter);
+    
+    List<ClinicalDataCountItem> getClinicalDataCountsFromColumnStore(StudyViewFilter studyViewFilter, List<String> filteredAttributes);
 }u}(j/  (abb17400c8cfb75d3a5457057ed553a151a4ad7djg0  Kservice/src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.javaji0  modifiedja0  KBjb0  Kjk0  KDjl0  https://github.com/cBioPortal/cbioportal/blob/2e3d886121d0820a23aa6d914638fab898da8f04/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javajn0  https://github.com/cBioPortal/cbioportal/raw/2e3d886121d0820a23aa6d914638fab898da8f04/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javajp0  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.java?ref=2e3d886121d0820a23aa6d914638fab898da8f04jr0  X  @@ -5,21 +5,29 @@
 import org.cbioportal.model.*;
 import org.cbioportal.model.util.Select;
 import org.cbioportal.persistence.StudyViewRepository;
+import org.cbioportal.persistence.enums.ClinicalAttributeDataSource;
+import org.cbioportal.persistence.enums.ClinicalAttributeDataType;
 import org.cbioportal.service.*;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.exception.StudyNotFoundException;
 import org.cbioportal.service.util.MolecularProfileUtil;
+import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
+import org.cbioportal.webparam.ClinicalDataFilter;
 import org.cbioportal.webparam.StudyViewFilter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.*;
 import java.util.function.Function;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 @Service
 public class StudyViewServiceImpl implements StudyViewService {
     private static final List<CNA> CNA_TYPES_AMP_AND_HOMDEL = Collections.unmodifiableList(Arrays.asList(CNA.AMP, CNA.HOMDEL));
+    
+    private final Map<String, List<String>> clinicalAttributeNameMap = new HashMap<>();
+    
     @Autowired
     private MolecularProfileService molecularProfileService;
     @Autowired
@@ -252,11 +260,67 @@ public List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String>
 
     @Override
     public List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter) {
-        return studyViewRepository.getFilteredSamplesFromColumnstore(studyViewFilter);
+        CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter);
+        return studyViewRepository.getFilteredSamplesFromColumnstore(studyViewFilter, categorizedClinicalDataCountFilter);
     }
 
     @Override
     public List<AlterationCountByGene> getMutatedGenesFromColumnstore(StudyViewFilter studyViewFilter) {
-        return studyViewRepository.getMutatedGenes(studyViewFilter);
+        CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter);
+        return studyViewRepository.getMutatedGenes(studyViewFilter, categorizedClinicalDataCountFilter);
+    }
+
+    @Override
+    public List<ClinicalDataCountItem> getClinicalDataCountsFromColumnStore(StudyViewFilter studyViewFilter, List<String> 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<ClinicalAttributeDataSource> 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));
+       }
     }
 }u}(j/  (a7f9383a3f01bfb6a72cb04ac3011212ba97c69bjg0  Tweb/src/main/java/org/cbioportal/web/columnstore/StudyViewColumnStoreController.javaji0  modifiedja0  K0jb0  Kjk0  K3jl0  https://github.com/cBioPortal/cbioportal/blob/2e3d886121d0820a23aa6d914638fab898da8f04/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.javajn0  https://github.com/cBioPortal/cbioportal/raw/2e3d886121d0820a23aa6d914638fab898da8f04/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.javajp0  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.java?ref=2e3d886121d0820a23aa6d914638fab898da8f04jr0  X  @@ -4,9 +4,15 @@
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.AlterationFilter;
+import org.cbioportal.model.ClinicalDataCountItem;
 import org.cbioportal.model.Sample;
 import org.cbioportal.service.StudyViewService;
+import org.cbioportal.service.exception.StudyNotFoundException;
+import org.cbioportal.web.columnstore.util.NewStudyViewFilterUtil;
 import org.cbioportal.web.config.annotation.InternalApi;
+import org.cbioportal.webparam.ClinicalDataCountFilter;
+import org.cbioportal.webparam.ClinicalDataFilter;
 import org.cbioportal.webparam.StudyViewFilter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
@@ -17,20 +23,25 @@
 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.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import springfox.documentation.annotations.ApiIgnore;
 
 import javax.validation.Valid;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
+import java.util.stream.Collectors;
 
 @InternalApi
 @RestController
 @Validated
 @Api(tags = "Study View Column Store")
 public class StudyViewColumnStoreController {
-
+    
+    private static final String COLUMN_STORE_ENDPOINT_PREFIX="/column-store";
+    
     @Autowired
     private StudyViewService studyViewService;
     
@@ -64,10 +75,44 @@ public ResponseEntity<List<AlterationCountByGene>> fetchMutatedGenes(
         @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
         @ApiIgnore // 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
-    ) {
+    ) throws StudyNotFoundException {
+        AlterationFilter annotationFilters = interceptedStudyViewFilter.getAlterationFilter();
+        List<Sample> samples = studyViewService.getFilteredSamplesFromColumnstore(interceptedStudyViewFilter);
+        List<String> studyIds = new ArrayList<>();
+        List<String> sampleIds = new ArrayList<>();
+        for(Sample sample : samples) {
+            studyIds.add(sample.getCancerStudyIdentifier());
+            sampleIds.add(sample.getStableId());
+        }
         return new ResponseEntity<>(
-            studyViewService.getMutatedGenesFromColumnstore(interceptedStudyViewFilter),
+            studyViewService.getMutationAlterationCountByGenes(studyIds, sampleIds, annotationFilters),
             HttpStatus.OK
         );
     }
+
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', 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)
+    @ApiOperation("Fetch clinical data counts by study view filter")
+    public ResponseEntity<List<ClinicalDataCountItem>> fetchClinicalDataCounts(
+        @ApiParam(required = true, value = "Clinical data count filter")
+        @Valid @RequestBody(required = false) ClinicalDataCountFilter clinicalDataCountFilter,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface. this attribute is needed for the @PreAuthorize tag above.
+        @Valid @RequestAttribute(required = false, value = "interceptedClinicalDataCountFilter") ClinicalDataCountFilter interceptedClinicalDataCountFilter) {
+
+        List<ClinicalDataFilter> attributes = interceptedClinicalDataCountFilter.getAttributes();
+        StudyViewFilter studyViewFilter = interceptedClinicalDataCountFilter.getStudyViewFilter();
+
+        if (attributes.size() == 1) {
+            NewStudyViewFilterUtil.removeSelfFromFilter(attributes.get(0).getAttributeId(), studyViewFilter);
+       }
+       // boolean singleStudyUnfiltered = studyViewFilterUtil.isSingleStudyUnfiltered(studyViewFilter);
+        List<ClinicalDataCountItem> result = studyViewService.getClinicalDataCountsFromColumnStore(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);
+
+    }
 }u	      }(j/  (cc4bd198f20c4ae90bfe210a12042c1f2aad1b34jg0  Qweb/src/main/java/org/cbioportal/web/columnstore/util/NewStudyViewFilterUtil.javaji0  addedja0  Kjb0  K jk0  Kjl0  https://github.com/cBioPortal/cbioportal/blob/2e3d886121d0820a23aa6d914638fab898da8f04/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2Futil%2FNewStudyViewFilterUtil.javajn0  https://github.com/cBioPortal/cbioportal/raw/2e3d886121d0820a23aa6d914638fab898da8f04/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2Futil%2FNewStudyViewFilterUtil.javajp0  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2Futil%2FNewStudyViewFilterUtil.java?ref=2e3d886121d0820a23aa6d914638fab898da8f04jr0  X  @@ -0,0 +1,12 @@
+package org.cbioportal.web.columnstore.util;
+
+import org.cbioportal.webparam.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));
+        }
+    }
+}u}(j/  (cc56f9a8803482637ebf159a35128587c6f563e9jg0  Vwebparam/src/main/java/org/cbioportal/webparam/CategorizedClinicalDataCountFilter.javaji0  addedja0  KGjb0  K jk0  KGjl0  https://github.com/cBioPortal/cbioportal/blob/2e3d886121d0820a23aa6d914638fab898da8f04/webparam%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fwebparam%2FCategorizedClinicalDataCountFilter.javajn0  https://github.com/cBioPortal/cbioportal/raw/2e3d886121d0820a23aa6d914638fab898da8f04/webparam%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fwebparam%2FCategorizedClinicalDataCountFilter.javajp0  https://api.github.com/repos/cBioPortal/cbioportal/contents/webparam%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fwebparam%2FCategorizedClinicalDataCountFilter.java?ref=2e3d886121d0820a23aa6d914638fab898da8f04jr0  Xv  @@ -0,0 +1,71 @@
+package org.cbioportal.webparam;
+
+import java.util.List;
+
+public final class CategorizedClinicalDataCountFilter {
+
+    public static Builder getBuilder() {
+        return new Builder();
+    }
+    private final List<ClinicalDataFilter> sampleNumericalClinicalDataFilters;
+    private final List<ClinicalDataFilter> sampleCategoricalClinicalDataFilters;
+    private final List<ClinicalDataFilter> patientNumericalClinicalDataFilters;
+    private final List<ClinicalDataFilter> patientCategoricalClinicalDataFilters;
+    private CategorizedClinicalDataCountFilter(Builder builder) {
+       this.sampleCategoricalClinicalDataFilters = builder.sampleCategoricalClinicalDataFilters;
+       this.sampleNumericalClinicalDataFilters = builder.sampleNumericalClinicalDataFilters;
+       this.patientCategoricalClinicalDataFilters = builder.patientCategoricalClinicalDataFilters;
+       this.patientNumericalClinicalDataFilters = builder.patientNumericalClinicalDataFilters;
+    }
+
+    public List<ClinicalDataFilter> getSampleNumericalClinicalDataFilters() {
+        return sampleNumericalClinicalDataFilters;
+    }
+
+    public List<ClinicalDataFilter> getSampleCategoricalClinicalDataFilters() {
+        return sampleCategoricalClinicalDataFilters;
+    }
+
+    public List<ClinicalDataFilter> getPatientNumericalClinicalDataFilters() {
+        return patientNumericalClinicalDataFilters;
+    }
+
+    public List<ClinicalDataFilter> getPatientCategoricalClinicalDataFilters() {
+        return patientCategoricalClinicalDataFilters;
+    }
+
+
+    public static class Builder {
+        private List<ClinicalDataFilter> sampleNumericalClinicalDataFilters;
+        private List<ClinicalDataFilter> sampleCategoricalClinicalDataFilters;
+        private List<ClinicalDataFilter> patientNumericalClinicalDataFilters;
+        private List<ClinicalDataFilter> patientCategoricalClinicalDataFilters;
+
+        private Builder(){
+            
+        }
+        public Builder setSampleCategoricalClinicalDataFilters(List<ClinicalDataFilter> sampleCategoricalClinicalDataFilters) {
+            this.sampleCategoricalClinicalDataFilters = sampleCategoricalClinicalDataFilters;
+            return this;
+        }
+
+        public Builder setSampleNumericalClinicalDataFilters(List<ClinicalDataFilter> sampleNumericalClinicalDataFilters) {
+            this.sampleNumericalClinicalDataFilters = sampleNumericalClinicalDataFilters;
+            return this;
+        }
+
+        public Builder setPatientCategoricalClinicalDataFilters(List<ClinicalDataFilter> patientCategoricalClinicalDataFilters) {
+            this.patientCategoricalClinicalDataFilters = patientCategoricalClinicalDataFilters;
+            return this;
+        }
+
+        public Builder setPatientNumericalClinicalDataFilters(List<ClinicalDataFilter> patientNumericalClinicalDataFilters) {
+            this.patientNumericalClinicalDataFilters = patientNumericalClinicalDataFilters;
+            return this; 
+        }
+        
+        public CategorizedClinicalDataCountFilter build() {
+            return new CategorizedClinicalDataCountFilter(this);
+        }
+    }
+}ueu(f397d021c464bbf4fb1b73e52dfe0f22a9f77ffc}(sha(f397d021c464bbf4fb1b73e52dfe0f22a9f77ffcnode_idEC_kwDOAe-hB9oAKGYzOTdkMDIxYzQ2NGJiZjRmYjFiNzNlNTJkZmUwZjIyYTlmNzdmZmMcommit}(author}(namehaynescdemailhaynescd@chop.edudate2023-07-05T15:31:10Zu	committer}(j0  haynescdj0  haynescd@chop.eduj0  2023-07-05T15:31:10ZumessageUpdate testtree}(j0  (baeccb9f1321f2390b92871b38d3d37a84b636e4urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/baeccb9f1321f2390b92871b38d3d37a84b636e4uj0  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/f397d021c464bbf4fb1b73e52dfe0f22a9f77ffc
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj0  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/f397d021c464bbf4fb1b73e52dfe0f22a9f77ffchtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/f397d021c464bbf4fb1b73e52dfe0f22a9f77ffccomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/f397d021c464bbf4fb1b73e52dfe0f22a9f77ffc/commentsj0  }(loginhaynescdidJ j0  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5j0  %https://api.github.com/users/haynescdj0  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminuj0  }(j0  haynescdj0  J j0  MDQ6VXNlcjMzNjA4OTIwj0  4https://avatars.githubusercontent.com/u/33608920?v=4j0  h5j0  %https://api.github.com/users/haynescdj0  https://github.com/haynescdj 1  /https://api.github.com/users/haynescd/followersj1  <https://api.github.com/users/haynescd/following{/other_user}j1  5https://api.github.com/users/haynescd/gists{/gist_id}j1  <https://api.github.com/users/haynescd/starred{/owner}{/repo}j1  3https://api.github.com/users/haynescd/subscriptionsj
1  *https://api.github.com/users/haynescd/orgsj1  +https://api.github.com/users/haynescd/reposj1  6https://api.github.com/users/haynescd/events{/privacy}j1  5https://api.github.com/users/haynescd/received_eventsj1  Userj1  uparents]}(j0  (bdf7f94609c05d7bb266c698d717e0f9b104da53j0  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/bdf7f94609c05d7bb266c698d717e0f9b104da53j0  Xhttps://github.com/cBioPortal/cbioportal/commit/bdf7f94609c05d7bb266c698d717e0f9b104da53uastats}(totalK<	additionsK<	deletionsK ufiles]}(j0  (f431dea61cd9014e5f0092ba6c99740e855642acfilenamepersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepositoryTest.javastatusmodifiedj.1  K<j/1  K changesK<blob_urlhttps://github.com/cBioPortal/cbioportal/blob/f397d021c464bbf4fb1b73e52dfe0f22a9f77ffc/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/f397d021c464bbf4fb1b73e52dfe0f22a9f77ffc/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.java?ref=f397d021c464bbf4fb1b73e52dfe0f22a9f77ffcpatchX  @@ -151,4 +151,64 @@ public void getFilterSamplesWithCategoricalSampleClinicalDataFilter() {
         List<Sample> filteredSamples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, clincalDataCountFilters);
         Assert.assertEquals(1435, filteredSamples.size());
     }
+    @Test
+    @Ignore
+    public void getFilterSamplesWithNumericPatientClinicalDataFilter() {
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(
+            new String[]{"msk_ch_2020"},null
+        );
+        CategorizedClinicalDataCountFilter clincalDataCountFilters = CategorizedClinicalDataCountFilter.getBuilder()
+            .setPatientNumericalClinicalDataFilters(Arrays.asList(generateNumericalClinicalDataFilter("AGE", new String[]{"60-65"})))
+            .build();
+
+        List<Sample> filteredSamples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, clincalDataCountFilters);
+        Assert.assertEquals(3343, filteredSamples.size());
+    }
+    @Test
+    @Ignore
+    public void getFilterSamplesWithPatientClinicalDataFilterAndSampleClinicalDataFilter() {
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(
+            new String[]{"msk_ch_2020"},null
+        );
+
+        ClinicalDataFilter clinicalDataFilter = new ClinicalDataFilter();
+        clinicalDataFilter.setAttributeId("TMB_NONSYNONYMOUS");
+        DataFilterValue filterValue = new DataFilterValue();
+        filterValue.setStart(BigDecimal.valueOf(0.033333333));
+        filterValue.setEnd(BigDecimal.valueOf(0.033333333));
+        clinicalDataFilter.setValues(List.of(filterValue));
+        
+        CategorizedClinicalDataCountFilter clincalDataCountFilters = CategorizedClinicalDataCountFilter.getBuilder()
+            .setPatientNumericalClinicalDataFilters(List.of(generateNumericalClinicalDataFilter("AGE", new String[]{"60-65"})))
+            .setSampleNumericalClinicalDataFilters(List.of(clinicalDataFilter))
+            .setSampleCategoricalClinicalDataFilters(List.of(generateCategoricalClinicalDataFilter("CANCER_TYPE", new String[]{"Bladder Cancer"})))
+            .build();
+
+        List<Sample> filteredSamples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, clincalDataCountFilters);
+        Assert.assertEquals(21, filteredSamples.size());
+    }
+
+    @Test
+    @Ignore
+    public void getMutatedGenesWithPatientClinicalDataFilterAndSampleClinicalDataFilter() {
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(
+            new String[]{"msk_ch_2020"},null
+        );
+
+        ClinicalDataFilter clinicalDataFilter = new ClinicalDataFilter();
+        clinicalDataFilter.setAttributeId("TMB_NONSYNONYMOUS");
+        DataFilterValue filterValue = new DataFilterValue();
+        filterValue.setStart(BigDecimal.valueOf(0.033333333));
+        filterValue.setEnd(BigDecimal.valueOf(0.033333333));
+        clinicalDataFilter.setValues(List.of(filterValue));
+
+        CategorizedClinicalDataCountFilter clincalDataCountFilters = CategorizedClinicalDataCountFilter.getBuilder()
+            .setPatientNumericalClinicalDataFilters(List.of(generateNumericalClinicalDataFilter("AGE", new String[]{"60-65"})))
+            .setSampleNumericalClinicalDataFilters(List.of(clinicalDataFilter))
+            .setSampleCategoricalClinicalDataFilters(List.of(generateCategoricalClinicalDataFilter("CANCER_TYPE", new String[]{"Bladder Cancer"})))
+            .build();
+
+        List<AlterationCountByGene> mutatedGenes = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter, clincalDataCountFilters);
+        Assert.assertEquals(16, mutatedGenes.size());
+    }
 }
\ No newline at end of fileuau(77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a}(sha(77c03e1ea1b4bf7be2ec9e3dcf8cda448258728anode_idEC_kwDOAe-hB9oAKDc3YzAzZTFlYTFiNGJmN2JlMmVjOWUzZGNmOGNkYTQ0ODI1ODcyOGEcommit}(author}(namehaynescdemailhaynescd@chop.edudate2023-06-29T20:33:25Zu	committer}(jK1  haynescdjM1  haynescd@chop.edujO1  2023-06-29T20:33:25Zumessage@Update StudyView Mapper to utilize CategorizedClinicalDataFiltertree}(jC1  (1795b6e201703d92bdb9aee4b609097a2b65e8a8urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/1795b6e201703d92bdb9aee4b609097a2b65e8a8uj[1  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj[1  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728ahtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728acomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/commentsjI1  }(loginhaynescdidJ jE1  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5j[1  %https://api.github.com/users/haynescdjg1  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminujQ1  }(jl1  haynescdjn1  J jE1  MDQ6VXNlcjMzNjA4OTIwjp1  4https://avatars.githubusercontent.com/u/33608920?v=4jr1  h5j[1  %https://api.github.com/users/haynescdjg1  https://github.com/haynescdju1  /https://api.github.com/users/haynescd/followersjw1  <https://api.github.com/users/haynescd/following{/other_user}jy1  5https://api.github.com/users/haynescd/gists{/gist_id}j{1  <https://api.github.com/users/haynescd/starred{/owner}{/repo}j}1  3https://api.github.com/users/haynescd/subscriptionsj1  *https://api.github.com/users/haynescd/orgsj1  +https://api.github.com/users/haynescd/reposj1  6https://api.github.com/users/haynescd/events{/privacy}j1  5https://api.github.com/users/haynescd/received_eventsj1  Userj1  uparents]}(jC1  (047cb2640b5cde4cd78944dac3eee9fe735d1ab9j[1  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/047cb2640b5cde4cd78944dac3eee9fe735d1ab9jg1  Xhttps://github.com/cBioPortal/cbioportal/commit/047cb2640b5cde4cd78944dac3eee9fe735d1ab9uastats}(totalM1	additionsM	deletionsKufiles](}(jC1  (67d60d265e324869afa5d49fee6dab3853503f78filename]persistence/persistence-api/src/main/java/org/cbioportal/persistence/StudyViewRepository.javastatusmodifiedj1  Kj1  KchangesK
blob_urlhttps://github.com/cBioPortal/cbioportal/blob/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStudyViewRepository.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStudyViewRepository.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStudyViewRepository.java?ref=77c03e1ea1b4bf7be2ec9e3dcf8cda448258728apatchX&  @@ -2,12 +2,18 @@
 
 import org.cbioportal.model.AlterationCountByGene;
 import org.cbioportal.model.Sample;
+import org.cbioportal.persistence.enums.ClinicalAttributeDataSource;
+import org.cbioportal.persistence.enums.ClinicalAttributeDataType;
+import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
 import org.cbioportal.webparam.StudyViewFilter;
 
 import java.util.List;
 
 public interface StudyViewRepository {
-    List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter);
+    List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
+
+    List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
+
+    List<String> getClinicalDataAttributeNames(ClinicalAttributeDataSource clinicalAttributeDataSource, ClinicalAttributeDataType dataType);
 
-    List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter);
 }u}(jC1  (ed320c1cebdeb86e26975a96186b3d90fb93e204j1  kpersistence/persistence-api/src/main/java/org/cbioportal/persistence/enums/ClinicalAttributeDataSource.javaj1  addedj1  Kj1  K j1  Kj1  https://github.com/cBioPortal/cbioportal/blob/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fenums%2FClinicalAttributeDataSource.javaj1  https://github.com/cBioPortal/cbioportal/raw/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fenums%2FClinicalAttributeDataSource.javaj1  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fenums%2FClinicalAttributeDataSource.java?ref=77c03e1ea1b4bf7be2ec9e3dcf8cda448258728aj1  X`  @@ -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;
+    }
+}u}(jC1  (591f67e117d28f576de9bf7566af8ad425820ee4j1  ipersistence/persistence-api/src/main/java/org/cbioportal/persistence/enums/ClinicalAttributeDataType.javaj1  addedj1  Kj1  K j1  Kj1  https://github.com/cBioPortal/cbioportal/blob/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fenums%2FClinicalAttributeDataType.javaj1  https://github.com/cBioPortal/cbioportal/raw/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fenums%2FClinicalAttributeDataType.javaj1  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fenums%2FClinicalAttributeDataType.java?ref=77c03e1ea1b4bf7be2ec9e3dcf8cda448258728aj1  Xl  @@ -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;
+    }
+}u}(jC1  (c6eb088729513d9572a3d7ddbb96f20265575a21j1  ppersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.javaj1  modifiedj1  Kj1  Kj1  Kj1  https://github.com/cBioPortal/cbioportal/blob/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.javaj1  https://github.com/cBioPortal/cbioportal/raw/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.javaj1  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.java?ref=77c03e1ea1b4bf7be2ec9e3dcf8cda448258728aj1  X*  @@ -2,11 +2,14 @@
 
 import org.cbioportal.model.AlterationCountByGene;
 import org.cbioportal.model.Sample;
+import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
 import org.cbioportal.webparam.StudyViewFilter;
 
 import java.util.List;
 
 public interface StudyViewMapper {
-    List<Sample> getFilteredSamples(StudyViewFilter studyViewFilter);
-    List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter);
+    List<Sample> getFilteredSamples(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
+    List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
+   
+    List<String> getClinicalAttributeNames(String tableName);
 }u}(jC1  (aeabf1dc71c0efa4617c4173ea07e60f0ee67d04j1  {persistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepository.javaj1  modifiedj1  Kj1  Kj1  Kj1  https://github.com/cBioPortal/cbioportal/blob/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.javaj1  https://github.com/cBioPortal/cbioportal/raw/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.javaj1  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.java?ref=77c03e1ea1b4bf7be2ec9e3dcf8cda448258728aj1  X  @@ -3,6 +3,9 @@
 import org.cbioportal.model.AlterationCountByGene;
 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.webparam.CategorizedClinicalDataCountFilter;
 import org.cbioportal.webparam.StudyViewFilter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Repository;
@@ -16,12 +19,20 @@ public class StudyViewMyBatisRepository implements StudyViewRepository {
     private StudyViewMapper studyViewMapper;
     
     @Override
-    public List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter) {
-        return studyViewMapper.getFilteredSamples(studyViewFilter);
+    public List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) {
+        return studyViewMapper.getFilteredSamples(studyViewFilter, categorizedClinicalDataCountFilter);
     }
     
     @Override
-    public List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter) {
-        return studyViewMapper.getMutatedGenes(studyViewFilter);
+    public List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) {
+        return studyViewMapper.getMutatedGenes(studyViewFilter, categorizedClinicalDataCountFilter);
     }
+
+    @Override
+    public List<String> getClinicalDataAttributeNames(ClinicalAttributeDataSource clinicalAttributeDataSource, ClinicalAttributeDataType dataType) {
+        String tableName = clinicalAttributeDataSource.getValue().toLowerCase() + "_clinical_attribute_" + dataType.getValue().toLowerCase();
+        return studyViewMapper.getClinicalAttributeNames(tableName);
+    }
+
+
 }
\ No newline at end of fileu}(jC1  (bad4e0b82b471c81b69d651370b0f83c9909ab94j1  tpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmlj1  modifiedj1  Kj1  Kj1  K)j1  https://github.com/cBioPortal/cbioportal/blob/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlj1  https://github.com/cBioPortal/cbioportal/raw/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlj1  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=77c03e1ea1b4bf7be2ec9e3dcf8cda448258728aj1  X  @@ -39,31 +39,31 @@
     <!-- This block represents the Study View Filter -->
     <sql id="sampleUniqueIdsFromStudyViewFilter">
         <trim prefixOverrides="INTERSECT">
-            <if test="studyIds != null and !studyIds.isEmpty()">
+            <if test="studyViewFilter.studyIds != null and !studyViewFilter.studyIds.isEmpty()">
                 INTERSECT
                 SELECT sample_unique_id
                 FROM sample
                 WHERE cancer_study_identifier IN
-                <foreach item="studyId" collection="studyIds" open="(" separator="," close=")">
+                <foreach item="studyId" collection="studyViewFilter.studyIds" open="(" separator="," close=")">
                     #{studyId}
                 </foreach>
             </if>
-            <if test="sampleIdentifiers != null and !sampleIdentifiers.isEmpty()">
+            <if test="studyViewFilter.sampleIdentifiers != null and !studyViewFilter.sampleIdentifiers.isEmpty()">
                 INTERSECT
                 SELECT sample_unique_id
                 FROM sample
                 WHERE sample_unique_id IN
-                <foreach item="sampleIdentifier" collection="sampleIdentifiers" open="(" separator="," close=")">
+                <foreach item="sampleIdentifier" collection="studyViewFilter.sampleIdentifiers" open="(" separator="," close=")">
                     #{sampleIdentifier.getStudyId()}_#{sampleIdentifier.getSampleId()}
                 </foreach>
             </if>
-            <if test="geneFilters != null and !geneFilters.isEmpty()">
+            <if test="studyViewFilter.geneFilters != null and !geneFilters.isEmpty()">
                 INTERSECT
                 SELECT sample_unique_id
                 FROM genomic_event
                 <where>
                     <trim prefixOverrides="OR">
-                        <foreach item="profileGroup" collection="geneFilters" open="OR (" separator="," close=")">
+                        <foreach item="profileGroup" collection="studyViewFilter.geneFilters" open="OR (" separator="," close=")">
                             genetic_profile_stable_id IN
                             <foreach item="molecularProfileId" collection="profileGroup.getMolecularProfileIds()" open="(" separator="," close=")">
                                 #{molecularProfileId}
@@ -104,8 +104,8 @@
                     </trim>
                  )
             </if>  -->
-             <if test="clinicalDataFilters != null and !clinicalDataFilters.isEmpty()">
-                <foreach item="clinicalDataFilter" collection="clinicalDataFilters" open="INTERSECT" separator="INTERSECT">
+            <if test="categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters() != null and !categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters().isEmpty()">
+                <foreach item="clinicalDataFilter" collection="categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters()" open="INTERSECT" separator="INTERSECT">
                     SELECT sample_unique_id
                     FROM sample_clinical_attribute_numeric
                     WHERE attribute_name = '${clinicalDataFilter.attributeId}'
@@ -114,19 +114,30 @@
                             <if test="dataFilterValue.value eq 'NA'">
                                 AND attribute_value = -1000000
                             </if>
-                            <if test="dataFilterValue.start != null">
-                                AND attribute_value &gt; ${dataFilterValue.start}
-                            </if>
-                            <if test="dataFilterValue.end != null">
-                                AND attribute_value &lt;= ${dataFilterValue.end}
-                            </if>
+                            <choose>
+                                <when test="dataFilterValue.start == dataFilterValue.end">
+                                    AND ABS(attribute_value - ${dataFilterValue.start}) &lt; EXP(-11) 
+                                </when>
+                                <otherwise>
+                                    <if test="dataFilterValue.start != null">
+                                        AND attribute_value &gt; ${dataFilterValue.start}
+                                    </if>
+                                    <if test="dataFilterValue.end != null">
+                                        AND attribute_value &lt;= ${dataFilterValue.end}
+                                    </if>
+                                </otherwise>
+                            </choose>
                         </trim>
                     </foreach>
                 </foreach>
-                )
             </if>
             <!-- ... extend for other elements of the StudyViewFilter object -->
         </trim>
     </sql>
 
+    <select id="getClinicalAttributeNames" resultType="String">
+        SELECT
+        DISTINCT(attribute_name)
+        FROM ${tableName};
+    </select>
 </mapper>u}(jC1  (f320653a9f9679950d2b9d148db1751a075f2e8fj1  persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepositoryTest.javaj1  modifiedj1  K&j1  Kj1  K*j1  https://github.com/cBioPortal/cbioportal/blob/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaj1  https://github.com/cBioPortal/cbioportal/raw/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaj1  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.java?ref=77c03e1ea1b4bf7be2ec9e3dcf8cda448258728aj1  X
  @@ -2,6 +2,11 @@
 
 import org.cbioportal.model.AlterationCountByGene;
 import org.cbioportal.model.Sample;
+import org.cbioportal.persistence.enums.ClinicalAttributeDataSource;
+import org.cbioportal.persistence.enums.ClinicalAttributeDataType;
+import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
+import org.cbioportal.webparam.ClinicalDataFilter;
+import org.cbioportal.webparam.DataFilterValue;
 import org.cbioportal.webparam.StudyViewFilter;
 import org.junit.Assert;
 import org.junit.Test;
@@ -11,6 +16,7 @@
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -30,20 +36,48 @@ public void getFilteredSamples() {
         studyIds.add("msk_ch_2020");
         studyViewFilter.setStudyIds(studyIds);
         
-        List<Sample> samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter);
-        Assert.assertEquals(3, samples.size());
+        List<Sample> samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build());
+        Assert.assertEquals(24146, samples.size());
     }
 
     @Test
     public void getMutatedGenes() {
         StudyViewFilter studyViewFilter = new StudyViewFilter();
 
         List<String> studyIds = new ArrayList<>();
-        studyIds.add("msk_ch_2020");
+        studyIds.add("msk_impact_2017");
         studyViewFilter.setStudyIds(studyIds);
 
-        List<AlterationCountByGene> mutations = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter);
+        List<AlterationCountByGene> mutations = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter, null);
         Assert.assertEquals(2, mutations.size());
     }
 
+    @Test
+    public void getClinicalAttributeNames() {
+        List<String> names = studyViewMyBatisRepository.getClinicalDataAttributeNames(ClinicalAttributeDataSource.PATIENT, ClinicalAttributeDataType.CATEGORICAL);
+        Assert.assertTrue(names.size() > 0);
+        Assert.assertTrue(names.contains("OS_STATUS"));
+    }
+    
+    @Test
+    public void getFilterSamplesWithClinicalDataFilter() {
+        ClinicalDataFilter clinicalDataFilter = new ClinicalDataFilter();
+        clinicalDataFilter.setAttributeId("TMB_NONSYNONYMOUS");
+        DataFilterValue filterValue = new DataFilterValue();
+        filterValue.setStart(BigDecimal.valueOf(0.033333333));
+        filterValue.setEnd(BigDecimal.valueOf(0.033333333));
+        clinicalDataFilter.setValues(List.of(filterValue));
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = CategorizedClinicalDataCountFilter.getBuilder()
+            .setSampleNumericalClinicalDataFilters(List.of(clinicalDataFilter))
+            .build();
+
+        List<String> studyIds = new ArrayList<>();
+        studyIds.add("msk_ch_2020");
+        studyViewFilter.setStudyIds(studyIds);
+        
+        List<ClinicalDataFilter> test = categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters();
+        List<Sample> samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, categorizedClinicalDataCountFilter);
+        Assert.assertEquals(4507, samples.size()); 
+    }
 }
\ No newline at end of fileu}(jC1  (010f0b5c9274fbeb45d28e62f65c15a7f91de2fcj1  Kservice/src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.javaj1  modifiedj1  K/j1  Kj1  K1j1  https://github.com/cBioPortal/cbioportal/blob/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj1  https://github.com/cBioPortal/cbioportal/raw/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj1  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.java?ref=77c03e1ea1b4bf7be2ec9e3dcf8cda448258728aj1  X6  @@ -5,10 +5,14 @@
 import org.cbioportal.model.*;
 import org.cbioportal.model.util.Select;
 import org.cbioportal.persistence.StudyViewRepository;
+import org.cbioportal.persistence.enums.ClinicalAttributeDataSource;
+import org.cbioportal.persistence.enums.ClinicalAttributeDataType;
 import org.cbioportal.service.*;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.exception.StudyNotFoundException;
 import org.cbioportal.service.util.MolecularProfileUtil;
+import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
+import org.cbioportal.webparam.ClinicalDataFilter;
 import org.cbioportal.webparam.StudyViewFilter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -20,6 +24,9 @@
 @Service
 public class StudyViewServiceImpl implements StudyViewService {
     private static final List<CNA> CNA_TYPES_AMP_AND_HOMDEL = Collections.unmodifiableList(Arrays.asList(CNA.AMP, CNA.HOMDEL));
+    
+    private final Map<String, List<String>> clinicalAttributeNameMap = new HashMap<>();
+    
     @Autowired
     private MolecularProfileService molecularProfileService;
     @Autowired
@@ -252,11 +259,49 @@ public List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String>
 
     @Override
     public List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter) {
-        return studyViewRepository.getFilteredSamplesFromColumnstore(studyViewFilter);
+        CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter);
+        return studyViewRepository.getFilteredSamplesFromColumnstore(studyViewFilter, categorizedClinicalDataCountFilter);
     }
 
     @Override
     public List<AlterationCountByGene> getMutatedGenesFromColumnstore(StudyViewFilter studyViewFilter) {
-        return studyViewRepository.getMutatedGenes(studyViewFilter);
+        CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter);
+        return studyViewRepository.getMutatedGenes(studyViewFilter, categorizedClinicalDataCountFilter);
+    }
+    
+    private CategorizedClinicalDataCountFilter extractClinicalDataCountFilters(final StudyViewFilter studyViewFilter) {
+        if(clinicalAttributeNameMap.isEmpty()) {
+           buildClinicalAttributeNameMap(); 
+        }
+        
+        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<ClinicalAttributeDataSource> 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));
+       }
     }
 }u}(jC1  (76f9629ca2e3610466678630d377dadae57a904aj1  Tweb/src/main/java/org/cbioportal/web/columnstore/StudyViewColumnStoreController.javaj1  modifiedj1  K"j1  Kj1  K#j1  https://github.com/cBioPortal/cbioportal/blob/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.javaj1  https://github.com/cBioPortal/cbioportal/raw/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.javaj1  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.java?ref=77c03e1ea1b4bf7be2ec9e3dcf8cda448258728aj1  X
  @@ -4,9 +4,12 @@
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.ClinicalDataCountItem;
 import org.cbioportal.model.Sample;
 import org.cbioportal.service.StudyViewService;
 import org.cbioportal.web.config.annotation.InternalApi;
+import org.cbioportal.webparam.ClinicalDataCountFilter;
+import org.cbioportal.webparam.ClinicalDataFilter;
 import org.cbioportal.webparam.StudyViewFilter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
@@ -17,20 +20,25 @@
 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.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import springfox.documentation.annotations.ApiIgnore;
 
 import javax.validation.Valid;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
+import java.util.stream.Collectors;
 
 @InternalApi
 @RestController
 @Validated
 @Api(tags = "Study View Column Store")
 public class StudyViewColumnStoreController {
-
+    
+    private static final String COLUMN_STORE_ENDPOINT_PREFIX="/column-store";
+    
     @Autowired
     private StudyViewService studyViewService;
     
@@ -70,4 +78,29 @@ public ResponseEntity<List<AlterationCountByGene>> fetchMutatedGenes(
             HttpStatus.OK
         );
     }
+
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', 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)
+    @ApiOperation("Fetch clinical data counts by study view filter")
+    public ResponseEntity<List<ClinicalDataCountItem>> fetchClinicalDataCounts(
+        @ApiParam(required = true, value = "Clinical data count filter")
+        @Valid @RequestBody(required = false) ClinicalDataCountFilter clinicalDataCountFilter,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface. this attribute is needed for the @PreAuthorize tag above.
+        @Valid @RequestAttribute(required = false, value = "interceptedClinicalDataCountFilter") ClinicalDataCountFilter interceptedClinicalDataCountFilter) {
+
+        List<ClinicalDataFilter> attributes = interceptedClinicalDataCountFilter.getAttributes();
+        StudyViewFilter studyViewFilter = interceptedClinicalDataCountFilter.getStudyViewFilter();
+
+        //if (attributes.size() == 1) {
+          //  studyViewFilterUtil.removeSelfFromFilter(attributes.get(0).getAttributeId(), studyViewFilter);
+       // }
+       // boolean singleStudyUnfiltered = studyViewFilterUtil.isSingleStudyUnfiltered(studyViewFilter);
+        List<ClinicalDataCountItem> result = new ArrayList<>();//clinicalDataService.fetchClinicalDataCounts(
+            //studyIds, sampleIds, attributes.stream().map(a -> a.getAttributeId()).collect(Collectors.toList())); 
+        return new ResponseEntity<>(result, HttpStatus.OK);
+
+    }
 }u}(jC1  (cc56f9a8803482637ebf159a35128587c6f563e9j1  Vwebparam/src/main/java/org/cbioportal/webparam/CategorizedClinicalDataCountFilter.javaj1  addedj1  KGj1  K j1  KGj1  https://github.com/cBioPortal/cbioportal/blob/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/webparam%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fwebparam%2FCategorizedClinicalDataCountFilter.javaj1  https://github.com/cBioPortal/cbioportal/raw/77c03e1ea1b4bf7be2ec9e3dcf8cda448258728a/webparam%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fwebparam%2FCategorizedClinicalDataCountFilter.javaj1  https://api.github.com/repos/cBioPortal/cbioportal/contents/webparam%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fwebparam%2FCategorizedClinicalDataCountFilter.java?ref=77c03e1ea1b4bf7be2ec9e3dcf8cda448258728aj1  Xv  @@ -0,0 +1,71 @@
+package org.cbioportal.webparam;
+
+import java.util.List;
+
+public final class CategorizedClinicalDataCountFilter {
+
+    public static Builder getBuilder() {
+        return new Builder();
+    }
+    private final List<ClinicalDataFilter> sampleNumericalClinicalDataFilters;
+    private final List<ClinicalDataFilter> sampleCategoricalClinicalDataFilters;
+    private final List<ClinicalDataFilter> patientNumericalClinicalDataFilters;
+    private final List<ClinicalDataFilter> patientCategoricalClinicalDataFilters;
+    private CategorizedClinicalDataCountFilter(Builder builder) {
+       this.sampleCategoricalClinicalDataFilters = builder.sampleCategoricalClinicalDataFilters;
+       this.sampleNumericalClinicalDataFilters = builder.sampleNumericalClinicalDataFilters;
+       this.patientCategoricalClinicalDataFilters = builder.patientCategoricalClinicalDataFilters;
+       this.patientNumericalClinicalDataFilters = builder.patientNumericalClinicalDataFilters;
+    }
+
+    public List<ClinicalDataFilter> getSampleNumericalClinicalDataFilters() {
+        return sampleNumericalClinicalDataFilters;
+    }
+
+    public List<ClinicalDataFilter> getSampleCategoricalClinicalDataFilters() {
+        return sampleCategoricalClinicalDataFilters;
+    }
+
+    public List<ClinicalDataFilter> getPatientNumericalClinicalDataFilters() {
+        return patientNumericalClinicalDataFilters;
+    }
+
+    public List<ClinicalDataFilter> getPatientCategoricalClinicalDataFilters() {
+        return patientCategoricalClinicalDataFilters;
+    }
+
+
+    public static class Builder {
+        private List<ClinicalDataFilter> sampleNumericalClinicalDataFilters;
+        private List<ClinicalDataFilter> sampleCategoricalClinicalDataFilters;
+        private List<ClinicalDataFilter> patientNumericalClinicalDataFilters;
+        private List<ClinicalDataFilter> patientCategoricalClinicalDataFilters;
+
+        private Builder(){
+            
+        }
+        public Builder setSampleCategoricalClinicalDataFilters(List<ClinicalDataFilter> sampleCategoricalClinicalDataFilters) {
+            this.sampleCategoricalClinicalDataFilters = sampleCategoricalClinicalDataFilters;
+            return this;
+        }
+
+        public Builder setSampleNumericalClinicalDataFilters(List<ClinicalDataFilter> sampleNumericalClinicalDataFilters) {
+            this.sampleNumericalClinicalDataFilters = sampleNumericalClinicalDataFilters;
+            return this;
+        }
+
+        public Builder setPatientCategoricalClinicalDataFilters(List<ClinicalDataFilter> patientCategoricalClinicalDataFilters) {
+            this.patientCategoricalClinicalDataFilters = patientCategoricalClinicalDataFilters;
+            return this;
+        }
+
+        public Builder setPatientNumericalClinicalDataFilters(List<ClinicalDataFilter> patientNumericalClinicalDataFilters) {
+            this.patientNumericalClinicalDataFilters = patientNumericalClinicalDataFilters;
+            return this; 
+        }
+        
+        public CategorizedClinicalDataCountFilter build() {
+            return new CategorizedClinicalDataCountFilter(this);
+        }
+    }
+}ueu(8412f5e0fefbebea45ef73fb9d9e2f85b641cd37}(sha(8412f5e0fefbebea45ef73fb9d9e2f85b641cd37node_idEC_kwDOAe-hB9oAKDg0MTJmNWUwZmVmYmViZWE0NWVmNzNmYjlkOWUyZjg1YjY0MWNkMzccommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-07-25T18:07:54Zu	committer}(j2  GitHubj
2  noreply@github.comj2  2023-07-25T18:07:54ZumessageFrontend v5.3.15tree}(j 2  (640b0e453fe6d503451e1d75f681a0dfeb6211d4urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/640b0e453fe6d503451e1d75f681a0dfeb6211d4uj2  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/8412f5e0fefbebea45ef73fb9d9e2f85b641cd37
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkwA96CRBK7hj4Ov3rIwAAyCMIAE0lvdYWmRR1xwnqmAe4iGq5
NciT6Kg9BLjBhWE9+AdRij3bMcXB+SeYH6ogiDgxAcUPON/C2lx/eFTD6wqk8dfK
EK4iK90gK4LK0he3Xu1bEQxaJCmAdaZX72djr0i9Lh7YABp9+LJXqWxQU3XNPHlf
3IOOsUdvstmquDfU5ia9ddCxKgjUvw7RiU4R5NjoAW9fWHhHnjM4JXQKUgLLuPhD
RRCVl92LYGtO+sihz2k3Kz8A3pWGLYH+5wOA2n2N6Kdga10bmmEGx67oF1PMtcTs
qzIT5dZhPZpDWwmLJ4Vi9itEM/K1wv6IwyQDE7cgH0BxWiZRFr5mQek8Xw7gKsQ=
=vK7B
-----END PGP SIGNATURE-----
payloadtree 640b0e453fe6d503451e1d75f681a0dfeb6211d4
parent 7339191fc545e3a3626aaf96cc2e6e7f63bc2292
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1690308474 -0400
committer GitHub <noreply@github.com> 1690308474 -0400

Frontend v5.3.15uuj2  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8412f5e0fefbebea45ef73fb9d9e2f85b641cd37html_urlXhttps://github.com/cBioPortal/cbioportal/commit/8412f5e0fefbebea45ef73fb9d9e2f85b641cd37comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/8412f5e0fefbebea45ef73fb9d9e2f85b641cd37/commentsj2  }(login
dippindotsidJtO j2  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j2  'https://api.github.com/users/dippindotsj&2  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj2  }(j+2  web-flowj-2  J/j2  MDQ6VXNlcjE5ODY0NDQ3j/2  4https://avatars.githubusercontent.com/u/19864447?v=4j12  h5j2  %https://api.github.com/users/web-flowj&2  https://github.com/web-flowj42  /https://api.github.com/users/web-flow/followersj62  <https://api.github.com/users/web-flow/following{/other_user}j82  5https://api.github.com/users/web-flow/gists{/gist_id}j:2  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j<2  3https://api.github.com/users/web-flow/subscriptionsj>2  *https://api.github.com/users/web-flow/orgsj@2  +https://api.github.com/users/web-flow/reposjB2  6https://api.github.com/users/web-flow/events{/privacy}jD2  5https://api.github.com/users/web-flow/received_eventsjF2  UserjH2  uparents]}(j 2  (7339191fc545e3a3626aaf96cc2e6e7f63bc2292j2  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7339191fc545e3a3626aaf96cc2e6e7f63bc2292j&2  Xhttps://github.com/cBioPortal/cbioportal/commit/7339191fc545e3a3626aaf96cc2e6e7f63bc2292uastats}(totalK	additionsK	deletionsKufiles]}(j 2  (f4eaa8507bf6b2ec0641df47e213b6ce70cff134filenamepom.xmlstatusmodifiedjb2  Kjc2  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/8412f5e0fefbebea45ef73fb9d9e2f85b641cd37/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/8412f5e0fefbebea45ef73fb9d9e2f85b641cd37/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=8412f5e0fefbebea45ef73fb9d9e2f85b641cd37patchXY  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.14</frontend.version>
+    <frontend.version>v5.3.15</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(b53ceacc70faab853b517721614e7fb4b2ffecb9}(sha(b53ceacc70faab853b517721614e7fb4b2ffecb9node_idEC_kwDOAe-hB9oAKGI1M2NlYWNjNzBmYWFiODUzYjUxNzcyMTYxNGU3ZmI0YjJmZmVjYjkcommit}(author}(name
Onur Sumeremails.onur.sumer@gmail.comdate2023-05-16T15:56:06Zu	committer}(j2  
Onur Sumerj2  s.onur.sumer@gmail.comj2  2023-07-11T18:58:02Zumessage4add new clickhouse clinical data bin count end pointtree}(jw2  (82c2e5a9fab7880842ebb712bc7a5c31d8c0db83urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/82c2e5a9fab7880842ebb712bc7a5c31d8c0db83uj2  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/b53ceacc70faab853b517721614e7fb4b2ffecb9
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj2  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b53ceacc70faab853b517721614e7fb4b2ffecb9html_urlXhttps://github.com/cBioPortal/cbioportal/commit/b53ceacc70faab853b517721614e7fb4b2ffecb9comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/b53ceacc70faab853b517721614e7fb4b2ffecb9/commentsj}2  }(login	onursumeridJ6 jy2  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5j2  &https://api.github.com/users/onursumerj2  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminuj2  }(j2  	onursumerj2  J6 jy2  MDQ6VXNlcjM2MDQxOTg=j2  3https://avatars.githubusercontent.com/u/3604198?v=4j2  h5j2  &https://api.github.com/users/onursumerj2  https://github.com/onursumerj2  0https://api.github.com/users/onursumer/followersj2  =https://api.github.com/users/onursumer/following{/other_user}j2  6https://api.github.com/users/onursumer/gists{/gist_id}j2  =https://api.github.com/users/onursumer/starred{/owner}{/repo}j2  4https://api.github.com/users/onursumer/subscriptionsj2  +https://api.github.com/users/onursumer/orgsj2  ,https://api.github.com/users/onursumer/reposj2  7https://api.github.com/users/onursumer/events{/privacy}j2  6https://api.github.com/users/onursumer/received_eventsj2  Userj2  uparents]}(jw2  (2e3d886121d0820a23aa6d914638fab898da8f04j2  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2e3d886121d0820a23aa6d914638fab898da8f04j2  Xhttps://github.com/cBioPortal/cbioportal/commit/2e3d886121d0820a23aa6d914638fab898da8f04uastats}(totalM	additionsK	deletionsK
ufiles](}(jw2  (1c8a1e87fa787f1850d8bf58cf10480bd61f0777filename]persistence/persistence-api/src/main/java/org/cbioportal/persistence/StudyViewRepository.javastatusmodifiedj2  Kj2  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/b53ceacc70faab853b517721614e7fb4b2ffecb9/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStudyViewRepository.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/b53ceacc70faab853b517721614e7fb4b2ffecb9/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStudyViewRepository.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStudyViewRepository.java?ref=b53ceacc70faab853b517721614e7fb4b2ffecb9patchX  @@ -14,6 +14,10 @@
 public interface StudyViewRepository {
     List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
 
+    List<ClinicalData> getSampleClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
+    
+    List<ClinicalData> getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
+    
     List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
     
     List<ClinicalDataCount> getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List<String> filteredAttributes);u}(jw2  (c99a9a9082ff6af2086c47f31893f79666bc8314j2  ppersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.javaj2  modifiedj2  Kj2  K j2  Kj2  https://github.com/cBioPortal/cbioportal/blob/b53ceacc70faab853b517721614e7fb4b2ffecb9/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.javaj2  https://github.com/cBioPortal/cbioportal/raw/b53ceacc70faab853b517721614e7fb4b2ffecb9/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.javaj2  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.java?ref=b53ceacc70faab853b517721614e7fb4b2ffecb9j2  X  @@ -1,6 +1,7 @@
 package org.cbioportal.persistence.mybatiscolumnstore;
 
 import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.ClinicalData;
 import org.cbioportal.model.ClinicalDataCount;
 import org.cbioportal.model.Sample;
 import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
@@ -10,6 +11,7 @@
 
 public interface StudyViewMapper {
     List<Sample> getFilteredSamples(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters);
+
     List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters);
     
     List<ClinicalDataCount> getPatientClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter,
@@ -22,4 +24,8 @@ List<ClinicalDataCount> getClinicalDataCounts(StudyViewFilter studyViewFilter, C
                                                   boolean applyPatientIdFilters, List<String> attributeIds, List<String> filteredAttributeValues);
     
     List<String> getClinicalAttributeNames(String tableName);
+    
+    List<ClinicalData> getSampleClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, List<String> attributeIds);
+    
+    List<ClinicalData> getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, List<String> attributeIds);
 }u}(jw2  (9e219c836006176ca4c84a40a95800a142bd5cb1j2  {persistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepository.javaj2  modifiedj2  K	j2  Kj2  K
j2  https://github.com/cBioPortal/cbioportal/blob/b53ceacc70faab853b517721614e7fb4b2ffecb9/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.javaj2  https://github.com/cBioPortal/cbioportal/raw/b53ceacc70faab853b517721614e7fb4b2ffecb9/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.javaj2  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.java?ref=b53ceacc70faab853b517721614e7fb4b2ffecb9j2  XK  @@ -43,7 +43,7 @@ public List<ClinicalDataCount> getSampleClinicalDataCounts(StudyViewFilter study
         return studyViewMapper.getSampleClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter),
            filteredAttributes, FILTERED_CLINICAL_ATTR_VALUES );
     }
-
+    
     @Override
     public List<ClinicalDataCount> getPatientClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List<String> filteredAttributes) {
         return studyViewMapper.getPatientClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter),
@@ -60,4 +60,12 @@ private boolean shouldApplyPatientIdFilters(CategorizedClinicalDataCountFilter c
         return categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters().isEmpty()
             || categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters().isEmpty();
     }
+
+    public List<ClinicalData> getSampleClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) {
+        return studyViewMapper.getSampleClinicalDataFromStudyViewFilter(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), attributeIds);
+    }
+    
+    public List<ClinicalData> getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) {
+        return studyViewMapper.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), attributeIds);
+    }
 }
\ No newline at end of fileu}(jw2  (a6e1b19ee3e1a1bde8563d9102444e3d44ce4466j2  tpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmlj2  modified       j2  K>j2  Kj2  K?j2  https://github.com/cBioPortal/cbioportal/blob/b53ceacc70faab853b517721614e7fb4b2ffecb9/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlj2  https://github.com/cBioPortal/cbioportal/raw/b53ceacc70faab853b517721614e7fb4b2ffecb9/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlj2  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=b53ceacc70faab853b517721614e7fb4b2ffecb9j2  Xu  @@ -43,6 +43,67 @@
         GROUP BY hugo_gene_symbol
         ORDER BY totalCount DESC;
     </select>
+
+    <!-- TODO only fetching from sample_clinical_attribute_numeric, need to support sample_clinical_attribute_categorical as well -->
+    <select id="getSampleClinicalDataFromStudyViewFilter" resultType="org.cbioportal.model.ClinicalData">
+        SELECT
+            sample_unique_id as sampleId,
+            patient_unique_id as patientId,
+            attribute_name as attrId,
+            attribute_value as attrValue,
+            cancer_study_identifier as studyId
+        FROM sample_clinical_attribute_numeric
+        <where>
+            sample_unique_id IN (
+            <include refid="sampleUniqueIdsFromStudyViewFilter"/>
+            <if test="applyPatientIdFilters == true">
+                INTERSECT <include refid="getSampleIdsFromPatientIds"/>
+            </if>
+            )
+        </where>
+        <if test="attributeIds != null and !attributeIds.isEmpty()">
+            AND attribute_name IN
+            <foreach item="attributeId" collection="attributeIds" open="(" separator="," close=")">
+                #{attributeId}
+            </foreach>
+        </if>
+    </select>
+    
+    <!-- TODO only fetching from patient_clinical_attribute_numeric, need to support patient_clinical_attribute_categorical as well -->
+    <select id="getPatientClinicalDataFromStudyViewFilter" resultType="org.cbioportal.model.ClinicalData">
+        SELECT
+            patient_unique_id as patientId,
+            attribute_name as attrId,
+            attribute_value as attrValue,
+            cancer_study_identifier as studyId
+        FROM patient_clinical_attribute_numeric
+        <where> 
+            patient_unique_id IN (
+                <include refid="getPatientIdsFromSampleIdFilters"/>
+                <if test="applyPatientIdFilters == true">
+                    INTERSECT <include refid="patientUniqueIdsFromStudyViewFilter"/>
+                </if>
+            )
+        </where>
+        <if test="attributeIds != null and !attributeIds.isEmpty()">
+            AND attribute_name IN
+            <foreach item="attributeId" collection="attributeIds" open="(" separator="," close=")">
+                #{attributeId}
+            </foreach>
+        </if>
+    </select>
+    
+<!--    &lt;!&ndash; for /clinical-data-bin-counts/fetch (returns ClinicalDataBin objects) &ndash;&gt;-->
+<!--    <select id="getStaticClinicalDataBins" resultType="org.cbioportal.model.ClinicalDataBin">-->
+<!--        -->
+<!--    </select>-->
+
+<!--    &lt;!&ndash; for /clinical-data-bin-counts/fetch (returns ClinicalDataBin objects) &ndash;&gt;-->
+<!--    <select id="getDynamicClinicalDataBins" resultType="org.cbioportal.model.ClinicalDataBin">-->
+<!--        <include refid="getStaticClinicalDataBins" />-->
+<!--    </select>-->
+
+    <!-- This block represents the Study View Filter -->
    
     <!-- for /clinical-data-counts/fetch (returns ClinicalData) which will then be converted to clinicalDataCountItems -->
     <select id="getClinicalDataCounts" resultType="org.cbioportal.model.ClinicalDataCount">
@@ -107,7 +168,7 @@
                 FROM sample
                 WHERE sample_unique_id IN
                 <foreach item="sampleIdentifier" collection="studyViewFilter.sampleIdentifiers" open="(" separator="," close=")">
-                    #{sampleIdentifier.getStudyId()}_#{sampleIdentifier.getSampleId()}
+                    '${sampleIdentifier.studyId}_${sampleIdentifier.sampleId}'
                 </foreach>
             </if>
             <if test="studyViewFilter.geneFilters != null and !studyViewFilter.geneFilters.isEmpty()">u}(jw2  (3862be4e93b40efcb28f40e9364f33b415f1683aj2  persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepositoryTest.javaj2  modifiedj2  Kj2  Kj2  Kj2  https://github.com/cBioPortal/cbioportal/blob/b53ceacc70faab853b517721614e7fb4b2ffecb9/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaj2  https://github.com/cBioPortal/cbioportal/raw/b53ceacc70faab853b517721614e7fb4b2ffecb9/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaj2  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.java?ref=b53ceacc70faab853b517721614e7fb4b2ffecb9j2  X
  @@ -1,6 +1,7 @@
 package org.cbioportal.persistence.mybatiscolumnstore;
 
 import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.ClinicalData;
 import org.cbioportal.model.ClinicalDataCount;
 import org.cbioportal.model.Sample;
 import org.cbioportal.model.util.Select;
@@ -20,7 +21,6 @@
 import java.util.*;
 import java.util.Arrays;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 
@@ -59,6 +59,33 @@ public void getMutatedGenes() {
         List<AlterationCountByGene> mutations = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build());
         Assert.assertEquals(2, mutations.size());
     }
+
+    @Test
+    @Ignore
+    public void getPatientClinicalDataFromStudyViewFilter() {
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(new String[]{"msk_ch_2020"}, null);
+        List<ClinicalData> clinicalData = studyViewMyBatisRepository.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, List.of("AGE"), CategorizedClinicalDataCountFilter.getBuilder().build());
+        Assert.assertEquals(24146, clinicalData.size());
+
+        List<ClinicalDataFilter> clinicalDataFilters = Arrays.asList(generateCategoricalClinicalDataFilter("SEX", new String[]{"Female"}));
+        CategorizedClinicalDataCountFilter clinicalDataCountFilters = CategorizedClinicalDataCountFilter.getBuilder()
+            .setPatientCategoricalClinicalDataFilters(clinicalDataFilters)
+            .build();
+        studyViewFilter = generateStudyViewFilter((new String[]{"msk_ch_2020"} ), clinicalDataFilters);
+        clinicalData = studyViewMyBatisRepository.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, List.of("AGE"), clinicalDataCountFilters);
+        Assert.assertEquals(13121, clinicalData.size());
+
+        // TODO how to apply sample identifiers when fetching patient clinical data? 
+//        studyViewFilter = generateStudyViewFilter((new String[]{"msk_ch_2020"} ), clinicalDataFilters);
+//        List<SampleIdentifier> sampleIdentifierFilters = new ArrayList<>();
+//        SampleIdentifier sampleIdentifier = new SampleIdentifier();
+//        sampleIdentifier.setSampleId("P-0000015");
+//        sampleIdentifier.setStudyId("msk_ch_2020");
+//        sampleIdentifierFilters.add(sampleIdentifier);
+//        studyViewFilter.setSampleIdentifiers(sampleIdentifierFilters);
+//        clinicalData = studyViewMyBatisRepository.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, List.of("AGE"), clinicalDataCountFilters);
+//        Assert.assertEquals(1, clinicalData.size());
+    }
     
     @Test
     public void getMutatedGenesFiltered() {u}(jw2  (cc160ee031244e285413617bb1f8d59af63091bbj2  Tpersistence/persistence-mybatis/src/test/resources/testContextDatabaseClickhouse.xmlj2  modifiedj2  Kj2  Kj2  Kj2  https://github.com/cBioPortal/cbioportal/blob/b53ceacc70faab853b517721614e7fb4b2ffecb9/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestContextDatabaseClickhouse.xmlj2  https://github.com/cBioPortal/cbioportal/raw/b53ceacc70faab853b517721614e7fb4b2ffecb9/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestContextDatabaseClickhouse.xmlj2  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestContextDatabaseClickhouse.xml?ref=b53ceacc70faab853b517721614e7fb4b2ffecb9j2  X  @@ -16,7 +16,7 @@
         <!-- 
             Enable this to connect to an actual clickhouse Database instead of a mock one.
             Note that this is only intended for temporary local use, not for automated CI tests.
-        -->         
+        -->
 <!--        <property name="url" value="jdbc:ch://localhost:8123/cbioportal"/>-->
 <!--        <property name="password" value="cbio_pass"/>-->
 <!--        <property name="username" value="cbio_user"/>-->u}(jw2  (c1ab46997d886c46a74888fdf369358c971fd6b1j2  Bservice/src/main/java/org/cbioportal/service/StudyViewService.javaj2  modifiedj2  Kj2  Kj2  Kj2  https://github.com/cBioPortal/cbioportal/blob/b53ceacc70faab853b517721614e7fb4b2ffecb9/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javaj2  https://github.com/cBioPortal/cbioportal/raw/b53ceacc70faab853b517721614e7fb4b2ffecb9/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javaj2  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.java?ref=b53ceacc70faab853b517721614e7fb4b2ffecb9j2  X  @@ -1,11 +1,8 @@
 package org.cbioportal.service;
 
 import org.cbioportal.model.*;
-import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.exception.StudyNotFoundException;
-import org.cbioportal.webparam.SampleIdentifier;
 import org.cbioportal.webparam.StudyViewFilter;
-import org.springframework.cache.annotation.Cacheable;
 
 import java.util.List;
 
@@ -28,4 +25,8 @@ List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> studyIds,
     List<AlterationCountByGene> getMutatedGenesFromColumnstore(StudyViewFilter interceptedStudyViewFilter);
     
     List<ClinicalDataCountItem> getClinicalDataCountsFromColumnStore(StudyViewFilter studyViewFilter, List<String> filteredAttributes);
+    
+    List<ClinicalData> getSampleClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds);
+    
+    List<ClinicalData> getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds);
 }u}(jw2  (b212e2d96ac10f5e5199ff562783223c63e53dddj2  Kservice/src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.javaj2  modifiedj2  K
j2  Kj2  Kj2  https://github.com/cBioPortal/cbioportal/blob/b53ceacc70faab853b517721614e7fb4b2ffecb9/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj2  https://github.com/cBioPortal/cbioportal/raw/b53ceacc70faab853b517721614e7fb4b2ffecb9/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj2  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.java?ref=b53ceacc70faab853b517721614e7fb4b2ffecb9j2  X  @@ -12,15 +12,13 @@
 import org.cbioportal.service.exception.StudyNotFoundException;
 import org.cbioportal.service.util.MolecularProfileUtil;
 import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
-import org.cbioportal.webparam.ClinicalDataFilter;
 import org.cbioportal.webparam.StudyViewFilter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.*;
 import java.util.function.Function;
 import java.util.stream.Collectors;
-import java.util.stream.Stream;
 
 @Service
 public class StudyViewServiceImpl implements StudyViewService {
@@ -323,4 +321,14 @@ private void buildClinicalAttributeNameMap() {
            clinicalAttributeNameMap.put(numericKey, studyViewRepository.getClinicalDataAttributeNames(clinicalAttributeDataSource, ClinicalAttributeDataType.NUMERIC));
        }
     }
+
+    public List<ClinicalData> getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds) {
+        CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter);
+        return studyViewRepository.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, attributeIds, categorizedClinicalDataCountFilter);
+    }
+
+    public List<ClinicalData> getSampleClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds) {
+        CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter);
+        return studyViewRepository.getSampleClinicalDataFromStudyViewFilter(studyViewFilter, attributeIds, categorizedClinicalDataCountFilter);
+    }
 }u}(jw2  (220171affd12dd43c25a4830f97383d1402678b8j2  Tweb/src/main/java/org/cbioportal/web/columnstore/StudyViewColumnStoreController.javaj2  modifiedj2  Kj2  Kj2  Kj2  https://github.com/cBioPortal/cbioportal/blob/b53ceacc70faab853b517721614e7fb4b2ffecb9/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.javaj2  https://github.com/cBioPortal/cbioportal/raw/b53ceacc70faab853b517721614e7fb4b2ffecb9/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.javaj2  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.java?ref=b53ceacc70faab853b517721614e7fb4b2ffecb9j2  Xg  @@ -5,14 +5,18 @@
 import io.swagger.annotations.ApiParam;
 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.StudyViewService;
 import org.cbioportal.service.exception.StudyNotFoundException;
 import org.cbioportal.web.columnstore.util.NewStudyViewFilterUtil;
 import org.cbioportal.web.config.annotation.InternalApi;
-import org.cbioportal.webparam.ClinicalDataCountFilter;
+import org.cbioportal.web.util.ClinicalDataBinUtil;
 import org.cbioportal.webparam.ClinicalDataFilter;
+import org.cbioportal.webparam.ClinicalDataCountFilter;
+import org.cbioportal.webparam.ClinicalDataBinCountFilter;
+import org.cbioportal.webparam.DataBinMethod;
 import org.cbioportal.webparam.StudyViewFilter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
@@ -24,6 +28,7 @@
 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 springfox.documentation.annotations.ApiIgnore;
@@ -44,6 +49,8 @@ public class StudyViewColumnStoreController {
     
     @Autowired
     private StudyViewService studyViewService;
+    @Autowired
+    private ClinicalDataBinUtil clinicalDataBinUtil;
     
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @PostMapping(value = "/column-store/filtered-samples/fetch",
@@ -115,4 +122,26 @@ public ResponseEntity<List<ClinicalDataCountItem>> fetchClinicalDataCounts(
         return new ResponseEntity<>(result, HttpStatus.OK);
 
     }
+
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', 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)
+    @ApiOperation("Fetch clinical data bin counts by study view filter")
+    public ResponseEntity<List<ClinicalDataBin>> fetchClinicalDataBinCounts(
+        @ApiParam("Method for data binning")
+        @RequestParam(defaultValue = "DYNAMIC") DataBinMethod dataBinMethod,
+        @ApiParam(required = true, value = "Clinical data bin count filter")
+        @Valid @RequestBody(required = false) ClinicalDataBinCountFilter clinicalDataBinCountFilter,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiIgnore // 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
+    ) {
+        List<ClinicalDataBin> clinicalDataBins = clinicalDataBinUtil.fetchClinicalDataBinCountsFromColumnStore(
+            dataBinMethod,
+            interceptedClinicalDataBinCountFilter,
+            true
+        );
+        return new ResponseEntity<>(clinicalDataBins, HttpStatus.OK);
+    }
 }u}(jw2  (fa5b6c1c20a239c60c4d8d46d7161dd3bd3af685j2  Bweb/src/main/java/org/cbioportal/web/util/ClinicalDataBinUtil.javaj2  modifiedj2  K`j2  K j2  K`j2  https://github.com/cBioPortal/cbioportal/blob/b53ceacc70faab853b517721614e7fb4b2ffecb9/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FClinicalDataBinUtil.javaj2  https://github.com/cBioPortal/cbioportal/raw/b53ceacc70faab853b517721614e7fb4b2ffecb9/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FClinicalDataBinUtil.javaj2  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FClinicalDataBinUtil.java?ref=b53ceacc70faab853b517721614e7fb4b2ffecb9j2  X  @@ -3,8 +3,10 @@
 import org.cbioportal.model.ClinicalAttribute;
 import org.cbioportal.model.ClinicalData;
 import org.cbioportal.model.ClinicalDataBin;
+import org.cbioportal.model.Sample;
 import org.cbioportal.service.ClinicalAttributeService;
 import org.cbioportal.service.PatientService;
+import org.cbioportal.service.StudyViewService;
 import org.cbioportal.service.util.ClinicalAttributeUtil;
 import org.cbioportal.webparam.ClinicalDataBinCountFilter;
 import org.cbioportal.webparam.ClinicalDataBinFilter;
@@ -37,6 +39,9 @@ public class ClinicalDataBinUtil {
     @Autowired
     private PatientService patientService;
     
+    @Autowired
+    private StudyViewService studyViewService; 
+    
     public StudyViewFilter removeSelfFromFilter(ClinicalDataBinCountFilter dataBinCountFilter) {
         List<ClinicalDataBinFilter> attributes = dataBinCountFilter.getAttributes();
         StudyViewFilter studyViewFilter = dataBinCountFilter.getStudyViewFilter();
@@ -60,6 +65,97 @@ public List<ClinicalDataBin> fetchClinicalDataBinCounts(
         );
     }
     
+    public List<ClinicalDataBin> fetchClinicalDataBinCountsFromColumnStore(
+        DataBinMethod dataBinMethod,
+        ClinicalDataBinCountFilter dataBinCountFilter,
+        boolean shouldRemoveSelfFromFilter
+    ) {
+        List<ClinicalDataBinFilter> attributes = dataBinCountFilter.getAttributes();
+        StudyViewFilter studyViewFilter = dataBinCountFilter.getStudyViewFilter();
+
+        if (shouldRemoveSelfFromFilter) {
+            studyViewFilter = removeSelfFromFilter(dataBinCountFilter);
+        }
+
+        List<String> attributeIds = attributes.stream().map(ClinicalDataBinFilter::getAttributeId).collect(Collectors.toList());
+
+        // a new StudyView filter to partially filter by study and sample ids only
+        StudyViewFilter partialFilter = new StudyViewFilter();
+        partialFilter.setStudyIds(studyViewFilter.getStudyIds());
+        partialFilter.setSampleIdentifiers(studyViewFilter.getSampleIdentifiers());
+        
+        // filter only by study id and sample identifiers, ignore rest
+        List<Sample> unfilteredSamples = studyViewService.getFilteredSamplesFromColumnstore(partialFilter);
+        List<Sample> filteredSamples = studyViewService.getFilteredSamplesFromColumnstore(studyViewFilter);
+
+        // TODO make sure these keys don't need to be distinct
+        List<String> unfilteredUniqueSampleKeys = unfilteredSamples.stream().map(Sample::getUniqueSampleKey).collect(Collectors.toList());
+        List<String> filteredUniqueSampleKeys = filteredSamples.stream().map(Sample::getUniqueSampleKey).collect(Collectors.toList());
+        List<String> unfilteredUniquePatientKeys = unfilteredSamples.stream().map(Sample::getUniquePatientKey).collect(Collectors.toList());
+        List<String> filteredUniquePatientKeys = filteredSamples.stream().map(Sample::getUniquePatientKey).collect(Collectors.toList());
+
+        // TODO make sure we don't need a distinction between sample vs patient attribute ids here
+        //  ideally we shouldn't because we have patient clinical data separated from sample clinical data in clickhouse
+        List<ClinicalData> unfilteredClinicalDataForSamples = studyViewService.getSampleClinicalDataFromStudyViewFilter(partialFilter, attributeIds);
+        List<ClinicalData> filteredClinicalDataForSamples = studyViewService.getSampleClinicalDataFromStudyViewFilter(studyViewFilter, attributeIds);
+        List<ClinicalData> unfilteredClinicalDataForPatients = studyViewService.getPatientClinicalDataFromStudyViewFilter(partialFilter, attributeIds);
+        List<ClinicalData> filteredClinicalDataForPatients = studyViewService.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, attributeIds);
+        
+        Map<String, ClinicalDataType> attributeDatatypeMap = constructAttributeDataMap(
+            unfilteredClinicalDataForSamples.stream().map(ClinicalData::getAttrId).collect(Collectors.toList()),
+            unfilteredClinicalDataForPatients.stream().map(ClinicalData::getAttrId).collect(Collectors.toList()),
+            Collections.emptyList() // TODO ignoring conflictingPatientAttributeIds for now
+        );
+
+        List<ClinicalData> unfilteredClinicalData = Stream.of(
+            unfilteredClinicalDataForSamples,
+            unfilteredClinicalDataForPatients
+            // unfilteredClinicalDataForConflictingPatientAttributes /// TODO ignoring conflictingPatientAttributeIds for now
+        ).flatMap(Collection::stream).collect(Collectors.toList());
+
+        List<ClinicalData> filteredClinicalData = Stream.of(
+            filteredClinicalDataForSamples,
+            filteredClinicalDataForPatients
+            // filteredClinicalDataForConflictingPatientAttributes // TODO ignoring conflictingPatientAttributeIds for now
+        ).flatMap(Collection::stream).collect(Collectors.toList());
+        
+        Map<String, List<ClinicalData>> unfilteredClinicalDataByAttributeId =
+            unfilteredClinicalData.stream().collect(Collectors.groupingBy(ClinicalData::getAttrId));
+
+        Map<String, List<ClinicalData>> filteredClinicalDataByAttributeId =
+            filteredClinicalData.stream().collect(Collectors.groupingBy(ClinicalData::getAttrId));
+        
+        List<ClinicalDataBin> clinicalDataBins = Collections.emptyList();
+
+        if (dataBinMethod == DataBinMethod.STATIC) {
+            if (!unfilteredSamples.isEmpty() && !unfilteredClinicalData.isEmpty()) {
+                clinicalDataBins = calculateStaticDataBins(
+                    attributes,
+                    attributeDatatypeMap,
+                    unfilteredClinicalDataByAttributeId,
+                    filteredClinicalDataByAttributeId,
+                    unfilteredUniqueSampleKeys,
+                    unfilteredUniquePatientKeys,
+                    filteredUniqueSampleKeys,
+                    filteredUniquePatientKeys
+                );
+            }
+        }
+        else { // dataBinMethod == DataBinMethod.DYNAMIC
+            if (!filteredClinicalData.isEmpty()) {
+                clinicalDataBins = calculateDynamicDataBins(
+                    attributes,
+                    attributeDatatypeMap,
+                    filteredClinicalDataByAttributeId,
+                    filteredUniqueSampleKeys,
+                    filteredUniquePatientKeys
+                );
+            }
+        }
+
+        return clinicalDataBins;
+    }
+    
     public List<ClinicalDataBin> fetchClinicalDataBinCounts(
         DataBinMethod dataBinMethod,
         ClinicalDataBinCountFilter dataBinCountFilter,ueu(512595db82641da5c80b4950bbb64fec453e5ca8}(sha(512595db82641da5c80b4950bbb64fec453e5ca8node_idEC_kwDOAe-hB9oAKDUxMjU5NWRiODI2NDFkYTVjODBiNDk1MGJiYjY0ZmVjNDUzZTVjYTgcommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-06-09T13:51:06Zu	committer}(j<3  
pvannieropj>3  pim@thehyve.nlj@3  2023-06-09T13:51:06Zumessage'Add unit tests for resolveEntrezGeneIdstree}(j43  (d9c01279669ef307200ce76e6d25e26cd1324747urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/d9c01279669ef307200ce76e6d25e26cd1324747ujL3  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/512595db82641da5c80b4950bbb64fec453e5ca8
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujL3  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/512595db82641da5c80b4950bbb64fec453e5ca8html_urlXhttps://github.com/cBioPortal/cbioportal/commit/512595db82641da5c80b4950bbb64fec453e5ca8comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/512595db82641da5c80b4950bbb64fec453e5ca8/commentsj:3  }(login
pvannieropidJa j63  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5jL3  'https://api.github.com/users/pvannieropjX3  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminujB3  }(j]3  
pvannieropj_3  Ja j63  MDQ6VXNlcjc0NTg4NQ==ja3  2https://avatars.githubusercontent.com/u/745885?v=4jc3  h5jL3  'https://api.github.com/users/pvannieropjX3  https://github.com/pvannieropjf3  1https://api.github.com/users/pvannierop/followersjh3  >https://api.github.com/users/pvannierop/following{/other_user}jj3  7https://api.github.com/users/pvannierop/gists{/gist_id}jl3  >https://api.github.com/users/pvannierop/starred{/owner}{/repo}jn3  5https://api.github.com/users/pvannierop/subscriptionsjp3  ,https://api.github.com/users/pvannierop/orgsjr3  -https://api.github.com/users/pvannierop/reposjt3  8https://api.github.com/users/pvannierop/events{/privacy}jv3  7https://api.github.com/users/pvannierop/received_eventsjx3  Userjz3  uparents]}(j43  (2f807e84986ad81fbb099ac1e45e559147a16268jL3  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2f807e84986ad81fbb099ac1e45e559147a16268jX3  Xhttps://github.com/cBioPortal/cbioportal/commit/2f807e84986ad81fbb099ac1e45e559147a16268uastats}(totalK	additionsK	deletionsKufiles](}(j43  (c0a4dabd74446abeb1949ac9b5a5b20982f570fafilenameBweb/src/main/java/org/cbioportal/web/util/StudyViewFilterUtil.javastatusmodifiedj3  Kj3  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/512595db82641da5c80b4950bbb64fec453e5ca8/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/512595db82641da5c80b4950bbb64fec453e5ca8/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.java?ref=512595db82641da5c80b4950bbb64fec453e5ca8patchX  @@ -294,7 +294,7 @@ private Map<String, Integer> getStringIntegerMap(List<String> hugoGeneSymbols) {
 
     // TODO Pim test this logic.
     // TODO Pim write test.
-    public List<StructVarFilterQuery> addEntrezGeneIds(List<StructVarFilterQuery> structVarQueries) {
+    public List<StructVarFilterQuery> resolveEntrezGeneIds(List<StructVarFilterQuery> structVarQueries) {
 
         List<String> hugoGeneSymbols = structVarQueries
             .stream()u}(j43  (a03bfba5958b1100088129e30d5b83801824bcfdj3  Yweb/src/main/java/org/cbioportal/web/util/appliers/StructuralVariantSubFilterApplier.javaj3  modifiedj3  Kj3  Kj3  Kj3  https://github.com/cBioPortal/cbioportal/blob/512595db82641da5c80b4950bbb64fec453e5ca8/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.javaj3  https://github.com/cBioPortal/cbioportal/raw/512595db82641da5c80b4950bbb64fec453e5ca8/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.javaj3  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.java?ref=512595db82641da5c80b4950bbb64fec453e5ca8j3  X  @@ -75,7 +75,7 @@ public List<SampleIdentifier> filter(List<SampleIdentifier> toFilter, StudyViewF
                         .map(SampleIdentifier::getSampleId)
                         .collect(Collectors.toList());
 
-                final List<StructVarFilterQuery> entrezIdEnhancedSvQueries = studyViewFilterUtil.addEntrezGeneIds(structVarQueries);
+                final List<StructVarFilterQuery> entrezIdEnhancedSvQueries = studyViewFilterUtil.resolveEntrezGeneIds(structVarQueries);
                 remainingSampleIdentifiers = structuralVariantService
                     .fetchStructuralVariantsByStructVarQueries(molecularProfileIds, sampleIds, entrezIdEnhancedSvQueries)
                     .stream()u}(j43  (fc15795cf0df8da7ed65d5dea4e6572ef42a8852j3  ]web/src/test/java/org/cbioportal/web/util/appliers/StructuralVariantSubFilterApplierTest.javaj3  modifiedj3  Kj3  Kj3  Kj3  https://github.com/cBioPortal/cbioportal/blob/512595db82641da5c80b4950bbb64fec453e5ca8/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.javaj3  https://github.com/cBioPortal/cbioportal/raw/512595db82641da5c80b4950bbb64fec453e5ca8/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.javaj3  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.java?ref=512595db82641da5c80b4950bbb64fec453e5ca8j3  X  @@ -21,7 +21,6 @@
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 
 import static org.mockito.ArgumentMatchers.anyList;
 import static org.mockito.ArgumentMatchers.eq;
@@ -86,7 +85,7 @@ public void setUp() throws Exception {
             createStructVar("5", ST_1_ID)
         );
         // Subsequently, return results for svA and svB queries.
-        when(studyViewFilterUtil.addEntrezGeneIds(anyList()))
+        when(studyViewFilterUtil.resolveEntrezGeneIds(anyList()))
             .thenReturn(svA, svB);
         when(structuralVariantService.fetchStructuralVariantsByStructVarQueries(anyList(), anyList(), anyList())
         ).thenReturn(structuralVariantsQuerySvA, structuralVariantsQuerySvB);ueu(5c70b4f50b0577784910bedd40e21fbf8d667269}(sha(5c70b4f50b0577784910bedd40e21fbf8d667269node_idEC_kwDOAe-hB9oAKDVjNzBiNGY1MGIwNTc3Nzg0OTEwYmVkZDQwZTIxZmJmOGQ2NjcyNjkcommit}(author}(namePim van Nieropemailpim@thehyve.nldate2023-04-14T09:21:22Zu	committer}(j3  
pvannieropj3  pim@thehyve.nlj3  2023-06-06T06:56:29Zumessage)Change HashMap to Set

PR feedback Gaofeitree}(j3  (885ad703e9b781d9c69ca55d597d1a1828e2be16urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/885ad703e9b781d9c69ca55d597d1a1828e2be16uj3  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/5c70b4f50b0577784910bedd40e21fbf8d667269
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj3  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/5c70b4f50b0577784910bedd40e21fbf8d667269html_urlXhttps://github.com/cBioPortal/cbioportal/commit/5c70b4f50b0577784910bedd40e21fbf8d667269comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/5c70b4f50b0577784910bedd40e21fbf8d667269/commentsj3  }(login
pvannieropidJa j3  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5j3  'https://api.github.com/users/pvannieropj3  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminuj3  }(j3  
pvannieropj3  Ja j3  MDQ6VXNlcjc0NTg4NQ==j3  2https://avatars.githubusercontent.com/u/745885?v=4j3  h5j3  'https://api.github.com/users/pvannieropj3  https://github.com/pvannieropj3  1https://api.github.com/users/pvannierop/followersj3  >https://api.github.com/users/pvannierop/following{/other_user}j3  7https://api.github.com/users/pvannierop/gists{/gist_id}j3  >https://api.github.com/users/pvannierop/starred{/owner}{/repo}j3  5https://api.github.com/users/pvannierop/subscriptionsj3  ,https://api.github.com/users/pvannierop/orgsj3  -https://api.github.com/users/pvannierop/reposj3  8https://api.github.com/users/pvannierop/events{/privacy}j3  7https://api.github.com/users/pvannierop/received_eventsj3  Userj3  uparents]}(j3  (788b2185d3324ec8a4b23e43aa665d2f68551f69j3  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/788b2185d3324ec8a4b23e43aa665d2f68551f69j3  Xhttps://github.com/cBioPortal/cbioportal/commit/788b2185d3324ec8a4b23e43aa665d2f68551f69uastats}(totalK	additionsK	deletionsKufiles]}(j3  (3a4b3641df1dca64b1592d0f380a2d348fe6c051filenameKservice/src/main/java/org/cbioportal/service/util/ProfiledCasesCounter.javastatusmodifiedj4  Kj4  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/5c70b4f50b0577784910bedd40e21fbf8d667269/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FProfiledCasesCounter.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/5c70b4f50b0577784910bedd40e21fbf8d667269/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FProfiledCasesCounter.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FProfiledCasesCounter.java?ref=5c70b4f50b0577784910bedd40e21fbf8d667269patchX{  @@ -121,16 +121,16 @@ public void calculate(List<T> alterationCounts,
         }
 
         if (includeMissingAlterationsFromGenePanel) {
-            Map<Integer, Boolean> genesWithAlteration = alterationCounts.stream()
+            Set<Integer> genesWithAlteration = alterationCounts.stream()
                     .flatMap(count -> Arrays.stream(count.getEntrezGeneIds()))
-                    .collect(Collectors.toMap(entrezGeneId -> entrezGeneId, x -> true));
+                    .collect(Collectors.toSet());
 
             geneToGenePanel.entrySet().forEach(entry -> {
                 Integer entrezGeneId = entry.getKey().getFirst();
                 String hugoGeneSymbol = entry.getKey().getSecond();
                 // add alterationCount object where there are no alterations but have genePanel
                 // object
-                if (!genesWithAlteration.containsKey(entrezGeneId)) {
+                if (!genesWithAlteration.contains(entrezGeneId)) {
                     AlterationCountByGene alterationCountByGene = new AlterationCountByGene();
 
                     Set<String> totalProfiledPatients = new HashSet<>();uau(60a5146809b3efbe1c798ca87f004f30748dcd8b}(sha(60a5146809b3efbe1c798ca87f004f30748dcd8bnode_idEC_kwDOAe-hB9oAKDYwYTUxNDY4MDliM2VmYmUxYzc5OGNhODdmMDA0ZjMwNzQ4ZGNkOGIcommit}(author}(name
Onur Sumeremails.onur.sumer@gmail.comdate2023-06-26T21:47:14Zu	committer}(j64  GitHubj84  noreply@github.comj:4  2023-06-26T21:47:14Zumessageadd mock data and config for clickhouse testing on filtered samples and mutated genes (#10213)

Co-authored-by: Bryan Lai <laib1@mskcc.org>tree}(j.4  (22a89335c7d15895f9d63bfe353b9e8bce90b54burlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/22a89335c7d15895f9d63bfe353b9e8bce90b54bujF4  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/60a5146809b3efbe1c798ca87f004f30748dcd8b
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkmgdiCRBK7hj4Ov3rIwAAIkMIAGl6kyexOk1Umzm4RwMOpkWm
vrr5yQKkj/qLJ4QlDEZHLsjZTDk4MG+pr6TkMUf+oTV78HBpNQ2zrLnvO1mXzmL2
RVnDjYsoIjMOM6Kuhqqd94PvvbcnKtgkk0SIdPLRdPNnE+Tx4zXixRSx7oMCO0L3
N1hqmiHBTquACFQ7GDv0Y/FWr7yNULZk7CUbJuc/3j8b7CT8dHWq31Q6VMBZcqbL
Fe0OMro7Pmgv95J4iBcUK9219/K2AXQ/lT0r2EkaNqF8/+aChPlS96RiGXrxbqrK
ct9oPAr+mbBcyX93PpR1d+aEyQd13nJMFU/CGXtTMpzaiB5I/CrSBdHY8Lp8hiY=
=6jNA
-----END PGP SIGNATURE-----
payloadX]  tree 22a89335c7d15895f9d63bfe353b9e8bce90b54b
parent 0bf78c91d2b9dab7f3c71f71ada3f0a159b9405f
author Onur Sumer <s.onur.sumer@gmail.com> 1687816034 -0400
committer GitHub <noreply@github.com> 1687816034 -0400

add mock data and config for clickhouse testing on filtered samples and mutated genes (#10213)

Co-authored-by: Bryan Lai <laib1@mskcc.org>uujF4  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/60a5146809b3efbe1c798ca87f004f30748dcd8bhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/60a5146809b3efbe1c798ca87f004f30748dcd8bcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/60a5146809b3efbe1c798ca87f004f30748dcd8b/commentsj44  }(login	onursumeridJ6 j04  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5jF4  &https://api.github.com/users/onursumerjT4  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminuj<4  }(jY4  web-flowj[4  J/j04  MDQ6VXNlcjE5ODY0NDQ3j]4  4https://avatars.githubusercontent.com/u/19864447?v=4j_4  h5jF4  %https://api.github.com/users/web-flowjT4  https://github.com/web-flowjb4  /https://api.github.com/users/web-flow/followersjd4  <https://api.github.com/users/web-flow/following{/other_user}jf4  5https://api.github.com/users/web-flow/gists{/gist_id}jh4  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jj4  3https://api.github.com/users/web-flow/subscriptionsjl4  *https://api.github.com/users/web-flow/orgsjn4  +https://api.github.com/users/web-flow/reposjp4  6https://api.github.com/users/web-flow/events{/privacy}jr4  5https://api.github.com/users/web-flow/received_eventsjt4  Userjv4  uparents]}(j.4  (0bf78c91d2b9dab7f3c71f71ada3f0a159b9405fjF4  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/0bf78c91d2b9dab7f3c71f71ada3f0a159b9405fjT4  Xhttps://github.com/cBioPortal/cbioportal/commit/0bf78c91d2b9dab7f3c71f71ada3f0a159b9405fuastats}(totalK	additionsK	deletionsK ufiles](}(j.4  (a67cf376d51c9159302ae95dbf431c935f9d63e6filenamepersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepositoryTest.javastatusaddedj4  K1j4  K changesK1blob_urlhttps://github.com/cBioPortal/cbioportal/blob/60a5146809b3efbe1c798ca87f004f30748dcd8b/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/60a5146809b3efbe1c798ca87f004f30748dcd8b/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.java?ref=60a5146809b3efbe1c798ca87f004f30748dcd8bpatchX  @@ -0,0 +1,49 @@
+package org.cbioportal.persistence.mybatiscolumnstore;
+
+import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.Sample;
+import org.cbioportal.webparam.StudyViewFilter;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Configurable;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration("/testContextDatabaseClickhouse.xml")
+@Configurable
+public class StudyViewMyBatisRepositoryTest {
+
+    @Autowired
+    private StudyViewMyBatisRepository studyViewMyBatisRepository;
+
+    @Test
+    public void getFilteredSamples() {
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+
+        List<String> studyIds = new ArrayList<>();
+        studyIds.add("msk_ch_2020");
+        studyViewFilter.setStudyIds(studyIds);
+        
+        List<Sample> samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter);
+        Assert.assertEquals(3, samples.size());
+    }
+
+    @Test
+    public void getMutatedGenes() {
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+
+        List<String> studyIds = new ArrayList<>();
+        studyIds.add("msk_ch_2020");
+        studyViewFilter.setStudyIds(studyIds);
+
+        List<AlterationCountByGene> mutations = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter);
+        Assert.assertEquals(2, mutations.size());
+    }
+
+}
\ No newline at end of fileu}(j.4  (37721f014975e2e1560297baa5c47b836594292ej4  Gpersistence/persistence-mybatis/src/test/resources/clickhouseSchema.sqlj4  addedj4  Kyj4  K j4  Kyj4  https://github.com/cBioPortal/cbioportal/blob/60a5146809b3efbe1c798ca87f004f30748dcd8b/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseSchema.sqlj4  https://github.com/cBioPortal/cbioportal/raw/60a5146809b3efbe1c798ca87f004f30748dcd8b/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseSchema.sqlj4  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseSchema.sql?ref=60a5146809b3efbe1c798ca87f004f30748dcd8bj4  X  @@ -0,0 +1,121 @@
+create table cna_discrete
+(
+    sample_unique_id          varchar(255),
+    alteration                int,
+    hugo_gene_symbol          varchar(255),
+    gene_panel_stable_id      varchar(255),
+    cancer_study_identifier   varchar(255),
+    genetic_profile_stable_id varchar(255),
+    PRIMARY KEY (sample_unique_id, alteration, hugo_gene_symbol, cancer_study_identifier)
+);
+
+create table genetic_profile
+(
+    sample_unique_id        varchar(255),
+    genetic_alteration_type varchar(255),
+    datatype                varchar(255),
+    value                   varchar(255),
+    cancer_study_identifier varchar(255),
+    PRIMARY KEY (sample_unique_id, genetic_alteration_type, datatype, value, cancer_study_identifier)
+);
+
+create table genetic_profile_counts
+(
+    sample_unique_id          varchar(255),
+    profile_name              varchar(255),
+    genetic_profile_stable_id varchar(255),
+    cancer_study_identifier   varchar(255),
+    count                     int
+);
+
+create table genomic_event
+(
+    sample_unique_id          varchar(255),
+    variant                   varchar(255),
+    hugo_gene_symbol          varchar(255),
+    gene_panel_stable_id      varchar(255),
+    cancer_study_identifier   varchar(255),
+    genetic_profile_stable_id varchar(255),
+    PRIMARY KEY (sample_unique_id, variant, hugo_gene_symbol, cancer_study_identifier, genetic_profile_stable_id)
+);
+
+create table mutation
+(
+    sample_unique_id          varchar(255),
+    variant                   varchar(255),
+    hugo_gene_symbol          varchar(255),
+    gene_panel_stable_id      varchar(255),
+    cancer_study_identifier   varchar(255),
+    genetic_profile_stable_id varchar(255),
+    PRIMARY KEY (sample_unique_id, variant, hugo_gene_symbol, cancer_study_identifier)
+);
+
+create table patient_clinical_attribute_categorical
+(
+    patient_unique_id       varchar(255),
+    attribute_name          varchar(255),
+    attribute_value         varchar(255),
+    cancer_study_identifier varchar(255),
+    PRIMARY KEY (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier)
+);
+
+create table patient_clinical_attribute_numeric
+(
+    patient_unique_id       varchar(255),
+    attribute_name          varchar(255),
+    attribute_value         float,
+    cancer_study_identifier varchar(255),
+    PRIMARY KEY (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier)
+);
+
+create table sample
+(
+    sample_unique_id         varchar(255),
+    sample_stable_id         varchar(255),
+    patient_unique_id        varchar(255),
+    patient_stable_id        varchar(255),
+    cancer_study_identifier  varchar(255),
+    sample_unique_id_base64  varchar(255),
+    patient_unique_id_base64 varchar(255),
+    PRIMARY KEY (sample_unique_id, patient_unique_id, cancer_study_identifier)
+);
+
+create table sample_clinical_attribute_categorical
+(
+    patient_unique_id       varchar(255),
+    sample_unique_id        varchar(255),
+    attribute_name          varchar(255),
+    attribute_value         varchar(255),
+    cancer_study_identifier varchar(255),
+    PRIMARY KEY (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier)
+);
+
+create table sample_clinical_attribute_numeric
+(
+    patient_unique_id       varchar(255),
+    sample_unique_id        varchar(255),
+    attribute_name          varchar(255),
+    attribute_value         float,
+    cancer_study_identifier varchar(255),
+    PRIMARY KEY (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier)
+);
+
+create table sample_list
+(
+    sample_unique_id        varchar(255),
+    sample_list_stable_id   varchar(255),
+    name                    varchar(255),
+    cancer_study_identifier varchar(255),
+    PRIMARY KEY (sample_unique_id, sample_list_stable_id, name, cancer_study_identifier)
+);
+
+create table structural_variant
+(
+    sample_unique_id          varchar(255),
+    hugo_symbol_gene1         varchar(255),
+    hugo_symbol_gene2         varchar(255),
+    gene_panel_stable_id      varchar(255),
+    cancer_study_identifier   varchar(255),
+    genetic_profile_stable_id varchar(255),
+    PRIMARY KEY (sample_unique_id, hugo_symbol_gene1, hugo_symbol_gene2, cancer_study_identifier)
+);u}(j.4  (a52d4180198a7f7218882238ef64ffb2deb71b61j4  Hpersistence/persistence-mybatis/src/test/resources/clickhouseTestSql.sqlj4  addedj4  Kj4  K j4  Kj4  https://github.com/cBioPortal/cbioportal/blob/60a5146809b3efbe1c798ca87f004f30748dcd8b/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseTestSql.sqlj4  https://github.com/cBioPortal/cbioportal/raw/60a5146809b3efbe1c798ca87f004f30748dcd8b/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseTestSql.sqlj4  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseTestSql.sql?ref=60a5146809b3efbe1c798ca87f004f30748dcd8bj4  Xi  @@ -0,0 +1,20 @@
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000004', 'AGE', 39.739902, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000004', 'TIME_FROM_DX_TO_SEQ', 991, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000004', 'TIME_TO_BLOOD_DRAW_FROM_TX', 609, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000015', 'AGE', 44.440792, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000015', 'TIME_FROM_DX_TO_SEQ', 2558, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000015', 'TIME_TO_BLOOD_DRAW_FROM_TX', 5, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000023', 'AGE', 61.319645, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000023', 'TIME_FROM_DX_TO_SEQ', 245, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000023', 'TIME_TO_BLOOD_DRAW_FROM_TX', 166, 'msk_ch_2020');
+
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000004-N01', '', 'P-0000004-N01', 'msk_ch_2020_P-0000004', '', 'P-0000004', 'msk_ch_2020');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000015-N01', '', 'P-0000015-N01', 'msk_ch_2020_P-0000015', '', 'P-0000015', 'msk_ch_2020');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000023-N01', '', 'P-0000023-N01', 'msk_ch_2020_P-0000023', '', 'P-0000023', 'msk_ch_2020');
+-- 
+INSERT INTO genomic_event (sample_unique_id, variant, hugo_gene_symbol, gene_panel_stable_id, cancer_study_identifier, genetic_profile_stable_id) VALUES ('msk_ch_2020_P-0000004-N01', 'p.R1051Q', 'KDR', '', 'msk_ch_2020', 'msk_ch_2020_mutations');
+INSERT INTO genomic_event (sample_unique_id, variant, hugo_gene_symbol, gene_panel_stable_id, cancer_study_identifier, genetic_profile_stable_id) VALUES ('msk_ch_2020_P-0000004-N01', 'p.T1884I', 'TET2', '', 'msk_ch_2020', 'msk_ch_2020_mutations');
+
+INSERT INTO mutation (sample_unique_id, variant, hugo_gene_symbol, gene_panel_stable_id, cancer_study_identifier, genetic_profile_stable_id) VALUES ('msk_ch_2020_P-0000004-N01', 'p.R1051Q', 'KDR', '', 'msk_ch_2020', 'msk_ch_2020_mutations');
+INSERT INTO mutation (sample_unique_id, variant, hugo_gene_symbol, gene_panel_stable_id, cancer_study_identifier, genetic_profile_stable_id) VALUES ('msk_ch_2020_P-0000004-N01', 'p.T1884I', 'TET2', '', 'msk_ch_2020', 'msk_ch_2020_mutations');
+u}(j.4  (4f93f760f8cec9b23d7c894ce85f3e9c66b66423j4  Tpersistence/persistence-mybatis/src/test/resources/testContextDatabaseClickhouse.xmlj4  addedj4  K*j4  K j4  K*j4  https://github.com/cBioPortal/cbioportal/blob/60a5146809b3efbe1c798ca87f004f30748dcd8b/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestContextDatabaseClickhouse.xmlj4  https://github.com/cBioPortal/cbioportal/raw/60a5146809b3efbe1c798ca87f004f30748dcd8b/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestContextDatabaseClickhouse.xmlj4  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestContextDatabaseClickhouse.xml?ref=60a5146809b3efbe1c798ca87f004f30748dcd8bj4  X1	  @@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beans
+    xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:util="http://www.springframework.org/schema/util"
+    xmlns:context="http://www.springframework.org/schema/context"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context.xsd
+                      http://www.springframework.org/schema/util
+                      http://www.springframework.org/schema/util/spring-util.xsd">
+    <bean id="dbcpDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
+        <property name="url" value="jdbc:h2:mem:;MODE=MySQL;DATABASE_TO_UPPER=false;INIT=RUNSCRIPT FROM 'classpath:clickhouseSchema.sql'\;RUNSCRIPT FROM 'classpath:clickhouseTestSql.sql'"/>
+        <!-- 
+            Enable this to connect to an actual clickhouse Database instead of a mock one.
+            Note that this is only intended for temporary local use, not for automated CI tests.
+        -->         
+<!--        <property name="url" value="jdbc:ch://localhost:8123/cbioportal"/>-->
+<!--        <property name="password" value="cbio_pass"/>-->
+<!--        <property name="username" value="cbio_user"/>-->
+    </bean>
+
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dbcpDataSource"/>
+        <property name="typeAliasesPackage" value="org.mskcc.cbio.portal.model"/>
+        <property name="typeHandlersPackage" value="org.cbioportal.persistence.mybatis.typehandler"/>
+    </bean>
+
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="dbcpDataSource" />
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.cbioportal.persistence.mybatiscolumnstore"/>
+    </bean>
+
+    <context:component-scan base-package="org.cbioportal.persistence.mybatiscolumnstore"/>
+
+</beans>
\ No newline at end of fileueu(631a5b3a5fe9212454af7cbb5a48c6891a20c527}(sha(631a5b3a5fe9212454af7cbb5a48c6891a20c527node_idEC_kwDOAe-hB9oAKDYzMWE1YjNhNWZlOTIxMjQ1NGFmN2NiYjVhNDhjNjg5MWEyMGM1Mjccommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-06-13T09:58:33Zu	committer}(j4  
Bas Leenknegtj4  basleenknegt@thehyve.nlj4  2023-06-20T11:41:50ZumessageUpdate result reporttree}(j4  (3f6b8acc3a2d7def0597110d4df13db592765200urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/3f6b8acc3a2d7def0597110d4df13db592765200uj4  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/631a5b3a5fe9212454af7cbb5a48c6891a20c527
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj4  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/631a5b3a5fe9212454af7cbb5a48c6891a20c527html_urlXhttps://github.com/cBioPortal/cbioportal/commit/631a5b3a5fe9212454af7cbb5a48c6891a20c527comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/631a5b3a5fe9212454af7cbb5a48c6891a20c527/commentsj4  }(login
pvannieropidJa j4  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5j4  'https://api.github.com/users/pvannieropj4  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminuj4  }(j4  BasLeej4  J~2 j4  MDQ6VXNlcjMzMjMwMDY=j4  3https://avatars.githubusercontent.com/u/3323006?v=4j4  h5j4  #https://api.github.com/users/BasLeej4  https://github.com/BasLeej4  -https://api.github.com/users/BasLee/followersj4  :https://api.github.com/users/BasLee/following{/other_user}j4  3https://api.github.com/users/BasLee/gists{/gist_id}j4  :https://api.github.com/users/BasLee/starred{/owner}{/repo}j4  1https://api.github.com/users/BasLee/subscriptionsj4  (https://api.github.com/users/BasLee/orgsj4  )https://api.github.com/users/BasLee/reposj4  4https://api.github.com/users/BasLee/events{/privacy}j4  3https://api.github.com/users/BasLee/received_eventsj5  Userj5  uparents]}(j4  (077a0b3d89d6556626f8b167a387592ea23926d3j4  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/077a0b3d89d6556626f8b167a387592ea23926d3j4  Xhttps://github.com/cBioPortal/cbioportal/commit/077a0b3d89d6556626f8b167a387592ea23926d3uastats}(totalK	additionsK	deletionsKufiles]}(j4  (8a39412f12d159a96b8ad548010704f8baa3a118filename=core/src/test/scripts/test_data/study_es_0/result_report.htmlstatusmodifiedj5  Kj5  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/631a5b3a5fe9212454af7cbb5a48c6891a20c527/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.htmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/631a5b3a5fe9212454af7cbb5a48c6891a20c527/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.htmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.html?ref=631a5b3a5fe9212454af7cbb5a48c6891a20c527patchX	  @@ -1742,7 +1742,7 @@ <h4 class="panel-title">data_resource_study.txt</h4>
           <a role="button" data-toggle="collapse" aria-expanded="true"
              href="#collapse_ZGF0YV9zdHJ1Y3R1cmFsX3ZhcmlhbnRzLnR4dA",
              aria-controls="collapse_ZGF0YV9zdHJ1Y3R1cmFsX3ZhcmlhbnRzLnR4dA">
-            <span class="badge">3</span>
+            <span class="badge">5</span>
             <h4 class="panel-title">data_structural_variants.txt</h4>
           </a>
         </div>
@@ -1770,6 +1770,22 @@ <h4 class="panel-title">data_structural_variants.txt</h4>
                 <td>&ndash;</td>
                 <td></td>
               </tr>
+              <tr class="success">
+                <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
+                <td>48</td>
+                <td>&ndash;</td>
+                <td>No Entrez gene id or gene symbol provided for site 2. Assuming either the intragenic, deletion, duplication, translocation or inversion variant</td>
+                <td>&ndash;</td>
+                <td></td>
+              </tr>
+              <tr class="success">
+                <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
+                <td>49</td>
+                <td>&ndash;</td>
+                <td>No Entrez gene id or gene symbol provided for site 1. Assuming either the intragenic, deletion, duplication, translocation or inversion variant</td>
+                <td>&ndash;</td>
+                <td></td>
+              </tr>
               <tr class="success">
                 <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
                 <td>&ndash;</td>
@@ -1782,7 +1798,7 @@ <h4 class="panel-title">data_structural_variants.txt</h4>
                 <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
                 <td>&ndash;</td>
                 <td>&ndash;</td>
-                <td>Read 47 lines. Lines with warning: 0. Lines with error: 0</td>
+                <td>Read 49 lines. Lines with warning: 0. Lines with error: 0</td>
                 <td>&ndash;</td>
                 <td></td>
               </tr>uau(8f4fa2ce4e10348df6fa328b8051c32069838454}(sha(8f4fa2ce4e10348df6fa328b8051c32069838454node_idEC_kwDOAe-hB9oAKDhmNGZhMmNlNGUxMDM0OGRmNmZhMzI4YjgwNTFjMzIwNjk4Mzg0NTQcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-08T02:04:39Zu	committer}(j:5  Djokovic0311j<5  .55948986+Djokovic0311@users.noreply.github.comj>5  2023-08-08T02:04:39Zumessage modify controller file structuretree}(j25  (e2e628fc6295487a47b1e633bfd9735cfa15ed45urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/e2e628fc6295487a47b1e633bfd9735cfa15ed45ujJ5  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/8f4fa2ce4e10348df6fa328b8051c32069838454
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujJ5  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8f4fa2ce4e10348df6fa328b8051c32069838454html_urlXhttps://github.com/cBioPortal/cbioportal/commit/8f4fa2ce4e10348df6fa328b8051c32069838454comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/8f4fa2ce4e10348df6fa328b8051c32069838454/commentsj85  }(loginDjokovic0311idJUj45  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5jJ5  )https://api.github.com/users/Djokovic0311jV5  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs       	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminuj@5  }(j[5  Djokovic0311j]5  JUj45  MDQ6VXNlcjU1OTQ4OTg2j_5  4https://avatars.githubusercontent.com/u/55948986?v=4ja5  h5jJ5  )https://api.github.com/users/Djokovic0311jV5  https://github.com/Djokovic0311jd5  3https://api.github.com/users/Djokovic0311/followersjf5  @https://api.github.com/users/Djokovic0311/following{/other_user}jh5  9https://api.github.com/users/Djokovic0311/gists{/gist_id}jj5  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}jl5  7https://api.github.com/users/Djokovic0311/subscriptionsjn5  .https://api.github.com/users/Djokovic0311/orgsjp5  /https://api.github.com/users/Djokovic0311/reposjr5  :https://api.github.com/users/Djokovic0311/events{/privacy}jt5  9https://api.github.com/users/Djokovic0311/received_eventsjv5  Userjx5  uparents]}(j25  (b40d245a48542ab54b0efe25516243d55cd129b3jJ5  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b40d245a48542ab54b0efe25516243d55cd129b3jV5  Xhttps://github.com/cBioPortal/cbioportal/commit/b40d245a48542ab54b0efe25516243d55cd129b3uastats}(totalK	additionsK.	deletionsKUufiles](}(j25  (c3344ce94e98e3c3b009d1deab47e0d8871c4d04filenameOweb/src/main/java/org/cbioportal/web/GenericAssayCategoricalDataController.javastatusremovedj5  K j5  KPchangesKPblob_urlhttps://github.com/cBioPortal/cbioportal/blob/b40d245a48542ab54b0efe25516243d55cd129b3/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayCategoricalDataController.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/b40d245a48542ab54b0efe25516243d55cd129b3/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayCategoricalDataController.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayCategoricalDataController.java?ref=b40d245a48542ab54b0efe25516243d55cd129b3patchX
  @@ -1,80 +0,0 @@
-package org.cbioportal.web;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import org.apache.commons.lang3.StringUtils;
-import org.cbioportal.model.*;
-import org.cbioportal.service.GenericAssayCategoricalDataService;
-import org.cbioportal.service.GenericAssayService;
-import org.cbioportal.service.SampleService;
-import org.cbioportal.service.exception.GenericAssayNotFoundException;
-import org.cbioportal.service.exception.MolecularProfileNotFoundException;
-import org.cbioportal.web.config.annotation.InternalApi;
-import org.cbioportal.web.parameter.GenericAssayFilter;
-import org.cbioportal.web.parameter.HeaderKeyConstants;
-import org.cbioportal.web.parameter.MolecularProfileCasesGroupFilter;
-import org.cbioportal.web.parameter.Projection;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpHeaders;
-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.*;
-import springfox.documentation.annotations.ApiIgnore;
-
-import javax.validation.Valid;
-import java.util.*;
-import java.util.stream.Collectors;
-
-@InternalApi
-@RestController
-@Validated
-@Api(tags = "Generic Assay Categorical Data", description = " ")
-public class GenericAssayCategoricalDataController {
-
-    @Autowired
-    private GenericAssayCategoricalDataService genericAssayCategoricalDataService;
-
-    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
-    @RequestMapping(value = "/generic-assay-enrichments/categorical/fetch",
-        method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE,
-        produces = MediaType.APPLICATION_JSON_VALUE)
-    @ApiOperation("Fetch generic assay categorical data enrichments in a molecular profile")
-    public ResponseEntity<List<GenericAssayCategoricalEnrichment>> fetchGenericAssayCategoricalDataEnrichmentInMultipleMolecularProfiles(
-        @ApiIgnore 
-        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
-        @ApiParam("Type of the enrichment e.g. SAMPLE or PATIENT")
-        @RequestParam(defaultValue = "SAMPLE") EnrichmentType enrichmentType,
-        @ApiParam(required = true, value = "List of groups containing sample and molecular profile identifiers")
-        @Valid @RequestBody(required = false) List<MolecularProfileCasesGroupFilter> groups,
-        @ApiIgnore
-        @Valid @RequestAttribute(required = false, value = "interceptedMolecularProfileCasesGroupFilters") List<MolecularProfileCasesGroupFilter> interceptedMolecularProfileCasesGroupFilters)
-        throws MolecularProfileNotFoundException, UnsupportedOperationException {
-        
-        return new ResponseEntity<>(fetchExpressionEnrichments(enrichmentType, interceptedMolecularProfileCasesGroupFilters),
-            HttpStatus.OK);
-    }
-    private List<GenericAssayCategoricalEnrichment> fetchExpressionEnrichments(EnrichmentType enrichmentType,
-                                                                                List<MolecularProfileCasesGroupFilter> interceptedMolecularProfileCasesGroupFilters
-                                                                                ) throws MolecularProfileNotFoundException {
-        Map<String, List<MolecularProfileCaseIdentifier>> groupCaseIdentifierSet = interceptedMolecularProfileCasesGroupFilters
-            .stream().collect(Collectors.toMap(MolecularProfileCasesGroupFilter::getName,
-                MolecularProfileCasesGroupFilter::getMolecularProfileCaseIdentifiers));
-
-        Set<String> molecularProfileIds = groupCaseIdentifierSet.values().stream()
-            .flatMap(molecularProfileCaseSet -> molecularProfileCaseSet.stream()
-                .map(MolecularProfileCaseIdentifier::getMolecularProfileId))
-            .collect(Collectors.toSet());
-
-        if (molecularProfileIds.size() > 1) {
-            throw new UnsupportedOperationException("Multi-study expression enrichments is not yet implemented");
-        }
-        return genericAssayCategoricalDataService.getGenericAssayCategoricalEnrichments(
-            molecularProfileIds.iterator().next(), groupCaseIdentifierSet, enrichmentType);
-    }
-}
-
-u}(j25  (bac54097958934ed082d850ff1a75025e6cd8379j5  Jweb/src/main/java/org/cbioportal/web/GenericAssayEnrichmentController.javaj5  renamedj5  K,j5  Kj5  K/j5  https://github.com/cBioPortal/cbioportal/blob/8f4fa2ce4e10348df6fa328b8051c32069838454/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.javaj5  https://github.com/cBioPortal/cbioportal/raw/8f4fa2ce4e10348df6fa328b8051c32069838454/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.javaj5  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.java?ref=8f4fa2ce4e10348df6fa328b8051c32069838454j5  X  @@ -5,8 +5,10 @@
 import io.swagger.annotations.ApiParam;
 import org.cbioportal.model.EnrichmentType;
 import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
 import org.cbioportal.service.GenericAssayBinaryDataService;
+import org.cbioportal.service.GenericAssayCategoricalDataService;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.impl.GenericAssayBinaryDataServiceImpl;
 import org.cbioportal.web.config.annotation.InternalApi;
@@ -30,14 +32,35 @@
 @InternalApi
 @RestController
 @Validated
-@Api(tags = "Generic Assay Binary Data", description = " ")
-public class GenericAssayBinaryDataController {
+@Api(tags = "Generic Assay Enrichment Data", description = " ")
+public class GenericAssayEnrichmentController {
+    @Autowired
+    private GenericAssayCategoricalDataService genericAssayCategoricalDataService;
     @Autowired
     private GenericAssayBinaryDataService genericAssayBinaryDataService;
 
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @RequestMapping(value = "/generic-assay-categorical-enrichments/fetch",
+        method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE,
+        produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch generic assay categorical data enrichments in a molecular profile")
+    public ResponseEntity<List<GenericAssayCategoricalEnrichment>> fetchGenericAssayCategoricalDataEnrichmentInMultipleMolecularProfiles(
+        @ApiIgnore
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiParam("Type of the enrichment e.g. SAMPLE or PATIENT")
+        @RequestParam(defaultValue = "SAMPLE") EnrichmentType enrichmentType,
+        @ApiParam(required = true, value = "List of groups containing sample and molecular profile identifiers")
+        @Valid @RequestBody(required = false) List<MolecularProfileCasesGroupFilter> groups,
+        @ApiIgnore
+        @Valid @RequestAttribute(required = false, value = "interceptedMolecularProfileCasesGroupFilters") List<MolecularProfileCasesGroupFilter> interceptedMolecularProfileCasesGroupFilters)
+        throws MolecularProfileNotFoundException, UnsupportedOperationException {
+
+        return new ResponseEntity<>(fetchExpressionEnrichments(enrichmentType, interceptedMolecularProfileCasesGroupFilters),
+            HttpStatus.OK);
+    }
 
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
-    @RequestMapping(value = "/generic-assay-enrichments/binary/fetch",
+    @RequestMapping(value = "/generic-assay-binary-enrichments/fetch",
         method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE,
         produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Fetch generic assay binary data enrichments in a molecular profile")
@@ -71,4 +94,22 @@ public ResponseEntity<List<GenericAssayBinaryEnrichment>> fetchGenericAssayBinar
             HttpStatus.OK);
     }
 
+    private List<GenericAssayCategoricalEnrichment> fetchExpressionEnrichments(EnrichmentType enrichmentType,
+                                                                               List<MolecularProfileCasesGroupFilter> interceptedMolecularProfileCasesGroupFilters
+    ) throws MolecularProfileNotFoundException {
+        Map<String, List<MolecularProfileCaseIdentifier>> groupCaseIdentifierSet = interceptedMolecularProfileCasesGroupFilters
+            .stream().collect(Collectors.toMap(MolecularProfileCasesGroupFilter::getName,
+                MolecularProfileCasesGroupFilter::getMolecularProfileCaseIdentifiers));
+
+        Set<String> molecularProfileIds = groupCaseIdentifierSet.values().stream()
+            .flatMap(molecularProfileCaseSet -> molecularProfileCaseSet.stream()
+                .map(MolecularProfileCaseIdentifier::getMolecularProfileId))
+            .collect(Collectors.toSet());
+
+        if (molecularProfileIds.size() > 1) {
+            throw new UnsupportedOperationException("Multi-study expression enrichments is not yet implemented");
+        }
+        return genericAssayCategoricalDataService.getGenericAssayCategoricalEnrichments(
+            molecularProfileIds.iterator().next(), groupCaseIdentifierSet, enrichmentType);
+    }
 }previous_filenameJweb/src/main/java/org/cbioportal/web/GenericAssayBinaryDataController.javau}(j25  (8b9f6cfd93e4583ba27932ee47fd63b57aa04d70j5  Vweb/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.javaj5  modifiedj5  Kj5  Kj5  Kj5  https://github.com/cBioPortal/cbioportal/blob/8f4fa2ce4e10348df6fa328b8051c32069838454/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaj5  https://github.com/cBioPortal/cbioportal/raw/8f4fa2ce4e10348df6fa328b8051c32069838454/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaj5  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.java?ref=8f4fa2ce4e10348df6fa328b8051c32069838454j5  XU  @@ -101,8 +101,8 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
     public static final String TREATMENTS_PATIENT_PATH = "/treatments/patient";
     public static final String TREATMENTS_SAMPLE_PATH = "/treatments/sample";
     public static final String GENERIC_ASSAY_ENRICHMENT_FETCH_PATH = "/generic-assay-enrichments/fetch";
-    public static final String GENERIC_ASSAY_CATEGORICAL_ENRICHMENT_FETCH_PATH = "/generic-assay-enrichments/categorical/fetch";
-    public static final String GENERIC_ASSAY_BINARY_ENRICHMENT_FETCH_PATH = "/generic-assay-enrichments/binary/fetch";
+    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";
 
     @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {ueu(082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad}(sha(082f3f56b88555f9ff9a0c1e57bfe7b3bd3326adnode_idEC_kwDOAe-hB9oAKDA4MmYzZjU2Yjg4NTU1ZjlmZjlhMGMxZTU3YmZlN2IzYmQzMzI2YWQcommit}(author}(name
Qi-Xuan Luemailqlu@carisls.comdate2023-07-26T11:02:41Zu	committer}(j5  
Qi-Xuan Luj5  qlu@carisls.comj5  2023-07-26T11:02:41ZumessagePchange CopyNumberDataCounterFilter to StudyViewFilter and GenomicDataCountFiltertree}(j5  (17321b3eb4fe942fd8e83b010be0bbcd917c5cd8urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/17321b3eb4fe942fd8e83b010be0bbcd917c5cd8uj5  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj5  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326adhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326adcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad/commentsj5  Nj5  Nparents]}(j5  (fff09f454900087338c19c1dc3768aab5e2187ecj5  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/fff09f454900087338c19c1dc3768aab5e2187ecj5  Xhttps://github.com/cBioPortal/cbioportal/commit/fff09f454900087338c19c1dc3768aab5e2187ecuastats}(totalMW	additionsK	deletionsKsufiles](}(j5  (6223ba42e17ab28a7c87bbf51212b9793f7c2d31filenameBservice/src/main/java/org/cbioportal/service/StudyViewService.javastatusmodifiedj5  Kj5  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.java?ref=082f3f56b88555f9ff9a0c1e57bfe7b3bd3326adpatchXS  @@ -20,8 +20,11 @@ List<AlterationCountByGene> getStructuralVariantAlterationCountByGenes(List<Stri
     List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> studyIds, List<String> sampleIds, AlterationFilter annotationFilter)
         throws StudyNotFoundException;
 
-    List<GenomicDataCount> getCNAAlterationCountsByEvent(String molecularProfileId, List<Integer> entrezGeneIds,
-                                                         List<Integer> alterations) throws MolecularProfileNotFoundException;
+    List<GenomicDataCount> getCNAAlterationCountsByGeneSpecific(List<String> studyIds,
+                                                                List<String> sampleIds,
+                                                                List<String> hugoGeneSymbols,
+                                                                AlterationFilter alterationFilter) 
+        throws StudyNotFoundException;
 
     List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String> sampleIds, List<String> studyIds, List<String> stableIds, List<String> profileTypes);
 u}(j5  (688f395d2890accc4b3bc898f624191c59289846j5  Kservice/src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.javaj5  modifiedj5  K(j5  Kj5  K=j5  https://github.com/cBioPortal/cbioportal/blob/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj5  https://github.com/cBioPortal/cbioportal/raw/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj5  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.java?ref=082f3f56b88555f9ff9a0c1e57bfe7b3bd3326adj5  X  @@ -38,7 +38,7 @@ public class StudyViewServiceImpl implements StudyViewService {
     private AlterationRepository alterationRepository;
 
     @Autowired
-    private DiscreteCopyNumberService discreteCopyNumberService;
+    private GeneService geneService;
     
     @Override
     public List<GenomicDataCount> getGenomicDataCounts(List<String> studyIds, List<String> sampleIds) {
@@ -157,7 +157,7 @@ public List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> stu
         throws StudyNotFoundException {
         List<MolecularProfileCaseIdentifier> caseIdentifiers =
             molecularProfileService.getFirstDiscreteCNAProfileCaseIdentifiers(studyIds, sampleIds);
-        Select<CNA> cnaTypes = Select.byValues(CNA_TYPES_AMP_AND_HOMDEL);
+        
         List<CopyNumberCountByGene> copyNumberCountByGenes = alterationCountService.getSampleCnaGeneCounts(
             caseIdentifiers,
             Select.all(),
@@ -190,28 +190,47 @@ public List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> stu
     }
 
     @Override
-    public List<GenomicDataCount> getCNAAlterationCountsByEvent(String molecularProfileId, List<Integer> entrezGeneIds,
-                                                                List<Integer> alterations) throws MolecularProfileNotFoundException {
+    public List<GenomicDataCount> getCNAAlterationCountsByGeneSpecific(List<String> studyIds,
+                                                                       List<String> sampleIds,
+                                                                       List<String> hugoGeneSymbols,
+                                                                       AlterationFilter alterationFilter) throws StudyNotFoundException {
+        List<MolecularProfileCaseIdentifier> caseIdentifiers =
+            molecularProfileService.getFirstDiscreteCNAProfileCaseIdentifiers(studyIds, sampleIds);
 
-        List<CopyNumberCount> copyNumberCounts = discreteCopyNumberService.fetchCopyNumberCounts(molecularProfileId, entrezGeneIds, alterations);
-        
-        return copyNumberCounts
+        Select<Integer> entrezGeneIds = Select.byValues(
+            geneService
+            .fetchGenes(hugoGeneSymbols,
+                "HUGO_GENE_SYMBOL", "SUMMARY")
             .stream()
-            .filter(c -> c.getNumberOfSamplesWithAlterationInGene() != null)
-            .map(entry -> {
-                int count = entry.getNumberOfSamplesWithAlterationInGene();
-                int alteration = entry.getAlteration();
-                String label = CNA.getByCode(entry.getAlteration().shortValue()).getDescription();
-                
-                GenomicDataCount genomicDataCount = new GenomicDataCount();
-                genomicDataCount.setLabel(label);
-                genomicDataCount.setValue(String.valueOf(alteration));
-                genomicDataCount.setCount(count);
+            .map(Gene::getEntrezGeneId));
 
-                return genomicDataCount;
-            })
-            .collect(Collectors.toList());
-    }
+        List<CopyNumberCountByGene> copyNumberCountByGenes = alterationCountService.getSampleCnaGeneCounts(
+            caseIdentifiers,
+            entrezGeneIds,
+            true,
+            false,
+            alterationFilter).getFirst();
+        Set<String> distinctStudyIds = new HashSet<>(studyIds);
+        if (distinctStudyIds.size() == 1 && !copyNumberCountByGenes.isEmpty()) {
+            return copyNumberCountByGenes
+                .stream()
+                .filter(c -> c.getNumberOfAlteredCases() != null && c.getNumberOfAlteredCases() > 0)
+                .map(entry -> {
+                    int count = entry.getNumberOfAlteredCases();
+                    int alteration = entry.getAlteration();
+                    String label = CNA.getByCode(entry.getAlteration().shortValue()).getDescription();
+
+                    GenomicDataCount genomicDataCount = new GenomicDataCount();
+                    genomicDataCount.setLabel(label);
+                    genomicDataCount.setValue(String.valueOf(alteration));
+                    genomicDataCount.setCount(count);
+
+                    return genomicDataCount;
+                })
+                .collect(Collectors.toList());
+        }
+        return new ArrayList<GenomicDataCount>();
+    };
 
     @Override
     public List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String> sampleIds, List<String> studyIds,u}(j5  (afd12faf5b792b6372b00ae7fb88b631f0add8dej5  Oservice/src/test/java/org/cbioportal/service/impl/StudyViewServiceImplTest.javaj5  modifiedj5  K5j5  K5j5  Kjj5  https://github.com/cBioPortal/cbioportal/blob/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javaj5  https://github.com/cBioPortal/cbioportal/raw/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javaj5  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.java?ref=082f3f56b88555f9ff9a0c1e57bfe7b3bd3326adj5  X  @@ -43,7 +43,7 @@ public class StudyViewServiceImplTest extends BaseServiceImplTest {
     @Mock
     private GenericAssayService genericAssayService;
     @Mock
-    private DiscreteCopyNumberService discreteCopyNumberService;
+    private GeneService geneService;
     private AlterationFilter alterationFilter = new AlterationFilter();
 
     @Test
@@ -259,61 +259,61 @@ public void getCNAAlterationCountByGenes() throws Exception {
     }
 
     @Test
-    public void getCNAAlterationCountByEvent() throws Exception {
+    public void getCNAAlterationCountByGeneSpecific() throws Exception {
 
-        List<Integer> entrezGeneIds = new ArrayList<>();
-        List<Integer> alterations = new ArrayList<>();
+        List<String> sampleIds = Arrays.asList(BaseServiceImplTest.SAMPLE_ID1, BaseServiceImplTest.SAMPLE_ID2, BaseServiceImplTest.SAMPLE_ID3);
+        List<String> studyIds = Collections.nCopies(3, BaseServiceImplTest.STUDY_ID);
+        List<String> hugoGeneSymbols = Arrays.asList(BaseServiceImplTest.HUGO_GENE_SYMBOL_1);
+
+        List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers = new ArrayList<>();
+        MolecularProfileCaseIdentifier profileCaseIdentifier1 = new MolecularProfileCaseIdentifier(BaseServiceImplTest.SAMPLE_ID1, BaseServiceImplTest.MOLECULAR_PROFILE_ID);
+        molecularProfileCaseIdentifiers.add(profileCaseIdentifier1);
+        MolecularProfileCaseIdentifier profileCaseIdentifier2 = new MolecularProfileCaseIdentifier(BaseServiceImplTest.SAMPLE_ID2, BaseServiceImplTest.MOLECULAR_PROFILE_ID);
+        molecularProfileCaseIdentifiers.add(profileCaseIdentifier2);
+        Mockito.when(molecularProfileService.getFirstDiscreteCNAProfileCaseIdentifiers(studyIds, sampleIds))
+            .thenReturn(molecularProfileCaseIdentifiers);
         
-        for (int i = -2; i < 3; i++) {
-            entrezGeneIds.add(BaseServiceImplTest.ENTREZ_GENE_ID_1);
-            alterations.add(i);
-        }
-
-        List<CopyNumberCount> alterationCountByEvents = new ArrayList<>();
-        CopyNumberCount alterationCountByEvent1 = new CopyNumberCount();
-        CopyNumberCount alterationCountByEvent2 = new CopyNumberCount();
-        CopyNumberCount alterationCountByEvent3 = new CopyNumberCount();
-        CopyNumberCount alterationCountByEvent4 = new CopyNumberCount();
-        CopyNumberCount alterationCountByEvent5 = new CopyNumberCount();
+        List<CopyNumberCountByGene> alterationCountByGenes = new ArrayList<>();
+        CopyNumberCountByGene alterationCountByGene1 = new CopyNumberCountByGene();
         
-        alterationCountByEvent1.setMolecularProfileId(BaseServiceImplTest.MOLECULAR_PROFILE_ID);
-        alterationCountByEvent1.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
-        alterationCountByEvent1.setAlteration(-2);
-        alterationCountByEvent1.setNumberOfSamples(5);
-        alterationCountByEvent1.setNumberOfSamplesWithAlterationInGene(1);
-        alterationCountByEvent2.setMolecularProfileId(BaseServiceImplTest.MOLECULAR_PROFILE_ID);
-        alterationCountByEvent2.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
-        alterationCountByEvent2.setAlteration(-1);
-        alterationCountByEvent2.setNumberOfSamples(5);
-        alterationCountByEvent2.setNumberOfSamplesWithAlterationInGene(1);
-        alterationCountByEvent3.setMolecularProfileId(BaseServiceImplTest.MOLECULAR_PROFILE_ID);
-        alterationCountByEvent3.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
-        alterationCountByEvent3.setAlteration(0);
-        alterationCountByEvent3.setNumberOfSamples(5);
-        alterationCountByEvent3.setNumberOfSamplesWithAlterationInGene(1);
-        alterationCountByEvent4.setMolecularProfileId(BaseServiceImplTest.MOLECULAR_PROFILE_ID);
-        alterationCountByEvent4.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
-        alterationCountByEvent4.setAlteration(1);
-        alterationCountByEvent4.setNumberOfSamples(5);
-        alterationCountByEvent4.setNumberOfSamplesWithAlterationInGene(1);
-        alterationCountByEvent5.setMolecularProfileId(BaseServiceImplTest.MOLECULAR_PROFILE_ID);
-        alterationCountByEvent5.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
-        alterationCountByEvent5.setAlteration(2);
-        alterationCountByEvent5.setNumberOfSamples(5);
-        alterationCountByEvent5.setNumberOfSamplesWithAlterationInGene(1);
-        alterationCountByEvents.add(alterationCountByEvent1);
-        alterationCountByEvents.add(alterationCountByEvent2);
-        alterationCountByEvents.add(alterationCountByEvent3);
-        alterationCountByEvents.add(alterationCountByEvent4);
-        alterationCountByEvents.add(alterationCountByEvent5);
-
-        Mockito.when(discreteCopyNumberService.fetchCopyNumberCounts(
-            eq(BaseServiceImplTest.MOLECULAR_PROFILE_ID),
-            eq(entrezGeneIds),
-            eq(alterations)
-)).thenReturn(alterationCountByEvents);
-        List<GenomicDataCount> result = studyViewService.getCNAAlterationCountsByEvent(BaseServiceImplTest.MOLECULAR_PROFILE_ID, entrezGeneIds, alterations);
-        Assert.assertEquals(5, result.size());
+        alterationCountByGene1.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
+        alterationCountByGene1.setAlteration(-2);
+        alterationCountByGene1.setNumberOfAlteredCases(1);
+        alterationCountByGenes.add(alterationCountByGene1);
+
+        CopyNumberCountByGene alterationCountByGene2 = new CopyNumberCountByGene();
+        alterationCountByGene2.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
+        alterationCountByGene2.setAlteration(-1);
+        alterationCountByGene2.setNumberOfAlteredCases(1);
+        alterationCountByGenes.add(alterationCountByGene2);
+
+        CopyNumberCountByGene alterationCountByGene3 = new CopyNumberCountByGene();
+        alterationCountByGene3.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
+        alterationCountByGene3.setAlteration(0);
+        alterationCountByGene3.setNumberOfAlteredCases(1);
+        alterationCountByGenes.add(alterationCountByGene3);
+
+        CopyNumberCountByGene alterationCountByGene4 = new CopyNumberCountByGene();
+        alterationCountByGene4.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
+        alterationCountByGene4.setAlteration(1);
+        alterationCountByGene4.setNumberOfAlteredCases(1);
+        alterationCountByGenes.add(alterationCountByGene4);
+
+        CopyNumberCountByGene alterationCountByGene5 = new CopyNumberCountByGene();
+        alterationCountByGene5.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
+        alterationCountByGene5.setAlteration(2);
+        alterationCountByGene5.setNumberOfAlteredCases(1);
+        alterationCountByGenes.add(alterationCountByGene5);
+
+        Mockito.when(alterationCountService.getSampleCnaGeneCounts(
+            any(),
+            any(),
+            eq(true),
+            eq(false),
+            any(AlterationFilter.class)))
+            .thenReturn(new Pair<>(alterationCountByGenes, 5L));
+        List<GenomicDataCount> result = studyViewService.getCNAAlterationCountsByGeneSpecific(studyIds, sampleIds, hugoGeneSymbols, new AlterationFilter());
+        Assert.assertEquals(5L, result.size());
     }
 
     @Testu}(j5  (6ec6e79dcf3d1379c0949972555c9be8022619cfj5  =web/src/main/java/org/cbioportal/web/StudyViewController.javaj5  modifiedj5  K*j5  Kj5  KAj5  https://github.com/cBioPortal/cbioportal/blob/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj5  https://github.com/cBioPortal/cbioportal/raw/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj5  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=082f3f56b88555f9ff9a0c1e57bfe7b3bd3326adj5  X  @@ -841,29 +841,6 @@ public List<CaseListDataCount> fetchCaseListCounts(
                 .collect(Collectors.toList());
 
     }
-
-    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
-    @RequestMapping(value = "/genomic-data-counts/fetch", method = RequestMethod.POST,
-        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
-    @ApiOperation("Fetch genomic data counts by CopyNumberCountFilter")
-    public ResponseEntity<List<GenomicDataCount>> fetchGenomicDataCounts(
-        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
-        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
-        @ApiParam(required = true, value = "List of copy number count identifiers")
-        @RequestBody CopyNumberCountFilter copyNumberCountFilter
-    ) throws MolecularProfileNotFoundException {
-        String molecularProfileId = copyNumberCountFilter.getMolecularProfileId();
-        int entrezGeneId = copyNumberCountFilter.getEntrezGeneId();
-
-        List<Integer> entrezGeneIds = new ArrayList<>();
-        List<Integer> alterations = DiscreteCopyNumberEventType.ALL.getAlterationTypes();
-        for (int i = 0; i < alterations.size(); i++) entrezGeneIds.add(entrezGeneId);
-        
-        return new ResponseEntity<>(
-            studyViewService.getCNAAlterationCountsByEvent(molecularProfileId, entrezGeneIds, alterations), 
-            HttpStatus.OK
-        );
-    }
     
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/genomic-data-bin-counts/fetch", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@@ -880,6 +857,48 @@ public ResponseEntity<List<GenomicDataBin>> fetchGenomicDataBinCounts(
         return new ResponseEntity<>(studyViewFilterApplier.getDataBins(dataBinMethod, interceptedGenomicDataBinCountFilter), HttpStatus.OK);
     }
 
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @RequestMapping(value = "/genomic-data-counts/fetch", method = RequestMethod.POST,
+        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch genomic data counts by GenomicDataCountFilter")
+    public ResponseEntity<List<GenomicDataCount>> fetchGenomicDataCounts(
+        @ApiParam(required = true, value = "Genomic data bin count filter") @Valid @RequestBody(required = false) GenomicDataCountFilter genomicDataCountFilter,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiParam(required = true, value = "List of copy number count identifiers")
+        @ApiIgnore
+        @Valid @RequestAttribute(required = false, value = "interceptedGenomicDataCountFilter") GenomicDataCountFilter interceptedGenomicDataCountFilter
+    ) throws StudyNotFoundException {
+        List<GenomicDataFilter> gdFilters = interceptedGenomicDataCountFilter.getGenomicDataFilters();
+        StudyViewFilter studyViewFilter = interceptedGenomicDataCountFilter.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 (gdFilters.size() == 1) {
+            studyViewFilterUtil.removeSelfFromGenomicDataFilter(
+                gdFilters.get(0).getHugoGeneSymbol(), 
+                gdFilters.get(0).getProfileType(), 
+                studyViewFilter);
+        }
+        List<SampleIdentifier> filteredSampleIdentifiers = studyViewFilterApplier.apply(studyViewFilter);
+
+        if (filteredSampleIdentifiers.isEmpty()) {
+            return new ResponseEntity<>(new ArrayList<>(), HttpStatus.OK);
+        }
+
+        List<String> studyIds = new ArrayList<>();
+        List<String> sampleIds = new ArrayList<>();
+        studyViewFilterUtil.extractStudyAndSampleIds(filteredSampleIdentifiers, studyIds, sampleIds);
+        
+        List<GenomicDataCount> result = studyViewService.getCNAAlterationCountsByGeneSpecific(
+            studyIds,
+            sampleIds,
+            gdFilters.stream().map(GenomicDataFilter::getHugoGeneSymbol).collect(Collectors.toList()),
+            studyViewFilter.getAlterationFilter());
+
+        return new ResponseEntity<>(result, HttpStatus.OK);
+    }
+    
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/generic-assay-data-counts/fetch", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Fetch generic assay data counts by study view filter")u}(j5  (c01ec7696c1c982450178be39d0a178edd3ad3dcj5  Jweb/src/main/java/org/cbioportal/web/parameter/GenomicDataCountFilter.javaj5  addedj5  Kj5  K j5  Kj5  https://github.com/cBioPortal/cbioportal/blob/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FGenomicDataCountFilter.javaj5  https://github.com/cBioPortal/cbioportal/raw/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FGenomicDataCountFilter.javaj5  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FGenomicDataCountFilter.java?ref=082f3f56b88555f9ff9a0c1e57bfe7b3bd3326adj5  X  @@ -0,0 +1,26 @@
+package org.cbioportal.web.parameter;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class GenomicDataCountFilter implements Serializable {
+
+    private List<GenomicDataFilter> genomicDataFilters;
+    private StudyViewFilter studyViewFilter;
+
+    public List<GenomicDataFilter> getGenomicDataFilters() {
+        return genomicDataFilters;
+    }
+
+    public void setGenomicDataFilters(List<GenomicDataFilter> genomicDataFilters) {
+        this.genomicDataFilters = genomicDataFilters;
+    }
+
+    public StudyViewFilter getStudyViewFilter() {
+        return studyViewFilter;
+    }
+
+    public void setStudyViewFilter(StudyViewFilter studyViewFilter) {
+        this.studyViewFilter = studyViewFilter;
+    }
+}u}(j5  (67be75bdc7000a385d59dbb4c658688aa039cb99j5  Vweb/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.javaj5  modifiedj5  Kj5  K j5  Kj5  https://github.com/cBioPortal/cbioportal/blob/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaj5  https://github.com/cBioPortal/cbioportal/raw/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaj5  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.java?ref=082f3f56b88555f9ff9a0c1e57bfe7b3bd3326adj5  X  @@ -131,6 +131,8 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
             return extractAttributesFromClinicalDataBinCountFilter(request);
         } else if (requestPathInfo.equals(STUDY_VIEW_GENOMICL_DATA_BIN_COUNTS_PATH)) {
             return extractAttributesFromGenomicDataBinCountFilter(request);
+        } else if (requestPathInfo.equals(STUDY_VIEW_GENOMICL_DATA_COUNTS_PATH)) {
+            return extractAttributesFromGenomicDataCountFilter(request);
         } else if (requestPathInfo.equals(STUDY_VIEW_GENERIC_ASSAY_DATA_BIN_COUNTS_PATH)) {
             return extractAttributesFromGenericAssayDataBinCountFilter(request);
         } else if (requestPathInfo.equals(STUDY_VIEW_GENERIC_ASSAY_DATA_COUNTS_PATH)) {
@@ -478,6 +480,26 @@ private boolean extractAttributesFromGenomicDataBinCountFilter(HttpServletReques
         return true;
     }
 
+    private boolean extractAttributesFromGenomicDataCountFilter(HttpServletRequest request) {
+        try {
+            GenomicDataCountFilter genomicDataCountFilter = objectMapper.readValue(request.getInputStream(),
+                GenomicDataCountFilter.class);
+            LOG.debug("extracted genomicDataCountFilter: " + genomicDataCountFilter.toString());
+            LOG.debug("setting interceptedGenomicDataCountFilter to " + genomicDataCountFilter);
+            request.setAttribute("interceptedGenomicDataCountFilter", genomicDataCountFilter);
+            if (cacheMapUtil.hasCacheEnabled()) {
+                Collection<String> cancerStudyIdCollection = extractCancerStudyIdsFromGenomicDataCountFilter(
+                    genomicDataCountFilter);
+                LOG.debug("setting involvedCancerStudies to " + cancerStudyIdCollection);
+                request.setAttribute("involvedCancerStudies", cancerStudyIdCollection);
+            }
+        } catch (Exception e) {
+            LOG.error("exception thrown during extraction of genomicDataBinCountFilter: " + e);
+            return false;
+        }
+        return true;
+    }
+
     private boolean extractAttributesFromGenericAssayDataBinCountFilter(HttpServletRequest request) {
         try {
             GenericAssayDataBinCountFilter genericAssayDataBinCountFilter = objectMapper
@@ -723,6 +745,14 @@ private Set<String> extractCancerStudyIdsFromGenomicDataBinCountFilter(
         return new HashSet<String>();
     }
 
+    private Set<String> extractCancerStudyIdsFromGenomicDataCountFilter(
+        GenomicDataCountFilter genomicDataCountFilter) {
+        if (genomicDataCountFilter.getStudyViewFilter() != null) {
+            return extractCancerStudyIdsFromStudyViewFilter(genomicDataCountFilter.getStudyViewFilter());
+        }
+        return new HashSet<String>();
+    }
+
     private Set<String> extractCancerStudyIdsFromGenericAssayDataBinCountFilter(
             GenericAssayDataBinCountFilter genericAssayDataBinCountFilter) {
         if (genericAssayDataBinCountFilter.getStudyViewFilter() != null) {u}(j5  (ecf5bdab85cceb359f2f511895ea0a4e26cbd0b9j5  Bweb/src/main/java/org/cbioportal/web/util/StudyViewFilterUtil.javaj5  modifiedj5  Kj5  Kj5  Kj5  https://github.com/cBioPortal/cbioportal/blob/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javaj5  https://github.com/cBioPortal/cbioportal/raw/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javaj5  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.java?ref=082f3f56b88555f9ff9a0c1e57bfe7b3bd3326adj5  X  @@ -45,19 +45,27 @@ public void extractStudyAndSampleIds(
     }
 
     public void removeSelfFromFilter(String attributeId, StudyViewFilter studyViewFilter) {
-        if (studyViewFilter!= null && studyViewFilter.getClinicalDataFilters() != null) {
+        if (studyViewFilter != null && studyViewFilter.getClinicalDataFilters() != null) {
             studyViewFilter.getClinicalDataFilters().removeIf(f -> f.getAttributeId().equals(attributeId));
         }
     }
+    
+    public void removeSelfFromGenomicDataFilter(String hugoGeneSymbol, String profileType, StudyViewFilter studyViewFilter) {
+        if (studyViewFilter != null && studyViewFilter.getGenomicDataFilters() != null) {
+            studyViewFilter.getGenomicDataFilters().removeIf(f -> 
+                f.getHugoGeneSymbol().equals(hugoGeneSymbol) && f.getProfileType().equals(profileType)
+            );
+        }
+    }
 
     public void removeSelfFromGenericAssayFilter(String stableId, StudyViewFilter studyViewFilter) {
-        if (studyViewFilter!= null && studyViewFilter.getGenericAssayDataFilters() != null) {
+        if (studyViewFilter != null && studyViewFilter.getGenericAssayDataFilters() != null) {
             studyViewFilter.getGenericAssayDataFilters().removeIf(f -> f.getStableId().equals(stableId));
         }
     }
 
     public void removeSelfCustomDataFromFilter(String attributeId, StudyViewFilter studyViewFilter) {
-        if (studyViewFilter!= null && studyViewFilter.getCustomDataFilters() != null) {
+        if (studyViewFilter != null && studyViewFilter.getCustomDataFilters() != null) {
             studyViewFilter.getCustomDataFilters().removeIf(f -> f.getAttributeId().equals(attributeId));
         }
     }u}(j5  (e72672c10cdab44b8e97a8ca4a51c74ffd627469j5  Aweb/src/test/java/org/cbioportal/web/StudyViewControllerTest.javaj5  modifiedj5  Kj5  K
j5  K"j5  https://github.com/cBioPortal/cbioportal/blob/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj5  https://github.com/cBioPortal/cbioportal/raw/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326ad/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj5  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.java?ref=082f3f56b88555f9ff9a0c1e57bfe7b3bd3326adj5  X
  @@ -64,7 +64,7 @@ public class StudyViewControllerTest {
     private static final Integer TEST_CLINICAL_EVENT_TYPE_COUNT = 513;
     private static final String TEST_CNA_ALTERATION_NAME = "test_cna_event_type";
     private static final String TEST_CNA_ALTERATION_VALUE = "2";
-    private static final String TEST_MOLECULAR_PROFILE_ID = "test_molecular_profile_id";
+    private static final String TEST_MOLECULAR_PROFILE_TYPE = "test_molecular_profile_type";
 
     private List<SampleIdentifier> filteredSampleIdentifiers = new ArrayList<>();
     private List<ClinicalData> clinicalData = new ArrayList<>();
@@ -512,31 +512,39 @@ public void fetchSampleCounts() throws Exception {
 
     @Test
     public void fetchGenomicDataCounts() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+        
         List<GenomicDataCount> genomicDataCounts = new ArrayList<>();
         GenomicDataCount genomicDataCount1 = new GenomicDataCount();
         genomicDataCount1.setLabel(TEST_CNA_ALTERATION_NAME);
         genomicDataCount1.setValue(TEST_CNA_ALTERATION_VALUE);
         genomicDataCount1.setCount(1);
         genomicDataCounts.add(genomicDataCount1);
-
-        List<Integer> entrezGeneIds = new ArrayList<>();
-        List<Integer> alterations = DiscreteCopyNumberEventType.ALL.getAlterationTypes();
-        for (int i = 0; i < alterations.size(); i++) entrezGeneIds.add(TEST_ENTREZ_GENE_ID_1);
         
-        when(studyViewService.getCNAAlterationCountsByEvent(
-            eq(TEST_MOLECULAR_PROFILE_ID),
-            eq(entrezGeneIds),
-            eq(alterations)))
+        when(studyViewService.getCNAAlterationCountsByGeneSpecific(
+            anyList(),
+            anyList(),
+            anyList(),
+            any(AlterationFilter.class)))
             .thenReturn(genomicDataCounts);
 
-        CopyNumberCountFilter copyNumberCountFilter = new CopyNumberCountFilter();
-        copyNumberCountFilter.setEntrezGeneId(TEST_ENTREZ_GENE_ID_1);
-        copyNumberCountFilter.setMolecularProfileId(TEST_MOLECULAR_PROFILE_ID);
+        GenomicDataCountFilter genomicDataCountFilter = new GenomicDataCountFilter();
+        List<GenomicDataFilter> genomicDataFilters = new ArrayList<>();
+        GenomicDataFilter genomicDataFilter1 = new GenomicDataFilter();
+        genomicDataFilter1.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_1);
+        genomicDataFilter1.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataFilters.add(genomicDataFilter1);
+        genomicDataCountFilter.setGenomicDataFilters(genomicDataFilters);
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+        studyViewFilter.setAlterationFilter(alterationFilter);
+        genomicDataCountFilter.setStudyViewFilter(studyViewFilter);
         
         mockMvc.perform(MockMvcRequestBuilders.post("/genomic-data-counts/fetch")
                 .accept(MediaType.APPLICATION_JSON)
                 .contentType(MediaType.APPLICATION_JSON)
-                .content(objectMapper.writeValueAsString(copyNumberCountFilter)))
+                .content(objectMapper.writeValueAsString(genomicDataCountFilter)))
             .andExpect(MockMvcResultMatchers.status().isOk())
             .andExpect(MockMvcResultMatchers.content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))
             .andExpect(MockMvcResultMatchers.jsonPath("$[0].label").value(TEST_CNA_ALTERATION_NAME))ueu(4be9db4426d0921ce511af3538fe09224dd075cd}(sha(4be9db4426d0921ce511af3538fe09224dd075cdnode_idEC_kwDOAe-hB9oAKDRiZTlkYjQ0MjZkMDkyMWNlNTExYWYzNTM4ZmUwOTIyNGRkMDc1Y2Qcommit}(author}(name
Onur Sumeremails.onur.sumer@gmail.comdate2023-07-26T18:14:22Zu	committer}(j?6  GitHubjA6  noreply@github.comjC6  2023-07-26T18:14:22ZumessageMget mutation data from genomic event table instead of mutation table (#10289)tree}(j76  (5da07d4bf80981f2dd56b5aeab415ea3998610a4urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/5da07d4bf80981f2dd56b5aeab415ea3998610a4ujO6  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/4be9db4426d0921ce511af3538fe09224dd075cd
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkwWJ+CRBK7hj4Ov3rIwAA2d4IAAYzkfgDqkhprPCFfeABjLod
jhou6Y0ya+VSRG2fxqn6+03yZRRoZO8l8JUr+3su4X/sg1sDlULBW5dt2FR9p0qG
OkWENCfwa3IELVWPgAoDjD5VZpPu8gRdfI9uJIV10NwOmg9JZWyJkpKk4VgqUT7k
xzFbRPJgtqtTYIuoGgcpGZgONH7+N5PAU+hyQkma2KCAx7ucmEYtONTjKjGXBzWD
9fPBGRcy+oqsnHEJXQ1BjIs7b29p5/SbE5ACF0hLmJAMVjhSw1Z29LPDok884abe
YZVe4jx+2QwtUzxT1UyGOzf99w7B+ONckMXnuhVtAqj3+yC3V7ASiZR5Pz5Pt5A=
=DIFm
-----END PGP SIGNATURE-----
payloadX!  tree 5da07d4bf80981f2dd56b5aeab415ea3998610a4
parent 69875808bee06e7c7a310712b580da6de58bcea7
author Onur Sumer <s.onur.sumer@gmail.com> 1690395262 -0400
committer GitHub <noreply@github.com> 1690395262 -0400

get mutation data from genomic event table instead of mutation table (#10289)

uujO6  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4be9db4426d0921ce511af3538fe09224dd075cdhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/4be9db4426d0921ce511af3538fe09224dd075cdcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/4be9db4426d0921ce511af3538fe09224dd075cd/commentsj=6  }(login	onursumeridJ6 j96  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5jO6  &https://api.github.com/users/onursumerj]6  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminujE6  }(jb6  web-flowjd6  J/j96  MDQ6VXNlcjE5ODY0NDQ3jf6  4https://avatars.githubusercontent.com/u/19864447?v=4jh6  h5jO6  %https://api.github.com/users/web-flowj]6  https://github.com/web-flowjk6  /https://api.github.com/users/web-flow/followersjm6  <https://api.github.com/users/web-flow/following{/other_user}jo6  5https://api.github.com/users/web-flow/gists{/gist_id}jq6  <https://api.github.com/users/web-flow/starred{/owner}{/repo}js6  3https://api.github.com/users/web-flow/subscriptionsju6  *https://api.github.com/users/web-flow/orgsjw6  +https://api.github.com/users/web-flow/reposjy6  6https://api.github.com/users/web-flow/events{/privacy}j{6  5https://api.github.com/users/web-flow/received_eventsj}6  Userj6  uparents]}(j76  (69875808bee06e7c7a310712b580da6de58bcea7jO6  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/69875808bee06e7c7a310712b580da6de58bcea7j]6  Xhttps://github.com/cBioPortal/cbioportal/commit/69875808bee06e7c7a310712b580da6de58bcea7uastats}(totalK	additionsK	deletionsKufiles]}(j76  (4bbc93232d1885633b696e2d563f43d8e58ed818filenametpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmlstatusmodifiedj6  Kj6  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/4be9db4426d0921ce511af3538fe09224dd075cd/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/4be9db4426d0921ce511af3538fe09224dd075cd/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=4be9db4426d0921ce511af3538fe09224dd075cdpatchX  @@ -31,14 +31,15 @@
             COUNT(DISTINCT sample_unique_id) as numberOfProfiledCases,
             COUNT(DISTINCT sample_unique_id) as numberOfAlteredCases,
             COUNT(*) as totalCount
-        FROM mutation
+        FROM genomic_event
         <where>
-           sample_unique_id IN ( <include refid="sampleUniqueIdsFromStudyViewFilter"/>
+            variant_type = 'mutation'
+            AND
+            sample_unique_id IN ( <include refid="sampleUniqueIdsFromStudyViewFilter"/>
             <if test="applyPatientIdFilters == true">
                 INTERSECT <include refid="getSampleIdsFromPatientIds"/>
             </if> 
             )
-
         </where>
         GROUP BY hugo_gene_symbol
         ORDER BY totalCount DESC;uau(e13a985c9a3d1715a9b9e4302497a0f0eba54042}(sha(e13a985c9a3d1715a9b9e4302497a0f0eba54042node_idEC_kwDOAe-hB9oAKGUxM2E5ODVjOWEzZDE3MTVhOWI5ZTQzMDI0OTdhMGYwZWJhNTQwNDIcommit}(author}(nameSowmiyaa Kumaremail1109506589+sowmiyaa-kumar@users.noreply.github.comdate2023-06-20T17:01:17Zu	committer}(j6  GitHubj6  noreply@github.comj6  2023-06-20T17:01:17ZumessageUpdate validateData.py

Fixed an error in naming alleles for the mutation file checks in SNP, DNP, and TNP. (tumor_seq_allele1 was repeated twice, instead of tumor_seq_allele2)tree}(j6  (246baab5757d50b82461d828ffac4d1b7bde720durlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/246baab5757d50b82461d828ffac4d1b7bde720duj6  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/e13a985c9a3d1715a9b9e4302497a0f0eba54042
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkkdtdCRBK7hj4Ov3rIwAAhREIABrWRCnV4vzKBPMerSu6LiH+
WlYN1NX0ivSsvZ6uWj4hq96mHQTOgfpMJMZRU600vK+2BxshaliZYSOCKkJIF2XZ
2MK60V5VwEcCodlW2+a0AWF7JbRXYPvDIcCHTKJmPykCz02/h3lEuAEMAarnfVrQ
SgDFhmMX6YcHxFRWdFZ1/RKZVhvEb2XwOT6rCxSbCN1fmvmbpumeQNzCbfcCJRFN
I8FV1MGIJxjViKHDpX7ooySlWEjKf8+pSM6+byVlv8a1xKtSab0rT+xSySqA+Dyz
SdS0qG1F1x+RgiiFubBT2GJr1cAWAnewa/sSXujDIRf0PeSqxes336JLKk65CMk=
=Svcq
-----END PGP SIGNATURE-----
payloadX  tree 246baab5757d50b82461d828ffac4d1b7bde720d
parent 15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0
author Sowmiyaa Kumar <109506589+sowmiyaa-kumar@users.noreply.github.com> 1687280477 +0200
committer GitHub <noreply@github.com> 1687280477 +0200

Update validateData.py

Fixed an error in naming alleles for the mutation file checks in SNP, DNP, and TNP. (tumor_seq_allele1 was repeated twice, instead of tumor_seq_allele2)uuj6  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/e13a985c9a3d1715a9b9e4302497a0f0eba54042html_urlXhttps://github.com/cBioPortal/cbioportal/commit/e13a985c9a3d1715a9b9e4302497a0f0eba54042comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/e13a985c9a3d1715a9b9e4302497a0f0eba54042/commentsj6  }(loginsowmiyaa-kumaridJj6  U_kgDOBobwHQ
avatar_url5https://avatars.githubusercontent.com/u/109506589?v=4gravatar_idh5j6  +https://api.github.com/users/sowmiyaa-kumarj6  !https://github.com/sowmiyaa-kumar
followers_url5https://api.github.com/users/sowmiyaa-kumar/followers
following_urlBhttps://api.github.com/users/sowmiyaa-kumar/following{/other_user}	gists_url;https://api.github.com/users/sowmiyaa-kumar/gists{/gist_id}starred_urlBhttps://api.github.com/users/sowmiyaa-kumar/starred{/owner}{/repo}subscriptions_url9https://api.github.com/users/sowmiyaa-kumar/subscriptionsorganizations_url0https://api.github.com/users/sowmiyaa-kumar/orgs	repos_url1https://api.github.com/users/sowmiyaa-kumar/repos
events_url<https://api.github.com/users/sowmiyaa-kumar/events{/privacy}received_events_url;https://api.github.com/users/sowmiyaa-kumar/received_eventstypeUser
site_adminuj6  }(j6  web-flowj6  J/j6  MDQ6VXNlcjE5ODY0NDQ3j6  4https://avatars.githubusercontent.com/u/19864447?v=4j6  h5j6  %https://api.github.com/users/web-flowj6  https://github.com/web-flowj6  /https://api.github.com/users/web-flow/followersj6  <https://api.github.com/users/web-flow/following{/other_user}j6  5https://api.github.com/users/web-flow/gists{/gist_id}j6  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j6  3https://api.github.com/users/web-flow/subscriptionsj6  *https://api.github.com/users/web-flow/orgsj6  +https://api.github.com/users/web-flow/reposj6  6https://api.github.com/users/web-flow/events{/privacy}j6  5https://api.github.com/users/web-flow/received_eventsj6  Userj6  uparents]}(j6  (15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0j6  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0j6  Xhttps://github.com/cBioPortal/cbioportal/commit/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0uastats}(totalK	additionsK	deletionsKufiles]}(j6  (9ed0d2e30261c615f048480d1ba3cad52af3b61efilename.core/src/main/scripts/importer/validateData.pystatusmodifiedj7  Kj7  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/e13a985c9a3d1715a9b9e4302497a0f0eba54042/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.pyraw_urlhttps://github.com/cBioPortal/cbioportal/raw/e13a985c9a3d1715a9b9e4302497a0f0eba54042/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.pycontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.py?ref=e13a985c9a3d1715a9b9e4302497a0f0eba54042patchX  @@ -1928,23 +1928,23 @@ def checkAlleleMAFFormat(self, data):
 
             if variant_type == "SNP":
                 # Expect alleles to have length 2 when variant type is SNP
-                if not (len(ref_allele) == 1 and len(tumor_seq_allele1) == 1 and len(tumor_seq_allele1) == 1):
+                if not (len(ref_allele) == 1 and len(tumor_seq_allele1) == 1 and len(tumor_seq_allele2) == 1):
                     log_message = "Variant_Type indicates a SNP, but length of Reference_Allele, Tumor_Seq_Allele1 " \
                                   "and/or Tumor_Seq_Allele2 do not equal 1."
                     extra_dict = {'line_number': self.line_number,
                                   'cause': '(%s, %s, %s)' % (ref_allele, tumor_seq_allele1, tumor_seq_allele2)}
                     self.send_log_message(self.strict_maf_checks, log_message, extra_dict)
             if variant_type == "DNP":
                 # Expect alleles to have length 2 when variant type is DNP
-                if not (len(ref_allele) == 2 and len(tumor_seq_allele1) == 2 and len(tumor_seq_allele1) == 2):
+                if not (len(ref_allele) == 2 and len(tumor_seq_allele1) == 2 and len(tumor_seq_allele2) == 2):
                     log_message = "Variant_Type indicates a DNP, but length of Reference_Allele, Tumor_Seq_Allele1 " \
                                   "and/or Tumor_Seq_Allele2 do not equal 2."
                     extra_dict = {'line_number': self.line_number,
                                   'cause': '(%s, %s, %s)' % (ref_allele, tumor_seq_allele1, tumor_seq_allele2)}
                     self.send_log_message(self.strict_maf_checks, log_message, extra_dict)
             if variant_type == "TNP":
                 # Expect alleles to have length 3 when variant type is TNP
-                if not (len(ref_allele) == 3 and len(tumor_seq_allele1) == 3 and len(tumor_seq_allele1) == 3):
+                if not (len(ref_allele) == 3 and len(tumor_seq_allele1) == 3 and len(tumor_seq_allele2) == 3):
                     log_message = "Variant_Type indicates a TNP, but length of Reference_Allele, Tumor_Seq_Allele1 " \
                                   "and/or Tumor_Seq_Allele2 do not equal 3."
                     extra_dict = {'line_number': self.line_number,uau(370afe33a7127a550c63fbb708034ed21f5a1b70}(sha(370afe33a7127a550c63fbb708034ed21f5a1b70node_idEC_kwDOAe-hB9oAKDM3MGFmZTMzYTcxMjdhNTUwYzYzZmJiNzA4MDM0ZWQyMWY1YTFiNzAcommit}(author}(nameritikakundraemailkundrar@mskcc.orgdate2023-06-08T17:29:41Zu	committer}(j-7  GitHubj/7  noreply@github.comj17  2023-06-08T17:29:41ZumessageUpdate overview.mdtree}(j%7  (fd0dbb5d5abeb0a389926d2a8a724130d32257e0urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/fd0dbb5d5abeb0a389926d2a8a724130d32257e0uj=7  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/370afe33a7127a550c63fbb708034ed21f5a1b70
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkghAFCRBK7hj4Ov3rIwAAdmcIAG3Vp9TDZ8Nhuq/XiZ78n4rQ
G85Z/s/RBWF4JvYqTgV6Tu9qxwX6wEjx5jo02QpQ8Oj8Lh3RCTbVTPQwZAGN41B9
MxA0ptNYR4h92dLtt/78/hsWdJCJxBCRia7T5/aBAZLwIAKClMIELIIqg6NscA46
3NHsTeAVARJpXfIbrJmwKxZAfXfgkHmElYsj3uAJetANF0uyqkV1h+hVEqSqdNeT
pUv80G6KHTg63mG35SKpboP9i/rYoc3lKiil3D4JD4l4rLjZS6OM7C2OL3Wt1xO+
nGXStBD6JbWohnxYmAgCF22r7fz43e4dJohilxIYr9C0chyzTBbZMDUY3/k8Bsg=
=9oaA
-----END PGP SIGNATURE-----
payloadtree fd0dbb5d5abeb0a389926d2a8a724130d32257e0
parent 100d642e70a4ac4db1eccefc5de684bc40ea0cfb
author ritikakundra <kundrar@mskcc.org> 1686245381 -0400
committer GitHub <noreply@github.com> 1686245381 -0400

Update overview.mduuj=7  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/370afe33a7127a550c63fbb708034ed21f5a1b70html_urlXhttps://github.com/cBioPortal/cbioportal/commit/370afe33a7127a550c63fbb708034ed21f5a1b70comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/370afe33a7127a550c63fbb708034ed21f5a1b70/commentsj+7  }(loginritikakundraidJ9 j'7  MDQ6VXNlcjEyMDA3ODYy
avatar_url4https://avatars.githubusercontent.com/u/12007862?v=4gravatar_idh5j=7  )https://api.github.com/users/ritikakundrajK7  https://github.com/ritikakundra
followers_url3https://api.github.com/users/ritikakundra/followers
following_url@https://api.github.com/users/ritikakundra/following{/other_user}	gists_url9https://api.github.com/users/ritikakundra/gists{/gist_id}starred_url@https://api.github.com/users/ritikakundra/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/ritikakundra/subscriptionsorganizations_url.https://api.github.com/users/ritikakundra/orgs	repos_url/https://api.github.com/users/ritikakundra/repos
events_url:https://api.github.com/users/ritikakundra/events{/privacy}received_events_url9https://api.github.com/users/ritikakundra/received_eventstypeUser
site_adminuj37  }(jP7  web-flowjR7  J/j'7  MDQ6VXNlcjE5ODY0NDQ3jT7  4https://avatars.githubusercontent.com/u/19864447?v=4jV7  h5j=7  %https://api.github.com/users/web-flowjK7  https://github.com/web-flowjY7  /https://api.github.com/users/web-flow/followersj[7  <https://api.github.com/users/web-flow/following{/other_user}j]7  5https://api.github.com/users/web-flow/gists{/gist_id}j_7  <https://api.github.com/users/web-flow/starred{/owner}{/repo}ja7  3https://api.github.com/users/web-flow/subscriptionsjc7  *https://api.github.com/users/web-flow/orgsje7  +https://api.github.com/users/web-flow/reposjg7  6https://api.github.com/users/web-flow/events{/privacy}ji7  5https://api.github.com/users/web-flow/received_eventsjk7  Userjm7  uparents]}(j%7  (100d642e70a4ac4db1eccefc5de684bc40ea0cfbj=7  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/100d642e70a4ac4db1eccefc5de684bc40ea0cfbjK7  Xhttps://github.com/cBioPortal/cbioportal/commit/100d642e70a4ac4db1eccefc5de684bc40ea0cfbuastats}(totalK	additionsKi      	deletionsK ufiles]}(j%7  (ae18a16339e01dd259c822005bb4b29dc1ba5734filenamedocs/user-guide/overview.mdstatusmodifiedj7  Kj7  K changesKblob_urlvhttps://github.com/cBioPortal/cbioportal/blob/370afe33a7127a550c63fbb708034ed21f5a1b70/docs%2Fuser-guide%2Foverview.mdraw_urluhttps://github.com/cBioPortal/cbioportal/raw/370afe33a7127a550c63fbb708034ed21f5a1b70/docs%2Fuser-guide%2Foverview.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fuser-guide%2Foverview.md?ref=370afe33a7127a550c63fbb708034ed21f5a1b70patchXg  @@ -28,6 +28,7 @@ Short videos that show how to perform specific analyses or how to use specific p
 6. How to explore the data in a study [youtube.com](https://www.youtube.com/watch?v=N8ffDgkqDWc)
 7. How to run a query for genes of interest [youtube.com](https://www.youtube.com/watch?v=MH-kY5usA70)
 8. How to download data [youtube.com](https://www.youtube.com/watch?v=JId304dp3tc)
+9. Navigating AACR GENIE - Biopharma Collaborative (BPC) dataset [youtube.com](https://www.youtube.com/playlist?list=PLE2tjlUyHL8Gn4ythnuvf2BxWJVpAxkMM)
 
 ### Documentation
 * Frequently Asked Questions [FAQ](/user-guide/faq.md)uau(b8074ea9846c1e10264d2e93d973692c97cb1a3b}(sha(b8074ea9846c1e10264d2e93d973692c97cb1a3bnode_idEC_kwDOAe-hB9oAKGI4MDc0ZWE5ODQ2YzFlMTAyNjRkMmU5M2Q5NzM2OTJjOTdjYjFhM2Icommit}(author}(name
Ino de Bruijnemailino@ino.biodate2023-08-03T16:22:31Zu	committer}(j7  GitHubj7  noreply@github.comj7  2023-08-03T16:22:31Zumessagechange wording slightlytree}(j7  (6fb89b61092212c00fc070e7b843c8c1f3d43d01urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/6fb89b61092212c00fc070e7b843c8c1f3d43d01uj7  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/b8074ea9846c1e10264d2e93d973692c97cb1a3b
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJky9RHCRBK7hj4Ov3rIwAAqf0IAGTRaYsPiMxpj0bR+T9NBUUD
a9ltHofhUVKARfUfNhUNEf6LyF55ygnl1eSp58Y0Ec2w+TlOZ3BWLq8kk+NwY+6K
oM1z8+ATNFfxhR9v71XFj1BDeAXhZ73P0VJ5FpzgsqYWGqzTIU7S1aaJu+rB2uTC
yuHAzdNFNlv5b+oxY4SPmAYAip27Pw8SGNYcMp2OOoz40baK3B/hNcpZyxNof6R1
xEJjTo0lcS/3QqgYf/kbfZPV/e0tUlUGiiNqs5Q0LlG9Dex0QIKu1V1QS5O1CGRo
UAEjEBDxfcd61PZcUnd5nrngVwnVrAC17AYP60pjPn2cn0yz1p8Wk4sdDhoKqPk=
=cZYO
-----END PGP SIGNATURE-----
payloadtree 6fb89b61092212c00fc070e7b843c8c1f3d43d01
parent e9b53ef6f81b1b7f18464852a3dad5bd950a302f
author Ino de Bruijn <ino@ino.bio> 1691079751 -0400
committer GitHub <noreply@github.com> 1691079751 -0400

change wording slightlyuuj7  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b8074ea9846c1e10264d2e93d973692c97cb1a3bhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/b8074ea9846c1e10264d2e93d973692c97cb1a3bcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/b8074ea9846c1e10264d2e93d973692c97cb1a3b/commentsj7  }(logininodbidJZ j7  MDQ6VXNlcjEzMzQwMDQ=
avatar_url3https://avatars.githubusercontent.com/u/1334004?v=4gravatar_idh5j7  "https://api.github.com/users/inodbj7  https://github.com/inodb
followers_url,https://api.github.com/users/inodb/followers
following_url9https://api.github.com/users/inodb/following{/other_user}	gists_url2https://api.github.com/users/inodb/gists{/gist_id}starred_url9https://api.github.com/users/inodb/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/inodb/subscriptionsorganizations_url'https://api.github.com/users/inodb/orgs	repos_url(https://api.github.com/users/inodb/repos
events_url3https://api.github.com/users/inodb/events{/privacy}received_events_url2https://api.github.com/users/inodb/received_eventstypeUser
site_adminuj7  }(j7  web-flowj7  J/j7  MDQ6VXNlcjE5ODY0NDQ3j7  4https://avatars.githubusercontent.com/u/19864447?v=4j7  h5j7  %https://api.github.com/users/web-flowj7  https://github.com/web-flowj7  /https://api.github.com/users/web-flow/followersj7  <https://api.github.com/users/web-flow/following{/other_user}j7  5https://api.github.com/users/web-flow/gists{/gist_id}j7  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j7  3https://api.github.com/users/web-flow/subscriptionsj7  *https://api.github.com/users/web-flow/orgsj7  +https://api.github.com/users/web-flow/reposj7  6https://api.github.com/users/web-flow/events{/privacy}j7  5https://api.github.com/users/web-flow/received_eventsj7  Userj7  uparents]}(j7  (e9b53ef6f81b1b7f18464852a3dad5bd950a302fj7  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/e9b53ef6f81b1b7f18464852a3dad5bd950a302fj7  Xhttps://github.com/cBioPortal/cbioportal/commit/e9b53ef6f81b1b7f18464852a3dad5bd950a302fuastats}(totalK	additionsK	deletionsKufiles]}(j7  (f0cc07c7a91a0c11477a01b9ad7223afdf85d0e5filenamedocs/News.mdstatusmodifiedj7  Kj7  KchangesKblob_urlehttps://github.com/cBioPortal/cbioportal/blob/b8074ea9846c1e10264d2e93d973692c97cb1a3b/docs%2FNews.mdraw_urldhttps://github.com/cBioPortal/cbioportal/raw/b8074ea9846c1e10264d2e93d973692c97cb1a3b/docs%2FNews.mdcontents_urlwhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FNews.md?ref=b8074ea9846c1e10264d2e93d973692c97cb1a3bpatchX  @@ -1,13 +1,13 @@
 ## Aug 1, 2023
-*   **Enhancement**: This enhancement involves changing one-sided Fisher's exact tests to two-sided Fisher's exact tests, which will impact the calculation of p-values and q-values in several places. The affected areas are as follows:
+*   **Enhancement**: One-sided Fisher's exact tests were changed to two-sided Fisher's exact tests. The affected areas are as follows:
     *    Results View Page - Mutual Exclusivity Tab
     *    Results View Page - Comparison Tab - Genomic Alterations Tab
     *    Comparison Page - Genomic Alterations Tab
     *    Comparison Page - Mutations Tab
     
-    Please note that the Mutations tab is our new feature and when it was introduced to cBioPortal, it's already started using two-sided Fisher's exact tests.
+    Please note that the Comparison page Mutations tab is a recent feature and was introduced with two-sided Fisher's exact test already implemented.
 
-    To learn discussion about this change, please see our discussion [here](https://github.com/cBioPortal/cbioportal/issues/9943).
+    Several users pointed out that using a one-sided test was incorrect for these comparisons. Please see discussions [here](https://github.com/cBioPortal/cbioportal/issues/9943) for more information.
 
 ## May 2, 2023
 *   **New Feature**: The mutations tab now shows variant annotations from the [repository of Variant with Unexpected Effects (reVUE)](https://www.cancerrevue.org/).uau(24158cdb1aeb4c7a6e82add9885e57a646f08954}(sha(24158cdb1aeb4c7a6e82add9885e57a646f08954node_idEC_kwDOAe-hB9oAKDI0MTU4Y2RiMWFlYjRjN2E2ZTgyYWRkOTg4NWU1N2E2NDZmMDg5NTQcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-16T22:37:41Zu	committer}(j8  Djokovic0311j8  .55948986+Djokovic0311@users.noreply.github.comj8  2023-08-16T22:37:41Zumessageupdate importstree}(j8  (cae6436be945fbd5f159dc069f17fd5c0c9cf7e5urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/cae6436be945fbd5f159dc069f17fd5c0c9cf7e5uj+8  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/24158cdb1aeb4c7a6e82add9885e57a646f08954
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj+8  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/24158cdb1aeb4c7a6e82add9885e57a646f08954html_urlXhttps://github.com/cBioPortal/cbioportal/commit/24158cdb1aeb4c7a6e82add9885e57a646f08954comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/24158cdb1aeb4c7a6e82add9885e57a646f08954/commentsj8  }(loginDjokovic0311idJUj8  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5j+8  )https://api.github.com/users/Djokovic0311j78  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminuj!8  }(j<8  Djokovic0311j>8  JUj8  MDQ6VXNlcjU1OTQ4OTg2j@8  4https://avatars.githubusercontent.com/u/55948986?v=4jB8  h5j+8  )https://api.github.com/users/Djokovic0311j78  https://github.com/Djokovic0311jE8  3https://api.github.com/users/Djokovic0311/followersjG8  @https://api.github.com/users/Djokovic0311/following{/other_user}jI8  9https://api.github.com/users/Djokovic0311/gists{/gist_id}jK8  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}jM8  7https://api.github.com/users/Djokovic0311/subscriptionsjO8  .https://api.github.com/users/Djokovic0311/orgsjQ8  /https://api.github.com/users/Djokovic0311/reposjS8  :https://api.github.com/users/Djokovic0311/events{/privacy}jU8  9https://api.github.com/users/Djokovic0311/received_eventsjW8  UserjY8  uparents]}(j8  (7bf56d21bb9d125ace26174447244b57fad7b592j+8  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7bf56d21bb9d125ace26174447244b57fad7b592j78  Xhttps://github.com/cBioPortal/cbioportal/commit/7bf56d21bb9d125ace26174447244b57fad7b592uastats}(totalK	additionsK	deletionsKufiles](}(j8  (017a5ab005ff8e170b4aa7ce9ab2ec1652d4dba4filename\service/src/test/java/org/cbioportal/service/impl/GenericAssayEnrichmentServiceImplTest.javastatusmodifiedjs8  Kjt8  KchangesK
blob_urlhttps://github.com/cBioPortal/cbioportal/blob/24158cdb1aeb4c7a6e82add9885e57a646f08954/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/24158cdb1aeb4c7a6e82add9885e57a646f08954/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.java?ref=24158cdb1aeb4c7a6e82add9885e57a646f08954patchXi  @@ -1,7 +1,18 @@
 package org.cbioportal.service.impl;
 
-import org.cbioportal.model.*;
 import org.cbioportal.model.meta.GenericAssayMeta;
+import org.cbioportal.model.EnrichmentType;
+import org.cbioportal.model.MolecularProfileCaseIdentifier;
+import org.cbioportal.model.MolecularProfile;
+import org.cbioportal.model.MolecularProfileSamples;
+import org.cbioportal.model.CancerStudy;
+import org.cbioportal.model.ReferenceGenome;
+import org.cbioportal.model.Sample;
+import org.cbioportal.model.GenericAssayMolecularAlteration;
+import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
+import org.cbioportal.model.GroupStatistics;
+
 import org.cbioportal.persistence.MolecularDataRepository;
 import org.cbioportal.service.GenericAssayService;
 import org.cbioportal.service.MolecularProfileService;u}(j8  (294c580582eec4d4b8de8b24d183acbed9b1118fjy8  Jweb/src/main/java/org/cbioportal/web/GenericAssayEnrichmentController.javaj{8  modifiedjs8  Kjt8  Kj}8  Kj~8  https://github.com/cBioPortal/cbioportal/blob/24158cdb1aeb4c7a6e82add9885e57a646f08954/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.javaj8  https://github.com/cBioPortal/cbioportal/raw/24158cdb1aeb4c7a6e82add9885e57a646f08954/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.javaj8  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.java?ref=24158cdb1aeb4c7a6e82add9885e57a646f08954j8  X  @@ -17,7 +17,12 @@
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RequestAttribute;
 import springfox.documentation.annotations.ApiIgnore;
 
 import javax.validation.Valid;ueu(1f162e5067f7f42fa3de433bbf8fc38e3121904a}(sha(1f162e5067f7f42fa3de433bbf8fc38e3121904anode_idEC_kwDOAe-hB9oAKDFmMTYyZTUwNjdmN2Y0MmZhM2RlNDMzYmJmOGZjMzhlMzEyMTkwNGEcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-05-24T19:34:27Zu	committer}(j8  GitHubj8  noreply@github.comj8  2023-05-24T19:34:27ZumessageFrontend v5.3.8tree}(j8  (01c58495eac170733385a7315638d66159ea760durlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/01c58495eac170733385a7315638d66159ea760duj8  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/1f162e5067f7f42fa3de433bbf8fc38e3121904a
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkbmbDCRBK7hj4Ov3rIwAAku8IACqStg9Me/0PkXcPkutvQ5Z/
98SxrYH5B0AiAfQ3KUdBGTpAfoBT1EuN/VaOg8SQNAP6Q5oYvTnlSkdL1ZUd+fbv
Gfxphy6bEqCqdYAM4dGc9YY10nt5CjaTny4n99lZi+533OiX9WAX0J+EaBkjozsz
M8hPHFMUQW626+NjotvA+iEXAtihKSvh7d9mctx7+SgWvjL/Juw6EkY0BnRfx59v
ggDkVHhXL/vyQyv37FH8AVYmiKZdNj3dohzKx6qw9x6yHYZ+Vx9adlns1appk3fY
6RK09NNONCYtgXvJJFgQ/4WBUtyKNzg1ffxZvf8bTb7qaQwATAmQCrWIGX7n55A=
=9rNs
-----END PGP SIGNATURE-----
payloadtree 01c58495eac170733385a7315638d66159ea760d
parent 8d0008b61e04211528408d6cd8de4dd31551c4ea
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1684956867 -0600
committer GitHub <noreply@github.com> 1684956867 -0600

Frontend v5.3.8uuj8  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1f162e5067f7f42fa3de433bbf8fc38e3121904ahtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/1f162e5067f7f42fa3de433bbf8fc38e3121904acomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/1f162e5067f7f42fa3de433bbf8fc38e3121904a/commentsj8  }(login
dippindotsidJtO j8  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j8  'https://api.github.com/users/dippindotsj8  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj8  }(j8  web-flowj8  J/j8  MDQ6VXNlcjE5ODY0NDQ3j8  4https://avatars.githubusercontent.com/u/19864447?v=4j8  h5j8  %https://api.github.com/users/web-flowj8  https://github.com/web-flowj8  /https://api.github.com/users/web-flow/followersj8  <https://api.github.com/users/web-flow/following{/other_user}j8  5https://api.github.com/users/web-flow/gists{/gist_id}j8  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j8  3https://api.github.com/users/web-flow/subscriptionsj8  *https://api.github.com/users/web-flow/orgsj8  +https://api.github.com/users/web-flow/reposj8  6https://api.github.com/users/web-flow/events{/privacy}j8  5https://api.github.com/users/web-flow/received_eventsj8  Userj8  uparents]}(j8  (8d0008b61e04211528408d6cd8de4dd31551c4eaj8  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8d0008b61e04211528408d6cd8de4dd31551c4eaj8  Xhttps://github.com/cBioPortal/cbioportal/commit/8d0008b61e04211528408d6cd8de4dd31551c4eauastats}(totalK	additionsK	deletionsKufiles]}(j8  (e2cd192be20ac5c84bd520aa6cda7d1904812e4dfilenamepom.xmlstatusmodifiedj8  Kj8  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/1f162e5067f7f42fa3de433bbf8fc38e3121904a/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/1f162e5067f7f42fa3de433bbf8fc38e3121904a/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=1f162e5067f7f42fa3de433bbf8fc38e3121904apatchXW  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.7</frontend.version>
+    <frontend.version>v5.3.8</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(218a8881b9602cc5a6b69e5716505c16ac9c80b2}(sha(218a8881b9602cc5a6b69e5716505c16ac9c80b2node_idEC_kwDOAe-hB9oAKDIxOGE4ODgxYjk2MDJjYzVhNmI2OWU1NzE2NTA1YzE2YWM5YzgwYjIcommit}(author}(name
Onur Sumeremails.onur.sumer@gmail.comdate2023-06-08T21:28:41Zu	committer}(j9  
Onur Sumerj9  s.onur.sumer@gmail.comj9  2023-06-26T21:56:22Zumessage2add mybatiscolumnstore to test application contexttree}(j9  (76bc9a8f8f36169e31ad76a6efba75ba19e3b310urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/76bc9a8f8f36169e31ad76a6efba75ba19e3b310uj9  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/218a8881b9602cc5a6b69e5716505c16ac9c80b2
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj9  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/218a8881b9602cc5a6b69e5716505c16ac9c80b2html_urlXhttps://github.com/cBioPortal/cbioportal/commit/218a8881b9602cc5a6b69e5716505c16ac9c80b2comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/218a8881b9602cc5a6b69e5716505c16ac9c80b2/commentsj
9  }(login	onursumeridJ6 j	9  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5j9  &https://api.github.com/users/onursumerj+9  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminuj9  }(j09  	onursumerj29  J6 j	9  MDQ6VXNlcjM2MDQxOTg=j49  3https://avatars.githubusercontent.com/u/3604198?v=4j69  h5j9  &https://api.github.com/users/onursumerj+9  https://github.com/onursumerj99  0https://api.github.com/users/onursumer/followersj;9  =https://api.github.com/users/onursumer/following{/other_user}j=9  6https://api.github.com/users/onursumer/gists{/gist_id}j?9  =https://api.github.com/users/onursumer/starred{/owner}{/repo}jA9  4https://api.github.com/users/onursumer/subscriptionsjC9  +https://api.github.com/users/onursumer/orgsjE9  ,https://api.github.com/users/onursumer/reposjG9  7https://api.github.com/users/onursumer/events{/privacy}jI9  6https://api.github.com/users/onursumer/received_eventsjK9  UserjM9  uparents]}(j9  (1a98635a9b3730a2cda2ae7de9e8d2317bcaf310j9  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1a98635a9b3730a2cda2ae7de9e8d2317bcaf310j+9  Xhttps://github.com/cBioPortal/cbioportal/commit/1a98635a9b3730a2cda2ae7de9e8d2317bcaf310uastats}(totalK	additionsK	deletionsKufiles]}(j9  (00830ee9241dd61eb827f69b1699d1aa63a5e581filename2core/src/test/resources/applicationContext-dao.xmlstatusmodifiedjg9  Kjh9  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/218a8881b9602cc5a6b69e5716505c16ac9c80b2/core%2Fsrc%2Ftest%2Fresources%2FapplicationContext-dao.xmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/218a8881b9602cc5a6b69e5716505c16ac9c80b2/core%2Fsrc%2Ftest%2Fresources%2FapplicationContext-dao.xmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fresources%2FapplicationContext-dao.xml?ref=218a8881b9602cc5a6b69e5716505c16ac9c80b2patchX  @@ -80,7 +80,7 @@
     
     <!-- scan for mappers and let them be autowired -->
     <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
-        <property name="basePackage" value="org.mskcc.cbio.portal.persistence,org.cbioportal.persistence.mybatis" />
+        <property name="basePackage" value="org.mskcc.cbio.portal.persistence,org.cbioportal.persistence.mybatis,org.cbioportal.persistence.mybatiscolumnstore" />
     </bean>
 
     <!-- enable component scanning (beware that this does not enable mapper scanning!) -->uau(f2d60130bf38f014ceece0bf5b4e454b50832669}(sha(f2d60130bf38f014ceece0bf5b4e454b50832669node_idEC_kwDOAe-hB9oAKGYyZDYwMTMwYmYzOGYwMTRjZWVjZTBiZjViNGU0NTRiNTA4MzI2Njkcommit}(author}(namesbabyanushaemailsatravab@mskcc.orgdate2023-08-17T21:54:31Zu	committer}(j9  sbabyanushaj9  satravab@mskcc.orgj9  2023-08-17T21:54:31Zumessageupdated new scrrenshotstree}(j|9  (f3dfb0408f5e9daff4c0d06e1944f541c443fa4eurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/f3dfb0408f5e9daff4c0d06e1944f541c443fa4euj9  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/f2d60130bf38f014ceece0bf5b4e454b50832669
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj9  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/f2d60130bf38f014ceece0bf5b4e454b50832669html_urlXhttps://github.com/cBioPortal/cbioportal/commit/f2d60130bf38f014ceece0bf5b4e454b50832669comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/f2d60130bf38f014ceece0bf5b4e454b50832669/commentsj9  }(loginsbabyanushaidJ`_j~9  MDQ6VXNlcjYxNDMxNjQ4
avatar_url4https://avatars.githubusercontent.com/u/61431648?v=4gravatar_idh5j9  (https://api.github.com/users/sbabyanushaj9  https://github.com/sbabyanusha
followers_url2https://api.github.com/users/sbabyanusha/followers
following_url?https://api.github.com/users/sbabyanusha/following{/other_user}	gists_url8https://api.github.com/users/sbabyanusha/gists{/gist_id}starred_url?https://api.github.com/users/sbabyanusha/starred{/owner}{/repo}subscriptions_url6https://api.github.com/users/sbabyanusha/subscriptionsorganizations_url-https://api.github.com/users/sbabyanusha/orgs	repos_url.https://api.github.com/users/sbabyanusha/repos
events_url9https://api.github.com/users/sbabyanusha/events{/privacy}received_events_url8https://api.github.com/users/sbabyanusha/received_eventstypeUser
site_adminuj9  }(j9  sbabyanushaj9  J`_j~9  MDQ6VXNlcjYxNDMxNjQ4j9  4https://avatars.githubusercontent.com/u/61431648?v=4j9  h5j9  (https://api.github.com/users/sbabyanushaj9  https://github.com/sbabyanushaj9  2https://api.github.com/users/sbabyanusha/followersj9  ?https://api.github.com/users/sbabyanusha/following{/other_user}j9  8https://api.github.com/users/sbabyanusha/gists{/gist_id}j9  ?https://api.github.com/users/sbabyanusha/starred{/owner}{/repo}j9  6https://api.github.com/users/sbabyanusha/subscriptionsj9  -https://api.github.com/users/sbabyanusha/orgsj9  .https://api.github.com/users/sbabyanusha/reposj9  9https://api.github.com/users/sbabyanusha/events{/privacy}j9  8https://api.github.com/users/sbabyanusha/received_eventsj9  Userj9  uparents]}(j|9  (9fb4bcd3b47f54bb7f4544c4a8f8356df38e60e0j9  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9fb4bcd3b47f54bb7f4544c4a8f8356df38e60e0j9  Xhttps://github.com/cBioPortal/cbioportal/commit/9fb4bcd3b47f54bb7f4544c4a8f8356df38e60e0uastats}(totalK	additionsK	deletionsKufiles]}(j|9  (76de5dd513eaacb970d7d06b0d792451ada4943ffilenamedocs/News.mdstatusmodifiedj9  Kj9  KchangesKblob_urlehttps://github.com/cBioPortal/cbioportal/blob/f2d60130bf38f014ceece0bf5b4e454b50832669/docs%2FNews.mdraw_urldhttps://github.com/cBioPortal/cbioportal/raw/f2d60130bf38f014ceece0bf5b4e454b50832669/docs%2FNews.mdcontents_urlwhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FNews.md?ref=f2d60130bf38f014ceece0bf5b4e454b50832669patchXq	  @@ -1,4 +1,4 @@
-## Aug 15, 2023
+## Aug 18, 2023
 *   **Added data** consisting of 4,488 samples from 7 studies:
     * [Lung Adenocarcinoma Met Organotropism (MSK, Cancer Cell 2023)](https://www.cbioportal.org/study/summary?id=luad_mskcc_2023_met_organotropism) *2653 samples*
     * [Acute Myeloid Leukemia (OHSU, Cancer Cell 2022)](https://www.cbioportal.org/study/summary?id=aml_ohsu_2022) *942 samples*
@@ -12,17 +12,13 @@
 
 * **Data Improvements**
    
- * Methylation profile 450K is added to all 32 TCGA Pan-Can studies, in generic assay format. Data source: [GDC](https://gdc.cancer.gov/node/977). 
-     * Examples: Query by gene or probe from the dropdown box in the charts tab of the study summary page.
-     * Add a chart in the study view. 
-     * Create a track in Oncoprint (single study query only), or plots in the plots tab.
-<img width="1145" alt="Screen Shot 2023-08-14 at 7 35 42 PM" src="https://github.com/cBioPortal/datahub/assets/61431648/d4841094-cdd0-49bd-b91d-8513014be7d6">
+   * Methylation profile 450K is added to all 32 TCGA Pan-Can studies, in generic assay format. Data source: [GDC](https://gdc.cancer.gov/node/977). 
+<img width="973" alt="Screen Shot 2023-08-17 at 5 50 25 PM" src="https://github.com/cBioPortal/datahub/assets/61431648/7c8a53bd-9696-4e10-a49c-ac206ad9f263">
+
     
- * Genetic Ancestry data is added to all 32 TCGA Pan-Can studies, in generic assay format. Data source: [GDC](https://gdc.cancer.gov/about-data/publications/CCG-AIM-2020).
-     * Examples: Query by each ancestry population from the dropdown in the charts tab of the study summary page.
-     * Add an ancestry chart in the study view and can compare it with other populations.
-     * Create a track in Oncoprint (single study query only), or plots in the plots tab. 
-<img width="1121" alt="Screen Shot 2023-08-14 at 7 42 24 PM" src="https://github.com/cBioPortal/datahub/assets/61431648/58394b31-71fb-4326-99c1-989ee0f8bed1">
+   * Genetic Ancestry data is added to all 32 TCGA Pan-Can studies, in generic assay format. Data source: [GDC](https://gdc.cancer.gov/about-data/publications/CCG-AIM-2020). 
+<img width="855" alt="Screen Shot 2023-08-17 at 5 49 21 PM" src="https://github.com/cBioPortal/datahub/assets/61431648/e23df5d3-483a-4ed7-baab-198352bb724e">
+
 
 ## Aug 1, 2023
 *   **Enhancement**: One-sided Fisher's exact tests were changed to be two-sided. The affected pages are:uau(001bf661fb3e3c28ade634fcbd8e9303ed916ec9}(sha(001bf661fb3e3c28ade634fcbd8e9303ed916ec9node_idEC_kwDOAe-hB9oAKDAwMWJmNjYxZmIzZTNjMjhhZGU2MzRmY2JkOGU5MzAzZWQ5MTZlYzkcommit}(author}(nameKarthikemailkalletlakarthik@gmail.comdate2023-07-18T16:32:40Zu	committer}(j9  Karthikj9  kalletlakarthik@gmail.comj9  2023-07-26T15:20:51ZumessageCache treatment endpointstree}(j9  (f7c0be0f5cee6b331d50dc6a26241aff865af9dfurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/f7c0be0f5cee6b331d50dc6a26241aff865af9dfuj	:  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/001bf661fb3e3c28ade634fcbd8e9303ed916ec9
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj	:  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/001bf661fb3e3c28ade634fcbd8e9303ed916ec9html_urlXhttps://github.com/cBioPortal/cbioportal/commit/001bf661fb3e3c28ade634fcbd8e9303ed916ec9comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/001bf661fb3e3c28ade634fcbd8e9303ed916ec9/commentsj9  }(login	kalletlakidJƴ j9  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5j	:  &https://api.github.com/users/kalletlakj:  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminuj9  }(j:  	kalletlakj:  Jƴ j9  MDQ6VXNlcjEyOTU2ODcwj:  4https://avatars.githubusercontent.com/u/12956870?v=4j :  h5j	:  &https://api.github.com/users/kalletlakj:  https://github.com/kalletlakj#:  0https://api.github.com/users/kalletlak/followersj%:  =https://api.github.com/users/kalletlak/following{/other_user}j':  6https://api.github.com/users/kalletlak/gists{/gist_id}j):  =https://api.github.com/users/kalletlak/starred{/owner}{/repo}j+:  4https://api.github.com/users/kalletlak/subscriptionsj-:  +https://api.github.com/users/kalletlak/orgsj/:  ,https://api.github.com/users/kalletlak/reposj1:  7https://api.github.com/users/kalletlak/events{/privacy}j3:  6https://api.github.com/users/kalletlak/received_eventsj5:  Userj7:  uparents]}(j9  (4ac327bf13f47d36dd9a393dcece5583aa1896e4j	:  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4ac327bf13f47d36dd9a393dcece5583aa1896e4j:  Xhttps://github.com/cBioPortal/cbioportal/commit/4ac327bf13f47d36dd9a393dcece5583aa1896e4uastats}(totalK	additionsK	deletionsKufiles]}(j9  (c17ecda37f2b8e84dab4ea76a40ba17f19fa8de4filename=web/src/main/java/org/cbioportal/web/TreatmentController.javastatusmodifiedjQ:  KjR:  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/001bf661fb3e3c28ade634fcbd8e9303ed916ec9/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FTreatmentController.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/001bf661fb3e3c28ade634fcbd8e9303ed916ec9/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FTreatmentController.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FTreatmentController.java?ref=001bf661fb3e3c28ade634fcbd8e9303ed916ec9patchXw	  @@ -28,6 +28,7 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
+import java.util.Set;
 
 @PublicApi
 @RestController
@@ -151,12 +152,18 @@ public ResponseEntity<Boolean> getContainsTreatmentData(
         @ApiParam(required = true, value = "List of Study IDs")
         @Size(min = 1, max = PagingConstants.MAX_PAGE_SIZE)
         @RequestBody
-        List<String> studyIds
+        Set<String> studyIds
     ) {
-        Boolean containsTreatmentData = treatmentService.containsTreatmentData(studyIds, tier);
+        Boolean containsTreatmentData = instance.cacheableGetContainsTreatmentData(studyIds, tier);
         return new ResponseEntity<>(containsTreatmentData, HttpStatus.OK);
     }
 
+    // Caching enabled for any number of studies as the requests contains only studyIds and the response is a boolean
+    @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
+    public Boolean cacheableGetContainsTreatmentData(Set<String> studyIds, ClinicalEventKeyCode tier) {
+        return treatmentService.containsTreatmentData(new ArrayList<>(studyIds), tier);
+    }
+
     @PreAuthorize("hasPermission(#studyIds, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/treatments/display-sample", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Should sample level treatments be displayed")
@@ -168,9 +175,14 @@ public ResponseEntity<Boolean> getContainsSampleTreatmentData(
         @ApiParam(required = true, value = "List of Study IDs")
         @Size(min = 1, max = PagingConstants.MAX_PAGE_SIZE)
         @RequestBody
-        List<String> studyIds
+        Set<String> studyIds
     ) {
-        Boolean containsTreatmentData = treatmentService.containsSampleTreatmentData(studyIds, tier);
+        Boolean containsTreatmentData = instance.cacheableGetContainsSampleTreatmentData(studyIds, tier);
         return new ResponseEntity<>(containsTreatmentData, HttpStatus.OK);
     }
+
+    @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
+    public Boolean cacheableGetContainsSampleTreatmentData(Set<String> studyIds, ClinicalEventKeyCode tier) {
+        return treatmentService.containsSampleTreatmentData(new ArrayList<>(studyIds), tier);
+    }
 }uau(4eea1583ac540192cc4eae440fd1e5cead3b6b96}(sha(4eea1583ac540192cc4eae440fd1e5cead3b6b96node_idEC_kwDOAe-hB9oAKDRlZWExNTgzYWM1NDAxOTJjYzRlYWU0NDBmZDFlNWNlYWQzYjZiOTYcommit}(author}(nameritikakundraemailkundrar@mskcc.orgdate2023-05-25T16:34:06Zu	committer}(jn:  GitHubjp:  noreply@github.comjr:  2023-05-25T16:34:06ZumessageUpdate About-Us.mdtree}(jf:  (4374e9f61c92d1cf688b3a20282b68b6f64b7aeaurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/4374e9f61c92d1cf688b3a20282b68b6f64b7aeauj~:  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/4eea1583ac540192cc4eae440fd1e5cead3b6b96
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkb43+CRBK7hj4Ov3rIwAA6YcIACOcuThtKSkJpi7gw0gCQwng
5vg73s9iV2Cu8NyD6PAN+wSMxeeC+6WtmxEFVsc5OIH2FRRvxt5BREK42DeEQqnt
wabIqmdpmPbVbwZpHd+hdRpMTkiMHacFWa/Mj5lFBAb8gBOac3jgF2LA1uY7FBL5
jxJ4FINUCSN0up5jQqg9rcIbkkyPoM+2gMshI2RjS4cAPpvpAITATtfrlBKNqwiG
108ZoOeL95nFZnhTN2z5ed2crJiRysr68e/vZ6wEpQoL/2OR4+Kesym+DHOtJL3u
Ti5FMxvg3B7vxry6PB0tKSt9fLMKub9DjkRpSkngKoyosBIesFGXREH/84ZK2ME=
=KLk/
-----END PGP SIGNATURE-----
payloadtree 4374e9f61c92d1cf688b3a20282b68b6f64b7aea
parent d0b7a1df2962cfc6d762dff57daca0bcdc4684ce
author ritikakundra <kundrar@mskcc.org> 1685032446 -0400
committer GitHub <noreply@github.com> 1685032446 -0400

Update About-Us.mduuj~:  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4eea1583ac540192cc4eae440fd1e5cead3b6b96html_urlXhttps://github.com/cBioPortal/cbioportal/commit/4eea1583ac540192cc4eae440fd1e5cead3b6b96comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/4eea1583ac540192cc4eae440fd1e5cead3b6b96/commentsjl:  }(loginritikakundraidJ9 jh:  MDQ6VXNlcjEyMDA3ODYy
avatar_url4https://avatars.githubusercontent.com/u/12007862?v=4gravatar_idh5j~:  )https://api.github.com/users/ritikakundraj:  https://github.com/ritikakundra
followers_url3https://api.github.com/users/ritikakundra/followers
following_url@https://api.github.com/users/ritikakundra/following{/other_user}	gists_url9https://api.github.com/users/ritikakundra/gists{/gist_id}starred_url@https://api.github.com/users/ritikakundra/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/ritikakundra/subscriptionsorganizations_url.https://api.github.com/users/ritikakundra/orgs	repos_url/https://api.github.com/users/ritikakundra/repos
events_url:https://api.github.com/users/ritikakundra/events{/privacy}received_events_url9https://api.github.com/users/ritikakundra/received_eventstypeUser
site_adminujt:  }(j:  web-flowj:  J/jh:  MDQ6VXNlcjE5ODY0NDQ3j:  4https://avatars.githubusercontent.com/u/19864447?v=4j:  h5j~:  %https://api.github.com/users/web-flowj:  https://github.com/web-flowj:  /https://api.github.com/users/web-flow/followersj:  <https://api.github.com/users/web-flow/following{/other_user}j:  5https://api.github.com/users/web-flow/gists{/gist_id}j:  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j:  3https://api.github.com/users/web-flow/subscriptionsj:  *https://api.github.com/users/web-flow/orgsj:  +https://api.github.com/users/web-flow/reposj:  6https://api.github.com/users/web-flow/events{/privacy}j:  5https://api.github.com/users/web-flow/received_eventsj:  Userj:  uparents]}(jf:  (d0b7a1df2962cfc6d762dff57daca0bcdc4684cej~:  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d0b7a1df2962cfc6d762dff57daca0bcdc4684cej:  Xhttps://github.com/cBioPortal/cbioportal/commit/d0b7a1df2962cfc6d762dff57daca0bcdc4684ceuastats}(totalK	additionsK	deletionsKufiles]}(jf:  (61a2dc5e99379dc1dfb4dbfc05c9ad7c32742575filenamedocs/About-Us.mdstatusmodifiedj:  Kj:  KchangesKblob_urlihttps://github.com/cBioPortal/cbioportal/blob/4eea1583ac540192cc4eae440fd1e5cead3b6b96/docs%2FAbout-Us.mdraw_urlhhttps://github.com/cBioPortal/cbioportal/raw/4eea1583ac540192cc4eae440fd1e5cead3b6b96/docs%2FAbout-Us.mdcontents_url{https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FAbout-Us.md?ref=4eea1583ac540192cc4eae440fd1e5cead3b6b96patchX  @@ -3,9 +3,7 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 ## Memorial Sloan Kettering Cancer Center
 * Benjamin Gross
 * S Onur Sumer
-* Yichao Sun
 * Hongxin Zhang
-* Adam Abeshouse
 * Ritika Kundra
 * Ino de Bruijn
 * Robert Sheridan
@@ -17,7 +15,7 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 * Gaofei Zhao
 * Xiang Li
 * Anusha Satravada
-* Divya Madala
+* Rima AlHamad
 * Nikolaus Schultz
 
 ## Dana-Farber Cancer Institute
@@ -106,6 +104,9 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 * Diana Baiceanu
 * Paul van Dijk
 * Kees van Bochove
+* Yichao Sun
+* Adam Abeshouse
+* Divya Madala
 
 ## Funding for the cBioPortal for Cancer Genomics is or has been provided by:
 uau(5f92e44d0b7302224bbb05515e153d624a5a15c3}(sha(5f92e44d0b7302224bbb05515e153d624a5a15c3node_idEC_kwDOAe-hB9oAKDVmOTJlNDRkMGI3MzAyMjI0YmJiMDU1MTVlMTUzZDYyNGE1YTE1YzMcommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-06-13T09:58:33Zu	committer}(j:  
pvannieropj:  pim@thehyve.nlj:  2023-06-15T10:06:56ZumessageUpdate result reporttree}(j:  (d8583cd31ca8a484f4bc42dd889cc09301195e0eurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/d8583cd31ca8a484f4bc42dd889cc09301195e0euj:  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/5f92e44d0b7302224bbb05515e153d624a5a15c3
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj:  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/5f92e44d0b7302224bbb05515e153d624a5a15c3html_urlXhttps://github.com/cBioPortal/cbioportal/commit/5f92e44d0b7302224bbb05515e153d624a5a15c3comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/5f92e44d0b7302224bbb05515e153d624a5a15c3/commentsj:  }(login
pvannieropidJa j:  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5j:  'https://api.github.com/users/pvannieropj;  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminuj:  }(j;  
pvannieropj;  Ja j:  MDQ6VXNlcjc0NTg4NQ==j
;  2https://avatars.githubusercontent.com/u/745885?v=4j;  h5j:  'https://api.github.com/users/pvannieropj;  https://github.com/pvannieropj;  1https://api.github.com/users/pvannierop/followersj;  >https://api.github.com/users/pvannierop/following{/other_user}j;  7https://api.github.com/users/pvannierop/gists{/gist_id}j;  >https://api.github.com/users/pvannierop/starred{/owner}{/repo}j;  5https://api.github.com/users/pvannierop/subscriptionsj;  ,https://api.github.com/users/pvannierop/orgsj;  -https://api.github.com/users/pvannierop/reposj;  8https://api.github.com/users/pvannierop/events{/privacy}j;  7https://api.github.com/users/pvannierop/received_eventsj!;  Userj#;  uparents]}(j:  (d0fb6210aab800573e265132bed356b198c0db73j:  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d0fb6210aab800573e265132bed356b198c0db73j;  Xhttps://github.com/cBioPortal/cbioportal/commit/d0fb6210aab800573e265132bed356b198c0db73uastats}(totalK	additionsK	deletionsKufiles]}(j:  (8a39412f12d159a96b8ad548010704f8baa3a118filename=core/src/test/scripts/test_data/study_es_0/result_report.htmlstatusmodifiedj=;  Kj>;  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/5f92e44d0b7302224bbb05515e153d624a5a15c3/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.htmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/5f92e44d0b7302224bbb05515e153d624a5a15c3/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.htmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.html?ref=5f92e44d0b7302224bbb05515e153d624a5a15c3patchX	  @@ -1742,7 +1742,7 @@ <h4 class="panel-title">data_resource_study.txt</h4>
           <a role="button" data-toggle="collapse" aria-expanded="true"
              href="#collapse_ZGF0YV9zdHJ1Y3R1cmFsX3ZhcmlhbnRzLnR4dA",
              aria-controls="collapse_ZGF0YV9zdHJ1Y3R1cmFsX3ZhcmlhbnRzLnR4dA">
-            <span class="badge">3</span>
+            <span class="badge">5</span>
             <h4 class="panel-title">data_structural_variants.txt</h4>
           </a>
         </div>
@@ -1770,6 +1770,22 @@ <h4 class="panel-title">data_structural_variants.txt</h4>
                 <td>&ndash;</td>
                 <td></td>
               </tr>
+              <tr class="success">
+                <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
+                <td>48</td>
+                <td>&ndash;</td>
+                <td>No Entrez gene id or gene symbol provided for site 2. Assuming either the intragenic, deletion, duplication, translocation or inversion variant</td>
+                <td>&ndash;</td>
+                <td></td>
+              </tr>
+              <tr class="success">
+                <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
+                <td>49</td>
+                <td>&ndash;</td>
+                <td>No Entrez gene id or gene symbol provided for site 1. Assuming either the intragenic, deletion, duplication, translocation or inversion variant</td>
+                <td>&ndash;</td>
+                <td></td>
+              </tr>
               <tr class="success">
                 <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
                 <td>&ndash;</td>
@@ -1782,7 +1798,7 @@ <h4 class="panel-title">data_structural_variants.txt</h4>
                 <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
                 <td>&ndash;</td>
                 <td>&ndash;</td>
-                <td>Read 47 lines. Lines with warning: 0. Lines with error: 0</td>
+                <td>Read 49 lines. Lines with warning: 0. Lines with error: 0</td>
                 <td>&ndash;</td>
                 <td></td>
               </tr>uau(5e108b7694439ce699c9ae8dae189bb1adba6ada}(sha(5e108b7694439ce699c9ae8dae189bb1adba6adanode_idEC_kwDOAe-hB9oAKDVlMTA4Yjc2OTQ0MzljZTY5OWM5YWU4ZGFlMTg5YmIxYWRiYTZhZGEcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-08T04:13:11Zu	committer}(jZ;  Djokovic0311j\;  .55948986+Djokovic0311@users.noreply.github.comj^;  2023-08-08T04:13:11Zumessage,modify enrichment compare and validate issuetree}(jR;  (68ec7e322b038f6db88e3dc9f35bb0b56ff8f6cfurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/68ec7e322b038f6db88e3dc9f35bb0b56ff8f6cfujj;  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/5e108b7694439ce699c9ae8dae189bb1adba6ada
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujj;  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/5e108b7694439ce699c9ae8dae189bb1adba6adahtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/5e108b7694439ce699c9ae8dae189bb1adba6adacomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/5e108b7694439ce699c9ae8dae189bb1adba6ada/commentsjX;  }(loginDjokovic0311idJUjT;  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5jj;  )https://api.github.com/users/Djokovic0311jv;  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminuj`;  }(j{;  Djokovic0311j};  JUjT;  MDQ6VXNlcjU1OTQ4OTg2j;  4https://avatars.githubusercontent.com/u/55948986?v=4j;  h5jj;  )https://api.github.com/users/Djokovic0311jv;  https://github.com/Djokovic0311j;  3https://api.github.com/users/Djokovic0311/followersj;  @https://api.github.com/users/Djokovic0311/following{/other_user}j;  9https://api.github.com/users/Djokovic0311/gists{/gist_id}j;  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}j;  7https://api.github.com/users/Djokovic0311/subscriptionsj;  .https://api.github.com/users/Djokovic0311/orgsj;  /https://api.github.com/users/Djokovic0311/reposj;  :https://api.github.com/users/Djokovic0311/events{/privacy}j;  9https://api.github.com/users/Djokovic0311/received_eventsj;  Userj;  uparents]}(jR;  (30bcbce525990c58a30c63febd9591103857fd9bjj;  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/30bcbce525990c58a30c63febd9591103857fd9bjv;  Xhttps://github.com/cBioPortal/cbioportal/commit/30bcbce525990c58a30c63febd9591103857fd9buastats}(totalK 	additionsK	deletionsKufiles](}(jR;  (40ee2d11107ce2d9934520d6b5a93c25ee0ab680filenameBmodel/src/main/java/org/cbioportal/model/ExpressionEnrichment.javastatusmodifiedj;  Kj;  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/5e108b7694439ce699c9ae8dae189bb1adba6ada/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FExpressionEnrichment.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/5e108b7694439ce699c9ae8dae189bb1adba6ada/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FExpressionEnrichment.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FExpressionEnrichment.java?ref=5e108b7694439ce699c9ae8dae189bb1adba6adapatchX  @@ -6,7 +6,7 @@
 
 import javax.validation.constraints.NotNull;
 
-public class ExpressionEnrichment implements Serializable {
+public abstract class ExpressionEnrichment implements Serializable {
 
 	@NotNull
 	private List<GroupStatistics> groupsStatistics;u}(jR;  (2fdb661cf381055a175da7803be81909fca313c5j;  Omodel/src/main/java/org/cbioportal/model/GenericAssayCategoricalEnrichment.javaj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/cBioPortal/cbioportal/blob/5e108b7694439ce699c9ae8dae189bb1adba6ada/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayCategoricalEnrichment.javaj;  https://github.com/cBioPortal/cbioportal/raw/5e108b7694439ce699c9ae8dae189bb1adba6ada/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayCategoricalEnrichment.javaj;  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayCategoricalEnrichment.java?ref=5e108b7694439ce699c9ae8dae189bb1adba6adaj;  Xi  @@ -2,7 +2,6 @@
 
 import javax.validation.constraints.NotNull;
 import java.math.BigDecimal;
-import java.util.Comparator;
 
 public class GenericAssayCategoricalEnrichment extends GenericAssayEnrichment {
     @NotNull
@@ -15,4 +14,5 @@ public BigDecimal getqValue() {
     public void setqValue(BigDecimal qValue) {
         this.qValue = qValue;
     }
+
 }u}(jR;  (371032595cf6edd02354b9cc314ba540fee21c89j;  Dmodel/src/main/java/org/cbioportal/model/GenericAssayEnrichment.javaj;  modifiedj;  Kj;  Kj;  Kj;  https://github.com/cBioPortal/cbioportal/blob/5e108b7694439ce699c9ae8dae189bb1adba6ada/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayEnrichment.javaj;  https://github.com/cBioPortal/cbioportal/raw/5e108b7694439ce699c9ae8dae189bb1adba6ada/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayEnrichment.javaj;  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayEnrichment.java?ref=5e108b7694439ce699c9ae8dae189bb1adba6adaj;  Xq  @@ -5,7 +5,7 @@
 
 import javax.validation.constraints.NotNull;
 
-public class GenericAssayEnrichment extends ExpressionEnrichment implements Serializable {
+public abstract class GenericAssayEnrichment extends ExpressionEnrichment implements Serializable {
 
 	@NotNull
 	private String stableId;
@@ -38,4 +38,7 @@ public void setGenericEntityMetaProperties(HashMap<String, String> genericEntity
 		this.genericEntityMetaProperties = genericEntityMetaProperties;
 	}
 
+    public static int compare(GenericAssayEnrichment c1, GenericAssayEnrichment c2) {
+        return c1.getpValue().compareTo(c2.getpValue());
+    }
 }u}(jR;  (7ea1c70d5957f7d4a38e1e2941d2bb8af2a2da99j;  Xservice/src/main/java/org/cbioportal/service/impl/GenericAssayBinaryDataServiceImpl.javaj;  modifiedj;  Kj;  Kj;  K
j;  https://github.com/cBioPortal/cbioportal/blob/5e108b7694439ce699c9ae8dae189bb1adba6ada/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImpl.javaj;  https://github.com/cBioPortal/cbioportal/raw/5e108b7694439ce699c9ae8dae189bb1adba6ada/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImpl.javaj;  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImpl.java?ref=5e108b7694439ce699c9ae8dae189bb1adba6adaj;  XI  @@ -92,14 +92,7 @@ public List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
         List<GenericAssayBinaryEnrichment> genericAssayBinaryEnrichments = expressionEnrichmentUtil.getGenericAssayBinaryEnrichments(molecularProfile,
             filteredMolecularProfileCaseSets, enrichmentType, maItr);
 
-        // Sort the list based on pValue.
-        Collections.sort(genericAssayBinaryEnrichments, new Comparator<GenericAssayBinaryEnrichment>() {
-            @Override
-            public int compare(GenericAssayBinaryEnrichment c1, GenericAssayBinaryEnrichment c2) {
-                return c1.getpValue().compareTo(c2.getpValue());
-            }
-        });
-
+        Collections.sort(genericAssayBinaryEnrichments, GenericAssayEnrichment::compare);
         // Extract pValues and calculate qValues.
         BigDecimal[] pValues = genericAssayBinaryEnrichments.stream().map(GenericAssayBinaryEnrichment ::getpValue).toArray(BigDecimal[]::new);
         BigDecimal[] qValues = fisherExactTestCalculator.calcqValue(pValues);
@@ -133,6 +126,10 @@ private void validateMolecularProfile(MolecularProfile molecularProfile,
         if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
             throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
         }
+        System.out.println(molecularProfile.getGenericAssayType());
+        if(!molecularProfile.getGenericAssayType().equals("BINARY")) {
+            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+        }
     }
     
 }u}(jR;  (a40d750fb7046238a543ad3f18aaa0ee7a3e240aj;  ]service/src/main/java/org/cbioportal/service/impl/GenericAssayCategoricalDataServiceImpl.javaj;  modifiedj;  Kj;  Kj;  K
j;  https://github.com/cBioPortal/cbioportal/blob/5e108b7694439ce699c9ae8dae189bb1adba6ada/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayCategoricalDataServiceImpl.javaj;  https://github.com/cBioPortal/cbioportal/raw/5e108b7694439ce699c9ae8dae189bb1adba6ada/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayCategoricalDataServiceImpl.javaj;  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayCategoricalDataServiceImpl.java?ref=5e108b7694439ce699c9ae8dae189bb1adba6adaj;  XZ  @@ -81,12 +81,7 @@ public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichm
                 filteredMolecularProfileCaseSets, enrichmentType, maItr);
 
             // Sort the list based on pValue.
-            Collections.sort(genericAssayCategoricalEnrichments, new Comparator<GenericAssayCategoricalEnrichment>() {
-                @Override
-                public int compare(GenericAssayCategoricalEnrichment c1, GenericAssayCategoricalEnrichment c2) {
-                    return c1.getpValue().compareTo(c2.getpValue());
-                }
-            });
+            Collections.sort(genericAssayCategoricalEnrichments, GenericAssayEnrichment::compare);
     
             // Extract pValues and calculate qValues.
             BigDecimal[] pValues = genericAssayCategoricalEnrichments.stream().map(a -> a.getpValue()).toArray(BigDecimal[]::new);
@@ -119,6 +114,9 @@ private void validateMolecularProfile(MolecularProfile molecularProfile,
         if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
             throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
         }
+        if(!molecularProfile.getGenericAssayType().equals("CATEGORICAL")) {
+            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+        }
     }
 
 }ueu(18626e2ca955bf3330454eb4340ec57c5c234319}(sha(18626e2ca955bf3330454eb4340ec57c5c234319node_idEC_kwDOAe-hB9oAKDE4NjI2ZTJjYTk1NWJmMzMzMDQ1NGViNDM0MGVjNTdjNWMyMzQzMTkcommit}(author}(name
Bas Leenknegtemailbasleenknegt@thehyve.nldate2023-06-15T14:46:24Zu	committer}(j;  
Bas Leenknegtj;  basleenknegt@thehyve.nlj;  2023-06-15T14:46:24Zumessage3Revert controler rename to keep backward compatibletree}(j;  (d9c837b174eeb519faceb54f67bea102415013bfurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/d9c837b174eeb519faceb54f67bea102415013bfuj;  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/18626e2ca955bf3330454eb4340ec57c5c234319
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj;  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/18626e2ca955bf3330454eb4340ec57c5c234319html_urlXhttps://github.com/cBioPortal/cbioportal/commit/18626e2ca955bf3330454eb4340ec57c5c234319comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/18626e2ca955bf3330454eb4340ec57c5c234319/commentsj;  }(loginBasLeeidJ~2 j;  MDQ6VXNlcjMzMjMwMDY=
avatar_url3https://avatars.githubusercontent.com/u/3323006?v=4gravatar_idh5j;  #https://api.github.com/users/BasLeej<  https://github.com/BasLee
followers_url-https://api.github.com/users/BasLee/followers
following_url:https://api.github.com/users/BasLee/following{/other_user}	gists_url3https://api.github.com/users/BasLee/gists{/gist_id}starred_url:https://api.github.com/users/BasLee/starred{/owner}{/repo}subscriptions_url1https://api.github.com/users/BasLee/subscriptionsorganizations_url(https://api.github.com/users/BasLee/orgs	repos_url)https://api.github.com/users/BasLee/repos
events_url4https://api.github.com/users/BasLee/events{/privacy}received_events_url3https://api.github.com/users/BasLee/received_eventstypeUser
site_adminuj;  }(j<  BasLeej<  J~2 j;  MDQ6VXNlcjMzMjMwMDY=j<  3https://avatars.githubusercontent.com/u/3323006?v=4j<  h5j;  #https://api.github.com/users/BasLeej<  https://github.com/BasLeej<  -https://api.github.com/users/BasLee/followersj<  :https://api.github.com/users/BasLee/following{/other_user}j<  3https://api.github.com/users/BasLee/gists{/gist_id}j<  :https://api.github.com/users/BasLee/starred{/owner}{/repo}j!<  1https://api.github.com/users/BasLee/subscriptionsj#<  (https://api.github.com/users/BasLee/orgsj%<  )https://api.github.com/users/BasLee/reposj'<  4https://api.github.com/users/BasLee/events{/privacy}j)<  3https://api.github.com/users/BasLee/received_eventsj+<  Userj-<  uparents]}(j;  (9d7c2b38fba7b0573088fd403706ac4ab035d5e7j;  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9d7c2b38fba7b0573088fd403706ac4ab035d5e7j<  Xhttps://github.com/cBioPortal/cbioportal/commit/9d7c2b38fba7b0573088fd403706ac4ab035d5e7uastats}(totalK	additionsK	deletionsKufiles](}(j;  (93d32d173b152b38cc8db8c41b9c6a98403cd4b0filenameEservice/src/main/java/org/cbioportal/service/ClinicalDataService.javastatusmodifiedjG<  KjH<  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/18626e2ca955bf3330454eb4340ec57c5c234319/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FClinicalDataService.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/18626e2ca955bf3330454eb4340ec57c5c234319/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FClinicalDataService.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FClinicalDataService.java?ref=18626e2ca955bf3330454eb4340ec57c5c234319patchX  @@ -52,8 +52,8 @@ BaseMeta fetchMetaClinicalData(List<String> studyIds, List<String> ids, List<Str
     List<ClinicalData> getPatientClinicalDataDetailedToSample(List<String> studyIds, List<String> patientIds,
             List<String> attributeIds);
 
-    List<ClinicalData> fetchSampleClinicalTable(List<String> studyIds, List<String> sampleIds, Integer pageSize,
-                                                Integer pageNumber, String searchTerm, String sortBy, String direction);
+    List<ClinicalData> fetchClinicalDataClinicalTable(List<String> studyIds, List<String> sampleIds, Integer pageSize,
+                                                      Integer pageNumber, String searchTerm, String sortBy, String direction);
     
     Integer fetchSampleClinicalTableCount(List<String> studyIds, List<String> sampleIds, String searchTerm,
                                           String sortBy, String direction);u}(j;  (48548cfc3fad9f1972f6f7689332044e331a04ecjM<  Nservice/src/main/java/org/cbioportal/service/impl/ClinicalDataServiceImpl.javajO<  modifiedjG<  KjH<  KjQ<  KjR<  https://github.com/cBioPortal/cbioportal/blob/18626e2ca955bf3330454eb4340ec57c5c234319/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FClinicalDataServiceImpl.javajT<  https://github.com/cBioPortal/cbioportal/raw/18626e2ca955bf3330454eb4340ec57c5c234319/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FClinicalDataServiceImpl.javajV<  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FClinicalDataServiceImpl.java?ref=18626e2ca955bf3330454eb4340ec57c5c234319jX<  X  @@ -227,9 +227,9 @@ public List<ClinicalData> getPatientClinicalDataDetailedToSample(List<String> st
     }
 
     @Override
-    public List<ClinicalData> fetchSampleClinicalTable(List<String> studyIds, List<String> sampleIds, Integer pageSize,
-                                                       Integer pageNumber, String searchTerm, String sortBy,
-                                                       String direction) {
+    public List<ClinicalData> fetchClinicalDataClinicalTable(List<String> studyIds, List<String> sampleIds, Integer pageSize,
+                                                             Integer pageNumber, String searchTerm, String sortBy,
+                                                             String direction) {
         return clinicalDataRepository.fetchSampleClinicalTable(studyIds, sampleIds, pageSize, pageNumber, searchTerm,
                                                                             sortBy, direction);
     }u}(j;  (2cc1b336592868fdd22eb0d49832024fed1f5e3ejM<  =web/src/main/java/org/cbioportal/web/StudyViewController.javajO<  modifiedjG<  KjH<  KjQ<  KjR<  https://github.com/cBioPortal/cbioportal/blob/18626e2ca955bf3330454eb4340ec57c5c234319/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javajT<  https://github.com/cBioPortal/cbioportal/raw/18626e2ca955bf3330454eb4340ec57c5c234319/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javajV<  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=18626e2ca955bf3330454eb4340ec57c5c234319jX<  XR  @@ -919,7 +919,7 @@ public ResponseEntity<ClinicalDataCollection> fetchClinicalTable(
         List<SampleIdentifier> filteredSampleIdentifiers = studyViewFilterApplier.apply(interceptedStudyViewFilter);
         studyViewFilterUtil.extractStudyAndSampleIds(filteredSampleIdentifiers, sampleStudyIds, sampleIds);
         
-        List<ClinicalData> sampleClinicalData = clinicalDataService.fetchSampleClinicalTable(
+        List<ClinicalData> sampleClinicalData = clinicalDataService.fetchClinicalDataClinicalTable(
             sampleStudyIds,
             sampleIds,
             pageSize,u}(j;  (c6dd59a329833de47d5584c23853a0b1a71452e6jM<  Aweb/src/test/java/org/cbioportal/web/StudyViewControllerTest.javajO<  modifiedjG<  KjH<  KjQ<  KjR<  https://github.com/cBioPortal/cbioportal/blob/18626e2ca955bf3330454eb4340ec57c5c234319/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.java
      jT<  https://github.com/cBioPortal/cbioportal/raw/18626e2ca955bf3330454eb4340ec57c5c234319/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javajV<  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.java?ref=18626e2ca955bf3330454eb4340ec57c5c234319jX<  X  @@ -767,7 +767,7 @@ public void fetchGenericAssayDataCounts() throws Exception {
     public void fetchClinicalDataClinicalTable() throws Exception {
 
         // For this sake of this test the sample clinical data and patient clinical data are identical.
-        when(clinicalDataService.fetchSampleClinicalTable(anyList(), anyList(),
+        when(clinicalDataService.fetchClinicalDataClinicalTable(anyList(), anyList(),
             anyInt(), anyInt(), anyString(), any(), anyString())).thenReturn(clinicalData);
         when(clinicalDataService.fetchClinicalData(anyList(), anyList(),
             any(), anyString(), anyString())).thenReturn(clinicalData);ueu(326e765a4f8b615b2f308dcbab110931362d4eec}(sha(326e765a4f8b615b2f308dcbab110931362d4eecnode_idEC_kwDOAe-hB9oAKDMyNmU3NjVhNGY4YjYxNWIyZjMwOGRjYmFiMTEwOTMxMzYyZDRlZWMcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-05-24T15:20:48Zu	committer}(j|<  Gaofei Zhaoj~<  ,15748980+dippindots@users.noreply.github.comj<  2023-05-24T15:44:40ZumessageFix integration testtree}(jt<  (3473ac9e56227267066b8fc97e2f0f760fa8142curlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/3473ac9e56227267066b8fc97e2f0f760fa8142cuj<  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/326e765a4f8b615b2f308dcbab110931362d4eec
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj<  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/326e765a4f8b615b2f308dcbab110931362d4eechtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/326e765a4f8b615b2f308dcbab110931362d4eeccomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/326e765a4f8b615b2f308dcbab110931362d4eec/commentsjz<  }(login
dippindotsidJtO jv<  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j<  'https://api.github.com/users/dippindotsj<  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj<  }(j<  
dippindotsj<  JtO jv<  MDQ6VXNlcjE1NzQ4OTgwj<  4https://avatars.githubusercontent.com/u/15748980?v=4j<  h5j<  'https://api.github.com/users/dippindotsj<  https://github.com/dippindotsj<  1https://api.github.com/users/dippindots/followersj<  >https://api.github.com/users/dippindots/following{/other_user}j<  7https://api.github.com/users/dippindots/gists{/gist_id}j<  >https://api.github.com/users/dippindots/starred{/owner}{/repo}j<  5https://api.github.com/users/dippindots/subscriptionsj<  ,https://api.github.com/users/dippindots/orgsj<  -https://api.github.com/users/dippindots/reposj<  8https://api.github.com/users/dippindots/events{/privacy}j<  7https://api.github.com/users/dippindots/received_eventsj<  Userj<  uparents]}(jt<  (16da69be4c385ae3d8098baee347fbaf3913c591j<  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/16da69be4c385ae3d8098baee347fbaf3913c591j<  Xhttps://github.com/cBioPortal/cbioportal/commit/16da69be4c385ae3d8098baee347fbaf3913c591uastats}(totalK	additionsK	deletionsK ufiles]}(jt<  (d0d60663f3e84646d610c130e85a1f70d8f42d38filename#test/integration/test_load_study.shstatusmodifiedj<  Kj<  K changesKblob_url~https://github.com/cBioPortal/cbioportal/blob/326e765a4f8b615b2f308dcbab110931362d4eec/test%2Fintegration%2Ftest_load_study.shraw_url}https://github.com/cBioPortal/cbioportal/raw/326e765a4f8b615b2f308dcbab110931362d4eec/test%2Fintegration%2Ftest_load_study.shcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/test%2Fintegration%2Ftest_load_study.sh?ref=326e765a4f8b615b2f308dcbab110931362d4eecpatchX  @@ -17,6 +17,8 @@ run_in_service cbioportal "cd /cbioportal/core/src/main/scripts/ && perl importG
                           /cbioportal/core/src/test/scripts/test_data/study_es_0/data_gene_panel_testpanel1.txt"
 run_in_service cbioportal "cd /cbioportal/core/src/main/scripts/ && perl importGenePanel.pl --data \
                           /cbioportal/core/src/test/scripts/test_data/study_es_0/data_gene_panel_testpanel2.txt"
+run_in_service cbioportal "cd /cbioportal/core/src/main/scripts/ && echo yes | ./importGenesetData.pl --data /cbioportal/core/src/test/resources/genesets/study_es_0_genesets.gmt --new-version msigdb_7.5.1 --supp /cbioportal/core/src/test/resources/genesets/study_es_0_supp-genesets.txt"
+run_in_service cbioportal "cd /cbioportal/core/src/main/scripts/ && ./importGenesetHierarchy.pl --data /cbioportal/core/src/test/resources/genesets/study_es_0_tree.yaml"
 
 # dump portal info
 echo "Testing the dump of local portal info directory..."uau(5ba9828590b28494ac6d132c828e9e7f7e1b9418}(sha(5ba9828590b28494ac6d132c828e9e7f7e1b9418node_idEC_kwDOAe-hB9oAKDViYTk4Mjg1OTBiMjg0OTRhYzZkMTMyYzgyOGU5ZTdmN2UxYjk0MTgcommit}(author}(name
Bas Leenknegtemailbasleenknegt@thehyve.nldate2023-06-12T15:07:32Zu	committer}(j<  
Bas Leenknegtj<  basleenknegt@thehyve.nlj<  2023-06-12T15:07:32Zumessage1Fix difference h2 and mysql in sorting nulls lasttree}(j<  (d19c3c3d8d4fbf176eefd067164e34548bdc8d86urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/d19c3c3d8d4fbf176eefd067164e34548bdc8d86uj=  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/5ba9828590b28494ac6d132c828e9e7f7e1b9418
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj=  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/5ba9828590b28494ac6d132c828e9e7f7e1b9418html_urlXhttps://github.com/cBioPortal/cbioportal/commit/5ba9828590b28494ac6d132c828e9e7f7e1b9418comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/5ba9828590b28494ac6d132c828e9e7f7e1b9418/commentsj<  }(loginBasLeeidJ~2 j<  MDQ6VXNlcjMzMjMwMDY=
avatar_url3https://avatars.githubusercontent.com/u/3323006?v=4gravatar_idh5j=  #https://api.github.com/users/BasLeej
=  https://github.com/BasLee
followers_url-https://api.github.com/users/BasLee/followers
following_url:https://api.github.com/users/BasLee/following{/other_user}	gists_url3https://api.github.com/users/BasLee/gists{/gist_id}starred_url:https://api.github.com/users/BasLee/starred{/owner}{/repo}subscriptions_url1https://api.github.com/users/BasLee/subscriptionsorganizations_url(https://api.github.com/users/BasLee/orgs	repos_url)https://api.github.com/users/BasLee/repos
events_url4https://api.github.com/users/BasLee/events{/privacy}received_events_url3https://api.github.com/users/BasLee/received_eventstypeUser
site_adminuj<  }(j=  BasLeej=  J~2 j<  MDQ6VXNlcjMzMjMwMDY=j=  3https://avatars.githubusercontent.com/u/3323006?v=4j=  h5j=  #https://api.github.com/users/BasLeej
=  https://github.com/BasLeej=  -https://api.github.com/users/BasLee/followersj=  :https://api.github.com/users/BasLee/following{/other_user}j=  3https://api.github.com/users/BasLee/gists{/gist_id}j!=  :https://api.github.com/users/BasLee/starred{/owner}{/repo}j#=  1https://api.github.com/users/BasLee/subscriptionsj%=  (https://api.github.com/users/BasLee/orgsj'=  )https://api.github.com/users/BasLee/reposj)=  4https://api.github.com/users/BasLee/events{/privacy}j+=  3https://api.github.com/users/BasLee/received_eventsj-=  Userj/=  uparents]}(j<  (131320beba79ed3343c17f1a94d869279fe24debj=  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/131320beba79ed3343c17f1a94d869279fe24debj
=  Xhttps://github.com/cBioPortal/cbioportal/commit/131320beba79ed3343c17f1a94d869279fe24debuastats}(totalK		additionsK	deletionsKufiles]}(j<  (e0ca2e602a306bd027d5007cecd0016a32f07ee2filenamelpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatis/ClinicalDataMapper.xmlstatusmodifiedjI=  KjJ=  KchangesK	blob_urlhttps://github.com/cBioPortal/cbioportal/blob/5ba9828590b28494ac6d132c828e9e7f7e1b9418/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.xmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/5ba9828590b28494ac6d132c828e9e7f7e1b9418/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.xmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.xml?ref=5ba9828590b28494ac6d132c828e9e7f7e1b9418patchX  @@ -269,7 +269,14 @@
             </if>
             <if test="_parameter.containsKey('sortBy') and sortBy != null">
                 <!-- Put 'NULL samples' last: -->
-                ORDER BY ISNULL(SORT_BY), SORT_BY ${direction}
+                <choose>
+                    <when test="_databaseId == 'mysql'">
+                        ORDER BY ISNULL(SORT_BY), SORT_BY ${direction}
+                    </when>
+                    <when test="_databaseId == 'h2'">
+                        ORDER BY SORT_BY ${direction} NULLS LAST
+                    </when>
+                </choose>
             </if>
             
             <if test="_parameter.containsKey('limit') and limit != null and limit != 0">uau(7339191fc545e3a3626aaf96cc2e6e7f63bc2292}(sha(7339191fc545e3a3626aaf96cc2e6e7f63bc2292node_idEC_kwDOAe-hB9oAKDczMzkxOTFmYzU0NWUzYTM2MjZhYWY5NmNjMmU2ZTdmNjNiYzIyOTIcommit}(author}(nameBasLeeemailbasleenknegt@thehyve.nldate2023-07-20T13:44:12Zu	committer}(jf=  GitHubjh=  noreply@github.comjj=  2023-07-20T13:44:12ZumessagePAllow ProfiledCasesCounter to add counts to empty alteration count list (#10255)tree}(j^=  (28257704b258ebc361c9b495230dee4501945013urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/28257704b258ebc361c9b495230dee4501945013ujv=  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/7339191fc545e3a3626aaf96cc2e6e7f63bc2292
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkuTosCRBK7hj4Ov3rIwAA+oIIAHB8E0h5DbjfXxOEjaXW/yhW
oGl4r7nQgnq9dGYFv3ZGtKAuYiJd5Lj0BDLsaMRLzHMDMld1cp/PnEPMCeIYgin1
i7OyzgqmuipcCQx69wjew68fpaBZrZVExbYAiuRXebW5k/UAYBMJDRcaEYCsq5JB
F63VCR+JaRodXLDIUWOv18rBmtEUXArblAf6gzuMnCPilhxpQ0uKIlR7XVOwH9zH
IoakoHrC7mKCAzSoBCMeM/f216hP+OtNgx37V4ebVrqVpktqkkfRxjUkay4EX0eq
BK8ucTBcNpdzgdE8BmVJ0HXw9nb3wJ9UxpC4tqGQZ0uV100y7pkShXCYL8edFMk=
=FXcI
-----END PGP SIGNATURE-----
payloadX!  tree 28257704b258ebc361c9b495230dee4501945013
parent 8f6534e47ba1adb65a1c77ee92e397cfd8a146cf
author BasLee <basleenknegt@thehyve.nl> 1689860652 +0200
committer GitHub <noreply@github.com> 1689860652 -0400

Allow ProfiledCasesCounter to add counts to empty alteration count list (#10255)

uujv=  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7339191fc545e3a3626aaf96cc2e6e7f63bc2292html_urlXhttps://github.com/cBioPortal/cbioportal/commit/7339191fc545e3a3626aaf96cc2e6e7f63bc2292comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/7339191fc545e3a3626aaf96cc2e6e7f63bc2292/commentsjd=  }(loginBasLeeidJ~2 j`=  MDQ6VXNlcjMzMjMwMDY=
avatar_url3https://avatars.githubusercontent.com/u/3323006?v=4gravatar_idh5jv=  #https://api.github.com/users/BasLeej=  https://github.com/BasLee
followers_url-https://api.github.com/users/BasLee/followers
following_url:https://api.github.com/users/BasLee/following{/other_user}	gists_url3https://api.github.com/users/BasLee/gists{/gist_id}starred_url:https://api.github.com/users/BasLee/starred{/owner}{/repo}subscriptions_url1https://api.github.com/users/BasLee/subscriptionsorganizations_url(https://api.github.com/users/BasLee/orgs	repos_url)https://api.github.com/users/BasLee/repos
events_url4https://api.github.com/users/BasLee/events{/privacy}received_events_url3https://api.github.com/users/BasLee/received_eventstypeUser
site_adminujl=  }(j=  web-flowj=  J/j`=  MDQ6VXNlcjE5ODY0NDQ3j=  4https://avatars.githubusercontent.com/u/19864447?v=4j=  h5jv=  %https://api.github.com/users/web-flowj=  https://github.com/web-flowj=  /https://api.github.com/users/web-flow/followersj=  <https://api.github.com/users/web-flow/following{/other_user}j=  5https://api.github.com/users/web-flow/gists{/gist_id}j=  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j=  3https://api.github.com/users/web-flow/subscriptionsj=  *https://api.github.com/users/web-flow/orgsj=  +https://api.github.com/users/web-flow/reposj=  6https://api.github.com/users/web-flow/events{/privacy}j=  5https://api.github.com/users/web-flow/received_eventsj=  Userj=  uparents]}(j^=  (8f6534e47ba1adb65a1c77ee92e397cfd8a146cfjv=  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8f6534e47ba1adb65a1c77ee92e397cfd8a146cfj=  Xhttps://github.com/cBioPortal/cbioportal/commit/8f6534e47ba1adb65a1c77ee92e397cfd8a146cfuastats}(totalK	additionsK	deletionsKufiles]}(j^=  (a48b6476b5962ff48696ee69a77638f37dee96d0filenameqpersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/AlterationMyBatisRepository.javastatusmodifiedj=  Kj=  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/7339191fc545e3a3626aaf96cc2e6e7f63bc2292/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepository.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/7339191fc545e3a3626aaf96cc2e6e7f63bc2292/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepository.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepository.java?ref=7339191fc545e3a3626aaf96cc2e6e7f63bc2292patchX  @@ -36,8 +36,10 @@ public List<AlterationCountByGene> getSampleAlterationGeneCounts(Set<MolecularPr
             || (molecularProfileCaseIdentifiers == null || molecularProfileCaseIdentifiers.isEmpty())
             || allAlterationsExcludedDriverAnnotation(alterationFilter)
             || allAlterationsExcludedMutationStatus(alterationFilter)
-            || allAlterationsExcludedDriverTierAnnotation(alterationFilter)) {
-            return Collections.emptyList();
+            || allAlterationsExcludedDriverTierAnnotation(alterationFilter)
+        ) {
+            // We want a mutable empty list:
+            return new ArrayList<>();
         }
 
         Set<String> molecularProfileIds = molecularProfileCaseIdentifiers.stream()uau(0d8a80cc8ed3753f4911202b302803dcd2966489}(sha(0d8a80cc8ed3753f4911202b302803dcd2966489node_idEC_kwDOAe-hB9oAKDBkOGE4MGNjOGVkMzc1M2Y0OTExMjAyYjMwMjgwM2RjZDI5NjY0ODkcommit}(author}(name
Bas Leenknegtemailbasleenknegt@thehyve.nldate2023-07-17T12:10:50Zu	committer}(j=  
Bas Leenknegtj=  basleenknegt@thehyve.nlj=  2023-07-17T12:18:05ZumessageIFilter out unauthorized studies when fetching study tags using @PreFiltertree}(j=  (f8c9b71301eed2008b6f4f9bcb3e947aa991cbd7urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/f8c9b71301eed2008b6f4f9bcb3e947aa991cbd7uj=  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/0d8a80cc8ed3753f4911202b302803dcd2966489
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj=  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/0d8a80cc8ed3753f4911202b302803dcd2966489html_urlXhttps://github.com/cBioPortal/cbioportal/commit/0d8a80cc8ed3753f4911202b302803dcd2966489comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/0d8a80cc8ed3753f4911202b302803dcd2966489/commentsj=  }(loginBasLeeidJ~2 j=  MDQ6VXNlcjMzMjMwMDY=
avatar_url3https://avatars.githubusercontent.com/u/3323006?v=4gravatar_idh5j=  #https://api.github.com/users/BasLeej=  https://github.com/BasLee
followers_url-https://api.github.com/users/BasLee/followers
following_url:https://api.github.com/users/BasLee/following{/other_user}	gists_url3https://api.github.com/users/BasLee/gists{/gist_id}starred_url:https://api.github.com/users/BasLee/starred{/owner}{/repo}subscriptions_url1https://api.github.com/users/BasLee/subscriptionsorganizations_url(https://api.github.com/users/BasLee/orgs	repos_url)https://api.github.com/users/BasLee/repos
events_url4https://api.github.com/users/BasLee/events{/privacy}received_events_url3https://api.github.com/users/BasLee/received_eventstypeUser
site_adminuj=  }(j=  BasLeej >  J~2 j=  MDQ6VXNlcjMzMjMwMDY=j>  3https://avatars.githubusercontent.com/u/3323006?v=4j>  h5j=  #https://api.github.com/users/BasLeej=  https://github.com/BasLeej>  -https://api.github.com/users/BasLee/followersj	>  :https://api.github.com/users/BasLee/following{/other_user}j>  3https://api.github.com/users/BasLee/gists{/gist_id}j
>  :https://api.github.com/users/BasLee/starred{/owner}{/repo}j>  1https://api.github.com/users/BasLee/subscriptionsj>  (https://api.github.com/users/BasLee/orgsj>  )https://api.github.com/users/BasLee/reposj>  4https://api.github.com/users/BasLee/events{/privacy}j>  3https://api.github.com/users/BasLee/received_eventsj>  Userj>  uparents]}(j=  (b3400e6aa562d5b7c093300cc94398e5ad0e9e84j=  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b3400e6aa562d5b7c093300cc94398e5ad0e9e84j=  Xhttps://github.com/cBioPortal/cbioportal/commit/b3400e6aa562d5b7c093300cc94398e5ad0e9e84uastats}(totalK	additionsK	deletionsKufiles]}(j=  (0ac037aaff08fd60199b5f14500a17be93cd5176filename9web/src/main/java/org/cbioportal/web/StudyController.javastatusmodifiedj5>  Kj6>  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/0d8a80cc8ed3753f4911202b302803dcd2966489/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/0d8a80cc8ed3753f4911202b302803dcd2966489/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.java?ref=0d8a80cc8ed3753f4911202b302803dcd2966489patchX  @@ -22,6 +22,7 @@
 import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreFilter;
 import org.springframework.security.core.Authentication;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -180,7 +181,7 @@ public ResponseEntity<Object> getTags(
         return new ResponseEntity<>(map, HttpStatus.OK);
     }
 
-    @PreAuthorize("hasPermission(#studyIds, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @PreFilter("hasPermission(#studyIds, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/studies/tags/fetch", method = RequestMethod.POST,
         produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Get the study tags by IDs")uau(34425b0c0b48de8ca46fa0ac6072656054308da0}(sha(34425b0c0b48de8ca46fa0ac6072656054308da0node_idEC_kwDOAe-hB9oAKDM0NDI1YjBjMGI0OGRlOGNhNDZmYTBhYzYwNzI2NTYwNTQzMDhkYTAcommit}(author}(namehaynescdemailhaynescd@chop.edudate2023-07-06T15:45:03Zu	committer}(jR>  haynescdjT>  haynescd@chop.edujV>  2023-07-06T15:45:03Zumessage,Add parallelStream for getClinicalDataCountstree}(jJ>  (c23126a8db1e2e8d4534e72d4d1864c94d1c67cfurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c23126a8db1e2e8d4534e72d4d1864c94d1c67cfujb>  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/34425b0c0b48de8ca46fa0ac6072656054308da0
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujb>  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/34425b0c0b48de8ca46fa0ac6072656054308da0html_urlXhttps://github.com/cBioPortal/cbioportal/commit/34425b0c0b48de8ca46fa0ac6072656054308da0comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/34425b0c0b48de8ca46fa0ac6072656054308da0/commentsjP>  }(loginhaynescdidJ jL>  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5jb>  %https://api.github.com/users/haynescdjn>  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminujX>  }(js>  haynescdju>  J jL>  MDQ6VXNlcjMzNjA4OTIwjw>  4https://avatars.githubusercontent.com/u/33608920?v=4jy>  h5jb>  %https://api.github.com/users/haynescdjn>  https://github.com/haynescdj|>  /https://api.github.com/users/haynescd/followersj~>  <https://api.github.com/users/haynescd/following{/other_user}j>  5https://api.github.com/users/haynescd/gists{/gist_id}j>  <https://api.github.com/users/haynescd/starred{/owner}{/repo}j>  3https://api.github.com/users/haynescd/subscriptionsj>  *https://api.github.com/users/haynescd/orgsj>  +https://api.github.com/users/haynescd/reposj>  6https://api.github.com/users/haynescd/events{/privacy}j>  5https://api.github.com/users/haynescd/received_eventsj>  Userj>  uparents]}(jJ>  (a869c2a52ed0cfefa7a52a7abe378a2e4f3ca156jb>  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/a869c2a52ed0cfefa7a52a7abe378a2e4f3ca156jn>  Xhttps://github.com/cBioPortal/cbioportal/commit/a869c2a52ed0cfefa7a52a7abe378a2e4f3ca156uastats}(totalK	additionsK	deletionsKufiles]}(jJ>  (abb17400c8cfb75d3a5457057ed553a151a4ad7dfilenameKservice/src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.javastatusmodifiedj>  Kj>  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/34425b0c0b48de8ca46fa0ac6072656054308da0/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/34425b0c0b48de8ca46fa0ac6072656054308da0/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.java?ref=34425b0c0b48de8ca46fa0ac6072656054308da0patchXX  @@ -276,7 +276,7 @@ public List<ClinicalDataCountItem> getClinicalDataCountsFromColumnStore(StudyVie
         
         return studyViewRepository.getClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, filteredAttributes)
             .stream().collect(Collectors.groupingBy(ClinicalDataCount::getAttributeId))
-            .entrySet().stream().map(e -> {
+            .entrySet().parallelStream().map(e -> {
                 ClinicalDataCountItem item = new ClinicalDataCountItem();
                 item.setAttributeId(e.getKey());
                 item.setCounts(e.getValue());uau(e2821be287184655e99a2cd0dd0f4373f66ba53d}(sha(e2821be287184655e99a2cd0dd0f4373f66ba53dnode_idEC_kwDOAe-hB9oAKGUyODIxYmUyODcxODQ2NTVlOTlhMmNkMGRkMGY0MzczZjY2YmE1M2Qcommit}(author}(namehaynescdemailhaynescd@chop.edudate2023-06-29T20:33:25Zu	committer}(j>  haynescdj>  haynescd@chop.eduj>  2023-06-30T13:21:36Zumessage@Update StudyView Mapper to utilize CategorizedClinicalDataFiltertree}(j>  (78e40e03c233037a7d1744bf8aeab2cb07c577fcurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/78e40e03c233037a7d1744bf8aeab2cb07c577fcuj>  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/e2821be287184655e99a2cd0dd0f4373f66ba53d
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj>  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/e2821be287184655e99a2cd0dd0f4373f66ba53dhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/e2821be287184655e99a2cd0dd0f4373f66ba53dcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/e2821be287184655e99a2cd0dd0f4373f66ba53d/commentsj>  }(loginhaynescdidJ j>  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5j>  %https://api.github.com/users/haynescdj>  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminuj>  }(j>  haynescdj>  J j>  MDQ6VXNlcjMzNjA4OTIwj>  4https://avatars.githubusercontent.com/u/33608920?v=4j>  h5j>  %https://api.github.com/users/haynescdj>  https://github.com/haynescdj>  /https://api.github.com/users/haynescd/followersj>  <https://api.github.com/users/haynescd/following{/other_user}j>  5https://api.github.com/users/haynescd/gists{/gist_id}j>  <https://api.github.com/users/haynescd/starred{/owner}{/repo}j>  3https://api.github.com/users/haynescd/subscriptionsj>  *https://api.github.com/users/haynescd/orgsj>  +https://api.github.com/users/haynescd/reposj>  6https://api.github.com/users/haynescd/events{/privacy}j?  5https://api.github.com/users/haynescd/received_eventsj?  Userj?  uparents]}(j>  (18819b109ea7cdcb4ad54e526332806d00cabdf1j>  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/18819b109ea7cdcb4ad54e526332806d00cabdf1j>  Xhttps://github.com/cBioPortal/cbioportal/commit/18819b109ea7cdcb4ad54e526332806d00cabdf1uastats}(totalM3	additionsM	deletionsKufiles](}(j>  (67d60d265e324869afa5d49fee6dab3853503f78filename]persistence/persistence-api/src/main/java/org/cbioportal/persistence/StudyViewRepository.javastatusmodifiedj?  Kj ?  KchangesK
blob_urlhttps://github.com/cBioPortal/cbioportal/blob/e2821be287184655e99a2cd0dd0f4373f66ba53d/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStudyViewRepository.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/e2821be287184655e99a2cd0dd0f4373f66ba53d/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStudyViewRepository.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStudyViewRepository.java?ref=e2821be287184655e99a2cd0dd0f4373f66ba53dpatchX&  @@ -2,12 +2,18 @@
 
 import org.cbioportal.model.AlterationCountByGene;
 import org.cbioportal.model.Sample;
+import org.cbioportal.persistence.enums.ClinicalAttributeDataSource;
+import org.cbioportal.persistence.enums.ClinicalAttributeDataType;
+import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
 import org.cbioportal.webparam.StudyViewFilter;
 
 import java.util.List;
 
 public interface StudyViewRepository {
-    List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter);
+    List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
+
+    List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
+
+    List<String> getClinicalDataAttributeNames(ClinicalAttributeDataSource clinicalAttributeDataSource, ClinicalAttributeDataType dataType);
 
-    List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter);
 }u}(j>  (ed320c1cebdeb86e26975a96186b3d90fb93e204j%?  kpersistence/persistence-api/src/main/java/org/cbioportal/persistence/enums/ClinicalAttributeDataSource.javaj'?  addedj?  Kj ?  K j)?  Kj*?  https://github.com/cBioPortal/cbioportal/blob/e2821be287184655e99a2cd0dd0f4373f66ba53d/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fenums%2FClinicalAttributeDataSource.javaj,?  https://github.com/cBioPortal/cbioportal/raw/e2821be287184655e99a2cd0dd0f4373f66ba53d/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fenums%2FClinicalAttributeDataSource.javaj.?  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fenums%2FClinicalAttributeDataSource.java?ref=e2821be287184655e99a2cd0dd0f4373f66ba53dj0?  X`  @@ -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;
+    }
+}u}(j>  (591f67e117d28f576de9bf7566af8ad425820ee4j%?  ipersistence/persistence-api/src/main/java/org/cbioportal/persistence/enums/ClinicalAttributeDataType.javaj'?  addedj?  Kj ?  K j)?  Kj*?  https://github.com/cBioPortal/cbioportal/blob/e2821be287184655e99a2cd0dd0f4373f66ba53d/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fenums%2FClinicalAttributeDataType.javaj,?  https://github.com/cBioPortal/cbioportal/raw/e2821be287184655e99a2cd0dd0f4373f66ba53d/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fenums%2FClinicalAttributeDataType.javaj.?  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fenums%2FClinicalAttributeDataType.java?ref=e2821be287184655e99a2cd0dd0f4373f66ba53dj0?  Xl  @@ -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;
+    }
+}u}(j>  (c6eb088729513d9572a3d7ddbb96f20265575a21j%?  ppersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.javaj'?  modifiedj?  Kj ?  Kj)?  Kj*?  https://github.com/cBioPortal/cbioportal/blob/e2821be287184655e99a2cd0dd0f4373f66ba53d/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.javaj,?  https://github.com/cBioPortal/cbioportal/raw/e2821be287184655e99a2cd0dd0f4373f66ba53d/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.javaj.?  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.java?ref=e2821be287184655e99a2cd0dd0f4373f66ba53dj0?  X*  @@ -2,11 +2,14 @@
 
 import org.cbioportal.model.AlterationCountByGene;
 import org.cbioportal.model.Sample;
+import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
 import org.cbioportal.webparam.StudyViewFilter;
 
 import java.util.List;
 
 public interface StudyViewMapper {
-    List<Sample> getFilteredSamples(StudyViewFilter studyViewFilter);
-    List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter);
+    List<Sample> getFilteredSamples(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
+    List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
+   
+    List<String> getClinicalAttributeNames(String tableName);
 }u}(j>  (aeabf1dc71c0efa4617c4173ea07e60f0ee67d04j%?  {persistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepository.javaj'?  modifiedj?  Kj ?  Kj)?  Kj*?  https://github.com/cBioPortal/cbioportal/blob/e2821be287184655e99a2cd0dd0f4373f66ba53d/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.javaj,?  https://github.com/cBioPortal/cbioportal/raw/e2821be287184655e99a2cd0dd0f4373f66ba53d/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.javaj.?  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.java?ref=e2821be287184655e99a2cd0dd0f4373f66ba53dj0?  X  @@ -3,6 +3,9 @@
 import org.cbioportal.model.AlterationCountByGene;
 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.webparam.CategorizedClinicalDataCountFilter;
 import org.cbioportal.webparam.StudyViewFilter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Repository;
@@ -16,12 +19,20 @@ public class StudyViewMyBatisRepository implements StudyViewRepository {
     private StudyViewMapper studyViewMapper;
     
     @Override
-    public List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter) {
-        return studyViewMapper.getFilteredSamples(studyViewFilter);
+    public List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) {
+        return studyViewMapper.getFilteredSamples(studyViewFilter, categorizedClinicalDataCountFilter);
     }
     
     @Override
-    public List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter) {
-        return studyViewMapper.getMutatedGenes(studyViewFilter);
+    public List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) {
+        return studyViewMapper.getMutatedGenes(studyViewFilter, categorizedClinicalDataCountFilter);
     }
+
+    @Override
+    public List<String> getClinicalDataAttributeNames(ClinicalAttributeDataSource clinicalAttributeDataSource, ClinicalAttributeDataType dataType) {
+        String tableName = clinicalAttributeDataSource.getValue().toLowerCase() + "_clinical_attribute_" + dataType.getValue().toLowerCase();
+        return studyViewMapper.getClinicalAttributeNames(tableName);
+    }
+
+
 }
\ No newline at end of fileu}(j>  (bad4e0b82b471c81b69d651370b0f83c9909ab94j%?  tpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmlj'?  modifiedj?  Kj ?  Kj)?  K*j*?  https://github.com/cBioPortal/cbioportal/blob/e2821be287184655e99a2cd0dd0f4373f66ba53d/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlj,?  https://github.com/cBioPortal/cbioportal/raw/e2821be287184655e99a2cd0dd0f4373f66ba53d/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlj.?  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=e2821be287184655e99a2cd0dd0f4373f66ba53dj0?  X  @@ -39,31 +39,31 @@
     <!-- This block represents the Study View Filter -->
     <sql id="sampleUniqueIdsFromStudyViewFilter">
         <trim prefixOverrides="INTERSECT">
-            <if test="studyIds != null and !studyIds.isEmpty()">
+            <if test="studyViewFilter.studyIds != null and !studyViewFilter.studyIds.isEmpty()">
                 INTERSECT
                 SELECT sample_unique_id
                 FROM sample
                 WHERE cancer_study_identifier IN
-                <foreach item="studyId" collection="studyIds" open="(" separator="," close=")">
+                <foreach item="studyId" collection="studyViewFilter.studyIds" open="(" separator="," close=")">
                     #{studyId}
                 </foreach>
             </if>
-            <if test="sampleIdentifiers != null and !sampleIdentifiers.isEmpty()">
+            <if test="studyViewFilter.sampleIdentifiers != null and !studyViewFilter.sampleIdentifiers.isEmpty()">
                 INTERSECT
                 SELECT sample_unique_id
                 FROM sample
                 WHERE sample_unique_id IN
-                <foreach item="sampleIdentifier" collection="sampleIdentifiers" open="(" separator="," close=")">
+                <foreach item="sampleIdentifier" collection="studyViewFilter.sampleIdentifiers" open="(" separator="," close=")">
                     #{sampleIdentifier.getStudyId()}_#{sampleIdentifier.getSampleId()}
                 </foreach>
             </if>
-            <if test="geneFilters != null and !geneFilters.isEmpty()">
+            <if test="studyViewFilter.geneFilters != null and !geneFilters.isEmpty()">
                 INTERSECT
                 SELECT sample_unique_id
                 FROM genomic_event
                 <where>
                     <trim prefixOverrides="OR">
-                        <foreach item="profileGroup" collection="geneFilters" open="OR (" separator="," close=")">
+                        <foreach item="profileGroup" collection="studyViewFilter.geneFilters" open="OR (" separator="," close=")">
                             genetic_profile_stable_id IN
                             <foreach item="molecularProfileId" collection="profileGroup.getMolecularProfileIds()" open="(" separator="," close=")">
                                 #{molecularProfileId}
@@ -104,8 +104,8 @@
                     </trim>
                  )
             </if>  -->
-             <if test="clinicalDataFilters != null and !clinicalDataFilters.isEmpty()">
-                <foreach item="clinicalDataFilter" collection="clinicalDataFilters" open="INTERSECT" separator="INTERSECT">
+            <if test="categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters() != null and !categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters().isEmpty()">
+                <foreach item="clinicalDataFilter" collection="categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters()" open="INTERSECT" separator="INTERSECT">
                     SELECT sample_unique_id
                     FROM sample_clinical_attribute_numeric
                     WHERE attribute_name = '${clinicalDataFilter.attributeId}'
@@ -114,18 +114,30 @@
                             <if test="dataFilterValue.value eq 'NA'">
                                 AND attribute_value = -1000000
                             </if>
-                            <if test="dataFilterValue.start != null">
-                                AND attribute_value &gt; ${dataFilterValue.start}
-                            </if>
-                            <if test="dataFilterValue.end != null">
-                                AND attribute_value &lt;= ${dataFilterValue.end}
-                            </if>
+                            <choose>
+                                <when test="dataFilterValue.start == dataFilterValue.end">
+                                    AND ABS(attribute_value - ${dataFilterValue.start}) &lt; EXP(-11) 
+                                </when>
+                                <otherwise>
+                                    <if test="dataFilterValue.start != null">
+                                        AND attribute_value &gt; ${dataFilterValue.start}
+                                    </if>
+                                    <if test="dataFilterValue.end != null">
+                                        AND attribute_value &lt;= ${dataFilterValue.end}
+                                    </if>
+                                </otherwise>
+                            </choose>
                         </trim>
                     </foreach>
-                </foreach>                
+                </foreach>
             </if>
             <!-- ... extend for other elements of the StudyViewFilter object -->
         </trim>
     </sql>
 
+    <select id="getClinicalAttributeNames" resultType="String">
+        SELECT
+        DISTINCT(attribute_name)
+        FROM ${tableName};
+    </select>
 </mapper>u}(j>  (9a9ad57dbf32b993cdb72697b1787f4ea414a89aj%?  persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepositoryTest.javaj'?  modifiedj?  K&j ?  Kj)?  K+j*?  https://github.com/cBioPortal/cbioportal/blob/e2821be287184655e99a2cd0dd0f4373f66ba53d/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaj,?  https://github.com/cBioPortal/cbioportal/raw/e2821be287184655e99a2cd0dd0f4373f66ba53d/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaj.?  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.java?ref=e2821be287184655e99a2cd0dd0f4373f66ba53dj0?  X  @@ -2,6 +2,9 @@
 
 import org.cbioportal.model.AlterationCountByGene;
 import org.cbioportal.model.Sample;
+import org.cbioportal.persistence.enums.ClinicalAttributeDataSource;
+import org.cbioportal.persistence.enums.ClinicalAttributeDataType;
+import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
 import org.cbioportal.webparam.ClinicalDataFilter;
 import org.cbioportal.webparam.DataFilterValue;
 import org.cbioportal.webparam.StudyViewFilter;
@@ -14,9 +17,12 @@
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 import java.math.BigDecimal;
-import java.util.*;
+import java.util.Arrays;
+import java.util.Collections;
 import java.util.function.Function;
 import java.util.stream.Collectors;
+import java.util.ArrayList;
+import java.util.List;
 
 @RunWith(SpringJUnit4ClassRunner.class)
 @ContextConfiguration("/testContextDatabaseClickhouse.xml")
@@ -31,7 +37,7 @@ public void getFilteredSamples() {
         StudyViewFilter studyViewFilter = generateStudyViewFilter(new String[]{"msk_ch_2020", "msk_impact_2017"}, null);
         
         // test total number of samples
-        List<Sample> samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter);
+        List<Sample> samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build());
         Assert.assertEquals(11, samples.size());
         
         // test sample numerical clinical attributes
@@ -42,18 +48,17 @@ public void getFilteredSamples() {
             )
         );
 
-        samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter);
+        samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build());
         Assert.assertEquals(2, samples.size());
     }
 
     @Test
     public void getMutatedGenes() {
         StudyViewFilter studyViewFilter = generateStudyViewFilter(new String[]{"msk_ch_2020"}, null);
 
-        List<AlterationCountByGene> mutations = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter);
+        List<AlterationCountByGene> mutations = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build());
         Assert.assertEquals(2, mutations.size());
     }
-
     
     private StudyViewFilter generateStudyViewFilter(
         String[] studyIds,
@@ -101,4 +106,32 @@ private ClinicalDataFilter generateClinicalDataFilter(String attributeId, String
         
         return dataFilterValue;
     };
+    @Test
+    public void getClinicalAttributeNames() {
+        List<String> names = studyViewMyBatisRepository.getClinicalDataAttributeNames(ClinicalAttributeDataSource.PATIENT, ClinicalAttributeDataType.CATEGORICAL);
+        Assert.assertTrue(names.size() > 0);
+        Assert.assertTrue(names.contains("OS_STATUS"));
+    }
+    
+    @Test
+    public void getFilterSamplesWithClinicalDataFilter() {
+        ClinicalDataFilter clinicalDataFilter = new ClinicalDataFilter();
+        clinicalDataFilter.setAttributeId("TMB_NONSYNONYMOUS");
+        DataFilterValue filterValue = new DataFilterValue();
+        filterValue.setStart(BigDecimal.valueOf(0.033333333));
+        filterValue.setEnd(BigDecimal.valueOf(0.033333333));
+        clinicalDataFilter.setValues(List.of(filterValue));
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = CategorizedClinicalDataCountFilter.getBuilder()
+            .setSampleNumericalClinicalDataFilters(List.of(clinicalDataFilter))
+            .build();
+
+        List<String> studyIds = new ArrayList<>();
+        studyIds.add("msk_ch_2020");
+        studyViewFilter.setStudyIds(studyIds);
+        
+        List<ClinicalDataFilter> test = categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters();
+        List<Sample> samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, categorizedClinicalDataCountFilter);
+        Assert.assertEquals(4507, samples.size()); 
+    }
 }
\ No newline at end of fileu}(j>  (010f0b5c9274fbeb45d28e62f65c15a7f91de2fcj%?  Kservice/src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.javaj'?  modifiedj?  K/j ?  Kj)?  K1j*?  https://github.com/cBioPortal/cbioportal/blob/e2821be287184655e99a2cd0dd0f4373f66ba53d/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj,?  https://github.com/cBioPortal/cbioportal/raw/e2821be287184655e99a2cd0dd0f4373f66ba53d/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj.?  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.java?ref=e2821be287184655e99a2cd0dd0f4373f66ba53dj0?  X6  @@ -5,10 +5,14 @@
 import org.cbioportal.model.*;
 import org.cbioportal.model.util.Select;
 import org.cbioportal.persistence.StudyViewRepository;
+import org.cbioportal.persistence.enums.ClinicalAttributeDataSource;
+import org.cbioportal.persistence.enums.ClinicalAttributeDataType;
 import org.cbioportal.service.*;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.exception.StudyNotFoundException;
 import org.cbioportal.service.util.MolecularProfileUtil;
+import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
+import org.cbioportal.webparam.ClinicalDataFilter;
 import org.cbioportal.webparam.StudyViewFilter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -20,6 +24,9 @@
 @Service
 public class StudyViewServiceImpl implements StudyViewService {
     private static final List<CNA> CNA_TYPES_AMP_AND_HOMDEL = Collections.unmodifiableList(Arrays.asList(CNA.AMP, CNA.HOMDEL));
+    
+    private final Map<String, List<String>> clinicalAttributeNameMap = new HashMap<>();
+    
     @Autowired
     private MolecularProfileService molecularProfileService;
     @Autowired
@@ -252,11 +259,49 @@ public List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String>
 
     @Override
     public List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter) {
-        return studyViewRepository.getFilteredSamplesFromColumnstore(studyViewFilter);
+        CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter);
+        return studyViewRepository.getFilteredSamplesFromColumnstore(studyViewFilter, categorizedClinicalDataCountFilter);
     }
 
     @Override
     public List<AlterationCountByGene> getMutatedGenesFromColumnstore(StudyViewFilter studyViewFilter) {
-        return studyViewRepository.getMutatedGenes(studyViewFilter);
+        CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter);
+        return studyViewRepository.getMutatedGenes(studyViewFilter, categorizedClinicalDataCountFilter);
+    }
+    
+    private CategorizedClinicalDataCountFilter extractClinicalDataCountFilters(final StudyViewFilter studyViewFilter) {
+        if(clinicalAttributeNameMap.isEmpty()) {
+           buildClinicalAttributeNameMap(); 
+        }
+        
+        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<ClinicalAttributeDataSource> 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));
+       }
     }
 }u}(j>  (76f9629ca2e3610466678630d377dadae57a904aj%?  Tweb/src/main/java/org/cbioportal/web/columnstore/StudyViewColumnStoreController.javaj'?  modifiedj?  K"j ?  Kj)?  K#j*?  https://github.com/cBioPortal/cbioportal/blob/e2821be287184655e99a2cd0dd0f4373f66ba53d/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.javaj,?  https://github.com/cBioPortal/cbioportal/raw/e2821be287184655e99a2cd0dd0f4373f66ba53d/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.javaj.?  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.java?ref=e2821be287184655e99a2cd0dd0f4373f66ba53dj0?  X
  @@ -4,9 +4,12 @@
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.ClinicalDataCountItem;
 import org.cbioportal.model.Sample;
 import org.cbioportal.service.StudyViewService;
 import org.cbioportal.web.config.annotation.InternalApi;
+import org.cbioportal.webparam.ClinicalDataCountFilter;
+import org.cbioportal.webparam.ClinicalDataFilter;
 import org.cbioportal.webparam.StudyViewFilter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
@@ -17,20 +20,25 @@
 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.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import springfox.documentation.annotations.ApiIgnore;
 
 import javax.validation.Valid;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
+import java.util.stream.Collectors;
 
 @InternalApi
 @RestController
 @Validated
 @Api(tags = "Study View Column Store")
 public class StudyViewColumnStoreController {
-
+    
+    private static final String COLUMN_STORE_ENDPOINT_PREFIX="/column-store";
+    
     @Autowired
     private StudyViewService studyViewService;
     
@@ -70,4 +78,29 @@ public ResponseEntity<List<AlterationCountByGene>> fetchMutatedGenes(
             HttpStatus.OK
         );
     }
+
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', 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)
+    @ApiOperation("Fetch clinical data counts by study view filter")
+    public ResponseEntity<List<ClinicalDataCountItem>> fetchClinicalDataCounts(
+        @ApiParam(required = true, value = "Clinical data count filter")
+        @Valid @RequestBody(required = false) ClinicalDataCountFilter clinicalDataCountFilter,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface. this attribute is needed for the @PreAuthorize tag above.
+        @Valid @RequestAttribute(required = false, value = "interceptedClinicalDataCountFilter") ClinicalDataCountFilter interceptedClinicalDataCountFilter) {
+
+        List<ClinicalDataFilter> attributes = interceptedClinicalDataCountFilter.getAttributes();
+        StudyViewFilter studyViewFilter = interceptedClinicalDataCountFilter.getStudyViewFilter();
+
+        //if (attributes.size() == 1) {
+          //  studyViewFilterUtil.removeSelfFromFilter(attributes.get(0).getAttributeId(), studyViewFilter);
+       // }
+       // boolean singleStudyUnfiltered = studyViewFilterUtil.isSingleStudyUnfiltered(studyViewFilter);
+        List<ClinicalDataCountItem> result = new ArrayList<>();//clinicalDataService.fetchClinicalDataCounts(
+            //studyIds, sampleIds, attributes.stream().map(a -> a.getAttributeId()).collect(Collectors.toList())); 
+        return new ResponseEntity<>(result, HttpStatus.OK);
+
+    }
 }u}(j>  (cc56f9a8803482637ebf159a35128587c6f563e9j%?  Vwebparam/src/main/java/org/cbioportal/webparam/CategorizedClinicalDataCountFilter.javaj'?  addedj?  KGj ?  K j)?  KGj*?  https://github.com/cBioPortal/cbioportal/blob/e2821be287184655e99a2cd0dd0f4373f66ba53d/webparam%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fwebparam%2FCategorizedClinicalDataCountFilter.javaj,?  https://github.com/cBioPortal/cbioportal/raw/e2821be287184655e99a2cd0dd0f4373f66ba53d/webparam%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fwebparam%2FCategorizedClinicalDataCountFilter.javaj.?  https://api.github.com/repos/cBioPortal/cbioportal/contents/webparam%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fwebparam%2FCategorizedClinicalDataCountFilter.java?ref=e2821be287184655e99a2cd0dd0f4373f66ba53dj0?  Xv  @@ -0,0 +1,71 @@
+package org.cbioportal.webparam;
+
+import java.util.List;
+
+public final class CategorizedClinicalDataCountFilter {
+
+    public static Builder getBuilder() {
+        return new Builder();
+    }
+    private final List<ClinicalDataFilter> sampleNumericalClinicalDataFilters;
+    private final List<ClinicalDataFilter> sampleCategoricalClinicalDataFilters;
+    private final List<ClinicalDataFilter> patientNumericalClinicalDataFilters;
+    private final List<ClinicalDataFilter> patientCategoricalClinicalDataFilters;
+    private CategorizedClinicalDataCountFilter(Builder builder) {
+       this.sampleCategoricalClinicalDataFilters = builder.sampleCategoricalClinicalDataFilters;
+       this.sampleNumericalClinicalDataFilters = builder.sampleNumericalClinicalDataFilters;
+       this.patientCategoricalClinicalDataFilters = builder.patientCategoricalClinicalDataFilters;
+       this.patientNumericalClinicalDataFilters = builder.patientNumericalClinicalDataFilters;
+    }
+
+    public List<ClinicalDataFilter> getSampleNumericalClinicalDataFilters() {
+        return sampleNumericalClinicalDataFilters;
+    }
+
+    public List<ClinicalDataFilter> getSampleCategoricalClinicalDataFilters() {
+        return sampleCategoricalClinicalDataFilters;
+    }
+
+    public List<ClinicalDataFilter> getPatientNumericalClinicalDataFilters() {
+        return patientNumericalClinicalDataFilters;
+    }
+
+    public List<ClinicalDataFilter> getPatientCategoricalClinicalDataFilters() {
+        return patientCategoricalClinicalDataFilters;
+    }
+
+
+    public static class Builder {
+        private List<ClinicalDataFilter> sampleNumericalClinicalDataFilters;
+        private List<ClinicalDataFilter> sampleCategoricalClinicalDataFilters;
+        private List<ClinicalDataFilter> patientNumericalClinicalDataFilters;
+        private List<ClinicalDataFilter> patientCategoricalClinicalDataFilters;
+
+        private Builder(){
+            
+        }
+        public Builder setSampleCategoricalClinicalDataFilters(List<ClinicalDataFilter> sampleCategoricalClinicalDataFilters) {
+            this.sampleCategoricalClinicalDataFilters = sampleCategoricalClinicalDataFilters;
+            return this;
+        }
+
+        public Builder setSampleNumericalClinicalDataFilters(List<ClinicalDataFilter> sampleNumericalClinicalDataFilters) {
+            this.sampleNumericalClinicalDataFilters = sampleNumericalClinicalDataFilters;
+            return this;
+        }
+
+        public Builder setPatientCategoricalClinicalDataFilters(List<ClinicalDataFilter> patientCategoricalClinicalDataFilters) {
+            this.patientCategoricalClinicalDataFilters = patientCategoricalClinicalDataFilters;
+            return this;
+        }
+
+        public Builder setPatientNumericalClinicalDataFilters(List<ClinicalDataFilter> patientNumericalClinicalDataFilters) {
+            this.patientNumericalClinicalDataFilters = patientNumericalClinicalDataFilters;
+            return this; 
+        }
+        
+        public CategorizedClinicalDataCountFilter build() {
+            return new CategorizedClinicalDataCountFilter(this);
+        }
+    }
+}ueu(8d0008b61e04211528408d6cd8de4dd31551c4ea}(sha(8d0008b61e04211528408d6cd8de4dd31551c4eanode_idEC_kwDOAe-hB9oAKDhkMDAwOGI2MWUwNDIxMTUyODQwOGQ2Y2Q4ZGU0ZGQzMTU1MWM0ZWEcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-05-24T18:47:52Zu	committer}(j?  GitHubj?  noreply@github.comj?  2023-05-24T18:47:52ZumessageTMerge pull request #10193 from cBioPortal/fix-integration-test

Fix integration testtree}(j|?  (3473ac9e56227267066b8fc97e2f0f760fa8142curlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/3473ac9e56227267066b8fc97e2f0f760fa8142cuj?  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/8d0008b61e04211528408d6cd8de4dd31551c4ea
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkblvYCRBK7hj4Ov3rIwAAuLQIAH/R3F3xbxcWog015CUEG7AS
SWonq+n+rLTpVFuZZSOPphXFqW+PLT+/W/YSlBH25x16zuAZFFLtVUTk9Im1pcph
OFE+iIqv9f2UdnuGnR6CSYNbwxJJNojVTJK9qEyPZUjWDu5G597qXhIXJqoVsPRG
MZf5Ixhn5/MuQFxCGnjTzEA5vBjj2AMjf0uy4dFa18HmeFy7EcQiq5BT0pw4hl1q
qR9KZH17RvMDfLQv/b+yR+DeJqGLwGxep0ESyEsivVWU/JHk0ZtjAqNQKk79UKPm
aU4QO6r/2+4/urFtqeoWRSNGTBA5/wfO2gumHaKL4YEspJi4eTmQtbISLGRcV1M=
=SCM6
-----END PGP SIGNATURE-----
payloadXm  tree 3473ac9e56227267066b8fc97e2f0f760fa8142c
parent 16da69be4c385ae3d8098baee347fbaf3913c591
parent 326e765a4f8b615b2f308dcbab110931362d4eec
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1684954072 -0600
committer GitHub <noreply@github.com> 1684954072 -0600

Merge pull request #10193 from cBioPortal/fix-integration-test

Fix integration testuuj?  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8d0008b61e04211528408d6cd8de4dd31551c4eahtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/8d0008b61e04211528408d6cd8de4dd31551c4eacomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/8d0008b61e04211528408d6cd8de4dd31551c4ea/commentsj?  }(login
dippindotsidJtO j~?  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j?  'https://api.github.com/users/dippindotsj?  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}P      	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj?  }(j?  web-flowj?  J/j~?  MDQ6VXNlcjE5ODY0NDQ3j?  4https://avatars.githubusercontent.com/u/19864447?v=4j?  h5j?  %https://api.github.com/users/web-flowj?  https://github.com/web-flowj?  /https://api.github.com/users/web-flow/followersj?  <https://api.github.com/users/web-flow/following{/other_user}j?  5https://api.github.com/users/web-flow/gists{/gist_id}j?  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j?  3https://api.github.com/users/web-flow/subscriptionsj?  *https://api.github.com/users/web-flow/orgsj?  +https://api.github.com/users/web-flow/reposj?  6https://api.github.com/users/web-flow/events{/privacy}j?  5https://api.github.com/users/web-flow/received_eventsj?  Userj?  uparents](}(j|?  (16da69be4c385ae3d8098baee347fbaf3913c591j?  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/16da69be4c385ae3d8098baee347fbaf3913c591j?  Xhttps://github.com/cBioPortal/cbioportal/commit/16da69be4c385ae3d8098baee347fbaf3913c591u}(j|?  (326e765a4f8b615b2f308dcbab110931362d4eecj?  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/326e765a4f8b615b2f308dcbab110931362d4eecj?  Xhttps://github.com/cBioPortal/cbioportal/commit/326e765a4f8b615b2f308dcbab110931362d4eecuestats}(totalK	additionsK	deletionsK ufiles]}(j|?  (d0d60663f3e84646d610c130e85a1f70d8f42d38filename#test/integration/test_load_study.shstatusmodifiedj?  Kj?  K changesKblob_url~https://github.com/cBioPortal/cbioportal/blob/8d0008b61e04211528408d6cd8de4dd31551c4ea/test%2Fintegration%2Ftest_load_study.shraw_url}https://github.com/cBioPortal/cbioportal/raw/8d0008b61e04211528408d6cd8de4dd31551c4ea/test%2Fintegration%2Ftest_load_study.shcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/test%2Fintegration%2Ftest_load_study.sh?ref=8d0008b61e04211528408d6cd8de4dd31551c4eapatchX  @@ -17,6 +17,8 @@ run_in_service cbioportal "cd /cbioportal/core/src/main/scripts/ && perl importG
                           /cbioportal/core/src/test/scripts/test_data/study_es_0/data_gene_panel_testpanel1.txt"
 run_in_service cbioportal "cd /cbioportal/core/src/main/scripts/ && perl importGenePanel.pl --data \
                           /cbioportal/core/src/test/scripts/test_data/study_es_0/data_gene_panel_testpanel2.txt"
+run_in_service cbioportal "cd /cbioportal/core/src/main/scripts/ && echo yes | ./importGenesetData.pl --data /cbioportal/core/src/test/resources/genesets/study_es_0_genesets.gmt --new-version msigdb_7.5.1 --supp /cbioportal/core/src/test/resources/genesets/study_es_0_supp-genesets.txt"
+run_in_service cbioportal "cd /cbioportal/core/src/main/scripts/ && ./importGenesetHierarchy.pl --data /cbioportal/core/src/test/resources/genesets/study_es_0_tree.yaml"
 
 # dump portal info
 echo "Testing the dump of local portal info directory..."uau(383b6bb92bc0e81460fdd5629153315300d54638}(sha(383b6bb92bc0e81460fdd5629153315300d54638node_idEC_kwDOAe-hB9oAKDM4M2I2YmI5MmJjMGU4MTQ2MGZkZDU2MjkxNTMzMTUzMDBkNTQ2Mzgcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-06-06T17:27:11Zu	committer}(j?  GitHubj@  noreply@github.comj@  2023-06-06T17:27:11ZumessageFrontend v5.3.10tree}(j?  (6098e9ad22a65c27837a7c07fa64f0f49e95d0dburlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/6098e9ad22a65c27837a7c07fa64f0f49e95d0dbuj@  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/383b6bb92bc0e81460fdd5629153315300d54638
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkf2xvCRBK7hj4Ov3rIwAA9oQIAH2tmf7C0MUSHt+ll7NttBZL
xacXtgOMLOo9IlJp3hQ0wBFHq/obTvV5NmtS+gd1ASlnMc/lnmNXKhcXlbrYK0QE
jAECsHB2S6RgeOtS+4RwUGP60vh4a8RceAB/n9UlwA9KdgFBv36sNlNyYseGhfU+
CdKwKvF+Y3up+U/QvpmEFnFKAyBjpFDVzQuP0iCDuQ33wg1zTn81lFcohhmhN15J
VXkWUEBr6xmwvstsxZSrI1T8cGVQm5Uu1YlsYDazvwmPMtk04ZDcsPM+k/EPQ3dE
2lMqxA7maEOEiCRTugjghsBamjNf3HeRdZVqVExc06frt/kzDYz/Ksb7FXEZX8s=
=8kbq
-----END PGP SIGNATURE-----
payloadtree 6098e9ad22a65c27837a7c07fa64f0f49e95d0db
parent 838557f30e13d1f580806d87b3c32a0c4200e59d
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1686072431 -0600
committer GitHub <noreply@github.com> 1686072431 -0600

Frontend v5.3.10uuj@  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/383b6bb92bc0e81460fdd5629153315300d54638html_urlXhttps://github.com/cBioPortal/cbioportal/commit/383b6bb92bc0e81460fdd5629153315300d54638comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/383b6bb92bc0e81460fdd5629153315300d54638/commentsj?  }(login
dippindotsidJtO j?  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j@  'https://api.github.com/users/dippindotsj@  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj@  }(j"@  web-flowj$@  J/j?  MDQ6VXNlcjE5ODY0NDQ3j&@  4https://avatars.githubusercontent.com/u/19864447?v=4j(@  h5j@  %https://api.github.com/users/web-flowj@  https://github.com/web-flowj+@  /https://api.github.com/users/web-flow/followersj-@  <https://api.github.com/users/web-flow/following{/other_user}j/@  5https://api.github.com/users/web-flow/gists{/gist_id}j1@  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j3@  3https://api.github.com/users/web-flow/subscriptionsj5@  *https://api.github.com/users/web-flow/orgsj7@  +https://api.github.com/users/web-flow/reposj9@  6https://api.github.com/users/web-flow/events{/privacy}j;@  5https://api.github.com/users/web-flow/received_eventsj=@  Userj?@  uparents]}(j?  (838557f30e13d1f580806d87b3c32a0c4200e59dj@  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/838557f30e13d1f580806d87b3c32a0c4200e59dj@  Xhttps://github.com/cBioPortal/cbioportal/commit/838557f30e13d1f580806d87b3c32a0c4200e59duastats}(totalK	additionsK	deletionsKufiles]}(j?  (36f630c130441b9c24308888efa56a49e469bfa9filenamepom.xmlstatusmodifiedjY@  KjZ@  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/383b6bb92bc0e81460fdd5629153315300d54638/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/383b6bb92bc0e81460fdd5629153315300d54638/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=383b6bb92bc0e81460fdd5629153315300d54638patchXX  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.9</frontend.version>
+    <frontend.version>v5.3.10</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(62e2567a569faf7c3788de49464ba30f68ef8b25}(sha(62e2567a569faf7c3788de49464ba30f68ef8b25node_idEC_kwDOAe-hB9oAKDYyZTI1NjdhNTY5ZmFmN2MzNzg4ZGU0OTQ2NGJhMzBmNjhlZjhiMjUcommit}(author}(name
Anurag Saxenaemail.135354880+ccf-saxenaa@users.noreply.github.comdate2023-08-14T19:21:17Zu	committer}(jv@  GitHubjx@  noreply@github.comjz@  2023-08-14T19:21:17Zumessage:Update faq.md

Fix links from the list to the anchor tags.tree}(jn@  (76b59f5bd6eda8c8a78f07e28f17ee05301571e2urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/76b59f5bd6eda8c8a78f07e28f17ee05301571e2uj@  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/62e2567a569faf7c3788de49464ba30f68ef8b25
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk2n6tCRBK7hj4Ov3rIwAAwHMIADoQjYvrwbCi9ScSyFHEf7N3
a8QDu2YYJZN7Km8iiHlv+8kZ3Ll7wCzn10eCUh4fl5YrgrKkUe9svw2/D1ZjSZhp
EpBgL5w2kijtkRDo1XSCF5yiu4ehU1ecJqTI6B8250R/jZrLGPuArWFCbpTeaLvy
CRQol9peByYcng6N0gyAUVIUxtlznuVaQPjcVPr5JkDAm3kbEuYqWrBLj1+XrF2/
qfWAwjNMV2qnqgjclNK2B/EOmzTw5yj9VTecLhAjs68u5UxWtjMsEfcE2+sdZbx9
57fTUiPl9NJZ18UNxE1Q09X4QWz/pAJ2a3dKTKUO0Ejbf4wQ7HWCBKW6cS8QoUM=
=J+rM
-----END PGP SIGNATURE-----
payloadX'  tree 76b59f5bd6eda8c8a78f07e28f17ee05301571e2
parent 7f523c88026c238576852145307d59d23a5395a1
author Anurag Saxena <135354880+ccf-saxenaa@users.noreply.github.com> 1692040877 -0400
committer GitHub <noreply@github.com> 1692040877 -0400

Update faq.md

Fix links from the list to the anchor tags.uuj@  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/62e2567a569faf7c3788de49464ba30f68ef8b25html_urlXhttps://github.com/cBioPortal/cbioportal/commit/62e2567a569faf7c3788de49464ba30f68ef8b25comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/62e2567a569faf7c3788de49464ba30f68ef8b25/commentsjt@  }(loginccf-saxenaaidJ Zjp@  U_kgDOCBFaAA
avatar_url5https://avatars.githubusercontent.com/u/135354880?v=4gravatar_idh5j@  (https://api.github.com/users/ccf-saxenaaj@  https://github.com/ccf-saxenaa
followers_url2https://api.github.com/users/ccf-saxenaa/followers
following_url?https://api.github.com/users/ccf-saxenaa/following{/other_user}	gists_url8https://api.github.com/users/ccf-saxenaa/gists{/gist_id}starred_url?https://api.github.com/users/ccf-saxenaa/starred{/owner}{/repo}subscriptions_url6https://api.github.com/users/ccf-saxenaa/subscriptionsorganizations_url-https://api.github.com/users/ccf-saxenaa/orgs	repos_url.https://api.github.com/users/ccf-saxenaa/repos
events_url9https://api.github.com/users/ccf-saxenaa/events{/privacy}received_events_url8https://api.github.com/users/ccf-saxenaa/received_eventstypeUser
site_adminuj|@  }(j@  web-flowj@  J/jp@  MDQ6VXNlcjE5ODY0NDQ3j@  4https://avatars.githubusercontent.com/u/19864447?v=4j@  h5j@  %https://api.github.com/users/web-flowj@  https://github.com/web-flowj@  /https://api.github.com/users/web-flow/followersj@  <https://api.github.com/users/web-flow/following{/other_user}j@  5https://api.github.com/users/web-flow/gists{/gist_id}j@  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j@  3https://api.github.com/users/web-flow/subscriptionsj@  *https://api.github.com/users/web-flow/orgsj@  +https://api.github.com/users/web-flow/reposj@  6https://api.github.com/users/web-flow/events{/privacy}j@  5https://api.github.com/users/web-flow/received_eventsj@  Userj@  uparents]}(jn@  (7f523c88026c238576852145307d59d23a5395a1j@  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7f523c88026c238576852145307d59d23a5395a1j@  Xhttps://github.com/cBioPortal/cbioportal/commit/7f523c88026c238576852145307d59d23a5395a1uastats}(totalK	additionsKP	deletionsKPufiles]}(jn@  (9dd56a962db633f646668b9e9c42f27449edfcbcfilenamedocs/user-guide/faq.mdstatusmodifiedj@  KPj@  KPchangesKblob_urlqhttps://github.com/cBioPortal/cbioportal/blob/62e2567a569faf7c3788de49464ba30f68ef8b25/docs%2Fuser-guide%2Ffaq.mdraw_urlphttps://github.com/cBioPortal/cbioportal/raw/62e2567a569faf7c3788de49464ba30f68ef8b25/docs%2Fuser-guide%2Ffaq.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fuser-guide%2Ffaq.md?ref=62e2567a569faf7c3788de49464ba30f68ef8b25patchXej  @@ -2,84 +2,84 @@
 
 
 * [General Questions](#general-questions)
-    * [What is the cBioPortal for Cancer Genomics?](/user-guide/faq.md#what-is-the-cbioportal-for-cancer-genomics)
-    * [How do I get started?](/user-guide/faq.md#how-do-i-get-started)
-    * [What data types are in the portal?](/user-guide/faq.md#what-data-types-are-in-the-portal)
+    * [What is the cBioPortal for Cancer Genomics?](#what-is-the-cbioportal-for-cancer-genomics)
+    * [How do I get started?](#how-do-i-get-started)
+    * [What data types are in the portal?](#what-data-types-are-in-the-portal)
     * [What does ___ stand for?](#what-does-___-stand-for)
-    * [What is the process of data curation?](/user-guide/faq.md#what-is-the-process-of-data-curation)
-    * [How do I get updates on new portal developments and new data sets?](/user-guide/faq.md#how-do-i-get-updates-on-new-portal-developments-and-new-data-sets)
-    * [Does the portal work on all browsers and operating systems?](/user-guide/faq.md#does-the-portal-work-on-all-browsers-and-operating-systems)
-    * [How do I cite the cBioPortal?](/user-guide/faq.md#how-do-i-cite-the-cbioportal)
-    * [Can I use figures from the cBioPortal in my publications or presentations?](/user-guide/faq.md#can-i-use-figures-from-the-cbioportal-in-my-publications-or-presentations)
-    * [Can I save or bookmark my results in cBioPortal?](/user-guide/faq.md#can-i-save-or-bookmark-my-results-in-cbioportal)
-    * [How is the cBioPortal for Cancer Genomics different from the Genomic Data Commons (GDC)?](/user-guide/faq.md#how-is-the-cbioportal-for-cancer-genomics-different-from-the-genomic-data-commons-gdc)
-    * [Does the cBioPortal provide a Web Service API? R interface? MATLAB interface?](/user-guide/faq.md#does-the-cbioportal-provide-a-web-service-api-r-interface-matlab-interface)
-    * [Can I use cBioPortal with my own data?](/user-guide/faq.md#can-i-use-cbioportal-with-my-own-data)
-    * [Can I create a local instance of cBioPortal to host my own data?](/user-guide/faq.md#can-i-create-a-local-instance-of-cbioportal-to-host-my-own-data)
-    * [I'd like to contribute code to the cBioPortal. How do I get started?](/user-guide/faq.md#id-like-to-contribute-code-to-the-cbioportal-how-do-i-get-started)
-    * [What is a Virtual Study?](/user-guide/faq.md#what-is-a-virtual-study)
-    * [Is it necessary to log in to use virtual studies? If I do log in, what additional functionality do I gain?](/user-guide/faq.md#is-it-necessary-to-log-in-to-use-virtual-studies-if-i-do-log-in-what-additional-functionality-do-i-gain)
-    * [What is Group Comparison?](/user-guide/faq.md#what-is-group-comparison)
-    * [What are the statistical significance tests in Group Comparison?](/user-guide/faq.md#what-are-the-statistical-significance-tests-in-group-comparison)
-* [Data Questions](/user-guide/faq.md#data-questions)
-    * [General Data](/user-guide/faq.md#general-data)
-        * [Does the portal contain cancer study X?](/user-guide/faq.md#does-the-portal-contain-cancer-study-x)
-        * [Which resources are integrated for variant annotation?](/user-guide/faq.md#which-resources-are-integrated-for-variant-annotation)
-        * [What version of the human reference genome is being used in cBioPortal?](/user-guide/faq.md#what-version-of-the-human-reference-genome-is-being-used-in-cbioportal)
-        * [How does cBioPortal handle duplicate samples or sample IDs across different studies?](/user-guide/faq.md#how-does-cbioportal-handle-duplicate-samples-or-sample-ids-across-different-studies)
-        * [Are there any normal tissue samples available through cBioPortal?](/user-guide/faq.md#are-there-any-normal-tissue-samples-available-through-cbioportal)
-        * [How can I find which studies have mRNA expression data (or any other specific data type)?](/user-guide/faq.md#how-can-i-find-which-studies-have-mrna-expression-data-or-any-other-specific-data-type)
-        * [Can I download all data at once?](/user-guide/faq.md#can-i-download-all-data-at-once)
-        * [The data today is different than the last time i looked. What happened?](/user-guide/faq.md#the-data-today-is-different-than-the-last-time-i-looked-what-happened)
-        * [How do I access data from AACR Project GENIE?](/user-guide/faq.md#how-do-i-access-data-from-aacr-project-genie)
-    * [TCGA](/user-guide/faq.md#tcga)
-        * [How does TCGA data in cBioPortal compare to TCGA data in Genome Data Commons?](/user-guide/faq.md#how-does-tcga-data-in-cbioportal-compare-to-tcga-data-in-genome-data-commons)
-        * [What happened to TCGA Provisional datasets?](/user-guide/faq.md#what-happened-to-tcga-provisional-datasets)
-        * [What are TCGA Firehose Legacy datasets and how do they compare to the publication-associated datasets and the PanCancer Atlas datasets?](/user-guide/faq.md#what-are-tcga-firehose-legacy-datasets-and-how-do-they-compare-to-the-publication-associated-datasets-and-the-pancancer-atlas-datasets)
-        * [Where do the thresholded copy number call in TCGA Firehose Legacy data come from?](/user-guide/faq.md#where-do-the-thresholded-copy-number-call-in-tcga-firehose-legacy-data-come-from)
-        * [Which studies have MutSig and GISTIC results? How do these results compare to the data in the TCGA publications?](/user-guide/faq.md#which-studies-have-mutsig-and-gistic-results-how-do-these-results-compare-to-the-data-in-the-tcga-publications)
-        * [How can I download the PanCancer Atlas data?](/user-guide/faq.md#how-can-i-download-the-pancancer-atlas-data)
-    * [DNA (Mutations, Copy Number &amp; Fusions)](/user-guide/faq.md#dna-mutations-copy-number--fusions)
-        * [Does the cBioPortal contain synonymous mutation data?](/user-guide/faq.md#does-the-cbioportal-contain-synonymous-mutation-data)
-        * [What processing or filtering is applied to generate the mutation data?](/user-guide/faq.md#what-processing-or-filtering-is-applied-to-generate-the-mutation-data)
-        * [What transcripts are used for annotating mutations?](/user-guide/faq.md#what-transcripts-are-used-for-annotating-mutations)
-        * [How are protein domains in the mutational lollipop diagrams specified?](/user-guide/faq.md#how-are-protein-domains-in-the-mutational-lollipop-diagrams-specified)
-        * [What is the difference between a “splice site” mutation and a “splice region” mutation?](/user-guide/faq.md#what-is-the-difference-between-a-splice-site-mutation-and-a-splice-region-mutation)
-        * [What do “Amplification”, “Gain”, “Deep Deletion”, “Shallow Deletion” and "-2", "-1", "0", "1", and "2" mean in the copy-number data?](/user-guide/faq.md#what-do-amplification-gain-deep-deletion-shallow-deletion-and--2--1-0-1-and-2-mean-in-the-copy-number-data)
-        * [What is GISTIC? What is RAE?](/user-guide/faq.md#what-is-gistic-what-is-rae)
-    * [RNA](/user-guide/faq.md#rna)
-        * [Does the portal store raw or probe-level data?](/user-guide/faq.md#does-the-portal-store-raw-or-probe-level-data)
-        * [What are mRNA and microRNA Z-Scores?](/user-guide/faq.md#what-are-mrna-and-microrna-z-scores)
-        * [Is there any normal RNA-seq data in cBioPortal?](/user-guide/faq.md#is-there-any-normal-rna-seq-data-in-cbioportal)
-        * [How is TCGA RNASeqV2 processed? What units are used?](/user-guide/faq.md#how-is-tcga-rnaseqv2-processed-what-units-are-used)
-        * [Is there microRNA data?](/user-guide/faq.md#is-there-microrna-data)
-        * [How can I query microRNAs in the portal?](/user-guide/faq.md#how-can-i-query-micrornas-in-the-portal)
-    * [Protein](/user-guide/faq.md#protein)
-        * [How can I query phosphoprotein levels in the portal?](/user-guide/faq.md#how-can-i-query-phosphoprotein-levels-in-the-portal)
-        * [Why isn’t there protein data for my gene of interest?](/user-guide/faq.md#why-isnt-there-protein-data-for-my-gene-of-interest)
-    * [DNA Methylation](/user-guide/faq.md#dna-methylation)
-        * [Which methylation probe is used for genes with multiple probes?](/user-guide/faq.md#which-methylation-probe-is-used-for-genes-with-multiple-probes)
-    * [Clinical Data](/user-guide/faq.md#clinical-data)
-        * [What kind of clinical data is stored in the portal?](/user-guide/faq.md#what-kind-of-clinical-data-is-stored-in-the-portal)
-        * [What is the meaning of OS_STATUS / OS_MONTHS, and PFS_STATUS / PFS_MONTHS?](/user-guide/faq.md#what-is-the-meaning-of-os_status--os_months-and-pfs_status--pfs_months)
-* [Analysis Questions](/user-guide/faq.md#analysis-questions)
-    * [How can I query/explore a select subset of samples?](/user-guide/faq.md#how-can-i-queryexplore-a-select-subset-of-samples)
-    * [How can I compare two or more subsets of samples?](/user-guide/faq.md#how-can-i-compare-two-or-more-subsets-of-samples)
-    * [Is it possible to determine if a particular mutation is heterozygous or homozygous in a sample? When a sample has 2 mutations in one gene, is it possible to determine whether the mutations are in cis or in trans with each other?](/user-guide/faq.md#is-it-possible-to-determine-if-a-particular-mutation-is-heterozygous-or-homozygous-in-a-sample-when-a-sample-has-2-mutations-in-one-gene-is-it-possible-to-determine-whether-the-mutations-are-in-cis-or-in-trans-with-each-other)
-    * [How can I query over/under expression of a gene?](/user-guide/faq.md#how-can-i-query-overunder-expression-of-a-gene)
-    * [How can I compare outcomes in patients with high vs low expression of a gene?](/user-guide/faq.md#how-can-i-compare-outcomes-in-patients-with-high-vs-low-expression-of-a-gene)
-* [Results View](/user-guide/faq.md#results-view)
-    * [OncoPrint](/user-guide/faq.md#oncoprint)
-        * [What are OncoPrints?](/user-guide/faq.md#what-are-oncoprints)
-        * [Can I change the order of genes in the OncoPrint?](/user-guide/faq.md#can-i-change-the-order-of-genes-in-the-oncoprint)
-        * [Can I visualize my own data within an OncoPrint?](/user-guide/faq.md#can-i-visualize-my-own-data-within-an-oncoprint)
-        * [Why are some samples “Not profiled” for certain genes?](/user-guide/faq.md#why-are-some-samples-not-profiled-for-certain-genes)
-    * [Other pages](/user-guide/faq.md#other-pages)
-        * [Does the Mutual Exclusivity tab calculate its statistics using all samples/alterations or only a specific subset?](/user-guide/faq.md#does-the-mutual-exclusivity-tab-calculate-its-statistics-using-all-samplesalterations-or-only-a-specific-subset)
-        * [What are the values of the box and whiskers in a boxplot?](/user-guide/faq.md#what-are-the-values-of-the-box-and-whiskers-in-a-boxplot)
-* [Study View](/user-guide/faq.md#study-view)
-    * [How to use filter in the URL of Study View page?](/user-guide/faq.md#how-to-use-filter-in-the-url-of-study-view-page)
-* [What if I have other questions or comments?](/user-guide/faq.md#what-if-i-have-other-questions-or-comments)
+    * [What is the process of data curation?](#what-is-the-process-of-data-curation)
+    * [How do I get updates on new portal developments and new data sets?](#how-do-i-get-updates-on-new-portal-developments-and-new-data-sets)
+    * [Does the portal work on all browsers and operating systems?](#does-the-portal-work-on-all-browsers-and-operating-systems)
+    * [How do I cite the cBioPortal?](#how-do-i-cite-the-cbioportal)
+    * [Can I use figures from the cBioPortal in my publications or presentations?](#can-i-use-figures-from-the-cbioportal-in-my-publications-or-presentations)
+    * [Can I save or bookmark my results in cBioPortal?](#can-i-save-or-bookmark-my-results-in-cbioportal)
+    * [How is the cBioPortal for Cancer Genomics different from the Genomic Data Commons (GDC)?](#how-is-the-cbioportal-for-cancer-genomics-different-from-the-genomic-data-commons-gdc)
+    * [Does the cBioPortal provide a Web Service API? R interface? MATLAB interface?](#does-the-cbioportal-provide-a-web-service-api-r-interface-matlab-interface)
+    * [Can I use cBioPortal with my own data?](#can-i-use-cbioportal-with-my-own-data)
+    * [Can I create a local instance of cBioPortal to host my own data?](#can-i-create-a-local-instance-of-cbioportal-to-host-my-own-data)
+    * [I'd like to contribute code to the cBioPortal. How do I get started?](#id-like-to-contribute-code-to-the-cbioportal-how-do-i-get-started)
+    * [What is a Virtual Study?](#what-is-a-virtual-study)
+    * [Is it necessary to log in to use virtual studies? If I do log in, what additional functionality do I gain?](#is-it-necessary-to-log-in-to-use-virtual-studies-if-i-do-log-in-what-additional-functionality-do-i-gain)
+    * [What is Group Comparison?](#what-is-group-comparison)
+    * [What are the statistical significance tests in Group Comparison?](#what-are-the-statistical-significance-tests-in-group-comparison)
+* [Data Questions](#data-questions)
+    * [General Data](#general-data)
+        * [Does the portal contain cancer study X?](#does-the-portal-contain-cancer-study-x)
+        * [Which resources are integrated for variant annotation?](#which-resources-are-integrated-for-variant-annotation)
+        * [What version of the human reference genome is being used in cBioPortal?](#what-version-of-the-human-reference-genome-is-being-used-in-cbioportal)
+        * [How does cBioPortal handle duplicate samples or sample IDs across different studies?](#how-does-cbioportal-handle-duplicate-samples-or-sample-ids-across-different-studies)
+        * [Are there any normal tissue samples available through cBioPortal?](#are-there-any-normal-tissue-samples-available-through-cbioportal)
+        * [How can I find which studies have mRNA expression data (or any other specific data type)?](#how-can-i-find-which-studies-have-mrna-expression-data-or-any-other-specific-data-type)
+        * [Can I download all data at once?](#can-i-download-all-data-at-once)
+        * [The data today is different than the last time i looked. What happened?](#the-data-today-is-different-than-the-last-time-i-looked-what-happened)
+        * [How do I access data from AACR Project GENIE?](#how-do-i-access-data-from-aacr-project-genie)
+    * [TCGA](#tcga)
+        * [How does TCGA data in cBioPortal compare to TCGA data in Genome Data Commons?](#how-does-tcga-data-in-cbioportal-compare-to-tcga-data-in-genome-data-commons)
+        * [What happened to TCGA Provisional datasets?](#what-happened-to-tcga-provisional-datasets)
+        * [What are TCGA Firehose Legacy datasets and how do they compare to the publication-associated datasets and the PanCancer Atlas datasets?](#what-are-tcga-firehose-legacy-datasets-and-how-do-they-compare-to-the-publication-associated-datasets-and-the-pancancer-atlas-datasets)
+        * [Where do the thresholded copy number call in TCGA Firehose Legacy data come from?](#where-do-the-thresholded-copy-number-call-in-tcga-firehose-legacy-data-come-from)
+        * [Which studies have MutSig and GISTIC results? How do these results compare to the data in the TCGA publications?](#which-studies-have-mutsig-and-gistic-results-how-do-these-results-compare-to-the-data-in-the-tcga-publications)
+        * [How can I download the PanCancer Atlas data?](#how-can-i-download-the-pancancer-atlas-data)
+    * [DNA (Mutations, Copy Number &amp; Fusions)](#dna-mutations-copy-number--fusions)
+        * [Does the cBioPortal contain synonymous mutation data?](#does-the-cbioportal-contain-synonymous-mutation-data)
+        * [What processing or filtering is applied to generate the mutation data?](#what-processing-or-filtering-is-applied-to-generate-the-mutation-data)
+        * [What transcripts are used for annotating mutations?](#what-transcripts-are-used-for-annotating-mutations)
+        * [How are protein domains in the mutational lollipop diagrams specified?](#how-are-protein-domains-in-the-mutational-lollipop-diagrams-specified)
+        * [What is the difference between a “splice site” mutation and a “splice region” mutation?](#what-is-the-difference-between-a-splice-site-mutation-and-a-splice-region-mutation)
+        * [What do “Amplification”, “Gain”, “Deep Deletion”, “Shallow Deletion” and "-2", "-1", "0", "1", and "2" mean in the copy-number data?](#what-do-amplification-gain-deep-deletion-shallow-deletion-and--2--1-0-1-and-2-mean-in-the-copy-number-data)
+        * [What is GISTIC? What is RAE?](#what-is-gistic-what-is-rae)
+    * [RNA](#rna)
+        * [Does the portal store raw or probe-level data?](#does-the-portal-store-raw-or-probe-level-data)
+        * [What are mRNA and microRNA Z-Scores?](#what-are-mrna-and-microrna-z-scores)
+        * [Is there any normal RNA-seq data in cBioPortal?](#is-there-any-normal-rna-seq-data-in-cbioportal)
+        * [How is TCGA RNASeqV2 processed? What units are used?](#how-is-tcga-rnaseqv2-processed-what-units-are-used)
+        * [Is there microRNA data?](#is-there-microrna-data)
+        * [How can I query microRNAs in the portal?](#how-can-i-query-micrornas-in-the-portal)
+    * [Protein](#protein)
+        * [How can I query phosphoprotein levels in the portal?](#how-can-i-query-phosphoprotein-levels-in-the-portal)
+        * [Why isn’t there protein data for my gene of interest?](#why-isnt-there-protein-data-for-my-gene-of-interest)
+    * [DNA Methylation](#dna-methylation)
+        * [Which methylation probe is used for genes with multiple probes?](#which-methylation-probe-is-used-for-genes-with-multiple-probes)
+    * [Clinical Data](#clinical-data)
+        * [What kind of clinical data is stored in the portal?](#what-kind-of-clinical-data-is-stored-in-the-portal)
+        * [What is the meaning of OS_STATUS / OS_MONTHS, and PFS_STATUS / PFS_MONTHS?](#what-is-the-meaning-of-os_status--os_months-and-pfs_status--pfs_months)
+* [Analysis Questions](#analysis-questions)
+    * [How can I query/explore a select subset of samples?](#how-can-i-queryexplore-a-select-subset-of-samples)
+    * [How can I compare two or more subsets of samples?](#how-can-i-compare-two-or-more-subsets-of-samples)
+    * [Is it possible to determine if a particular mutation is heterozygous or homozygous in a sample? When a sample has 2 mutations in one gene, is it possible to determine whether the mutations are in cis or in trans with each other?](#is-it-possible-to-determine-if-a-particular-mutation-is-heterozygous-or-homozygous-in-a-sample-when-a-sample-has-2-mutations-in-one-gene-is-it-possible-to-determine-whether-the-mutations-are-in-cis-or-in-trans-with-each-other)
+    * [How can I query over/under expression of a gene?](#how-can-i-query-overunder-expression-of-a-gene)
+    * [How can I compare outcomes in patients with high vs low expression of a gene?](#how-can-i-compare-outcomes-in-patients-with-high-vs-low-expression-of-a-gene)
+* [Results View](#results-view)
+    * [OncoPrint](#oncoprint)
+        * [What are OncoPrints?](#what-are-oncoprints)
+        * [Can I change the order of genes in the OncoPrint?](#can-i-change-the-order-of-genes-in-the-oncoprint)
+        * [Can I visualize my own data within an OncoPrint?](#can-i-visualize-my-own-data-within-an-oncoprint)
+        * [Why are some samples “Not profiled” for certain genes?](#why-are-some-samples-not-profiled-for-certain-genes)
+    * [Other pages](#other-pages)
+        * [Does the Mutual Exclusivity tab calculate its statistics using all samples/alterations or only a specific subset?](#does-the-mutual-exclusivity-tab-calculate-its-statistics-using-all-samplesalterations-or-only-a-specific-subset)
+        * [What are the values of the box and whiskers in a boxplot?](#what-are-the-values-of-the-box-and-whiskers-in-a-boxplot)
+* [Study View](#study-view)
+    * [How to use filter in the URL of Study View page?](#how-to-use-filter-in-the-url-of-study-view-page)
+* [What if I have other questions or comments?](#what-if-i-have-other-questions-or-comments)
 
 ## General Questions
 #### What is the cBioPortal for Cancer Genomics?
@@ -227,7 +227,7 @@ For mRNA and microRNA expression data, we typically compute the relative express
 #### Is there any normal RNA-seq data in cBioPortal?
 We have RNASeqV2 mRNA expression data for normal samples of 16 TCGA PanCan Atlas Cohorts. The data was curated from [GDC](https://gdc.cancer.gov/about-data/publications/pancanatlas), and can be downloaded from our [Datahub](https://github.com/cBioPortal/datahub) or [Data Set](https://www.cbioportal.org/datasets) page. This data is not directly queriable in portal; they are only used as reference data for calculating the "relavtive to normal expression z-score" profile. [Example: ERBB2 expression z-scores relative to normal expression](https://www.cbioportal.org/results/plots?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=laml_tcga_pan_can_atlas_2018%2Cacc_tcga_pan_can_atlas_2018%2Cblca_tcga_pan_can_atlas_2018%2Clgg_tcga_pan_can_atlas_2018%2Cbrca_tcga_pan_can_atlas_2018%2Ccesc_tcga_pan_can_atlas_2018%2Cchol_tcga_pan_can_atlas_2018%2Ccoadread_tcga_pan_can_atlas_2018%2Cdlbc_tcga_pan_can_atlas_2018%2Cesca_tcga_pan_can_atlas_2018%2Cgbm_tcga_pan_can_atlas_2018%2Chnsc_tcga_pan_can_atlas_2018%2Ckich_tcga_pan_can_atlas_2018%2Ckirc_tcga_pan_can_atlas_2018%2Ckirp_tcga_pan_can_atlas_2018%2Clihc_tcga_pan_can_atlas_2018%2Cluad_tcga_pan_can_atlas_2018%2Clusc_tcga_pan_can_atlas_2018%2Cmeso_tcga_pan_can_atlas_2018%2Cov_tcga_pan_can_atlas_2018%2Cpaad_tcga_pan_can_atlas_2018%2Cpcpg_tcga_pan_can_atlas_2018%2Cprad_tcga_pan_can_atlas_2018%2Csarc_tcga_pan_can_atlas_2018%2Cskcm_tcga_pan_can_atlas_2018%2Cstad_tcga_pan_can_atlas_2018%2Ctgct_tcga_pan_can_atlas_2018%2Cthym_tcga_pan_can_atlas_2018%2Cthca_tcga_pan_can_atlas_2018%2Cucs_tcga_pan_can_atlas_2018%2Cucec_tcga_pan_can_atlas_2018%2Cuvm_tcga_pan_can_atlas_2018&case_set_id=all&data_priority=0&gene_list=ERBB2&geneset_list=%20&plots_coloring_selection=%7B%22colorByCopyNumber%22%3A%22true%22%7D&plots_horz_selection=%7B%22dataType%22%3A%22clinical_attribute%22%2C%22selectedDataSourceOption%22%3A%22CANCER_STUDY%22%7D&plots_vert_selection=%7B%22selectedGeneOption%22%3A2064%2C%22dataType%22%3A%22MRNA_EXPRESSION%22%2C%22selectedDataSourceOption%22%3A%22rna_seq_v2_mrna_median_all_sample_ref_normal_Zscores%22%2C%22logScale%22%3A%22true%22%7D&profileFilter=0&tab_index=tab_visualize). 
 #### How is TCGA RNASeqV2 processed? What units are used?
-RNASeqV2 from TCGA is processed and normalized using [RSEM](https://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-12-323). Specifically, the RNASeq V2 data in cBioPortal corresponds to the rsem.genes.normalized_results file from TCGA. A more detailed explanation of RSEM output can be found [here](https://www.biostars.org/p/106127/). cBioPortal then calculates z-scores as described above in [What are mRNA and microRNA Z-Scores?](/user-guide/faq.md#what-are-mrna-and-microrna-z-scores)
+RNASeqV2 from TCGA is processed and normalized using [RSEM](https://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-12-323). Specifically, the RNASeq V2 data in cBioPortal corresponds to the rsem.genes.normalized_results file from TCGA. A more detailed explanation of RSEM output can be found [here](https://www.biostars.org/p/106127/). cBioPortal then calculates z-scores as described above in [What are mRNA and microRNA Z-Scores?](#what-are-mrna-and-microrna-z-scores)
 #### Is there microRNA data?
 We have microRNA data for only a few studies and they are not up to date. To download more updated miRNA data, please go to either [Broad Firehose](https://gdac.broadinstitute.org/), or [GDC](https://portal.gdc.cancer.gov/).
 #### How can I query microRNAs in the portal?
@@ -260,7 +260,7 @@ Now for the negative criteria example. This also begins by using OQL to run a qu
 
 With a sample list in hand, you can now either run a query in just the selected samples (select “User-defined Case List” in the “Select Patient/Case Set:” dropdown) or explore this set of patients in study view (click “Select cases by IDs” and then create a Virtual Study restricted to just those samples).
 
-For more information about OQL, see the [specification page](/user-guide/oql.md) or view the [tutorial slides](https://www.cbioportal.org/tutorials#oql). For more information about virtual studies, read [this FAQ](/user-guide/faq.md#what-is-a-virtual-study) or view the [tutorial slides](https://www.cbioportal.org/tutorials).
+For more information about OQL, see the [specification page](/user-guide/oql.md) or view the [tutorial slides](https://www.cbioportal.org/tutorials#oql). For more information about virtual studies, read [this FAQ](#what-is-a-virtual-study) or view the [tutorial slides](https://www.cbioportal.org/tutorials).
 #### How can I compare two or more subsets of samples?
 cBioPortal has a suite of analysis tools to enable comparisons between user-defined groups of samples/patients. For an overview of this functionality, see our [tutorial on group comparison](https://www.cbioportal.org/tutorials).
 #### Is it possible to determine if a particular mutation is heterozygous or homozygous in a sample? When a sample has 2 mutations in one gene, is it possible to determine whether the mutations are in cis or in trans with each other?
@@ -270,7 +270,7 @@ Specifically in the case of TCGA samples with two mutations in the same gene, yo
 #### How can I query over/under expression of a gene?
 cBioPortal supports Onco Query Language (OQL) which can be used to query over/under expression of a gene. When writing a query, select an mRNA expression profile. By default, samples with expression z-scores >2 or <-2 in any queried genes are considered altered. Alternate cut-offs can be defined using OQL, for example: "EGFR: EXP>2" will query for samples with an EGFR expression z-score >2. Review for the OQL [specification page](/user-guide/oql.md) or [tutorial slides](https://www.cbioportal.org/tutorials#oql) for more specifics and examples.
 #### How can I compare outcomes in patients with high vs low expression of a gene?
-To compare outcomes in patients with high vs low expression of a gene (excluding those patients with intermediate levels of expression), we will follow a 2 step process that builds on the approach described above in [How can I query/explore a select subset of samples?](/user-guide/faq.md#how-can-i-queryexplore-a-select-subset-of-samples), utilizing [OQL](/user-guide/oql.md) to first identify and then stratify that cases of interest.
+To compare outcomes in patients with high vs low expression of a gene (excluding those patients with intermediate levels of expression), we will follow a 2 step process that builds on the approach described above in [How can I query/explore a select subset of samples?](#how-can-i-queryexplore-a-select-subset-of-samples), utilizing [OQL](/user-guide/oql.md) to first identify and then stratify that cases of interest.
 
 First, identify the sample set using OQL. For example, to stratify patients based on expression of EGFR, add an mRNA profile to the query, and write "EGFR: EXP>2 EXP<-2" in the gene set box. After running the query, go to the Download tab and copy/download the “Samples affected” list.
 uau(ebde1ff6769ec990ab1aeae05a0e69749ce433f1}(sha(ebde1ff6769ec990ab1aeae05a0e69749ce433f1node_idEC_kwDOAe-hB9oAKGViZGUxZmY2NzY5ZWM5OTBhYjFhZWFlMDVhMGU2OTc0OWNlNDMzZjEcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-11T15:05:28Zu	committer}(j@  Djokovic0311j@  .55948986+Djokovic0311@users.noreply.github.comj@  2023-08-11T15:05:28Zumessageadd inline commentstree}(j@  (7807024eddadf5eb5a5813de6dddf1fd80e2b8bfurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/7807024eddadf5eb5a5813de6dddf1fd80e2b8bfuj@  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/ebde1ff6769ec990ab1aeae05a0e69749ce433f1
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj@  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ebde1ff6769ec990ab1aeae05a0e69749ce433f1html_urlXhttps://github.com/cBioPortal/cbioportal/commit/ebde1ff6769ec990ab1aeae05a0e69749ce433f1comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/ebde1ff6769ec990ab1aeae05a0e69749ce433f1/commentsj@  }(loginDjokovic0311idJUj@  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5j@  )https://api.github.com/users/Djokovic0311j	A  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminuj@  }(jA  Djokovic0311jA  JUj@  MDQ6VXNlcjU1OTQ4OTg2jA  4https://avatars.githubusercontent.com/u/55948986?v=4jA  h5j@  )https://api.github.com/users/Djokovic0311j	A  https://github.com/Djokovic0311jA  3https://api.github.com/users/Djokovic0311/followersjA  @https://api.github.com/users/Djokovic0311/following{/other_user}jA  9https://api.github.com/users/Djokovic0311/gists{/gist_id}jA  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}jA  7https://api.github.com/users/Djokovic0311/subscriptionsj!A  .https://api.github.com/users/Djokovic0311/orgsj#A  /https://api.github.com/users/Djokovic0311/reposj%A  :https://api.github.com/users/Djokovic0311/events{/privacy}j'A  9https://api.github.com/users/Djokovic0311/received_eventsj)A  Userj+A  uparents]}(j@  (34d402d9467eeb430721488aa76aaadde02a0511j@  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/34d402d9467eeb430721488aa76aaadde02a0511j	A  Xhttps://github.com/cBioPortal/cbioportal/commit/34d402d9467eeb430721488aa76aaadde02a0511uastats}(totalK	additionsK	deletionsKufiles](}(j@  (34124a5f09a94fe5a91f448eeee9a2c9777bf82bfilenameXservice/src/main/java/org/cbioportal/service/impl/GenericAssayEnrichmentServiceImpl.javastatusmodifiedjEA  KjFA  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/ebde1ff6769ec990ab1aeae05a0e69749ce433f1/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/ebde1ff6769ec990ab1aeae05a0e69749ce433f1/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.java?ref=ebde1ff6769ec990ab1aeae05a0e69749ce433f1patchX  @@ -48,28 +48,36 @@ public List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
         Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
         throws MolecularProfileNotFoundException {
 
+        // Validate and fetch molecular profile
         MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, true);
+
+        // Get the molecular alterations for the provided profile
         Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
             .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
 
+        // Filter the case sets based on molecular profile
         Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
 
+        // Obtain binary enrichments from the utility
         List<GenericAssayBinaryEnrichment> genericAssayBinaryEnrichments = expressionEnrichmentUtil.getGenericAssayBinaryEnrichments(molecularProfile,
             filteredMolecularProfileCaseSets, enrichmentType, maItr);
 
+        // Calculate q-values for enrichments
         calcQValues(genericAssayBinaryEnrichments);
 
+        // Extract stable IDs from binary enrichments
         List<String> getGenericAssayStableIds = genericAssayBinaryEnrichments.stream()
             .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
 
+        // Fetch metadata of generic assays by their stable IDs
         Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
 
+        // Assign meta properties to each enrichment
         return genericAssayBinaryEnrichments.stream().map(enrichmentDatum -> {
             enrichmentDatum.setGenericEntityMetaProperties(
                 genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
             return enrichmentDatum;
         }).collect(Collectors.toList());
-
     }
 
     @Override
@@ -112,8 +120,10 @@ private void validateMolecularProfile(MolecularProfile molecularProfile,
                                           List<MolecularProfile.MolecularAlterationType> validMolecularAlterationTypes, 
                                           boolean isBinary) throws MolecularProfileNotFoundException {
         if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
+            // Check alteration type
             throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
         }
+        // Check datatype for binary or categorical
         if(isBinary) {
             if(!molecularProfile.getDatatype().equals("BINARY")) {
                 throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
@@ -127,6 +137,8 @@ private void validateMolecularProfile(MolecularProfile molecularProfile,
 
     private Map<String, List<MolecularProfileCaseIdentifier>> filterMolecularProfileCaseSets(MolecularProfile molecularProfile, Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets) {
         if (BooleanUtils.isTrue(molecularProfile.getPatientLevel())) {
+            // If patient level, filter duplicates by patient id
+            // For now we only support sample level for samples
             List<String> sampleIds = molecularProfileCaseSets.values().stream().flatMap(Collection::stream).map(MolecularProfileCaseIdentifier::getCaseId).collect(Collectors.toList());
             List<String> studyIds = Collections.nCopies(sampleIds.size(), molecularProfile.getCancerStudyIdentifier());
             List<Sample> samples = sampleService.fetchSamples(studyIds, sampleIds, "ID");
@@ -157,10 +169,11 @@ private Map<String, GenericAssayMeta> getGenericAssayMetaByStableId(List<String>
     }
 
     private <T extends GenericAssayEnrichment> void calcQValues(List<T> enrichments) {
+        // Sort enrichments by pValue
         Collections.sort(enrichments, GenericAssayEnrichment::compare);
         BigDecimal[] pValues = enrichments.stream().map(T::getpValue).toArray(BigDecimal[]::new);
         BigDecimal[] qValues = fisherExactTestCalculator.calcqValue(pValues);
-
+        // Assign q-values to enrichments
         for (int i = 0; i < enrichments.size(); i++) {
             enrichments.get(i).setqValue(qValues[i]);
         }u}(j@  (4df336971319d87b375b9d0fb0edd8651234c29ajKA  Oservice/src/main/java/org/cbioportal/service/util/ExpressionEnrichmentUtil.javajMA  modifiedjEA  KjFA  KjOA  KjPA  https://github.com/cBioPortal/cbioportal/blob/ebde1ff6769ec990ab1aeae05a0e69749ce433f1/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FExpressionEnrichmentUtil.javajRA  https://github.com/cBioPortal/cbioportal/raw/ebde1ff6769ec990ab1aeae05a0e69749ce433f1/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FExpressionEnrichmentUtil.javajTA  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FExpressionEnrichmentUtil.java?ref=ebde1ff6769ec990ab1aeae05a0e69749ce433f1jVA  X  @@ -173,7 +173,7 @@ public <T extends MolecularAlteration, S extends ExpressionEnrichment> List<S> g
 
         Map<String, List<Integer>> groupIndicesMap = getGroupIndicesMap(molecularProfileCaseSets, enrichmentType,
             molecularProfile);
-        // unaltered: 34 altered 12 1: tttf 2:ffft
+        
         for (MolecularAlteration ma : maItr) {
             List<GenericAssayCountSummary> genericAssayCountSummaries = new ArrayList<>();
             List<GroupStatistics> groupsStatistics = new ArrayList<GroupStatistics>();ueu(bbf94cbc406ef56ff0abc43794a2ee12f861f81a}(sha(bbf94cbc406ef56ff0abc43794a2ee12f861f81anode_idEC_kwDOAe-hB9oAKGJiZjk0Y2JjNDA2ZWY1NmZmMGFiYzQzNzk0YTJlZTEyZjg2MWY4MWEcommit}(author}(nameKarthikemailkalletlakarthik@gmail.comdate2023-08-11T17:24:46Zu	committer}(jjA  KarthikjlA  kalletlakarthik@gmail.comjnA  2023-08-11T17:24:46ZumessageUpdate failing testtree}(jbA  (8acc7905625251b8e1e2ad9cae66f57ad058f0d8urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/8acc7905625251b8e1e2ad9cae66f57ad058f0d8ujzA  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/bbf94cbc406ef56ff0abc43794a2ee12f861f81a
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujzA  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/bbf94cbc406ef56ff0abc43794a2ee12f861f81ahtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/bbf94cbc406ef56ff0abc43794a2ee12f861f81acomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/bbf94cbc406ef56ff0abc43794a2ee12f861f81a/commentsjhA  }(login	kalletlakidJƴ jdA  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5jzA  &https://api.github.com/users/kalletlakjA  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminujpA  }(jA  	kalletlakjA  Jƴ jdA  MDQ6VXNlcjEyOTU2ODcwjA  4https://avatars.githubusercontent.com/u/12956870?v=4jA  h5jzA  &https://api.github.com/users/kalletlakjA  https://github.com/kalletlakjA  0https://api.github.com/users/kalletlak/followersjA  =https://api.github.com/users/kalletlak/following{/other_user}jA  6https://api.github.com/users/kalletlak/gists{/gist_id}jA  =https://api.github.com/users/kalletlak/starred{/owner}{/repo}jA  4https://api.github.com/users/kalletlak/subscriptionsjA  +https://api.github.com/users/kalletlak/orgsjA  ,https://api.github.com/users/kalletlak/reposjA  7https://api.github.com/users/kalletlak/events{/privacy}jA  6https://api.github.com/users/kalletlak/received_eventsjA  UserjA  uparents]}(jbA  (5f8caf7e118286e9260a1d8a8739703c6e24ed40jzA  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/5f8caf7e118286e9260a1d8a8739703c6e24ed40jA  Xhttps://github.com/cBioPortal/cbioportal/commit/5f8caf7e118286e9260a1d8a8739703c6e24ed40uastats}(totalK	additionsK 	deletionsKufiles]}(jbA  (b7155e59921e54de4e3abab8db9fddd2ed7e371afilenameGweb/src/test/java/org/cbioportal/web/DataAccessTokenControllerTest.javastatusmodifiedjA  K jA  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/bbf94cbc406ef56ff0abc43794a2ee12f861f81a/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenControllerTest.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/bbf94cbc406ef56ff0abc43794a2ee12f861f81a/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenControllerTest.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenControllerTest.java?ref=bbf94cbc406ef56ff0abc43794a2ee12f861f81apatchX
  @@ -271,7 +271,6 @@ public Void answer(InvocationOnMock getAllTokensInvocation) {
 
     @Test
     public void createTokenNotLoggedIn() throws Exception {
-        ReflectionTestUtils.setField(DataAccessTokenController.class, "userRoleToAccessToken", "TEST");
         Mockito.when(tokenService.createDataAccessToken(ArgumentMatchers.anyString())).thenReturn(MOCK_TOKEN_INFO);
         MvcResult result = mockMvc.perform(MockMvcRequestBuilders.post("/data-access-tokens")
                 .accept(MediaType.APPLICATION_JSON)uau(69875808bee06e7c7a310712b580da6de58bcea7}(sha(69875808bee06e7c7a310712b580da6de58bcea7node_idEC_kwDOAe-hB9oAKDY5ODc1ODA4YmVlMDZlN2M3YTMxMDcxMmI1ODBkYTZkZTU4YmNlYTccommit}(author}(name
Onur Sumeremails.onur.sumer@gmail.comdate2023-07-12T16:16:34Zu	committer}(jA  GitHubjA  noreply@github.comjA  2023-07-12T16:16:34Zumessage=add new clickhouse clinical data bin count end point (#10265)tree}(jA  (9ccf14913915ba105fec455996ebae91f072ebcaurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/9ccf14913915ba105fec455996ebae91f072ebcaujA  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/69875808bee06e7c7a310712b580da6de58bcea7
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkrtHiCRBK7hj4Ov3rIwAAE90IAIZIfETAhrOpUsTgmTMOrj1S
KsUELddiTcv2s2HHpsHuP1sZTosFIdmPIPcNkPZHUVqNtXkxmk+JoxixkC7XptWT
bjfmy1mkwTp8hLUHFTsj0e/uF7qUus1IxQNuW7Sd2dlFskVNVwkWuZmzJCSPwbSN
N1zgLjCqq95HuS855sw9eazfKcVe7DAuCmU/oaGkrt2qIq58vx6iI3+8ik09/kno
XW7GWtUutKKWceGg5EFX7Jj3DNDm9PYgJ0xNatuIla4gItpNyNPt+JXG1/pO/HW2
AwSpVDZnGYl666PqnHS0YEr4jnu6ah82x/u1UUlH99Y79Pq0xwyokh99mpDNGhs=
=uXhk
-----END PGP SIGNATURE-----
payloadX  tree 9ccf14913915ba105fec455996ebae91f072ebca
parent 2e3d886121d0820a23aa6d914638fab898da8f04
author Onur Sumer <s.onur.sumer@gmail.com> 1689178594 -0400
committer GitHub <noreply@github.com> 1689178594 -0400

add new clickhouse clinical data bin count end point (#10265)

uujA  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/69875808bee06e7c7a310712b580da6de58bcea7html_urlXhttps://github.com/cBioPortal/cbioportal/commit/69875808bee06e7c7a310712b580da6de58bcea7comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/69875808bee06e7c7a310712b580da6de58bcea7/commentsjA  }(login	onursumeridJ6 jA  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5jA  &https://api.github.com/users/onursumerjA  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminujA  }(jB  web-flowjB  J/jA  MDQ6VXNlcjE5ODY0NDQ3jB  4https://avatars.githubusercontent.com/u/19864447?v=4jB  h5jA  %https://api.github.com/users/web-flowjA  https://github.com/web-flowjB  /https://api.github.com/users/web-flow/followersj
B  <https://api.github.com/users/web-flow/following{/other_user}jB  5https://api.github.com/users/web-flow/gists{/gist_id}jB  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jB  3https://api.github.com/users/web-flow/subscriptionsjB  *https://api.github.com/users/web-flow/orgsjB  +https://api.github.com/users/web-flow/reposjB  6https://api.github.com/users/web-flow/events{/privacy}jB  5https://api.github.com/users/web-flow/received_eventsjB  UserjB  uparents]}(jA  (2e3d886121d0820a23aa6d914638fab898da8f04jA  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2e3d886121d0820a23aa6d914638fab898da8f04jA  Xhttps://github.com/cBioPortal/cbioportal/commit/2e3d886121d0820a23aa6d914638fab898da8f04uastats}(totalK	additionsK	deletionsK
ufiles](}(jA  (1c8a1e87fa787f1850d8bf58cf10480bd61f0777filename]persistence/persistence-api/src/main/java/org/cbioportal/persistence/StudyViewRepository.javastatusmodifiedj9B  Kj:B  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/69875808bee06e7c7a310712b580da6de58bcea7/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStudyViewRepository.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/69875808bee06e7c7a310712b580da6de58bcea7/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStudyViewRepository.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStudyViewRepository.java?ref=69875808bee06e7c7a310712b580da6de58bcea7patchX  @@ -14,6 +14,10 @@
 public interface StudyViewRepository {
     List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
 
+    List<ClinicalData> getSampleClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
+    
+    List<ClinicalData> getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
+    
     List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
     
     List<ClinicalDataCount> getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List<String> filteredAttributes);u}(jA  (c99a9a9082ff6af2086c47f31893f79666bc8314j?B  ppersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.javajAB  modifiedj9B  Kj:B  K jCB  KjDB  https://github.com/cBioPortal/cbioportal/blob/69875808bee06e7c7a310712b580da6de58bcea7/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.javajFB  https://github.com/cBioPortal/cbioportal/raw/69875808bee06e7c7a310712b580da6de58bcea7/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.javajHB  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.java?ref=69875808bee06e7c7a310712b580da6de58bcea7jJB  X  @@ -1,6 +1,7 @@
 package org.cbioportal.persistence.mybatiscolumnstore;
 
 import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.ClinicalData;
 import org.cbioportal.model.ClinicalDataCount;
 import org.cbioportal.model.Sample;
 import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
@@ -10,6 +11,7 @@
 
 public interface StudyViewMapper {
     List<Sample> getFilteredSamples(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters);
+
     List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters);
     
     List<ClinicalDataCount> getPatientClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter,
@@ -22,4 +24,8 @@ List<ClinicalDataCount> getClinicalDataCounts(StudyViewFilter studyViewFilter, C
                                                   boolean applyPatientIdFilters, List<String> attributeIds, List<String> filteredAttributeValues);
     
     List<String> getClinicalAttributeNames(String tableName);
+    
+    List<ClinicalData> getSampleClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, List<String> attributeIds);
+    
+    List<ClinicalData> getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, List<String> attributeIds);
 }u}(jA  (9e219c836006176ca4c84a40a95800a142bd5cb1j?B  {persistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepository.javajAB  modifiedj9B  K	j:B  KjCB  K
jDB  https://github.com/cBioPortal/cbioportal/blob/69875808bee06e7c7a310712b580da6de58bcea7/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.javajFB  https://github.com/cBioPortal/cbioportal/raw/69875808bee06e7c7a310712b580da6de58bcea7/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.javajHB  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.java?ref=69875808bee06e7c7a310712b580da6de58bcea7jJB  XK  @@ -43,7 +43,7 @@ public List<ClinicalDataCount> getSampleClinicalDataCounts(StudyViewFilter study
         return studyViewMapper.getSampleClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter),
            filteredAttributes, FILTERED_CLINICAL_ATTR_VALUES );
     }
-
+    
     @Override
     public List<ClinicalDataCount> getPatientClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List<String> filteredAttributes) {
         return studyViewMapper.getPatientClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter),
@@ -60,4 +60,12 @@ private boolean shouldApplyPatientIdFilters(CategorizedClinicalDataCountFilter c
         return categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters().isEmpty()
             || categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters().isEmpty();
     }
+
+    public List<ClinicalData> getSampleClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) {
+        return studyViewMapper.getSampleClinicalDataFromStudyViewFilter(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), attributeIds);
+    }
+    
+    public List<ClinicalData> getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) {
+        return studyViewMapper.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), attributeIds);
+    }
 }
\ No newline at end of fileu      }(jA  (6a27522c3cccb76f84b4c242dc875f651e190de7j?B  tpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmljAB  modifiedj9B  K2j:B  KjCB  K3jDB  https://github.com/cBioPortal/cbioportal/blob/69875808bee06e7c7a310712b580da6de58bcea7/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmljFB  https://github.com/cBioPortal/cbioportal/raw/69875808bee06e7c7a310712b580da6de58bcea7/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmljHB  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=69875808bee06e7c7a310712b580da6de58bcea7jJB  X  @@ -43,6 +43,55 @@
         GROUP BY hugo_gene_symbol
         ORDER BY totalCount DESC;
     </select>
+
+    <!-- TODO only fetching from sample_clinical_attribute_numeric, need to support sample_clinical_attribute_categorical as well -->
+    <select id="getSampleClinicalDataFromStudyViewFilter" resultType="org.cbioportal.model.ClinicalData">
+        SELECT
+            sample_unique_id as sampleId,
+            patient_unique_id as patientId,
+            attribute_name as attrId,
+            attribute_value as attrValue,
+            cancer_study_identifier as studyId
+        FROM sample_clinical_attribute_numeric
+        <where>
+            sample_unique_id IN (
+            <include refid="sampleUniqueIdsFromStudyViewFilter"/>
+            <if test="applyPatientIdFilters == true">
+                INTERSECT <include refid="getSampleIdsFromPatientIds"/>
+            </if>
+            )
+        </where>
+        <if test="attributeIds != null and !attributeIds.isEmpty()">
+            AND attribute_name IN
+            <foreach item="attributeId" collection="attributeIds" open="(" separator="," close=")">
+                #{attributeId}
+            </foreach>
+        </if>
+    </select>
+    
+    <!-- TODO only fetching from patient_clinical_attribute_numeric, need to support patient_clinical_attribute_categorical as well -->
+    <select id="getPatientClinicalDataFromStudyViewFilter" resultType="org.cbioportal.model.ClinicalData">
+        SELECT
+            patient_unique_id as patientId,
+            attribute_name as attrId,
+            attribute_value as attrValue,
+            cancer_study_identifier as studyId
+        FROM patient_clinical_attribute_numeric
+        <where> 
+            patient_unique_id IN (
+                <include refid="getPatientIdsFromSampleIdFilters"/>
+                <if test="applyPatientIdFilters == true">
+                    INTERSECT <include refid="patientUniqueIdsFromStudyViewFilter"/>
+                </if>
+            )
+        </where>
+        <if test="attributeIds != null and !attributeIds.isEmpty()">
+            AND attribute_name IN
+            <foreach item="attributeId" collection="attributeIds" open="(" separator="," close=")">
+                #{attributeId}
+            </foreach>
+        </if>
+    </select>
    
     <!-- for /clinical-data-counts/fetch (returns ClinicalData) which will then be converted to clinicalDataCountItems -->
     <select id="getClinicalDataCounts" resultType="org.cbioportal.model.ClinicalDataCount">
@@ -107,7 +156,7 @@
                 FROM sample
                 WHERE sample_unique_id IN
                 <foreach item="sampleIdentifier" collection="studyViewFilter.sampleIdentifiers" open="(" separator="," close=")">
-                    #{sampleIdentifier.getStudyId()}_#{sampleIdentifier.getSampleId()}
+                    '${sampleIdentifier.studyId}_${sampleIdentifier.sampleId}'
                 </foreach>
             </if>
             <if test="studyViewFilter.geneFilters != null and !studyViewFilter.geneFilters.isEmpty()">u}(jA  (3862be4e93b40efcb28f40e9364f33b415f1683aj?B  persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepositoryTest.javajAB  modifiedj9B  Kj:B  KjCB  KjDB  https://github.com/cBioPortal/cbioportal/blob/69875808bee06e7c7a310712b580da6de58bcea7/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javajFB  https://github.com/cBioPortal/cbioportal/raw/69875808bee06e7c7a310712b580da6de58bcea7/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javajHB  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.java?ref=69875808bee06e7c7a310712b580da6de58bcea7jJB  X
  @@ -1,6 +1,7 @@
 package org.cbioportal.persistence.mybatiscolumnstore;
 
 import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.ClinicalData;
 import org.cbioportal.model.ClinicalDataCount;
 import org.cbioportal.model.Sample;
 import org.cbioportal.model.util.Select;
@@ -20,7 +21,6 @@
 import java.util.*;
 import java.util.Arrays;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 
@@ -59,6 +59,33 @@ public void getMutatedGenes() {
         List<AlterationCountByGene> mutations = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build());
         Assert.assertEquals(2, mutations.size());
     }
+
+    @Test
+    @Ignore
+    public void getPatientClinicalDataFromStudyViewFilter() {
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(new String[]{"msk_ch_2020"}, null);
+        List<ClinicalData> clinicalData = studyViewMyBatisRepository.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, List.of("AGE"), CategorizedClinicalDataCountFilter.getBuilder().build());
+        Assert.assertEquals(24146, clinicalData.size());
+
+        List<ClinicalDataFilter> clinicalDataFilters = Arrays.asList(generateCategoricalClinicalDataFilter("SEX", new String[]{"Female"}));
+        CategorizedClinicalDataCountFilter clinicalDataCountFilters = CategorizedClinicalDataCountFilter.getBuilder()
+            .setPatientCategoricalClinicalDataFilters(clinicalDataFilters)
+            .build();
+        studyViewFilter = generateStudyViewFilter((new String[]{"msk_ch_2020"} ), clinicalDataFilters);
+        clinicalData = studyViewMyBatisRepository.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, List.of("AGE"), clinicalDataCountFilters);
+        Assert.assertEquals(13121, clinicalData.size());
+
+        // TODO how to apply sample identifiers when fetching patient clinical data? 
+//        studyViewFilter = generateStudyViewFilter((new String[]{"msk_ch_2020"} ), clinicalDataFilters);
+//        List<SampleIdentifier> sampleIdentifierFilters = new ArrayList<>();
+//        SampleIdentifier sampleIdentifier = new SampleIdentifier();
+//        sampleIdentifier.setSampleId("P-0000015");
+//        sampleIdentifier.setStudyId("msk_ch_2020");
+//        sampleIdentifierFilters.add(sampleIdentifier);
+//        studyViewFilter.setSampleIdentifiers(sampleIdentifierFilters);
+//        clinicalData = studyViewMyBatisRepository.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, List.of("AGE"), clinicalDataCountFilters);
+//        Assert.assertEquals(1, clinicalData.size());
+    }
     
     @Test
     public void getMutatedGenesFiltered() {u}(jA  (cc160ee031244e285413617bb1f8d59af63091bbj?B  Tpersistence/persistence-mybatis/src/test/resources/testContextDatabaseClickhouse.xmljAB  modifiedj9B  Kj:B  KjCB  KjDB  https://github.com/cBioPortal/cbioportal/blob/69875808bee06e7c7a310712b580da6de58bcea7/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestContextDatabaseClickhouse.xmljFB  https://github.com/cBioPortal/cbioportal/raw/69875808bee06e7c7a310712b580da6de58bcea7/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestContextDatabaseClickhouse.xmljHB  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestContextDatabaseClickhouse.xml?ref=69875808bee06e7c7a310712b580da6de58bcea7jJB  X  @@ -16,7 +16,7 @@
         <!-- 
             Enable this to connect to an actual clickhouse Database instead of a mock one.
             Note that this is only intended for temporary local use, not for automated CI tests.
-        -->         
+        -->
 <!--        <property name="url" value="jdbc:ch://localhost:8123/cbioportal"/>-->
 <!--        <property name="password" value="cbio_pass"/>-->
 <!--        <property name="username" value="cbio_user"/>-->u}(jA  (c1ab46997d886c46a74888fdf369358c971fd6b1j?B  Bservice/src/main/java/org/cbioportal/service/StudyViewService.javajAB  modifiedj9B  Kj:B  KjCB  KjDB  https://github.com/cBioPortal/cbioportal/blob/69875808bee06e7c7a310712b580da6de58bcea7/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javajFB  https://github.com/cBioPortal/cbioportal/raw/69875808bee06e7c7a310712b580da6de58bcea7/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javajHB  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.java?ref=69875808bee06e7c7a310712b580da6de58bcea7jJB  X  @@ -1,11 +1,8 @@
 package org.cbioportal.service;
 
 import org.cbioportal.model.*;
-import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.exception.StudyNotFoundException;
-import org.cbioportal.webparam.SampleIdentifier;
 import org.cbioportal.webparam.StudyViewFilter;
-import org.springframework.cache.annotation.Cacheable;
 
 import java.util.List;
 
@@ -28,4 +25,8 @@ List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> studyIds,
     List<AlterationCountByGene> getMutatedGenesFromColumnstore(StudyViewFilter interceptedStudyViewFilter);
     
     List<ClinicalDataCountItem> getClinicalDataCountsFromColumnStore(StudyViewFilter studyViewFilter, List<String> filteredAttributes);
+    
+    List<ClinicalData> getSampleClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds);
+    
+    List<ClinicalData> getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds);
 }u}(jA  (b212e2d96ac10f5e5199ff562783223c63e53dddj?B  Kservice/src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.javajAB  modifiedj9B  K
j:B  KjCB  KjDB  https://github.com/cBioPortal/cbioportal/blob/69875808bee06e7c7a310712b580da6de58bcea7/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javajFB  https://github.com/cBioPortal/cbioportal/raw/69875808bee06e7c7a310712b580da6de58bcea7/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javajHB  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.java?ref=69875808bee06e7c7a310712b580da6de58bcea7jJB  X  @@ -12,15 +12,13 @@
 import org.cbioportal.service.exception.StudyNotFoundException;
 import org.cbioportal.service.util.MolecularProfileUtil;
 import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
-import org.cbioportal.webparam.ClinicalDataFilter;
 import org.cbioportal.webparam.StudyViewFilter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.*;
 import java.util.function.Function;
 import java.util.stream.Collectors;
-import java.util.stream.Stream;
 
 @Service
 public class StudyViewServiceImpl implements StudyViewService {
@@ -323,4 +321,14 @@ private void buildClinicalAttributeNameMap() {
            clinicalAttributeNameMap.put(numericKey, studyViewRepository.getClinicalDataAttributeNames(clinicalAttributeDataSource, ClinicalAttributeDataType.NUMERIC));
        }
     }
+
+    public List<ClinicalData> getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds) {
+        CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter);
+        return studyViewRepository.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, attributeIds, categorizedClinicalDataCountFilter);
+    }
+
+    public List<ClinicalData> getSampleClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds) {
+        CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter);
+        return studyViewRepository.getSampleClinicalDataFromStudyViewFilter(studyViewFilter, attributeIds, categorizedClinicalDataCountFilter);
+    }
 }u}(jA  (220171affd12dd43c25a4830f97383d1402678b8j?B  Tweb/src/main/java/org/cbioportal/web/columnstore/StudyViewColumnStoreController.javajAB  modifiedj9B  Kj:B  KjCB  KjDB  https://github.com/cBioPortal/cbioportal/blob/69875808bee06e7c7a310712b580da6de58bcea7/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.javajFB  https://github.com/cBioPortal/cbioportal/raw/69875808bee06e7c7a310712b580da6de58bcea7/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.javajHB  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.java?ref=69875808bee06e7c7a310712b580da6de58bcea7jJB  Xg  @@ -5,14 +5,18 @@
 import io.swagger.annotations.ApiParam;
 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.StudyViewService;
 import org.cbioportal.service.exception.StudyNotFoundException;
 import org.cbioportal.web.columnstore.util.NewStudyViewFilterUtil;
 import org.cbioportal.web.config.annotation.InternalApi;
-import org.cbioportal.webparam.ClinicalDataCountFilter;
+import org.cbioportal.web.util.ClinicalDataBinUtil;
 import org.cbioportal.webparam.ClinicalDataFilter;
+import org.cbioportal.webparam.ClinicalDataCountFilter;
+import org.cbioportal.webparam.ClinicalDataBinCountFilter;
+import org.cbioportal.webparam.DataBinMethod;
 import org.cbioportal.webparam.StudyViewFilter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
@@ -24,6 +28,7 @@
 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 springfox.documentation.annotations.ApiIgnore;
@@ -44,6 +49,8 @@ public class StudyViewColumnStoreController {
     
     @Autowired
     private StudyViewService studyViewService;
+    @Autowired
+    private ClinicalDataBinUtil clinicalDataBinUtil;
     
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @PostMapping(value = "/column-store/filtered-samples/fetch",
@@ -115,4 +122,26 @@ public ResponseEntity<List<ClinicalDataCountItem>> fetchClinicalDataCounts(
         return new ResponseEntity<>(result, HttpStatus.OK);
 
     }
+
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', 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)
+    @ApiOperation("Fetch clinical data bin counts by study view filter")
+    public ResponseEntity<List<ClinicalDataBin>> fetchClinicalDataBinCounts(
+        @ApiParam("Method for data binning")
+        @RequestParam(defaultValue = "DYNAMIC") DataBinMethod dataBinMethod,
+        @ApiParam(required = true, value = "Clinical data bin count filter")
+        @Valid @RequestBody(required = false) ClinicalDataBinCountFilter clinicalDataBinCountFilter,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiIgnore // 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
+    ) {
+        List<ClinicalDataBin> clinicalDataBins = clinicalDataBinUtil.fetchClinicalDataBinCountsFromColumnStore(
+            dataBinMethod,
+            interceptedClinicalDataBinCountFilter,
+            true
+        );
+        return new ResponseEntity<>(clinicalDataBins, HttpStatus.OK);
+    }
 }u}(jA  (fa5b6c1c20a239c60c4d8d46d7161dd3bd3af685j?B  Bweb/src/main/java/org/cbioportal/web/util/ClinicalDataBinUtil.javajAB  modifiedj9B  K`j:B  K jCB  K`jDB  https://github.com/cBioPortal/cbioportal/blob/69875808bee06e7c7a310712b580da6de58bcea7/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FClinicalDataBinUtil.javajFB  https://github.com/cBioPortal/cbioportal/raw/69875808bee06e7c7a310712b580da6de58bcea7/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FClinicalDataBinUtil.javajHB  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FClinicalDataBinUtil.java?ref=69875808bee06e7c7a310712b580da6de58bcea7jJB  X  @@ -3,8 +3,10 @@
 import org.cbioportal.model.ClinicalAttribute;
 import org.cbioportal.model.ClinicalData;
 import org.cbioportal.model.ClinicalDataBin;
+import org.cbioportal.model.Sample;
 import org.cbioportal.service.ClinicalAttributeService;
 import org.cbioportal.service.PatientService;
+import org.cbioportal.service.StudyViewService;
 import org.cbioportal.service.util.ClinicalAttributeUtil;
 import org.cbioportal.webparam.ClinicalDataBinCountFilter;
 import org.cbioportal.webparam.ClinicalDataBinFilter;
@@ -37,6 +39,9 @@ public class ClinicalDataBinUtil {
     @Autowired
     private PatientService patientService;
     
+    @Autowired
+    private StudyViewService studyViewService; 
+    
     public StudyViewFilter removeSelfFromFilter(ClinicalDataBinCountFilter dataBinCountFilter) {
         List<ClinicalDataBinFilter> attributes = dataBinCountFilter.getAttributes();
         StudyViewFilter studyViewFilter = dataBinCountFilter.getStudyViewFilter();
@@ -60,6 +65,97 @@ public List<ClinicalDataBin> fetchClinicalDataBinCounts(
         );
     }
     
+    public List<ClinicalDataBin> fetchClinicalDataBinCountsFromColumnStore(
+        DataBinMethod dataBinMethod,
+        ClinicalDataBinCountFilter dataBinCountFilter,
+        boolean shouldRemoveSelfFromFilter
+    ) {
+        List<ClinicalDataBinFilter> attributes = dataBinCountFilter.getAttributes();
+        StudyViewFilter studyViewFilter = dataBinCountFilter.getStudyViewFilter();
+
+        if (shouldRemoveSelfFromFilter) {
+            studyViewFilter = removeSelfFromFilter(dataBinCountFilter);
+        }
+
+        List<String> attributeIds = attributes.stream().map(ClinicalDataBinFilter::getAttributeId).collect(Collectors.toList());
+
+        // a new StudyView filter to partially filter by study and sample ids only
+        StudyViewFilter partialFilter = new StudyViewFilter();
+        partialFilter.setStudyIds(studyViewFilter.getStudyIds());
+        partialFilter.setSampleIdentifiers(studyViewFilter.getSampleIdentifiers());
+        
+        // filter only by study id and sample identifiers, ignore rest
+        List<Sample> unfilteredSamples = studyViewService.getFilteredSamplesFromColumnstore(partialFilter);
+        List<Sample> filteredSamples = studyViewService.getFilteredSamplesFromColumnstore(studyViewFilter);
+
+        // TODO make sure these keys don't need to be distinct
+        List<String> unfilteredUniqueSampleKeys = unfilteredSamples.stream().map(Sample::getUniqueSampleKey).collect(Collectors.toList());
+        List<String> filteredUniqueSampleKeys = filteredSamples.stream().map(Sample::getUniqueSampleKey).collect(Collectors.toList());
+        List<String> unfilteredUniquePatientKeys = unfilteredSamples.stream().map(Sample::getUniquePatientKey).collect(Collectors.toList());
+        List<String> filteredUniquePatientKeys = filteredSamples.stream().map(Sample::getUniquePatientKey).collect(Collectors.toList());
+
+        // TODO make sure we don't need a distinction between sample vs patient attribute ids here
+        //  ideally we shouldn't because we have patient clinical data separated from sample clinical data in clickhouse
+        List<ClinicalData> unfilteredClinicalDataForSamples = studyViewService.getSampleClinicalDataFromStudyViewFilter(partialFilter, attributeIds);
+        List<ClinicalData> filteredClinicalDataForSamples = studyViewService.getSampleClinicalDataFromStudyViewFilter(studyViewFilter, attributeIds);
+        List<ClinicalData> unfilteredClinicalDataForPatients = studyViewService.getPatientClinicalDataFromStudyViewFilter(partialFilter, attributeIds);
+        List<ClinicalData> filteredClinicalDataForPatients = studyViewService.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, attributeIds);
+        
+        Map<String, ClinicalDataType> attributeDatatypeMap = constructAttributeDataMap(
+            unfilteredClinicalDataForSamples.stream().map(ClinicalData::getAttrId).collect(Collectors.toList()),
+            unfilteredClinicalDataForPatients.stream().map(ClinicalData::getAttrId).collect(Collectors.toList()),
+            Collections.emptyList() // TODO ignoring conflictingPatientAttributeIds for now
+        );
+
+        List<ClinicalData> unfilteredClinicalData = Stream.of(
+            unfilteredClinicalDataForSamples,
+            unfilteredClinicalDataForPatients
+            // unfilteredClinicalDataForConflictingPatientAttributes /// TODO ignoring conflictingPatientAttributeIds for now
+        ).flatMap(Collection::stream).collect(Collectors.toList());
+
+        List<ClinicalData> filteredClinicalData = Stream.of(
+            filteredClinicalDataForSamples,
+            filteredClinicalDataForPatients
+            // filteredClinicalDataForConflictingPatientAttributes // TODO ignoring conflictingPatientAttributeIds for now
+        ).flatMap(Collection::stream).collect(Collectors.toList());
+        
+        Map<String, List<ClinicalData>> unfilteredClinicalDataByAttributeId =
+            unfilteredClinicalData.stream().collect(Collectors.groupingBy(ClinicalData::getAttrId));
+
+        Map<String, List<ClinicalData>> filteredClinicalDataByAttributeId =
+            filteredClinicalData.stream().collect(Collectors.groupingBy(ClinicalData::getAttrId));
+        
+        List<ClinicalDataBin> clinicalDataBins = Collections.emptyList();
+
+        if (dataBinMethod == DataBinMethod.STATIC) {
+            if (!unfilteredSamples.isEmpty() && !unfilteredClinicalData.isEmpty()) {
+                clinicalDataBins = calculateStaticDataBins(
+                    attributes,
+                    attributeDatatypeMap,
+                    unfilteredClinicalDataByAttributeId,
+                    filteredClinicalDataByAttributeId,
+                    unfilteredUniqueSampleKeys,
+                    unfilteredUniquePatientKeys,
+                    filteredUniqueSampleKeys,
+                    filteredUniquePatientKeys
+                );
+            }
+        }
+        else { // dataBinMethod == DataBinMethod.DYNAMIC
+            if (!filteredClinicalData.isEmpty()) {
+                clinicalDataBins = calculateDynamicDataBins(
+                    attributes,
+                    attributeDatatypeMap,
+                    filteredClinicalDataByAttributeId,
+                    filteredUniqueSampleKeys,
+                    filteredUniquePatientKeys
+                );
+            }
+        }
+
+        return clinicalDataBins;
+    }
+    
     public List<ClinicalDataBin> fetchClinicalDataBinCounts(
         DataBinMethod dataBinMethod,
         ClinicalDataBinCountFilter dataBinCountFilter,ueu(6e45a2aaf3b9830899712f13449e7aed768a251e}(sha(6e45a2aaf3b9830899712f13449e7aed768a251enode_idEC_kwDOAe-hB9oAKDZlNDVhMmFhZjNiOTgzMDg5OTcxMmYxMzQ0OWU3YWVkNzY4YTI1MWUcommit}(author}(name
Onur Sumeremails.onur.sumer@gmail.comdate2023-06-08T20:34:31Zu	committer}(jB  
Onur SumerjB  s.onur.sumer@gmail.comjB  2023-06-08T20:34:31Zumessageremove pre authtree}(jB  (c16d388509256568185223d726d1157466a2d102urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c16d388509256568185223d726d1157466a2d102ujB  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/6e45a2aaf3b9830899712f13449e7aed768a251e
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujB  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/6e45a2aaf3b9830899712f13449e7aed768a251ehtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/6e45a2aaf3b9830899712f13449e7aed768a251ecomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/6e45a2aaf3b9830899712f13449e7aed768a251e/commentsjB  }(login	onursumeridJ6 jB  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5jB  &https://api.github.com/users/onursumerjB  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminujB  }(jB  	onursumerjB  J6 jB  MDQ6VXNlcjM2MDQxOTg=jB  3https://avatars.githubusercontent.com/u/3604198?v=4jB  h5jB  &https://api.github.com/users/onursumerjB  https://github.com/onursumerjB  0https://api.github.com/users/onursumer/followersjB  =https://api.github.com/users/onursumer/following{/other_user}jB  6https://api.github.com/users/onursumer/gists{/gist_id}jB  =https://api.github.com/users/onursumer/starred{/owner}{/repo}jB  4https://api.github.com/users/onursumer/subscriptionsjB  +https://api.github.com/users/onursumer/orgsjB  ,https://api.github.com/users/onursumer/reposjB  7https://api.github.com/users/onursumer/events{/privacy}jB  6https://api.github.com/users/onursumer/received_eventsjB  UserjB  uparents]}(jB  (6bb14d78b1f951c4f6d6db29c068a5e8d049855djB  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/6bb14d78b1f951c4f6d6db29c068a5e8d049855djB  Xhttps://github.com/cBioPortal/cbioportal/commit/6bb14d78b1f951c4f6d6db29c068a5e8d049855duastats}(totalK	additionsK	deletionsKufiles]}(jB  (4045eb36f4e76b50d767d021570b935ea719e646filename=web/src/main/java/org/cbioportal/web/StudyViewController.javastatusmodifiedjB  KjB  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/6e45a2aaf3b9830899712f13449e7aed768a251e/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/6e45a2aaf3b9830899712f13449e7aed768a251e/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=6e45a2aaf3b9830899712f13449e7aed768a251epatchX  @@ -209,7 +209,7 @@ public ResponseEntity<List<AlterationCountByGene>> fetchMutatedGenes(
         return new ResponseEntity<>(alterationCountByGenes, HttpStatus.OK);
     }
     
-    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    // @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/column-store/mutated-genes/fetch", method = RequestMethod.POST,
         consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Fetch mutated genes by study view filter")
@@ -349,7 +349,7 @@ public ResponseEntity<List<Sample>> fetchFilteredSamples(
         return new ResponseEntity<>(result, HttpStatus.OK);
     }
 
-    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    // @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/column-store/filtered-samples/fetch", method = RequestMethod.POST,
         consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Fetch sample IDs by study view filter")uau(05079e10472a341680fc721d633e0c4058977664}(sha(05079e10472a341680fc721d633e0c4058977664node_idEC_kwDOAe-hB9oAKDA1MDc5ZTEwNDcyYTM0MTY4MGZjNzIxZDYzM2UwYzQwNTg5Nzc2NjQcommit}(author}(name
Qi-Xuan Luemailqlu@carisls.comdate2023-07-28T12:34:38Zu	committer}(jC  
Qi-Xuan LujC  qlu@carisls.comjC  2023-07-28T12:34:38Zumessage,change to molecularDataService to fetch datatree}(jC  (9094f1a1df24d525785ccd3bde2427a7de536f8aurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/9094f1a1df24d525785ccd3bde2427a7de536f8auj#C  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/05079e10472a341680fc721d633e0c4058977664
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj#C  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/05079e10472a341680fc721d633e0c4058977664html_urlXhttps://github.com/cBioPortal/cbioportal/commit/05079e10472a341680fc721d633e0c4058977664comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/05079e10472a341680fc721d633e0c4058977664/commentsjC  NjC  Nparents]}(jC  (082f3f56b88555f9ff9a0c1e57bfe7b3bd3326adj#C  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326adj/C  Xhttps://github.com/cBioPortal/cbioportal/commit/082f3f56b88555f9ff9a0c1e57bfe7b3bd3326aduastats}(totalMp	additionsK	deletionsKvufiles](}(jC  (bd9ae14cdaf137a97c116177c885b70a16bf7d34filenameBmodel/src/main/java/org/cbioportal/model/GenomicDataCountItem.javastatusaddedj<C  K#j=C  K changesK#blob_urlhttps://github.com/cBioPortal/cbioportal/blob/05079e10472a341680fc721d633e0c4058977664/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenomicDataCountItem.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/05079e10472a341680fc721d633e0c4058977664/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenomicDataCountItem.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenomicDataCountItem.java?ref=05079e10472a341680fc721d633e0c4058977664patchXL  @@ -0,0 +1,35 @@
+package org.cbioportal.model;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class GenomicDataCountItem implements Serializable {
+
+    private String hugoGeneSymbol;
+    private String profileType;
+    private List<GenomicDataCount> counts;
+
+    public String getHugoGeneSymbol() {
+        return hugoGeneSymbol;
+    }
+
+    public void setHugoGeneSymbol(String hugoGeneSymbol) {
+        this.hugoGeneSymbol = hugoGeneSymbol;
+    }
+
+    public String getProfileType() {
+        return profileType;
+    }
+
+    public void setProfileType(String profileType) {
+        this.profileType = profileType;
+    }
+
+    public List<GenomicDataCount> getCounts() {
+        return counts;
+    }
+
+    public void setCounts(List<GenomicDataCount> counts) {
+        this.counts = counts;
+    }
+}u}(jC  (cf1f59dcb8518ba3fd0eab0a595291debdf6f809jBC  Bservice/src/main/java/org/cbioportal/service/StudyViewService.javajDC  modifiedj<C  Kj=C  KjFC  KjGC  https://github.com/cBioPortal/cbioportal/blob/05079e10472a341680fc721d633e0c4058977664/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javajIC  https://github.com/cBioPortal/cbioportal/raw/05079e10472a341680fc721d633e0c4058977664/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javajKC  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.java?ref=05079e10472a341680fc721d633e0c4058977664jMC  X  @@ -1,5 +1,6 @@
 package org.cbioportal.service;
 
+import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.exception.StudyNotFoundException;
@@ -20,10 +21,7 @@ List<AlterationCountByGene> getStructuralVariantAlterationCountByGenes(List<Stri
     List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> studyIds, List<String> sampleIds, AlterationFilter annotationFilter)
         throws StudyNotFoundException;
 
-    List<GenomicDataCount> getCNAAlterationCountsByGeneSpecific(List<String> studyIds,
-                                                                List<String> sampleIds,
-                                                                List<String> hugoGeneSymbols,
-                                                                AlterationFilter alterationFilter) 
+    List<GenomicDataCountItem> getCNAAlterationCountsByGeneSpecific(List<String> studyIds, List<String> sampleIds, List<Pair<String, String>> genomicDataFilters) 
         throws StudyNotFoundException;
 
     List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String> sampleIds, List<String> studyIds, List<String> stableIds, List<String> profileTypes);u}(jC  (1c899f5ad835b1fe7a26bd3637099c031eeb28dcjBC  Kservice/src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.javajDC  modifiedj<C  KNj=C  K%jFC  KsjGC  https://github.com/cBioPortal/cbioportal/blob/05079e10472a341680fc721d633e0c4058977664/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javajIC  https://github.com/cBioPortal/cbioportal/raw/05079e10472a341680fc721d633e0c4058977664/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javajKC  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.java?ref=05079e10472a341680fc721d633e0c4058977664jMC  X  @@ -2,6 +2,7 @@
 
 import org.apache.commons.collections4.map.MultiKeyMap;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
 import org.cbioportal.model.util.Select;
 import org.cbioportal.persistence.AlterationRepository;
@@ -15,6 +16,7 @@
 import java.util.*;
 import java.util.function.Function;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 @Service
 public class StudyViewServiceImpl implements StudyViewService {
@@ -40,6 +42,9 @@ public class StudyViewServiceImpl implements StudyViewService {
     @Autowired
     private GeneService geneService;
     
+    @Autowired 
+    private MolecularDataService molecularDataService;
+    
     @Override
     public List<GenomicDataCount> getGenomicDataCounts(List<String> studyIds, List<String> sampleIds) {
         List<MolecularProfileCaseIdentifier> molecularProfileSampleIdentifiers =
@@ -190,46 +195,82 @@ public List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> stu
     }
 
     @Override
-    public List<GenomicDataCount> getCNAAlterationCountsByGeneSpecific(List<String> studyIds,
-                                                                       List<String> sampleIds,
-                                                                       List<String> hugoGeneSymbols,
-                                                                       AlterationFilter alterationFilter) throws StudyNotFoundException {
-        List<MolecularProfileCaseIdentifier> caseIdentifiers =
-            molecularProfileService.getFirstDiscreteCNAProfileCaseIdentifiers(studyIds, sampleIds);
+    public List<GenomicDataCountItem> getCNAAlterationCountsByGeneSpecific(List<String> studyIds, 
+                                                                           List<String> sampleIds,
+                                                                           List<Pair<String, String>> genomicDataFilters) throws StudyNotFoundException {
+        
+        List<MolecularProfile> molecularProfiles = molecularProfileService.getMolecularProfilesInStudies(studyIds,
+            "SUMMARY");
+
+        Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
+            .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
 
-        Select<Integer> entrezGeneIds = Select.byValues(
-            geneService
-            .fetchGenes(hugoGeneSymbols,
-                "HUGO_GENE_SYMBOL", "SUMMARY")
+        Set<String> hugoGeneSymbols = genomicDataFilters.stream().map(Pair::getKey)
+            .collect(Collectors.toSet());
+
+        Map<String, Integer> geneSymbolIdMap = geneService
+            .fetchGenes(new ArrayList<>(hugoGeneSymbols), "HUGO_GENE_SYMBOL",
+                "SUMMARY")
+            .stream().collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
+        
+        return genomicDataFilters
             .stream()
-            .map(Gene::getEntrezGeneId));
+            .flatMap(gdFilter -> {
+                GenomicDataCountItem genomicDataCountItem = new GenomicDataCountItem();
+                String hugoGeneSymbol = gdFilter.getKey();
+                String profileType = gdFilter.getValue();
+                genomicDataCountItem.setHugoGeneSymbol(hugoGeneSymbol);
+                genomicDataCountItem.setProfileType(profileType);
+                
+                List<String> stableIds = Arrays.asList(geneSymbolIdMap.get(hugoGeneSymbol).toString());
 
-        List<CopyNumberCountByGene> copyNumberCountByGenes = alterationCountService.getSampleCnaGeneCounts(
-            caseIdentifiers,
-            entrezGeneIds,
-            true,
-            false,
-            alterationFilter).getFirst();
-        Set<String> distinctStudyIds = new HashSet<>(studyIds);
-        if (distinctStudyIds.size() == 1 && !copyNumberCountByGenes.isEmpty()) {
-            return copyNumberCountByGenes
-                .stream()
-                .filter(c -> c.getNumberOfAlteredCases() != null && c.getNumberOfAlteredCases() > 0)
-                .map(entry -> {
-                    int count = entry.getNumberOfAlteredCases();
-                    int alteration = entry.getAlteration();
-                    String label = CNA.getByCode(entry.getAlteration().shortValue()).getDescription();
-
-                    GenomicDataCount genomicDataCount = new GenomicDataCount();
-                    genomicDataCount.setLabel(label);
-                    genomicDataCount.setValue(String.valueOf(alteration));
-                    genomicDataCount.setCount(count);
-
-                    return genomicDataCount;
-                })
-                .collect(Collectors.toList());
-        }
-        return new ArrayList<GenomicDataCount>();
+                Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
+                    .getOrDefault(profileType, new ArrayList<MolecularProfile>()).stream()
+                    .collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
+                        MolecularProfile::getStableId));
+                
+                List<String> mappedSampleIds = new ArrayList<>();
+                List<String> mappedProfileIds = new ArrayList<>();
+
+                for (int i = 0; i < sampleIds.size(); i++) {
+                    String studyId = studyIds.get(i);
+                    if (studyIdToMolecularProfileIdMap.containsKey(studyId)) {
+                        mappedSampleIds.add(sampleIds.get(i));
+                        mappedProfileIds.add(studyIdToMolecularProfileIdMap.get(studyId));
+                    }
+                }
+
+                if (mappedSampleIds.isEmpty()) {
+                    return Stream.of();
+                }
+
+                List<GeneMolecularData> geneMolecularDataList = molecularDataService.getMolecularDataInMultipleMolecularProfiles(mappedProfileIds, mappedSampleIds,
+                        stableIds.stream().map(Integer::parseInt).collect(Collectors.toList()), "SUMMARY");
+                    
+                List<GenomicDataCount> genomicDataCounts = geneMolecularDataList
+                    .stream()
+                    .collect(Collectors.groupingBy(GeneMolecularData::getValue))
+                    .entrySet()
+                    .stream()
+                    .filter(entry -> entry.getKey() != null && !entry.getKey().equals("NA") && entry.getValue().size() > 0)
+                    .map(entry -> {
+                        Integer alteration = Integer.valueOf(entry.getKey());
+                        List<GeneMolecularData> geneMolecularData = entry.getValue();
+                        int count = geneMolecularData.size();
+
+                        String label = CNA.getByCode(alteration.shortValue()).getDescription();
+
+                        GenomicDataCount genomicDataCount = new GenomicDataCount();
+                        genomicDataCount.setLabel(label);
+                        genomicDataCount.setValue(String.valueOf(alteration));
+                        genomicDataCount.setCount(count);
+
+                        return genomicDataCount;
+                    }).collect(Collectors.toList());
+
+                genomicDataCountItem.setCounts(genomicDataCounts);
+                return Stream.of(genomicDataCountItem);
+            }).collect(Collectors.toList());
     };
 
     @Overrideu}(jC  (827a7b752a515684801b8188ec8e397a80da98bfjBC  Jservice/src/test/java/org/cbioportal/service/impl/BaseServiceImplTest.javajDC  modifiedj<C  Kj=C  KjFC  KjGC  https://github.com/cBioPortal/cbioportal/blob/05079e10472a341680fc721d633e0c4058977664/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.javajIC  https://github.com/cBioPortal/cbioportal/raw/05079e10472a341680fc721d633e0c4058977664/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.javajKC  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.java?ref=05079e10472a341680fc721d633e0c4058977664jMC  X  @@ -59,5 +59,7 @@ public class BaseServiceImplTest {
     public static final String CATEGORY_VALUE_1 = "category_value1";
     public static final String CATEGORY_VALUE_2 = "category_value2";
     public static final String EMPTY_VALUE_1 = "";
-    public static final String EMPTY_VALUE_2 = "NA";    
+    public static final String EMPTY_VALUE_2 = "NA";
+    public static final String PROFILE_TYPE_1 = "profile_type1";
+    public static final String PROFILE_TYPE_2 = "profile_type2";
 }u}(jC  (1b55c2590113a222b2a467c72436a91d44245558jBC  Oservice/src/test/java/org/cbioportal/service/impl/StudyViewServiceImplTest.javajDC  modifiedj<C  KBj=C  K5jFC  KwjGC  https://github.com/cBioPortal/cbioportal/blob/05079e10472a341680fc721d633e0c4058977664/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javajIC  https://github.com/cBioPortal/cbioportal/raw/05079e10472a341680fc721d633e0c4058977664/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javajKC  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.java?ref=05079e10472a341680fc721d633e0c4058977664jMC  X  @@ -14,11 +14,7 @@
 import org.mockito.Spy;
 import org.mockito.junit.MockitoJUnitRunner;
 
-import java.lang.reflect.Array;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
+import java.util.*;
 
 import static org.mockito.ArgumentMatchers.*;
 
@@ -43,6 +39,8 @@ public class StudyViewServiceImplTest extends BaseServiceImplTest {
     @Mock
     private GenericAssayService genericAssayService;
     @Mock
+    private MolecularDataService molecularDataService;
+    @Mock
     private GeneService geneService;
     private AlterationFilter alterationFilter = new AlterationFilter();
 
@@ -263,57 +261,72 @@ public void getCNAAlterationCountByGeneSpecific() throws Exception {
 
         List<String> sampleIds = Arrays.asList(BaseServiceImplTest.SAMPLE_ID1, BaseServiceImplTest.SAMPLE_ID2, BaseServiceImplTest.SAMPLE_ID3);
         List<String> studyIds = Collections.nCopies(3, BaseServiceImplTest.STUDY_ID);
-        List<String> hugoGeneSymbols = Arrays.asList(BaseServiceImplTest.HUGO_GENE_SYMBOL_1);
+        List<Pair<String, String>> genomicDataFilters = new ArrayList<>();
+        Pair<String, String> genomicDataFilter1 = new Pair<>(BaseServiceImplTest.HUGO_GENE_SYMBOL_1, BaseServiceImplTest.PROFILE_TYPE_1);
+        Pair<String, String> genomicDataFilter2 = new Pair<>(BaseServiceImplTest.HUGO_GENE_SYMBOL_2, BaseServiceImplTest.PROFILE_TYPE_2);
+        genomicDataFilters.add(genomicDataFilter1);
+        genomicDataFilters.add(genomicDataFilter2);
 
-        List<MolecularProfileCaseIdentifier> molecularProfileCaseIdentifiers = new ArrayList<>();
-        MolecularProfileCaseIdentifier profileCaseIdentifier1 = new MolecularProfileCaseIdentifier(BaseServiceImplTest.SAMPLE_ID1, BaseServiceImplTest.MOLECULAR_PROFILE_ID);
-        molecularProfileCaseIdentifiers.add(profileCaseIdentifier1);
-        MolecularProfileCaseIdentifier profileCaseIdentifier2 = new MolecularProfileCaseIdentifier(BaseServiceImplTest.SAMPLE_ID2, BaseServiceImplTest.MOLECULAR_PROFILE_ID);
-        molecularProfileCaseIdentifiers.add(profileCaseIdentifier2);
-        Mockito.when(molecularProfileService.getFirstDiscreteCNAProfileCaseIdentifiers(studyIds, sampleIds))
-            .thenReturn(molecularProfileCaseIdentifiers);
+        List<MolecularProfile> molecularProfiles = new ArrayList<>();
+        MolecularProfile molecularProfile = new MolecularProfile();
+        molecularProfile.setCancerStudyIdentifier(BaseServiceImplTest.STUDY_ID);
+        molecularProfile.setStableId(BaseServiceImplTest.STUDY_ID + "_" + BaseServiceImplTest.MOLECULAR_PROFILE_ID_A);
+        molecularProfiles.add(molecularProfile);
         
-        List<CopyNumberCountByGene> alterationCountByGenes = new ArrayList<>();
-        CopyNumberCountByGene alterationCountByGene1 = new CopyNumberCountByGene();
+        Mockito.when(molecularProfileService.getMolecularProfilesInStudies(studyIds, "SUMMARY"))
+            .thenReturn(molecularProfiles);
         
-        alterationCountByGene1.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
-        alterationCountByGene1.setAlteration(-2);
-        alterationCountByGene1.setNumberOfAlteredCases(1);
-        alterationCountByGenes.add(alterationCountByGene1);
-
-        CopyNumberCountByGene alterationCountByGene2 = new CopyNumberCountByGene();
-        alterationCountByGene2.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
-        alterationCountByGene2.setAlteration(-1);
-        alterationCountByGene2.setNumberOfAlteredCases(1);
-        alterationCountByGenes.add(alterationCountByGene2);
-
-        CopyNumberCountByGene alterationCountByGene3 = new CopyNumberCountByGene();
-        alterationCountByGene3.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
-        alterationCountByGene3.setAlteration(0);
-        alterationCountByGene3.setNumberOfAlteredCases(1);
-        alterationCountByGenes.add(alterationCountByGene3);
-
-        CopyNumberCountByGene alterationCountByGene4 = new CopyNumberCountByGene();
-        alterationCountByGene4.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
-        alterationCountByGene4.setAlteration(1);
-        alterationCountByGene4.setNumberOfAlteredCases(1);
-        alterationCountByGenes.add(alterationCountByGene4);
-
-        CopyNumberCountByGene alterationCountByGene5 = new CopyNumberCountByGene();
-        alterationCountByGene5.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
-        alterationCountByGene5.setAlteration(2);
-        alterationCountByGene5.setNumberOfAlteredCases(1);
-        alterationCountByGenes.add(alterationCountByGene5);
-
-        Mockito.when(alterationCountService.getSampleCnaGeneCounts(
-            any(),
-            any(),
-            eq(true),
-            eq(false),
-            any(AlterationFilter.class)))
-            .thenReturn(new Pair<>(alterationCountByGenes, 5L));
-        List<GenomicDataCount> result = studyViewService.getCNAAlterationCountsByGeneSpecific(studyIds, sampleIds, hugoGeneSymbols, new AlterationFilter());
-        Assert.assertEquals(5L, result.size());
+        Map<String, List<MolecularProfile>> molecularProfileMap = new HashMap<>();
+        molecularProfileMap.put(BaseServiceImplTest.PROFILE_TYPE_1, molecularProfiles);
+        molecularProfileMap.put(BaseServiceImplTest.PROFILE_TYPE_2, molecularProfiles);
+   
+        Mockito.when(molecularProfileUtil.categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles))
+            .thenReturn(molecularProfileMap);
+        
+        List<Gene> genes = new ArrayList<>();
+        Gene gene1 = new Gene();
+        gene1.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
+        gene1.setHugoGeneSymbol(BaseServiceImplTest.HUGO_GENE_SYMBOL_1);
+        Gene gene2 = new Gene();
+        gene2.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_2);
+        gene2.setHugoGeneSymbol(BaseServiceImplTest.HUGO_GENE_SYMBOL_2);
+        genes.add(gene1);
+        genes.add(gene2);
+
+        Mockito.when(geneService.fetchGenes(anyList(), anyString(), anyString()))
+                .thenReturn(genes);
+
+        List<GeneMolecularData> geneMolecularData = new ArrayList<>();
+        GeneMolecularData geneMolecularData1 = new GeneMolecularData();
+        geneMolecularData1.setValue("-2");
+        GeneMolecularData geneMolecularData2 = new GeneMolecularData();
+        geneMolecularData2.setValue("-2");
+        GeneMolecularData geneMolecularData3 = new GeneMolecularData();
+        geneMolecularData3.setValue("2");
+        GeneMolecularData geneMolecularData4 = new GeneMolecularData();
+        geneMolecularData4.setValue("2");
+        geneMolecularData.add(geneMolecularData1);
+        geneMolecularData.add(geneMolecularData2);
+        geneMolecularData.add(geneMolecularData3);
+        geneMolecularData.add(geneMolecularData4);
+        
+        Mockito.when(molecularDataService.getMolecularDataInMultipleMolecularProfiles(
+            anyList(),
+            anyList(),
+            anyList(),
+            anyString()))
+            .thenReturn(geneMolecularData);
+        
+        List<GenomicDataCountItem> result = studyViewService.getCNAAlterationCountsByGeneSpecific(studyIds, sampleIds, genomicDataFilters);
+        Assert.assertEquals(2L, result.size());
+        Assert.assertEquals(BaseServiceImplTest.HUGO_GENE_SYMBOL_1, result.get(0).getHugoGeneSymbol());
+        Assert.assertEquals(BaseServiceImplTest.PROFILE_TYPE_1, result.get(0).getProfileType());
+        Assert.assertEquals(2, result.get(0).getCounts().get(0).getCount().intValue());
+        Assert.assertEquals(2, result.get(0).getCounts().get(1).getCount().intValue());
+        Assert.assertEquals(BaseServiceImplTest.HUGO_GENE_SYMBOL_2, result.get(1).getHugoGeneSymbol());
+        Assert.assertEquals(BaseServiceImplTest.PROFILE_TYPE_2, result.get(1).getProfileType());
+        Assert.assertEquals(2, result.get(1).getCounts().get(0).getCount().intValue());
+        Assert.assertEquals(2, result.get(1).getCounts().get(1).getCount().intValue());
     }
 
     @Testu}(jC  (45a3142212f8e60676f5f4d3d7da0d27ec561126jBC  =web/src/main/java/org/cbioportal/web/StudyViewController.javajDC  modifiedj<C  Kj=C  KjFC  KjGC  https://github.com/cBioPortal/cbioportal/blob/05079e10472a341680fc721d633e0c4058977664/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javajIC  https://github.com/cBioPortal/cbioportal/raw/05079e10472a341680fc721d633e0c4058977664/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javajKC  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=05079e10472a341680fc721d633e0c4058977664jMC  Xl  @@ -9,15 +9,14 @@
 import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.commons.math3.stat.correlation.PearsonsCorrelation;
 import org.apache.commons.math3.stat.correlation.SpearmansCorrelation;
+import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
 import org.cbioportal.service.*;
-import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.exception.StudyNotFoundException;
 import org.cbioportal.service.util.ClinicalAttributeUtil;
 import org.cbioportal.web.config.annotation.InternalApi;
 import org.cbioportal.model.AlterationFilter;
 import org.cbioportal.web.parameter.*;
-import org.cbioportal.web.parameter.sort.ClinicalDataSortBy;
 import org.cbioportal.web.util.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.Cacheable;
@@ -861,11 +860,11 @@ public ResponseEntity<List<GenomicDataBin>> fetchGenomicDataBinCounts(
     @RequestMapping(value = "/genomic-data-counts/fetch", method = RequestMethod.POST,
         consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Fetch genomic data counts by GenomicDataCountFilter")
-    public ResponseEntity<List<GenomicDataCount>> fetchGenomicDataCounts(
-        @ApiParam(required = true, value = "Genomic data bin count filter") @Valid @RequestBody(required = false) GenomicDataCountFilter genomicDataCountFilter,
+    public ResponseEntity<List<GenomicDataCountItem>> fetchGenomicDataCounts(
+        @ApiParam(required = true, value = "Genomic data count filter") @Valid @RequestBody(required = false) GenomicDataCountFilter genomicDataCountFilter,
         @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
         @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
-        @ApiParam(required = true, value = "List of copy number count identifiers")
+        @ApiParam(required = true, value = "Intercepted Genomic Data Count Filter")
         @ApiIgnore
         @Valid @RequestAttribute(required = false, value = "interceptedGenomicDataCountFilter") GenomicDataCountFilter interceptedGenomicDataCountFilter
     ) throws StudyNotFoundException {
@@ -890,11 +889,10 @@ public ResponseEntity<List<GenomicDataCount>> fetchGenomicDataCounts(
         List<String> sampleIds = new ArrayList<>();
         studyViewFilterUtil.extractStudyAndSampleIds(filteredSampleIdentifiers, studyIds, sampleIds);
         
-        List<GenomicDataCount> result = studyViewService.getCNAAlterationCountsByGeneSpecific(
+        List<GenomicDataCountItem> result = studyViewService.getCNAAlterationCountsByGeneSpecific(
             studyIds,
             sampleIds,
-            gdFilters.stream().map(GenomicDataFilter::getHugoGeneSymbol).collect(Collectors.toList()),
-            studyViewFilter.getAlterationFilter());
+            gdFilters.stream().map(gdFilter -> new Pair<>(gdFilter.getHugoGeneSymbol(), gdFilter.getProfileType())).collect(Collectors.toList()));
 
         return new ResponseEntity<>(result, HttpStatus.OK);
     }u}(jC  (3951e57b963be731abed688f002aa194fc2f0793jBC  Aweb/src/test/java/org/cbioportal/web/StudyViewControllerTest.javajDC  modifiedj<C  K<j=C  KjFC  KKjGC  https://github.com/cBioPortal/cbioportal/blob/05079e10472a341680fc721d633e0c4058977664/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javajIC  https://github.com/cBioPortal/cbioportal/raw/05079e10472a341680fc721d633e0c4058977664/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javajKC  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.java?ref=05079e10472a341680fc721d633e0c4058977664jMC  X_  @@ -62,8 +62,10 @@ public class StudyViewControllerTest {
     private static final String TEST_GENERIC_ASSAY_DATA_VALUE_2 = "value2";
     private static final String TEST_CLINICAL_EVENT_TYPE = "STATUS";
     private static final Integer TEST_CLINICAL_EVENT_TYPE_COUNT = 513;
-    private static final String TEST_CNA_ALTERATION_NAME = "test_cna_event_type";
-    private static final String TEST_CNA_ALTERATION_VALUE = "2";
+    private static final String TEST_CNA_ALTERATION_NAME_1 = "test_cna_event_type_1";
+    private static final String TEST_CNA_ALTERATION_NAME_2 = "test_cna_event_type_2";
+    private static final String TEST_CNA_ALTERATION_VALUE_1 = "2";
+    private static final String TEST_CNA_ALTERATION_VALUE_2 = "-2";
     private static final String TEST_MOLECULAR_PROFILE_TYPE = "test_molecular_profile_type";
 
     private List<SampleIdentifier> filteredSampleIdentifiers = new ArrayList<>();
@@ -514,42 +516,85 @@ public void fetchSampleCounts() throws Exception {
     public void fetchGenomicDataCounts() throws Exception {
 
         when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
-        
-        List<GenomicDataCount> genomicDataCounts = new ArrayList<>();
+
+        List<GenomicDataCountItem> genomicDataCountItems = new ArrayList<>();
+
         GenomicDataCount genomicDataCount1 = new GenomicDataCount();
-        genomicDataCount1.setLabel(TEST_CNA_ALTERATION_NAME);
-        genomicDataCount1.setValue(TEST_CNA_ALTERATION_VALUE);
+        genomicDataCount1.setLabel(TEST_CNA_ALTERATION_NAME_1);
+        genomicDataCount1.setValue(TEST_CNA_ALTERATION_VALUE_1);
         genomicDataCount1.setCount(1);
-        genomicDataCounts.add(genomicDataCount1);
         
+        GenomicDataCount genomicDataCount2 = new GenomicDataCount();
+        genomicDataCount2.setLabel(TEST_CNA_ALTERATION_NAME_2);
+        genomicDataCount2.setValue(TEST_CNA_ALTERATION_VALUE_2);
+        genomicDataCount2.setCount(1);
+
+        GenomicDataCountItem genomicDataCountItem1 = new GenomicDataCountItem();
+        List<GenomicDataCount> genomicDataCounts1 = new ArrayList<>();
+        genomicDataCounts1.add(genomicDataCount1);
+        genomicDataCounts1.add(genomicDataCount2);
+        genomicDataCountItem1.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_1);
+        genomicDataCountItem1.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataCountItem1.setCounts(genomicDataCounts1);
+
+        GenomicDataCountItem genomicDataCountItem2 = new GenomicDataCountItem();
+        List<GenomicDataCount> genomicDataCounts2 = new ArrayList<>();
+        genomicDataCounts2.add(genomicDataCount1);
+        genomicDataCounts2.add(genomicDataCount2);
+        genomicDataCountItem2.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_2);
+        genomicDataCountItem2.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataCountItem2.setCounts(genomicDataCounts2);
+
+        genomicDataCountItems.add(genomicDataCountItem1);
+        genomicDataCountItems.add(genomicDataCountItem2);
+
         when(studyViewService.getCNAAlterationCountsByGeneSpecific(
             anyList(),
             anyList(),
-            anyList(),
-            any(AlterationFilter.class)))
-            .thenReturn(genomicDataCounts);
+            anyList()))
+            .thenReturn(genomicDataCountItems);
 
         GenomicDataCountFilter genomicDataCountFilter = new GenomicDataCountFilter();
         List<GenomicDataFilter> genomicDataFilters = new ArrayList<>();
+        
         GenomicDataFilter genomicDataFilter1 = new GenomicDataFilter();
         genomicDataFilter1.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_1);
         genomicDataFilter1.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
         genomicDataFilters.add(genomicDataFilter1);
+        
+        GenomicDataFilter genomicDataFilter2 = new GenomicDataFilter();
+        genomicDataFilter2.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_2);
+        genomicDataFilter2.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataFilters.add(genomicDataFilter2);
+        
         genomicDataCountFilter.setGenomicDataFilters(genomicDataFilters);
+        
         StudyViewFilter studyViewFilter = new StudyViewFilter();
         studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
-        studyViewFilter.setAlterationFilter(alterationFilter);
         genomicDataCountFilter.setStudyViewFilter(studyViewFilter);
-        
+
         mockMvc.perform(MockMvcRequestBuilders.post("/genomic-data-counts/fetch")
                 .accept(MediaType.APPLICATION_JSON)
                 .contentType(MediaType.APPLICATION_JSON)
                 .content(objectMapper.writeValueAsString(genomicDataCountFilter)))
             .andExpect(MockMvcResultMatchers.status().isOk())
             .andExpect(MockMvcResultMatchers.content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))
-            .andExpect(MockMvcResultMatchers.jsonPath("$[0].label").value(TEST_CNA_ALTERATION_NAME))
-            .andExpect(MockMvcResultMatchers.jsonPath("$[0].value").value(TEST_CNA_ALTERATION_VALUE))
-            .andExpect(MockMvcResultMatchers.jsonPath("$[0].count").value(1));
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].hugoGeneSymbol").value(TEST_HUGO_GENE_SYMBOL_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].profileType").value(TEST_MOLECULAR_PROFILE_TYPE))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[0].label").value(TEST_CNA_ALTERATION_NAME_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[0].value").value(TEST_CNA_ALTERATION_VALUE_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[0].count").value(1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[1].label").value(TEST_CNA_ALTERATION_NAME_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[1].value").value(TEST_CNA_ALTERATION_VALUE_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[1].count").value(1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].hugoGeneSymbol").value(TEST_HUGO_GENE_SYMBOL_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].profileType").value(TEST_MOLECULAR_PROFILE_TYPE))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[0].label").value(TEST_CNA_ALTERATION_NAME_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[0].value").value(TEST_CNA_ALTERATION_VALUE_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[0].count").value(1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[1].label").value(TEST_CNA_ALTERATION_NAME_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[1].value").value(TEST_CNA_ALTERATION_VALUE_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[1].count").value(1));
     }
     
     @Ignore("Skip StudyViewControllerTest.fetchClinicalDataDensityPlot due to assertion errors")ueu(cf2e30bac23346cd55423ea55dd19b7ccd93e4f2}(sha(cf2e30bac23346cd55423ea55dd19b7ccd93e4f2node_idEC_kwDOAe-hB9oAKGNmMmUzMGJhYzIzMzQ2Y2Q1NTQyM2VhNTVkZDE5YjdjY2Q5M2U0ZjIcommit      }(author}(namePrasanna Kumar Jagannathanemail+37613906+jagnathan@users.noreply.github.comdate2023-07-11T21:31:15Zu	committer}(jC  Prasanna Kumar JagannathanjC  +37613906+jagnathan@users.noreply.github.comjC  2023-07-11T21:31:15Zumessagefix 10221 - 403 issue

fix 10221 - 403 issue; swagger annotations cause issue in authentication object. If user authorization is enabled, authentication object is obtained from SecurityContextHoldertree}(jC  (c7eb47e799fc6cb129cc374c4aac03b7d9dc28feurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c7eb47e799fc6cb129cc374c4aac03b7d9dc28feujC  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/cf2e30bac23346cd55423ea55dd19b7ccd93e4f2
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujC  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/cf2e30bac23346cd55423ea55dd19b7ccd93e4f2html_urlXhttps://github.com/cBioPortal/cbioportal/commit/cf2e30bac23346cd55423ea55dd19b7ccd93e4f2comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/cf2e30bac23346cd55423ea55dd19b7ccd93e4f2/commentsjC  }(login	jagnathanidJR=jC  MDQ6VXNlcjM3NjEzOTA2
avatar_url4https://avatars.githubusercontent.com/u/37613906?v=4gravatar_idh5jC  &https://api.github.com/users/jagnathanjC  https://github.com/jagnathan
followers_url0https://api.github.com/users/jagnathan/followers
following_url=https://api.github.com/users/jagnathan/following{/other_user}	gists_url6https://api.github.com/users/jagnathan/gists{/gist_id}starred_url=https://api.github.com/users/jagnathan/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/jagnathan/subscriptionsorganizations_url+https://api.github.com/users/jagnathan/orgs	repos_url,https://api.github.com/users/jagnathan/repos
events_url7https://api.github.com/users/jagnathan/events{/privacy}received_events_url6https://api.github.com/users/jagnathan/received_eventstypeUser
site_adminujC  }(jC  	jagnathanjC  JR=jC  MDQ6VXNlcjM3NjEzOTA2jC  4https://avatars.githubusercontent.com/u/37613906?v=4jC  h5jC  &https://api.github.com/users/jagnathanjC  https://github.com/jagnathanjC  0https://api.github.com/users/jagnathan/followersjC  =https://api.github.com/users/jagnathan/following{/other_user}jC  6https://api.github.com/users/jagnathan/gists{/gist_id}jC  =https://api.github.com/users/jagnathan/starred{/owner}{/repo}jC  4https://api.github.com/users/jagnathan/subscriptionsjC  +https://api.github.com/users/jagnathan/orgsjC  ,https://api.github.com/users/jagnathan/reposjC  7https://api.github.com/users/jagnathan/events{/privacy}jC  6https://api.github.com/users/jagnathan/received_eventsjC  UserjC  uparents]}(jC  (249d4ca1bab7348af6f513bb4b897fac8cf93310jC  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/249d4ca1bab7348af6f513bb4b897fac8cf93310jC  Xhttps://github.com/cBioPortal/cbioportal/commit/249d4ca1bab7348af6f513bb4b897fac8cf93310uastats}(totalK	additionsK	deletionsKufiles]}(jC  (faf514f645f75d2626941d290883336abf1f1352filename9web/src/main/java/org/cbioportal/web/StudyController.javastatusmodifiedjC  KjC  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/cf2e30bac23346cd55423ea55dd19b7ccd93e4f2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/cf2e30bac23346cd55423ea55dd19b7ccd93e4f2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.java?ref=cf2e30bac23346cd55423ea55dd19b7ccd93e4f2patchXb  @@ -23,6 +23,7 @@
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -98,10 +99,10 @@ public ResponseEntity<List<CancerStudy>> getAllStudies(
         @ApiParam("Name of the property that the result list is sorted by")
         @RequestParam(required = false) StudySortBy sortBy,
         @ApiParam("Direction of the sort")
-        @RequestParam(defaultValue = "ASC") Direction direction,
-        @ApiParam(hidden = true, required = false)
-        @RequestParam(required = false) Authentication authentication) {
-        
+        @RequestParam(defaultValue = "ASC") Direction direction)
+        {
+
+        Authentication authentication = null;    
         // Only use this feature on the public portal and make sure it is never used
         // on portals using auth, as in auth setting, different users will have different
         // results.
@@ -115,6 +116,8 @@ public ResponseEntity<List<CancerStudy>> getAllStudies(
                 && direction == Direction.ASC) {
             return new ResponseEntity<>(defaultResponse, HttpStatus.OK);
         }
+        else
+            authentication = SecurityContextHolder.getContext().getAuthentication();
 
         if (projection == Projection.META) {
             HttpHeaders responseHeaders = new HttpHeaders();uau(4fa24f18218de011474ba7b2786977e6c3c9f458}(sha(4fa24f18218de011474ba7b2786977e6c3c9f458node_idEC_kwDOAe-hB9oAKDRmYTI0ZjE4MjE4ZGUwMTE0NzRiYTdiMjc4Njk3N2U2YzNjOWY0NTgcommit}(author}(namehaynescdemailhaynescd@chop.edudate2023-07-07T20:57:05Zu	committer}(jC  haynescdj D  haynescd@chop.edujD  2023-07-07T20:57:05Zumessageremove duplicate codetree}(jC  (56c04e878a6bf3bc6952d9ddcd50049684069eadurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/56c04e878a6bf3bc6952d9ddcd50049684069eadujD  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/4fa24f18218de011474ba7b2786977e6c3c9f458
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujD  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4fa24f18218de011474ba7b2786977e6c3c9f458html_urlXhttps://github.com/cBioPortal/cbioportal/commit/4fa24f18218de011474ba7b2786977e6c3c9f458comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/4fa24f18218de011474ba7b2786977e6c3c9f458/commentsjC  }(loginhaynescdidJ jC  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5jD  %https://api.github.com/users/haynescdjD  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminujD  }(jD  haynescdj!D  J jC  MDQ6VXNlcjMzNjA4OTIwj#D  4https://avatars.githubusercontent.com/u/33608920?v=4j%D  h5jD  %https://api.github.com/users/haynescdjD  https://github.com/haynescdj(D  /https://api.github.com/users/haynescd/followersj*D  <https://api.github.com/users/haynescd/following{/other_user}j,D  5https://api.github.com/users/haynescd/gists{/gist_id}j.D  <https://api.github.com/users/haynescd/starred{/owner}{/repo}j0D  3https://api.github.com/users/haynescd/subscriptionsj2D  *https://api.github.com/users/haynescd/orgsj4D  +https://api.github.com/users/haynescd/reposj6D  6https://api.github.com/users/haynescd/events{/privacy}j8D  5https://api.github.com/users/haynescd/received_eventsj:D  Userj<D  uparents]}(jC  (9178c2989dbfbda052e8ece86ca65017dfa6a998jD  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9178c2989dbfbda052e8ece86ca65017dfa6a998jD  Xhttps://github.com/cBioPortal/cbioportal/commit/9178c2989dbfbda052e8ece86ca65017dfa6a998uastats}(totalK.	additionsK	deletionsKufiles]}(jC  (f121f75fd5db65665c8e749961e1c941c94f8502filenametpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmlstatusmodifiedjVD  KjWD  KchangesK.blob_urlhttps://github.com/cBioPortal/cbioportal/blob/4fa24f18218de011474ba7b2786977e6c3c9f458/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/4fa24f18218de011474ba7b2786977e6c3c9f458/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=4fa24f18218de011474ba7b2786977e6c3c9f458patchX  @@ -46,16 +46,20 @@
    
     <!-- for /clinical-data-counts/fetch (returns ClinicalData) which will then be converted to clinicalDataCountItems -->
     <select id="getClinicalDataCounts" resultType="org.cbioportal.model.ClinicalDataCount">
-      <include refid="getPatientClinicalDataCountsQuery"/>
+        <include refid="getCategoricalClinicalDataCountsQuery">
+            <property name="table_name_prefix" value="patient"/>
+        </include>
         UNION ALL
-        <include refid="getSampleClinicalDataCountsQuery"/>
+        <include refid="getCategoricalClinicalDataCountsQuery">
+            <property name="table_name_prefix" value="sample"/>
+        </include>
     </select>
-    <sql id="getPatientClinicalDataCountsQuery">
+    <sql id="getCategoricalClinicalDataCountsQuery">
         SELECT
         attribute_name as attributeId,
         CASE WHEN attribute_value = 'NULL' THEN 'NA' ELSE attribute_value END AS value,
         Count(*) as count
-        FROM patient_clinical_attribute_categorical
+        FROM ${table_name_prefix}_clinical_attribute_categorical
         <where>
             patient_unique_id IN ( <include refid="getPatientIdsFromSampleIdFilters"/>
             <if test="applyPatientIdFilters == true">
@@ -72,38 +76,18 @@
             </foreach>
         </where>
         GROUP BY attribute_name,
-        attribute_value 
+        attribute_value
     </sql>
     <select id="getPatientClinicalDataCounts" resultType="org.cbioportal.model.ClinicalDataCount">
-        <include refid="getPatientClinicalDataCountsQuery"/>
+        <include refid="getCategoricalClinicalDataCountsQuery">
+            <property name="table_name_prefix" value="patient"/>
+        </include>
     </select>
     <select id="getSampleClinicalDataCounts" resultType="org.cbioportal.model.ClinicalDataCount">
-        <include refid="getSampleClinicalDataCountsQuery"/>
+        <include refid="getCategoricalClinicalDataCountsQuery">
+            <property name="table_name_prefix" value="sample"/>
+        </include>
     </select>
-    <sql id="getSampleClinicalDataCountsQuery">
-        SELECT
-        attribute_name as attributeId,
-        CASE WHEN attribute_value = 'NULL' THEN 'NA' ELSE attribute_value END AS value,
-        Count(*) as count
-        FROM sample_clinical_attribute_categorical
-        <where>
-            patient_unique_id IN ( <include refid="getPatientIdsFromSampleIdFilters"/>
-            <if test="applyPatientIdFilters == true">
-                INTERSECT <include refid="patientUniqueIdsFromStudyViewFilter"/>
-            </if>
-            )
-            AND UPPER(attribute_value) NOT IN
-            <foreach item="filteredAttributeValue" collection="filteredAttributeValues" open="(" separator="," close=")">
-                #{filteredAttributeValue}
-            </foreach>
-            AND attribute_name IN
-            <foreach item="attributeId" collection="attributeIds" open="(" separator="," close=")">
-                #{attributeId}
-            </foreach>
-        </where>
-        GROUP BY attribute_name,
-        attribute_value
-    </sql>
     
     <!-- This block represents the Study View Filter -->
     <sql id="sampleUniqueIdsFromStudyViewFilter">uau(e9b53ef6f81b1b7f18464852a3dad5bd950a302f}(sha(e9b53ef6f81b1b7f18464852a3dad5bd950a302fnode_idEC_kwDOAe-hB9oAKGU5YjUzZWY2ZjgxYjFiN2YxODQ2NDg1MmEzZGFkNWJkOTUwYTMwMmYcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-03T15:52:09Zu	committer}(jsD  GitHubjuD  noreply@github.comjwD  2023-08-03T15:52:09Zumessage"Update two-sided fisher tests newstree}(jkD  (31035ca7eb8dc9284ab3119b95c905f04476e483urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/31035ca7eb8dc9284ab3119b95c905f04476e483ujD  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/e9b53ef6f81b1b7f18464852a3dad5bd950a302f
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJky80pCRBK7hj4Ov3rIwAA3XgIAIYh0ZCSgwjAgDUNLUAWq8Ic
3TgUIjJEbPzfVxjEwi992JhgbTeyhu2GFrTZtLLcPA0VI/kWOek435OU5ay8ugyb
FJ1PRWxwCaEndGkuaai1EYlgmTgN4DJ3/cIp6E5YB2a3BMjrce2xmJvyzgi5EzAc
oNE5PJuzKL4eCLYymAqK2T4MB/la897MkHFL+bogKLhPLLhbn8pN6oNLAWdIwDMa
fn6IaBFPRANSCg1C/2F2nzqrpSnezuxRb4wWJ6AOucW9l0RSm6VeExY4bANwv/ka
MF+YyBSk4p6HflANdLq6qBXLtZM8nUL9GFvq9JA8s/TPHzl3PXWW274x65ZDg6k=
=GcJ3
-----END PGP SIGNATURE-----
payloadX  tree 31035ca7eb8dc9284ab3119b95c905f04476e483
parent 58a9cbe48c327c00913673471442986a42422241
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1691077929 -0400
committer GitHub <noreply@github.com> 1691077929 -0400

Update two-sided fisher tests newsuujD  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/e9b53ef6f81b1b7f18464852a3dad5bd950a302fhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/e9b53ef6f81b1b7f18464852a3dad5bd950a302fcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/e9b53ef6f81b1b7f18464852a3dad5bd950a302f/commentsjqD  }(login
dippindotsidJtO jmD  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5jD  'https://api.github.com/users/dippindotsjD  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminujyD  }(jD  web-flowjD  J/jmD  MDQ6VXNlcjE5ODY0NDQ3jD  4https://avatars.githubusercontent.com/u/19864447?v=4jD  h5jD  %https://api.github.com/users/web-flowjD  https://github.com/web-flowjD  /https://api.github.com/users/web-flow/followersjD  <https://api.github.com/users/web-flow/following{/other_user}jD  5https://api.github.com/users/web-flow/gists{/gist_id}jD  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jD  3https://api.github.com/users/web-flow/subscriptionsjD  *https://api.github.com/users/web-flow/orgsjD  +https://api.github.com/users/web-flow/reposjD  6https://api.github.com/users/web-flow/events{/privacy}jD  5https://api.github.com/users/web-flow/received_eventsjD  UserjD  uparents]}(jkD  (58a9cbe48c327c00913673471442986a42422241jD  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/58a9cbe48c327c00913673471442986a42422241jD  Xhttps://github.com/cBioPortal/cbioportal/commit/58a9cbe48c327c00913673471442986a42422241uastats}(totalK	additionsK	deletionsK ufiles]}(jkD  (9a3fce03aa84ef4f39d7a8b573937ee5b8fee672filenamedocs/News.mdstatusmodifiedjD  KjD  K changesKblob_urlehttps://github.com/cBioPortal/cbioportal/blob/e9b53ef6f81b1b7f18464852a3dad5bd950a302f/docs%2FNews.mdraw_urldhttps://github.com/cBioPortal/cbioportal/raw/e9b53ef6f81b1b7f18464852a3dad5bd950a302f/docs%2FNews.mdcontents_urlwhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FNews.md?ref=e9b53ef6f81b1b7f18464852a3dad5bd950a302fpatchXO  @@ -1,3 +1,14 @@
+## Aug 1, 2023
+*   **Enhancement**: This enhancement involves changing one-sided Fisher's exact tests to two-sided Fisher's exact tests, which will impact the calculation of p-values and q-values in several places. The affected areas are as follows:
+    *    Results View Page - Mutual Exclusivity Tab
+    *    Results View Page - Comparison Tab - Genomic Alterations Tab
+    *    Comparison Page - Genomic Alterations Tab
+    *    Comparison Page - Mutations Tab
+    
+    Please note that the Mutations tab is our new feature and when it was introduced to cBioPortal, it's already started using two-sided Fisher's exact tests.
+
+    To learn discussion about this change, please see our discussion [here](https://github.com/cBioPortal/cbioportal/issues/9943).
+
 ## May 2, 2023
 *   **New Feature**: The mutations tab now shows variant annotations from the [repository of Variant with Unexpected Effects (reVUE)](https://www.cancerrevue.org/).
     <img src="https://user-images.githubusercontent.com/16869603/234271379-6a0876ea-8477-426e-a0e4-5e0b0b66aef9.gif" width="700" />uau(100d642e70a4ac4db1eccefc5de684bc40ea0cfb}(sha(100d642e70a4ac4db1eccefc5de684bc40ea0cfbnode_idEC_kwDOAe-hB9oAKDEwMGQ2NDJlNzBhNGFjNGRiMWVjY2VmYzVkZTY4NGJjNDBlYTBjZmIcommit}(author}(name
Ino de Bruijnemailino@ino.biodate2023-06-07T22:59:38Zu	committer}(jD  GitHubjD  noreply@github.comjD  2023-06-07T22:59:38Zumessage Add note about official releasestree}(jD  (2acc81694441b009df211d6726566b87ecd14b51urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/2acc81694441b009df211d6726566b87ecd14b51ujD  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/100d642e70a4ac4db1eccefc5de684bc40ea0cfb
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkgQvaCRBK7hj4Ov3rIwAAr7UIAD3C3FWV3y4pD1XLuLV4SJ/y
WG6R+ZlWsCv7cCoTJW0bNCqvaGGoc0vjKPokm5ZzyD9hsLLFXc6IfLfwRHnloKVP
/ERKY2fhOlppwR/nNxt/XtHeheXcjUSPvldXP5UdA5giEgG0PFjGs76YMDYe7iS3
ZYgEn+t9yqLQ2cu1IyPxcZwOyzvbhSV33vXYtNPLmL2pj+mqHixrWVAccG2LB3FG
Cr6EtMDX59pZUkugqDZrMqsdoYYiHsBDQsN+rta97grVN0DtQeb1Np2Cxb2gEtLn
PB8NGUOwZjyQmMgvq2A0+baw7HEHepguTFjVmOMNRwyzyq9q58phE1MH3IKgpEY=
=1uiL
-----END PGP SIGNATURE-----
payloadtree 2acc81694441b009df211d6726566b87ecd14b51
parent 23178a84d247b34d14bcd8cb41f496a1fcb487f2
author Ino de Bruijn <ino@ino.bio> 1686178778 -0400
committer GitHub <noreply@github.com> 1686178778 -0400

Add note about official releasesuujD  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/100d642e70a4ac4db1eccefc5de684bc40ea0cfbhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/100d642e70a4ac4db1eccefc5de684bc40ea0cfbcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/100d642e70a4ac4db1eccefc5de684bc40ea0cfb/commentsjD  }(logininodbidJZ jD  MDQ6VXNlcjEzMzQwMDQ=
avatar_url3https://avatars.githubusercontent.com/u/1334004?v=4gravatar_idh5jD  "https://api.github.com/users/inodbjE  https://github.com/inodb
followers_url,https://api.github.com/users/inodb/followers
following_url9https://api.github.com/users/inodb/following{/other_user}	gists_url2https://api.github.com/users/inodb/gists{/gist_id}starred_url9https://api.github.com/users/inodb/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/inodb/subscriptionsorganizations_url'https://api.github.com/users/inodb/orgs	repos_url(https://api.github.com/users/inodb/repos
events_url3https://api.github.com/users/inodb/events{/privacy}received_events_url2https://api.github.com/users/inodb/received_eventstypeUser
site_adminujD  }(j
E  web-flowjE  J/jD  MDQ6VXNlcjE5ODY0NDQ3jE  4https://avatars.githubusercontent.com/u/19864447?v=4jE  h5jD  %https://api.github.com/users/web-flowjE  https://github.com/web-flowjE  /https://api.github.com/users/web-flow/followersjE  <https://api.github.com/users/web-flow/following{/other_user}jE  5https://api.github.com/users/web-flow/gists{/gist_id}jE  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jE  3https://api.github.com/users/web-flow/subscriptionsj E  *https://api.github.com/users/web-flow/orgsj"E  +https://api.github.com/users/web-flow/reposj$E  6https://api.github.com/users/web-flow/events{/privacy}j&E  5https://api.github.com/users/web-flow/received_eventsj(E  Userj*E  uparents]}(jD  (23178a84d247b34d14bcd8cb41f496a1fcb487f2jD  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/23178a84d247b34d14bcd8cb41f496a1fcb487f2jE  Xhttps://github.com/cBioPortal/cbioportal/commit/23178a84d247b34d14bcd8cb41f496a1fcb487f2uastats}(totalK	additionsK	deletionsKufiles]}(jD  (cec9d32f48ad1f26180744cbded5df30a55d75bdfilename%docs/development/Release-Procedure.mdstatusmodifiedjDE  KjEE  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/100d642e70a4ac4db1eccefc5de684bc40ea0cfb/docs%2Fdevelopment%2FRelease-Procedure.mdraw_urlhttps://github.com/cBioPortal/cbioportal/raw/100d642e70a4ac4db1eccefc5de684bc40ea0cfb/docs%2Fdevelopment%2FRelease-Procedure.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdevelopment%2FRelease-Procedure.md?ref=100d642e70a4ac4db1eccefc5de684bc40ea0cfbpatchX"  @@ -38,7 +38,7 @@ For releases with database migrations, we increase the MINOR number in MAJOR.MIN
 
 ### From pre-release to official release
 
-On the [GitHub Release Page](https://github.com/cBioPortal/cbioportal/releases) you will see that some releases have the pre-release indication whereas others do not. In general we make a new pre-release release every week. We test it out in production (https://cbioportal.org) for one month and if no new critical issues are identified we make it an official release.
+On the [GitHub Release Page](https://github.com/cBioPortal/cbioportal/releases) you will see that some releases have the pre-release indication whereas others do not. In general we make a new pre-release release every week. We test it out in production (https://cbioportal.org) for one month and if no new critical issues are identified we make it an official release. Occasionally we make a new official release in less than a month's time if we identify a critical issue in the previous release.
 
 ### cBioPortal Software Version Numbers
 uau(09bdc018b1ceae71bec4b1bb46d9544bedd9a7a3}(sha(09bdc018b1ceae71bec4b1bb46d9544bedd9a7a3node_idEC_kwDOAe-hB9oAKDA5YmRjMDE4YjFjZWFlNzFiZWM0YjFiYjQ2ZDk1NDRiZWRkOWE3YTMcommit}(author}(name
Ino de Bruijnemailino@ino.biodate2023-06-02T22:02:27Zu	committer}(jaE  GitHubjcE  noreply@github.comjeE  2023-06-02T22:02:27Zumessagefix release notes docs linktree}(jYE  (ba3c6bcea65f1621a485f5367f4fd586caa3e622urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/ba3c6bcea65f1621a485f5367f4fd586caa3e622ujqE  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/09bdc018b1ceae71bec4b1bb46d9544bedd9a7a3
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkembzCRBK7hj4Ov3rIwAAyHEIAHA85kuNN3bPq1f+USlIzlPU
UUDyFPAcshujWDtX8v0t/GgG2TYoUFqfOLajgbd60LJxq/vgp7dCvV0LeMc3eDxn
yfS0UAdnDswjemWu1xB63hTUGJgl3g8HNsEmfdsPYjzspP9mYIYugBk/pvWDfx62
GW5U17q2MsazYW8TuvQ9Boecs3SJ4YX2cl+QazpPURC1zl6spGRZBNKutKOuPpTK
z8vH1Q8k7DLQzNKWixpBkuqfce9rMV+fqL4ggF00wj26lUfbdiNXatOf9Cap/cfu
4IoevCpqe5MHUTSrDj9N4GJSu4NhSEL0ACZHr3ZglX8f0U3ypcEXXSjzpoUOMTU=
=3H0H
-----END PGP SIGNATURE-----
payloadtree ba3c6bcea65f1621a485f5367f4fd586caa3e622
parent 8532fe353fee85e14efc25f5862297f5bdaadb36
author Ino de Bruijn <ino@ino.bio> 1685743347 -0400
committer GitHub <noreply@github.com> 1685743347 -0400

fix release notes docs linkuujqE  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/09bdc018b1ceae71bec4b1bb46d9544bedd9a7a3html_urlXhttps://github.com/cBioPortal/cbioportal/commit/09bdc018b1ceae71bec4b1bb46d9544bedd9a7a3comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/09bdc018b1ceae71bec4b1bb46d9544bedd9a7a3/commentsj_E  }(logininodbidJZ j[E  MDQ6VXNlcjEzMzQwMDQ=
avatar_url3https://avatars.githubusercontent.com/u/1334004?v=4gravatar_idh5jqE  "https://api.github.com/users/inodbjE  https://github.com/inodb
followers_url,https://api.github.com/users/inodb/followers
following_url9https://api.github.com/users/inodb/following{/other_user}	gists_url2https://api.github.com/users/inodb/gists{/gist_id}starred_url9https://api.github.com/users/inodb/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/inodb/subscriptionsorganizations_url'https://api.github.com/users/inodb/orgs	repos_url(https://api.github.com/users/inodb/repos
events_url3https://api.github.com/users/inodb/events{/privacy}received_events_url2https://api.github.com/users/inodb/received_eventstypeUser
site_adminujgE  }(jE  web-flowjE  J/j[E  MDQ6VXNlcjE5ODY0NDQ3jE  4https://avatars.githubusercontent.com/u/19864447?v=4jE  h5jqE  %https://api.github.com/users/web-flowjE  https://github.com/web-flowjE  /https://api.github.com/users/web-flow/followersjE  <https://api.github.com/users/web-flow/following{/other_user}jE  5https://api.github.com/users/web-flow/gists{/gist_id}jE  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jE  3https://api.github.com/users/web-flow/subscriptionsjE  *https://api.github.com/users/web-flow/orgsjE  +https://api.github.com/users/web-flow/reposjE  6https://api.github.com/users/web-flow/events{/privacy}jE  5https://api.github.com/users/web-flow/received_eventsjE  UserjE  uparents]}(jYE  (8532fe353fee85e14efc25f5862297f5bdaadb36jqE  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8532fe353fee85e14efc25f5862297f5bdaadb36jE  Xhttps://github.com/cBioPortal/cbioportal/commit/8532fe353fee85e14efc25f5862297f5bdaadb36uastats}(totalK	additionsK	deletionsKufiles]}(jYE  (7bf80ceff714bc032f95041c2b15d0b2d4ebd249filename.github/release-drafter.ymlstatusmodifiedjE  KjE  KchangesKblob_urlthttps://github.com/cBioPortal/cbioportal/blob/09bdc018b1ceae71bec4b1bb46d9544bedd9a7a3/.github%2Frelease-drafter.ymlraw_urlshttps://github.com/cBioPortal/cbioportal/raw/09bdc018b1ceae71bec4b1bb46d9544bedd9a7a3/.github%2Frelease-drafter.ymlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/.github%2Frelease-drafter.yml?ref=09bdc018b1ceae71bec4b1bb46d9544bedd9a7a3patchXk  @@ -83,4 +83,4 @@ template: |
   - Frontend: https://github.com/cBioPortal/cbioportal-frontend/compare/$PREVIOUS_TAG...v$NEXT_PATCH_VERSION
   
   ## 🏷Notes on versioning and release procedure
-  https://docs.cbioportal.org/4.-development/release-procedure#a-note-on-versioning
+  https://docs.cbioportal.org/development/release-procedure/#a-note-on-versioninguau(dcc0637795222c50b227a451b9bf3cd07f41946f}(sha(dcc0637795222c50b227a451b9bf3cd07f41946fnode_idEC_kwDOAe-hB9oAKGRjYzA2Mzc3OTUyMjJjNTBiMjI3YTQ1MWI5YmYzY2QwN2Y0MTk0NmYcommit}(author}(name
Onur Sumeremails.onur.sumer@gmail.comdate2023-05-16T15:56:06Zu	committer}(jE  
Onur SumerjE  s.onur.sumer@gmail.comjE  2023-07-11T19:02:36Zumessage4add new clickhouse clinical data bin count end pointtree}(jE  (9ccf14913915ba105fec455996ebae91f072ebcaurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/9ccf14913915ba105fec455996ebae91f072ebcaujE  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/dcc0637795222c50b227a451b9bf3cd07f41946f
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujE  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/dcc0637795222c50b227a451b9bf3cd07f41946fhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/dcc0637795222c50b227a451b9bf3cd07f41946fcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/dcc0637795222c50b227a451b9bf3cd07f41946f/commentsjE  }(login	onursumeridJ6 jE  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5jE  &https://api.github.com/users/onursumerjE  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminujE  }(jE  	onursumerjE  J6 jE  MDQ6VXNlcjM2MDQxOTg=jE  3https://avatars.githubusercontent.com/u/3604198?v=4jE  h5jE  &https://api.github.com/users/onursumerjE  https://github.com/onursumerjF  0https://api.github.com/users/onursumer/followersjF  =https://api.github.com/users/onursumer/following{/other_user}jF  6https://api.github.com/users/onursumer/gists{/gist_id}jF  =https://api.github.com/users/onursumer/starred{/owner}{/repo}j
F  4https://api.github.com/users/onursumer/subscriptionsjF  +https://api.github.com/users/onursumer/orgsjF  ,https://api.github.com/users/onursumer/reposjF  7https://api.github.com/users/onursumer/events{/privacy}jF  6https://api.github.com/users/onursumer/received_eventsjF  UserjF  uparents]}(jE  (2e3d886121d0820a23aa6d914638fab898da8f04jE  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2e3d886121d0820a23aa6d914638fab898da8f04jE  Xhttps://github.com/cBioPortal/cbioportal/commit/2e3d886121d0820a23aa6d914638fab898da8f04uastats}(totalK	additionsK	deletionsK
ufiles](}(jE  (1c8a1e87fa787f1850d8bf58cf10480bd61f0777filename]persistence/persistence-api/src/main/java/org/cbioportal/persistence/StudyViewRepository.javastatusmodifiedj0F  Kj1F  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/dcc0637795222c50b227a451b9bf3cd07f41946f/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStudyViewRepository.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/dcc0637795222c50b227a451b9bf3cd07f41946f/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStudyViewRepository.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStudyViewRepository.java?ref=dcc0637795222c50b227a451b9bf3cd07f41946fpatchX  @@ -14,6 +14,10 @@
 public interface StudyViewRepository {
     List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
 
+    List<ClinicalData> getSampleClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
+    
+    List<ClinicalData> getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
+    
     List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
     
     List<ClinicalDataCount> getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List<String> filteredAttributes);u}(jE  (c99a9a9082ff6af2086c47f31893f79666bc8314j6F  ppersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.javaj8F  modifiedj0F  Kj1F  K j:F  Kj;F  https://github.com/cBioPortal/cbioportal/blob/dcc0637795222c50b227a451b9bf3cd07f41946f/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.javaj=F  https://github.com/cBioPortal/cbioportal/raw/dcc0637795222c50b227a451b9bf3cd07f41946f/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.javaj?F  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.java?ref=dcc0637795222c50b227a451b9bf3cd07f41946fjAF  X  @@ -1,6 +1,7 @@
 package org.cbioportal.persistence.mybatiscolumnstore;
 
 import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.ClinicalData;
 import org.cbioportal.model.ClinicalDataCount;
 import org.cbioportal.model.Sample;
 import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
@@ -10,6 +11,7 @@
 
 public interface StudyViewMapper {
     List<Sample> getFilteredSamples(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters);
+
     List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters);
     
     List<ClinicalDataCount> getPatientClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter,
@@ -22,4 +24,8 @@ List<ClinicalDataCount> getClinicalDataCounts(StudyViewFilter studyViewFilter, C
                                                   boolean applyPatientIdFilters, List<String> attributeIds, List<String> filteredAttributeValues);
     
     List<String> getClinicalAttributeNames(String tableName);
+    
+    List<ClinicalData> getSampleClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, List<String> attributeIds);
+    
+    List<ClinicalData> getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters, List<String> attributeIds);
 }u}(jE  (9e219c836006176ca4c84a40a95800a142bd5cb1j6F  {persistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepository.javaj8F  modifiedj0F  K	j1F  Kj:F  K
j;F  https://github.com/cBioPortal/cbioportal/blob/dcc0637795222c50b227a451b9bf3cd07f41946f/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.javaj=F  https://github.com/cBioPortal/cbioportal/raw/dcc0637795222c50b227a451b9bf3cd07f41946f/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.javaj?F  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.java?ref=dcc0637795222c50b227a451b9bf3cd07f41946fjAF  XK  @@ -43,7 +43,7 @@ public List<ClinicalDataCount> getSampleClinicalDataCounts(StudyViewFilter study
         return studyViewMapper.getSampleClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter),
            filteredAttributes, FILTERED_CLINICAL_ATTR_VALUES );
     }
-
+    
     @Override
     public List<ClinicalDataCount> getPatientClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, List<String> filteredAttributes) {
         return studyViewMapper.getPatientClinicalDataCounts(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter),
@@ -60,4 +60,12 @@ private boolean shouldApplyPatientIdFilters(CategorizedClinicalDataCountFilter c
         return categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters().isEmpty()
             || categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters().isEmpty();
     }
+
+    public List<ClinicalData> getSampleClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) {
+        return studyViewMapper.getSampleClinicalDataFromStudyViewFilter(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), attributeIds);
+    }
+    
+    public List<ClinicalData> getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) {
+        return studyViewMapper.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter), attributeIds);
+    }
 }
\ No newline at end of fileu}(jE  (6a27522c3cccb76f84b4c242dc875f651e190de7j6F  tpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmlj8F  modifiedj0F  K2j1F  Kj:F  K3j;F  https://github.com/cBioPortal/cbioportal/blob/dcc0637795222c50b227a451b9bf3cd07f41946f/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlj=F  https://github.com/cBioPortal/cbioportal/raw/dcc0637795222c50b227a451b9bf3cd07f41946f/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlj?F  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=dcc0637795222c50b227a451b9bf3cd07f41946fjAF  X  @@ -43,6 +43,55 @@
         GROUP BY hugo_gene_symbol
         ORDER BY totalCount DESC;
     </select>
+
+    <!-- TODO only fetching from sample_clinical_attribute_numeric, need to support sample_clinical_attribute_categorical as well -->
+    <select id="getSampleClinicalDataFromStudyViewFilter" resultType="org.cbioportal.model.ClinicalData">
+        SELECT
+            sample_unique_id as sampleId,
+            patient_unique_id as patientId,
+            attribute_name as attrId,
+            attribute_value as attrValue,
+            cancer_study_identifier as studyId
+        FROM sample_clinical_attribute_numeric
+        <where>
+            sample_unique_id IN (
+            <include refid="sampleUniqueIdsFromStudyViewFilter"/>
+            <if test="applyPatientIdFilters == true">
+                INTERSECT <include refid="getSampleIdsFromPatientIds"/>
+            </if>
+            )
+        </where>
+        <if test="attributeIds != null and !attributeIds.isEmpty()">
+            AND attribute_name IN
+            <foreach item="attributeId" collection="attributeIds" open="(" separator="," close=")">
+                #{attributeId}
+            </foreach>
+        </if>
+    </select>
+    
+    <!-- TODO only fetching from patient_clinical_attribute_numeric, need to support patient_clinical_attribute_categorical as well -->
+    <select id="getPatientClinicalDataFromStudyViewFilter" resultType="org.cbioportal.model.ClinicalData">
+        SELECT
+            patient_unique_id as patientId,
+            attribute_name as attrId,
+            attribute_value as attrValue,
+            cancer_study_identifier as studyId
+        FROM patient_clinical_attribute_numeric
+        <where> 
+            patient_unique_id IN (
+                <include refid="getPatientIdsFromSampleIdFilters"/>
+                <if test="applyPatientIdFilters == true">
+                    INTERSECT <include refid="patientUniqueIdsFromStudyViewFilter"/>
+                </if>
+            )
+        </where>
+        <if test="attributeIds != null and !attributeIds.isEmpty()">
+            AND attribute_name IN
+            <foreach item="attributeId" collection="attributeIds" open="(" separator="," close=")">
+                #{attributeId}
+            </foreach>
+        </if>
+    </select>
    
     <!-- for /clinical-data-counts/fetch (returns ClinicalData) which will then be converted to clinicalDataCountItems -->
     <select id="getClinicalDataCounts" resultType="org.cbioportal.model.ClinicalDataCount">
@@ -107,7 +156,7 @@
                 FROM sample
                 WHERE sample_unique_id IN
                 <foreach item="sampleIdentifier" collection="studyViewFilter.sampleIdentifiers" open="(" separator="," close=")">
-                    #{sampleIdentifier.getStudyId()}_#{sampleIdentifier.getSampleId()}
+                    '${sampleIdentifier.studyId}_${sampleIdentifier.sampleId}'
                 </foreach>
             </if>
             <if test="studyViewFilter.geneFilters != null and !studyViewFilter.geneFilters.isEmpty()">u}(jE  (3862be4e93b40efcb28f40e9364f33b415f1683aj6F  persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepositoryTest.javaj8F  modifiedj0F  Kj1F  Kj:F  Kj;F  https://github.com/cBioPortal/cbioportal/blob/dcc0637795222c50b227a451b9bf3cd07f41946f/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaj=F  https://github.com/cBioPortal/cbioportal/raw/dcc0637795222c50b227a451b9bf3cd07f41946f/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaj?F  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.java?ref=dcc0637795222c50b227a451b9bf3cd07f41946fjAF  X
  @@ -1,6 +1,7 @@
 package org.cbioportal.persistence.mybatiscolumnstore;
 
 import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.ClinicalData;
 import org.cbioportal.model.ClinicalDataCount;
 import org.cbioportal.model.Sample;
 import org.cbioportal.model.util.Select;
@@ -20,7 +21,6 @@
 import java.util.*;
 import java.util.Arrays;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 
@@ -59,6 +59,33 @@ public void getMutatedGenes() {
         List<AlterationCountByGene> mutations = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build());
         Assert.assertEquals(2, mutations.size());
     }
+
+    @Test
+    @Ignore
+    public void getPatientClinicalDataFromStudyViewFilter() {
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(new String[]{"msk_ch_2020"}, null);
+        List<ClinicalData> clinicalData = studyViewMyBatisRepository.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, List.of("AGE"), CategorizedClinicalDataCountFilter.getBuilder().build());
+        Assert.assertEquals(24146, clinicalData.size());
+
+        List<ClinicalDataFilter> clinicalDataFilters = Arrays.asList(generateCategoricalClinicalDataFilter("SEX", new String[]{"Female"}));
+        CategorizedClinicalDataCountFilter clinicalDataCountFilters = CategorizedClinicalDataCountFilter.getBuilder()
+            .setPatientCategoricalClinicalDataFilters(clinicalDataFilters)
+            .build();
+        studyViewFilter = generateStudyViewFilter((new String[]{"msk_ch_2020"} ), clinicalDataFilters);
+        clinicalData = studyViewMyBatisRepository.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, List.of("AGE"), clinicalDataCountFilters);
+        Assert.assertEquals(13121, clinicalData.size());
+
+        // TODO how to apply sample identifiers when fetching patient clinical data? 
+//        studyViewFilter = generateStudyViewFilter((new String[]{"msk_ch_2020"} ), clinicalDataFilters);
+//        List<SampleIdentifier> sampleIdentifierFilters = new ArrayList<>();
+//        SampleIdentifier sampleIdentifier = new SampleIdentifier();
+//        sampleIdentifier.setSampleId("P-0000015");
+//        sampleIdentifier.setStudyId("msk_ch_2020");
+//        sampleIdentifierFilters.add(sampleIdentifier);
+//        studyViewFilter.setSampleIdentifiers(sampleIdentifierFilters);
+//        clinicalData = studyViewMyBatisRepository.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, List.of("AGE"), clinicalDataCountFilters);
+//        Assert.assertEquals(1, clinicalData.size());
+    }
     
     @Test
     public void getMutatedGenesFiltered() {u}(jE  (cc160ee031244e285413617bb1f8d59af63091bbj6F  Tpersistence/persistence-mybatis/src/test/resources/testContextDatabaseClickhouse.xmlj8F  modifiedj0F  Kj1F  Kj:F  Kj;F  https://github.com/cBioPortal/cbioportal/blob/dcc0637795222c50b227a451b9bf3cd07f41946f/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestContextDatabaseClickhouse.xmlj=F  https://github.com/cBioPortal/cbioportal/raw/dcc0637795222c50b227a451b9bf3cd07f41946f/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestContextDatabaseClickhouse.xmlj?F  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestContextDatabaseClickhouse.xml?ref=dcc0637795222c50b227a451b9bf3cd07f41946fjAF  X  @@ -16,7 +16,7 @@
         <!-- 
             Enable this to connect to an actual clickhouse Database instead of a mock one.
             Note that this is only intended for temporary local use, not for automated CI tests.
-        -->         
+        -->
 <!--        <property name="url" value="jdbc:ch://localhost:8123/cbioportal"/>-->
 <!--        <property name="password" value="cbio_pass"/>-->
 <!--        <property name="username" value="cbio_user"/>-->u}(jE  (c1ab46997d886c46a74888fdf369358c971fd6b1j6F  Bservice/src/main/java/org/cbioportal/service/StudyViewService.javaj8F  modifiedj0F  Kj1F  Kj:F  Kj;F  https://github.com/cBioPortal/cbioportal/blob/dcc0637795222c50b227a451b9bf3cd07f41946f/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javaj=F  https://github.com/cBioPortal/cbioportal/raw/dcc0637795222c50b227a451b9bf3cd07f41946f/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javaj?F  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.java?ref=dcc0637795222c50b227a451b9bf3cd07f41946fjAF  X  @@ -1,11 +1,8 @@
 package org.cbioportal.service;
 
 import org.cbioportal.model.*;
-import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.exception.StudyNotFoundException;
-import org.cbioportal.webparam.SampleIdentifier;
 import org.cbioportal.webparam.StudyViewFilter;
-import org.springframework.cache.annotation.Cacheable;
 
 import java.util.List;
 
@@ -28,4 +25,8 @@ List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> studyIds,
     List<AlterationCountByGene> getMutatedGenesFromColumnstore(StudyViewFilter interceptedStudyViewFilter);
     
     List<ClinicalDataCountItem> getClinicalDataCountsFromColumnStore(StudyViewFilter studyViewFilter, List<String> filteredAttributes);
+    
+    List<ClinicalData> getSampleClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds);
+    
+    List<ClinicalData> getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds);
 }u}(jE  (b212e2d96ac10f5e5199ff562783223c63e53dddj6F  Kservice/src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.javaj8F  modifiedj0F  K
j1F  Kj:F  Kj;F  https://github.com/cBioPortal/cbioportal/blob/dcc0637795222c50b227a451b9bf3cd07f41946f/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj=F  https://github.com/cBioPortal/cbioportal/raw/dcc0637795222c50b227a451b9bf3cd07f41946f/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj?F  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.java?ref=dcc0637795222c50b227a451b9bf3cd07f41946fjAF  X  @@ -12,15 +12,13 @@
 import org.cbioportal.service.exception.StudyNotFoundException;
 import org.cbioportal.service.util.MolecularProfileUtil;
 import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
-import org.cbioportal.webparam.ClinicalDataFilter;
 import org.cbioportal.webparam.StudyViewFilter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.*;
 import java.util.function.Function;
 import java.util.stream.Collectors;
-import java.util.stream.Stream;
 
 @Service
 public class StudyViewServiceImpl implements StudyViewService {
@@ -323,4 +321,14 @@ private void buildClinicalAttributeNameMap() {
            clinicalAttributeNameMap.put(numericKey, studyViewRepository.getClinicalDataAttributeNames(clinicalAttributeDataSource, ClinicalAttributeDataType.NUMERIC));
        }
     }
+
+    public List<ClinicalData> getPatientClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds) {
+        CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter);
+        return studyViewRepository.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, attributeIds, categorizedClinicalDataCountFilter);
+    }
+
+    public List<ClinicalData> getSampleClinicalDataFromStudyViewFilter(StudyViewFilter studyViewFilter, List<String> attributeIds) {
+        CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter = extractClinicalDataCountFilters(studyViewFilter);
+        return studyViewRepository.getSampleClinicalDataFromStudyViewFilter(studyViewFilter, attributeIds, categorizedClinicalDataCountFilter);
+    }
 }u}(jE  (220171affd12dd43c25a4830f97383d1402678b8j6F  Tweb/src/main/java/org/cbioportal/web/columnstore/StudyViewColumnStoreController.javaj8F  modifiedj0F  Kj1F  Kj:F  Kj;F  https://github.com/cBioPortal/cbioportal/blob/dcc0637795222c50b227a451b9bf3cd07f41946f/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.javaj=F  https://github.com/cBioPortal/cbioportal/raw/dcc0637795222c50b227a451b9bf3cd07f41946f/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.javaj?F  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.java?ref=dcc0637795222c50b227a451b9bf3cd07f41946fjAF  Xg  @@ -5,14 +5,18 @@
 import io.swagger.annotations.ApiParam;
 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.StudyViewService;
 import org.cbioportal.service.exception.StudyNotFoundException;
 import org.cbioportal.web.columnstore.util.NewStudyViewFilterUtil;
 import org.cbioportal.web.config.annotation.InternalApi;
-import org.cbioportal.webparam.ClinicalDataCountFilter;
+import org.cbioportal.web.util.ClinicalDataBinUtil;
 import org.cbioportal.webparam.ClinicalDataFilter;
+import org.cbioportal.webparam.ClinicalDataCountFilter;
+import org.cbioportal.webparam.ClinicalDataBinCountFilter;
+import org.cbioportal.webparam.DataBinMethod;
 import org.cbioportal.webparam.StudyViewFilter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
@@ -24,6 +28,7 @@
 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 springfox.documentation.annotations.ApiIgnore;
@@ -44,6 +49,8 @@ public class StudyViewColumnStoreController {
     
     @Autowired
     private StudyViewService studyViewService;
+    @Autowired
+    private ClinicalDataBinUtil clinicalDataBinUtil;
     
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @PostMapping(value = "/column-store/filtered-samples/fetch",
@@ -115,4 +122,26 @@ public ResponseEntity<List<ClinicalDataCountItem>> fetchClinicalDataCounts(
         return new ResponseEntity<>(result, HttpStatus.OK);
 
     }
+
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', 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)
+    @ApiOperation("Fetch clinical data bin counts by study view filter")
+    public ResponseEntity<List<ClinicalDataBin>> fetchClinicalDataBinCounts(
+        @ApiParam("Method for data binning")
+        @RequestParam(defaultValue = "DYNAMIC") DataBinMethod dataBinMethod,
+        @ApiParam(required = true, value = "Clinical data bin count filter")
+        @Valid @RequestBody(required = false) ClinicalDataBinCountFilter clinicalDataBinCountFilter,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiIgnore // 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
+    ) {
+        List<ClinicalDataBin> clinicalDataBins = clinicalDataBinUtil.fetchClinicalDataBinCountsFromColumnStore(
+            dataBinMethod,
+            interceptedClinicalDataBinCountFilter,
+            true
+        );
+        return new ResponseEntity<>(clinicalDataBins, HttpStatus.OK);
+    }
 }u}(jE  (fa5b6c1c20a239c60c4d8d46d7161dd3bd3af685j6F  Bweb/src/main/java/org/cbioportal/web/util/ClinicalDataBinUtil.javaj8F  modifiedj0F  K`j1F  K j:F  K`j;F  https://github.com/cBioPortal/cbioportal/blob/dcc0637795222c50b227a451b9bf3cd07f41946f/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FClinicalDataBinUtil.javaj=F  https://github.com/cBioPortal/cbioportal/raw/dcc0637795222c50b227a451b9bf3cd07f41946f/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FClinicalDataBinUtil.javaj?F  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FClinicalDataBinUtil.java?ref=dcc0637795222c50b227a451b9bf3cd07f41946fjAF  X  @@ -3,8 +3,10 @@
 import org.cbioportal.model.ClinicalAttribute;
 import org.cbioportal.model.ClinicalData;
 import org.cbioportal.model.ClinicalDataBin;
+import org.cbioportal.model.Sample;
 import org.cbioportal.service.ClinicalAttributeService;
 import org.cbioportal.service.PatientService;
+import org.cbioportal.service.StudyViewService;
 import org.cbioportal.service.util.ClinicalAttributeUtil;
 import org.cbioportal.webparam.ClinicalDataBinCountFilter;
 import org.cbioportal.webparam.ClinicalDataBinFilter;
@@ -37,6 +39,9 @@ public class ClinicalDataBinUtil {
     @Autowired
     private PatientService patientService;
     
+    @Autowired
+    private StudyViewService studyViewService; 
+    
     public StudyViewFilter removeSelfFromFilter(ClinicalDataBinCountFilter dataBinCountFilter) {
         List<ClinicalDataBinFilter> attributes = dataBinCountFilter.getAttributes();
         StudyViewFilter studyViewFilter = dataBinCountFilter.getStudyViewFilter();
@@ -60,6 +65,97 @@ public List<ClinicalDataBin> fetchClinicalDataBinCounts(
         );
     }
     
+    public List<ClinicalDataBin> fetchClinicalDataBinCountsFromColumnStore(
+        DataBinMethod dataBinMethod,
+        ClinicalDataBinCountFilter dataBinCountFilter,
+        boolean shouldRemoveSelfFromFilter
+    ) {
+        List<ClinicalDataBinFilter> attributes = dataBinCountFilter.getAttributes();
+        StudyViewFilter studyViewFilter = dataBinCountFilter.getStudyViewFilter();
+
+        if (shouldRemoveSelfFromFilter) {
+            studyViewFilter = removeSelfFromFilter(dataBinCountFilter);
+        }
+
+        List<String> attributeIds = attributes.stream().map(ClinicalDataBinFilter::getAttributeId).collect(Collectors.toList());
+
+        // a new StudyView filter to partially filter by study and sample ids only
+        StudyViewFilter partialFilter = new StudyViewFilter();
+        partialFilter.setStudyIds(studyViewFilter.getStudyIds());
+        partialFilter.setSampleIdentifiers(studyViewFilter.getSampleIdentifiers());
+        
+        // filter only by study id and sample identifiers, ignore rest
+        List<Sample> unfilteredSamples = studyViewService.getFilteredSamplesFromColumnstore(partialFilter);
+        List<Sample> filteredSamples = studyViewService.getFilteredSamplesFromColumnstore(studyViewFilter);
+
+        // TODO make sure these keys don't need to be distinct
+        List<String> unfilteredUniqueSampleKeys = unfilteredSamples.stream().map(Sample::getUniqueSampleKey).collect(Collectors.toList());
+        List<String> filteredUniqueSampleKeys = filteredSamples.stream().map(Sample::getUniqueSampleKey).collect(Collectors.toList());
+        List<String> unfilteredUniquePatientKeys = unfilteredSamples.stream().map(Sample::getUniquePatientKey).collect(Collectors.toList());
+        List<String> filteredUniquePatientKeys = filteredSamples.stream().map(Sample::getUniquePatientKey).collect(Collectors.toList());
+
+        // TODO make sure we don't need a distinction between sample vs patient attribute ids here
+        //  ideally we shouldn't because we have patient clinical data separated from sample clinical data in clickhouse
+        List<ClinicalData> unfilteredClinicalDataForSamples = studyViewService.getSampleClinicalDataFromStudyViewFilter(partialFilter, attributeIds);
+        List<ClinicalData> filteredClinicalDataForSamples = studyViewService.getSampleClinicalDataFromStudyViewFilter(studyViewFilter, attributeIds);
+        List<ClinicalData> unfilteredClinicalDataForPatients = studyViewService.getPatientClinicalDataFromStudyViewFilter(partialFilter, attributeIds);
+        List<ClinicalData> filteredClinicalDataForPatients = studyViewService.getPatientClinicalDataFromStudyViewFilter(studyViewFilter, attributeIds);
+        
+        Map<String, ClinicalDataType> attributeDatatypeMap = constructAttributeDataMap(
+            unfilteredClinicalDataForSamples.stream().map(ClinicalData::getAttrId).collect(Collectors.toList()),
+            unfilteredClinicalDataForPatients.stream().map(ClinicalData::getAttrId).collect(Collectors.toList()),
+            Collections.emptyList() // TODO ignoring conflictingPatientAttributeIds for now
+        );
+
+        List<ClinicalData> unfilteredClinicalData = Stream.of(
+            unfilteredClinicalDataForSamples,
+            unfilteredClinicalDataForPatients
+            // unfilteredClinicalDataForConflictingPatientAttributes /// TODO ignoring conflictingPatientAttributeIds for now
+        ).flatMap(Collection::stream).collect(Collectors.toList());
+
+        List<ClinicalData> filteredClinicalData = Stream.of(
+            filteredClinicalDataForSamples,
+            filteredClinicalDataForPatients
+            // filteredClinicalDataForConflictingPatientAttributes // TODO ignoring conflictingPatientAttributeIds for now
+        ).flatMap(Collection::stream).collect(Collectors.toList());
+        
+        Map<String, List<ClinicalData>> unfilteredClinicalDataByAttributeId =
+            unfilteredClinicalData.stream().collect(Collectors.groupingBy(ClinicalData::getAttrId));
+
+        Map<String, List<ClinicalData>> filteredClinicalDataByAttributeId =
+            filteredClinicalData.stream().collect(Collectors.groupingBy(ClinicalData::getAttrId));
+        
+        List<ClinicalDataBin> clinicalDataBins = Collections.emptyList();
+
+        if (dataBinMethod == DataBinMethod.STATIC) {
+            if (!unfilteredSamples.isEmpty() && !unfilteredClinicalData.isEmpty()) {
+                clinicalDataBins = calculateStaticDataBins(
+                    attributes,
+                    attributeDatatypeMap,
+                    unfilteredClinicalDataByAttributeId,
+                    filteredClinicalDataByAttributeId,
+                    unfilteredUniqueSampleKeys,
+                    unfilteredUniquePatientKeys,
+                    filteredUniqueSampleKeys,
+                    filteredUniquePatientKeys
+                );
+            }
+        }
+        else { // dataBinMethod == DataBinMethod.DYNAMIC
+            if (!filteredClinicalData.isEmpty()) {
+                clinicalDataBins = calculateDynamicDataBins(
+                    attributes,
+                    attributeDatatypeMap,
+                    filteredClinicalDataByAttributeId,
+                    filteredUniqueSampleKeys,
+                    filteredUniquePatientKeys
+                );
+            }
+        }
+
+        return clinicalDataBins;
+    }
+    
     public List<ClinicalDataBin> fetchClinicalDataBinCounts(
         DataBinMethod dataBinMethod,
         ClinicalDataBinCountFilter dataBinCountFilter,ueu(7638a27317d615fd9836e5e4f9fd6c84ee431cfa}(sha(7638a27317d615fd9836e5e4f9fd6c84ee431cfanode_idEC_kwDOAe-hB9oAKDc2MzhhMjczMTdkNjE1ZmQ5ODM2ZTVlNGY5ZmQ2Yzg0ZWU0MzFjZmEcommit}(author}(name
Bas Leenknegtemailbasleenknegt@thehyve.nldate2023-06-29T14:04:48Zu	committer}(jF  
Bas LeenknegtjF  basleenknegt@thehyve.nljF  2023-06-29T14:09:13ZumessageJReplace authentication param with context call when retrieving all studiestree}(jF  (8608e930ccb0d3b6b0b1e69cd0c9809d0f0dde99urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/8608e930ccb0d3b6b0b1e69cd0c9809d0f0dde99ujF  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/7638a27317d615fd9836e5e4f9fd6c84ee431cfa
comment_countKverification}(verifiedreasonunsigned	signatureNpayloadNuujF  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7638a27317d615fd9836e5e4f9fd6c84ee431cfahtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/7638a27317d615fd9836e5e4f9fd6c84ee431cfacomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/7638a27317d615fd9836e5e4f9fd6c84ee431cfa/commentsjF  }(loginBasLeeidJ~2 jF  MDQ6VXNlcjMzMjMwMDY=
avatar_url3https://avatars.githubusercontent.com/u/3323006?v=4gravatar_id     h5jF  #https://api.github.com/users/BasLeejF  https://github.com/BasLee
followers_url-https://api.github.com/users/BasLee/followers
following_url:https://api.github.com/users/BasLee/following{/other_user}	gists_url3https://api.github.com/users/BasLee/gists{/gist_id}starred_url:https://api.github.com/users/BasLee/starred{/owner}{/repo}subscriptions_url1https://api.github.com/users/BasLee/subscriptionsorganizations_url(https://api.github.com/users/BasLee/orgs	repos_url)https://api.github.com/users/BasLee/repos
events_url4https://api.github.com/users/BasLee/events{/privacy}received_events_url3https://api.github.com/users/BasLee/received_eventstypeUser
site_adminujF  }(jF  BasLeejF  J~2 jF  MDQ6VXNlcjMzMjMwMDY=jF  3https://avatars.githubusercontent.com/u/3323006?v=4jF  h5jF  #https://api.github.com/users/BasLeejF  https://github.com/BasLeejF  -https://api.github.com/users/BasLee/followersjF  :https://api.github.com/users/BasLee/following{/other_user}jF  3https://api.github.com/users/BasLee/gists{/gist_id}jF  :https://api.github.com/users/BasLee/starred{/owner}{/repo}jF  1https://api.github.com/users/BasLee/subscriptionsjF  (https://api.github.com/users/BasLee/orgsjF  )https://api.github.com/users/BasLee/reposjF  4https://api.github.com/users/BasLee/events{/privacy}jF  3https://api.github.com/users/BasLee/received_eventsjF  UserjF  uparents]}(jF  (2ef50ef0663dd8da65f8fa8b114af9f68fd313d4jF  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2ef50ef0663dd8da65f8fa8b114af9f68fd313d4jF  Xhttps://github.com/cBioPortal/cbioportal/commit/2ef50ef0663dd8da65f8fa8b114af9f68fd313d4uastats}(totalK
	additionsK	deletionsKufiles]}(jF  (516225adbbfd0f6bf8c1c131cbbb6ace2ec86cf5filename9web/src/main/java/org/cbioportal/web/StudyController.javastatusmodifiedjF  KjF  KchangesK
blob_urlhttps://github.com/cBioPortal/cbioportal/blob/7638a27317d615fd9836e5e4f9fd6c84ee431cfa/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/7638a27317d615fd9836e5e4f9fd6c84ee431cfa/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.java?ref=7638a27317d615fd9836e5e4f9fd6c84ee431cfapatchX  @@ -23,6 +23,7 @@
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -98,11 +99,10 @@ public ResponseEntity<List<CancerStudy>> getAllStudies(
         @ApiParam("Name of the property that the result list is sorted by")
         @RequestParam(required = false) StudySortBy sortBy,
         @ApiParam("Direction of the sort")
-        @RequestParam(defaultValue = "ASC") Direction direction,
-        // adding @RequestParam causes error HTTP 400 error as by default required = true 
-        // if set to required = false causes unauthorized studies to be shown as authorized - see issue 10221
-        @ApiParam(hidden = true)
-        Authentication authentication) {
+        @RequestParam(defaultValue = "ASC") Direction direction
+    ) {
+        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+        
         // Only use this feature on the public portal and make sure it is never used
         // on portals using auth, as in auth setting, different users will have different
         // results.uau(8bf1312544943ac06a3e7b932ead81a41aa232d0}(sha(8bf1312544943ac06a3e7b932ead81a41aa232d0node_idEC_kwDOAe-hB9oAKDhiZjEzMTI1NDQ5NDNhYzA2YTNlN2I5MzJlYWQ4MWE0MWFhMjMyZDAcommit}(author}(namealismanemaillisman.aaron@gmail.comdate2023-06-21T18:23:17Zu	committer}(j
G  GitHubjG  noreply@github.comjG  2023-06-21T18:23:17ZumessageyMerge pull request #10233 from oplantalech/reference_genome_badge

Create property to show reference genome in study listtree}(jG  (c54daf3dcaeca3df07188c75ac720ee4ac4dae7eurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c54daf3dcaeca3df07188c75ac720ee4ac4dae7eujG  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/8bf1312544943ac06a3e7b932ead81a41aa232d0
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkk0AVCRBK7hj4Ov3rIwAAFPoIAE6oVMNJsAEyQ/E1RBPBD7w7
qjR+k/CXAKtfLhpxVMnZVP02n/xUGCZ1B82K2FlPQl9VwbZfiKlIr084pnEObuon
5dbcw5tkCGO+49bjU3uKz3kyWcfz2Sl1HsCMcFVoB2qCixXpOWDtUJ8Ey0++VT10
QROpnDbG7G+VbBHxDgg7tm42AP6CjBKYTwUVyoiUBfiiPOHNA/vloSvZAlRI/M49
Xk/KrkUnnsrtc0YWRDp6RwP5k0wC7lYazpe+TcaWftpCf2toBN3gLrVgmP+m7WfY
oGPthVn3lwLLvP8Wxj+1ZVrQQN8Z9IDoLX22Ne/xQjtKvzK8+Ogz0fU3Lb+iOd8=
=Wt/f
-----END PGP SIGNATURE-----
payloadXx  tree c54daf3dcaeca3df07188c75ac720ee4ac4dae7e
parent f7189e4f180a9c1a5eb385a1f0a8ee9d648d0065
parent dbee688334fbca61c4238ece408b1e323a78240c
author alisman <lisman.aaron@gmail.com> 1687371797 -0400
committer GitHub <noreply@github.com> 1687371797 -0400

Merge pull request #10233 from oplantalech/reference_genome_badge

Create property to show reference genome in study listuujG  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8bf1312544943ac06a3e7b932ead81a41aa232d0html_urlXhttps://github.com/cBioPortal/cbioportal/commit/8bf1312544943ac06a3e7b932ead81a41aa232d0comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/8bf1312544943ac06a3e7b932ead81a41aa232d0/commentsjG  }(loginalismanidJ jG  MDQ6VXNlcjE4NjUyMQ==
avatar_url2https://avatars.githubusercontent.com/u/186521?v=4gravatar_idh5jG  $https://api.github.com/users/alismanj(G  https://github.com/alisman
followers_url.https://api.github.com/users/alisman/followers
following_url;https://api.github.com/users/alisman/following{/other_user}	gists_url4https://api.github.com/users/alisman/gists{/gist_id}starred_url;https://api.github.com/users/alisman/starred{/owner}{/repo}subscriptions_url2https://api.github.com/users/alisman/subscriptionsorganizations_url)https://api.github.com/users/alisman/orgs	repos_url*https://api.github.com/users/alisman/repos
events_url5https://api.github.com/users/alisman/events{/privacy}received_events_url4https://api.github.com/users/alisman/received_eventstypeUser
site_adminujG  }(j-G  web-flowj/G  J/jG  MDQ6VXNlcjE5ODY0NDQ3j1G  4https://avatars.githubusercontent.com/u/19864447?v=4j3G  h5jG  %https://api.github.com/users/web-flowj(G  https://github.com/web-flowj6G  /https://api.github.com/users/web-flow/followersj8G  <https://api.github.com/users/web-flow/following{/other_user}j:G  5https://api.github.com/users/web-flow/gists{/gist_id}j<G  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j>G  3https://api.github.com/users/web-flow/subscriptionsj@G  *https://api.github.com/users/web-flow/orgsjBG  +https://api.github.com/users/web-flow/reposjDG  6https://api.github.com/users/web-flow/events{/privacy}jFG  5https://api.github.com/users/web-flow/received_eventsjHG  UserjJG  uparents](}(jG  (f7189e4f180a9c1a5eb385a1f0a8ee9d648d0065jG  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/f7189e4f180a9c1a5eb385a1f0a8ee9d648d0065j(G  Xhttps://github.com/cBioPortal/cbioportal/commit/f7189e4f180a9c1a5eb385a1f0a8ee9d648d0065u}(jG  (dbee688334fbca61c4238ece408b1e323a78240cjG  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/dbee688334fbca61c4238ece408b1e323a78240cj(G  Xhttps://github.com/cBioPortal/cbioportal/commit/dbee688334fbca61c4238ece408b1e323a78240cuestats}(totalK	additionsK	deletionsKufiles](}(jG  (19273b2d38a781eff9698b01a7561be22cd9ba57filename<docs/deployment/customization/portal.properties-Reference.mdstatusmodifiedjhG  KjiG  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/8bf1312544943ac06a3e7b932ead81a41aa232d0/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdraw_urlhttps://github.com/cBioPortal/cbioportal/raw/8bf1312544943ac06a3e7b932ead81a41aa232d0/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.md?ref=8bf1312544943ac06a3e7b932ead81a41aa232d0patchX  @@ -167,6 +167,13 @@ If _show\_unauthorized\_studies_ feature has been enabled, a message (template)
 skin.home_page.unauthorized_studies_global_message=
 ```
 
+### Show badge with reference genome
+In instances with hg19 and hg38 studies you can show the reference genome in the home page next to the number of samples. This can be done setting this property to `true` (`false` by default):
+
+```
+skin.home_page.show_reference_genome=
+```
+
 ### Control the appearance of the settings menu in study view and group comparison that controls custom annotation-based filtering
 
 A settings menu that allows the user to filter alterations in study view and group comparison may be used when [custom driver annotations](/File-Formats.md#custom-driver-annotations) were loaded for the study or studies displayed in these sections. This menu will only appear, when setting the property _skin.show\_settings\_menu_ to _true_.u}(jG  (79e16e74df70d482ff59ab39640f0ba1b4e5a316jnG  )portal/src/main/webapp/config_service.jspjpG  modifiedjhG  KjiG  KjrG  KjsG  https://github.com/cBioPortal/cbioportal/blob/8bf1312544943ac06a3e7b932ead81a41aa232d0/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspjuG  https://github.com/cBioPortal/cbioportal/raw/8bf1312544943ac06a3e7b932ead81a41aa232d0/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspjwG  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=8bf1312544943ac06a3e7b932ead81a41aa232d0jyG  XI  @@ -147,7 +147,8 @@
             "skin.patient_view.structural_variant_table.columns.show_on_init",
             "comparison.categorical_na_values",
             "skin.hide_download_controls",
-            "study_download_url"
+            "study_download_url",
+            "skin.home_page.show_reference_genome"
         };
 
 u}(jG  (7cfa8b26cf5cda380cb07062abfadeb8b387d4a5jnG  ,src/main/resources/portal.properties.EXAMPLEjpG  modifiedjhG  KjiG  K jrG  KjsG  https://github.com/cBioPortal/cbioportal/blob/8bf1312544943ac06a3e7b932ead81a41aa232d0/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEjuG  https://github.com/cBioPortal/cbioportal/raw/8bf1312544943ac06a3e7b932ead81a41aa232d0/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEjwG  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=8bf1312544943ac06a3e7b932ead81a41aa232d0jyG  X  @@ -104,6 +104,8 @@ skin.study_view.link_text=To build your own case set, try out our enhanced Study
 # skin.home_page.show_unauthorized_studies=false
 ## enable this to configure a global message for the studies that are unauthorized; the message can contain placecards like {$.Owner.email} for the studies that have the information in the study tags 
 # skin.home_page.unauthorized_studies_global_message=The study is unauthorized. You need to request access.
+## enable this to show reference genome next to the samples
+# skin.home_page.show_reference_genome=false
 
 setting controlling whether Download tabs and download/copy-to-clipboard controls should be shown
 # skin.hide_download_controls=trueueu(ad324a871ab1f221afe88f46a704b59584adbf38}(sha(ad324a871ab1f221afe88f46a704b59584adbf38node_idEC_kwDOAe-hB9oAKGFkMzI0YTg3MWFiMWYyMjFhZmU4OGY0NmE3MDRiNTk1ODRhZGJmMzgcommit}(author}(nameritikakundraemailkundrar@mskcc.orgdate2023-06-08T18:03:17Zu	committer}(jG  GitHubjG  noreply@github.comjG  2023-06-08T18:03:17Zumessage+Add AACR GENIE BPC tutorial videos (#10215)tree}(jG  (fd0dbb5d5abeb0a389926d2a8a724130d32257e0urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/fd0dbb5d5abeb0a389926d2a8a724130d32257e0ujG  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/ad324a871ab1f221afe88f46a704b59584adbf38
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkghflCRBK7hj4Ov3rIwAA8zcIAErL9q6+KsTjtbHnYLQ3yczv
BKuJr8afKPBTMVjrFlQtFZEhF35HkkpuENoIaJ4U++hZmVaAPmHa59GvrJpA+5Ae
J4N8/5aQAvSdux7Zb+2FMoaKqN6WqPNji2u04l+jbJ+5WVaQXL6Xzyg++n+DYmdu
e5aOCQXWFO3+xlNCdAHs6o+fTlt+zhYKb8FE3H6Q7eFmH8bSEXxrQCvDX0EJKnW8
QH4uQ3RxiZDp8ns9936ZfOMUWw1uaM9RhiAtVgqWp437kuT550zHTfF273rpxUSw
2NZAFH03UrR+w+f6iebirzlSiL/XMdhgTPZrDTZkeAG358rL3uu3cDmvWgF4vew=
=0NlE
-----END PGP SIGNATURE-----
payloadtree fd0dbb5d5abeb0a389926d2a8a724130d32257e0
parent 100d642e70a4ac4db1eccefc5de684bc40ea0cfb
author ritikakundra <kundrar@mskcc.org> 1686247397 -0400
committer GitHub <noreply@github.com> 1686247397 -0400

Add AACR GENIE BPC tutorial videos (#10215)

uujG  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ad324a871ab1f221afe88f46a704b59584adbf38html_urlXhttps://github.com/cBioPortal/cbioportal/commit/ad324a871ab1f221afe88f46a704b59584adbf38comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/ad324a871ab1f221afe88f46a704b59584adbf38/commentsjG  }(loginritikakundraidJ9 jG  MDQ6VXNlcjEyMDA3ODYy
avatar_url4https://avatars.githubusercontent.com/u/12007862?v=4gravatar_idh5jG  )https://api.github.com/users/ritikakundrajG  https://github.com/ritikakundra
followers_url3https://api.github.com/users/ritikakundra/followers
following_url@https://api.github.com/users/ritikakundra/following{/other_user}	gists_url9https://api.github.com/users/ritikakundra/gists{/gist_id}starred_url@https://api.github.com/users/ritikakundra/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/ritikakundra/subscriptionsorganizations_url.https://api.github.com/users/ritikakundra/orgs	repos_url/https://api.github.com/users/ritikakundra/repos
events_url:https://api.github.com/users/ritikakundra/events{/privacy}received_events_url9https://api.github.com/users/ritikakundra/received_eventstypeUser
site_adminujG  }(jG  web-flowjG  J/jG  MDQ6VXNlcjE5ODY0NDQ3jG  4https://avatars.githubusercontent.com/u/19864447?v=4jG  h5jG  %https://api.github.com/users/web-flowjG  https://github.com/web-flowjG  /https://api.github.com/users/web-flow/followersjG  <https://api.github.com/users/web-flow/following{/other_user}jG  5https://api.github.com/users/web-flow/gists{/gist_id}jG  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jG  3https://api.github.com/users/web-flow/subscriptionsjG  *https://api.github.com/users/web-flow/orgsjG  +https://api.github.com/users/web-flow/reposjG  6https://api.github.com/users/web-flow/events{/privacy}jG  5https://api.github.com/users/web-flow/received_eventsjG  UserjG  uparents]}(jG  (100d642e70a4ac4db1eccefc5de684bc40ea0cfbjG  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/100d642e70a4ac4db1eccefc5de684bc40ea0cfbjG  Xhttps://github.com/cBioPortal/cbioportal/commit/100d642e70a4ac4db1eccefc5de684bc40ea0cfbuastats}(totalK	additionsK	deletionsK ufiles]}(jG  (ae18a16339e01dd259c822005bb4b29dc1ba5734filenamedocs/user-guide/overview.mdstatusmodifiedjG  KjG  K changesKblob_urlvhttps://github.com/cBioPortal/cbioportal/blob/ad324a871ab1f221afe88f46a704b59584adbf38/docs%2Fuser-guide%2Foverview.mdraw_urluhttps://github.com/cBioPortal/cbioportal/raw/ad324a871ab1f221afe88f46a704b59584adbf38/docs%2Fuser-guide%2Foverview.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fuser-guide%2Foverview.md?ref=ad324a871ab1f221afe88f46a704b59584adbf38patchXg  @@ -28,6 +28,7 @@ Short videos that show how to perform specific analyses or how to use specific p
 6. How to explore the data in a study [youtube.com](https://www.youtube.com/watch?v=N8ffDgkqDWc)
 7. How to run a query for genes of interest [youtube.com](https://www.youtube.com/watch?v=MH-kY5usA70)
 8. How to download data [youtube.com](https://www.youtube.com/watch?v=JId304dp3tc)
+9. Navigating AACR GENIE - Biopharma Collaborative (BPC) dataset [youtube.com](https://www.youtube.com/playlist?list=PLE2tjlUyHL8Gn4ythnuvf2BxWJVpAxkMM)
 
 ### Documentation
 * Frequently Asked Questions [FAQ](/user-guide/faq.md)uau(e9cbd82f07ef7eb4cfb2054e10890ef6b91e666e}(sha(e9cbd82f07ef7eb4cfb2054e10890ef6b91e666enode_idEC_kwDOAe-hB9oAKGU5Y2JkODJmMDdlZjdlYjRjZmIyMDU0ZTEwODkwZWY2YjkxZTY2NmUcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-15T21:59:32Zu	committer}(jH  GitHubjH  noreply@github.comjH  2023-08-15T21:59:32ZumessageLMerge pull request #10331 from cBioPortal/frontend-v5.3.18

Frontend v5.3.18tree}(jH  (a0c9ec0bc961fac10c46d03e23c00eb1ccbb7862urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/a0c9ec0bc961fac10c46d03e23c00eb1ccbb7862ujH  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/e9cbd82f07ef7eb4cfb2054e10890ef6b91e666e
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk2/VECRBK7hj4Ov3rIwAAgVoIABjxngNV7CEdVcRF2Y7ueaOj
U1H6TnxWQmjU1UDUkI9k4+ZAkniPgB+VeNh7DeRBdtcDMmPz4wT4QlwLHDXKDXZI
tysxHPXO7fxf3MkoMZI5ZmDMnzw4C0sgPakEly40s6GFlWelF7dXq4On1CXrI2j7
w+iBf2bMdvXrpdXKeeEU4s/LKQXywu4PsCzJ1XeAwF9KxAQ0kZLUJMK70qjcnxIx
hyz/k5KEqYFvQwwr22cQcSJj6B0aSK1Ev6/sbgPTBTkmZBK3EQPaYpvRK9EnGRfQ
jR4iVkC+cOZa1C+o3w02ajGpLSKuVNSDeOMqwfV98JDjka5JOPXp6db7POUSs0k=
=/xHC
-----END PGP SIGNATURE-----
payloadXe  tree a0c9ec0bc961fac10c46d03e23c00eb1ccbb7862
parent dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7
parent 92d79bfa3bb87e12b292f702a59892d58b04f577
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1692136772 -0400
committer GitHub <noreply@github.com> 1692136772 -0400

Merge pull request #10331 from cBioPortal/frontend-v5.3.18

Frontend v5.3.18uujH  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/e9cbd82f07ef7eb4cfb2054e10890ef6b91e666ehtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/e9cbd82f07ef7eb4cfb2054e10890ef6b91e666ecomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/e9cbd82f07ef7eb4cfb2054e10890ef6b91e666e/commentsj
H  }(login
dippindotsidJtO jH  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5jH  'https://api.github.com/users/dippindotsj*H  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminujH  }(j/H  web-flowj1H  J/jH  MDQ6VXNlcjE5ODY0NDQ3j3H  4https://avatars.githubusercontent.com/u/19864447?v=4j5H  h5jH  %https://api.github.com/users/web-flowj*H  https://github.com/web-flowj8H  /https://api.github.com/users/web-flow/followersj:H  <https://api.github.com/users/web-flow/following{/other_user}j<H  5https://api.github.com/users/web-flow/gists{/gist_id}j>H  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j@H  3https://api.github.com/users/web-flow/subscriptionsjBH  *https://api.github.com/users/web-flow/orgsjDH  +https://api.github.com/users/web-flow/reposjFH  6https://api.github.com/users/web-flow/events{/privacy}jHH  5https://api.github.com/users/web-flow/received_eventsjJH  UserjLH  uparents](}(jH  (dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7jH  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7j*H  Xhttps://github.com/cBioPortal/cbioportal/commit/dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7u}(jH  (92d79bfa3bb87e12b292f702a59892d58b04f577jH  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/92d79bfa3bb87e12b292f702a59892d58b04f577j*H  Xhttps://github.com/cBioPortal/cbioportal/commit/92d79bfa3bb87e12b292f702a59892d58b04f577uestats}(totalK	additionsK	deletionsKufiles]}(jH  (d2c8c98c3a8ad67862705fdc52f754f44cec26f8filenamepom.xmlstatusmodifiedjjH  KjkH  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/e9cbd82f07ef7eb4cfb2054e10890ef6b91e666e/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/e9cbd82f07ef7eb4cfb2054e10890ef6b91e666e/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=e9cbd82f07ef7eb4cfb2054e10890ef6b91e666epatchXY  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.17</frontend.version>
+    <frontend.version>v5.3.18</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(79e373b9c42ffd1d25dca9e0dc309ea94692eaad}(sha(79e373b9c42ffd1d25dca9e0dc309ea94692eaadnode_idEC_kwDOAe-hB9oAKDc5ZTM3M2I5YzQyZmZkMWQyNWRjYTllMGRjMzA5ZWE5NDY5MmVhYWQcommit}(author}(namePim van Nieropemailpim@thehyve.nldate2023-05-04T12:54:11Zu	committer}(jH  
pvannieropjH  pim@thehyve.nljH  2023-06-06T06:56:29Zumessage*Return counts when gene 1 or gene2 is nulltree}(jH  (1c3022a9efcfb5076a507775f59dc0346e777757urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/1c3022a9efcfb5076a507775f59dc0346e777757ujH  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/79e373b9c42ffd1d25dca9e0dc309ea94692eaad
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujH  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/79e373b9c42ffd1d25dca9e0dc309ea94692eaadhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/79e373b9c42ffd1d25dca9e0dc309ea94692eaadcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/79e373b9c42ffd1d25dca9e0dc309ea94692eaad/commentsjH  }(login
pvannieropidJa jH  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5jH  'https://api.github.com/users/pvannieropjH  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminujH  }(jH  
pvannieropjH  Ja jH  MDQ6VXNlcjc0NTg4NQ==jH  2https://avatars.githubusercontent.com/u/745885?v=4jH  h5jH  'https://api.github.com/users/pvannieropjH  https://github.com/pvannieropjH  1https://api.github.com/users/pvannierop/followersjH  >https://api.github.com/users/pvannierop/following{/other_user}jH  7https://api.github.com/users/pvannierop/gists{/gist_id}jH  >https://api.github.com/users/pvannierop/starred{/owner}{/repo}jH  5https://api.github.com/users/pvannierop/subscriptionsjH  ,https://api.github.com/users/pvannierop/orgsjH  -https://api.github.com/users/pvannierop/reposjH  8https://api.github.com/users/pvannierop/events{/privacy}jH  7https://api.github.com/users/pvannierop/received_eventsjH  UserjH  uparents]}(jH  (5c70b4f50b0577784910bedd40e21fbf8d667269jH  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/5c70b4f50b0577784910bedd40e21fbf8d667269jH  Xhttps://github.com/cBioPortal/cbioportal/commit/5c70b4f50b0577784910bedd40e21fbf8d667269uastats}(totalK^	additionsK9	deletionsK%ufiles](}(jH  (91de51fb7356906110944cdd27eaf3761097919dfilenameGcore/src/test/scripts/test_data/study_es_0/data_structural_variants.txtstatusmodifiedjH  KjH  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/79e373b9c42ffd1d25dca9e0dc309ea94692eaad/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fdata_structural_variants.txtraw_urlhttps://github.com/cBioPortal/cbioportal/raw/79e373b9c42ffd1d25dca9e0dc309ea94692eaad/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fdata_structural_variants.txtcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fdata_structural_variants.txt?ref=79e373b9c42ffd1d25dca9e0dc309ea94692eaadpatchX  @@ -45,3 +45,5 @@ TCGA-A2-A04Q-01	NA	SND1	ENST00000354725	10	1	10000000	EXON	SND1_BRAF_CUSTOMHYVE_
 TCGA-A2-A0SX-01	NA	MKRN1	ENST00000255977	4	1	10000000	EXON	MKRN1_BRAF_CUSTOMHYVE_1	NA	BRAF	ENST00000288602	11	1	10000000		EXON	MKRN1_BRAF_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	MKRN1_BRAF_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			
 TCGA-AO-A0JL-01	NA	MKRN1	ENST00000255977	4	1	10000000	EXON	MKRN1_BRAF_CUSTOMHYVE_1	NA	BRAF	ENST00000288602	11	1	10000000		EXON	MKRN1_BRAF_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	MKRN1_BRAF_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			
 TCGA-AO-A0JL-01	NA	BRAF	ENST00000288602	6	1	10000000	EXON	BRAF_TTN_CUSTOMHYVE_1	NA	TTN	ENST00000589042	2	1	111111111		EXON	BRAF_TTN_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	BRAF_TTN_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			
+TCGA-AO-A0JL-01	NA	BRAF	ENST00000288602	6	1	10000000	EXON	BRAF_NULL_CUSTOMHYVE_1	NA			2	1	111111111		EXON	BRAF_NULL_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	BRAF_NULL_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			
+TCGA-AO-A0JL-01	NA			6	1	10000000	EXON	NULL_TTN_CUSTOMHYVE_1	NA	TTN	ENST00000589042	2	1	111111111		EXON	NULL_TTN_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	NULL_TTN_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			u}(jH  (01ed5f7bae7167941c488b34592e51cba881fbdejH  ppersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatis/AlterationCountsMapper.xmljH  modifiedjH  KjH  KjH  KjH  https://github.com/cBioPortal/cbioportal/blob/79e373b9c42ffd1d25dca9e0dc309ea94692eaad/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationCountsMapper.xmljH  https://github.com/cBioPortal/cbioportal/raw/79e373b9c42ffd1d25dca9e0dc309ea94692eaad/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationCountsMapper.xmljH  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationCountsMapper.xml?ref=79e373b9c42ffd1d25dca9e0dc309ea94692eaadjH  X  @@ -161,8 +161,8 @@
             <include refid="fromIncludeCustomAnnotationsSV" />
             INNER JOIN sample ON structural_variant.SAMPLE_ID = sample.INTERNAL_ID
             INNER JOIN patient ON sample.PATIENT_ID = patient.INTERNAL_ID
-            INNER JOIN gene as gene1 ON structural_variant.SITE1_ENTREZ_GENE_ID = gene1.ENTREZ_GENE_ID
-            INNER JOIN gene as gene2 ON structural_variant.SITE2_ENTREZ_GENE_ID = gene2.ENTREZ_GENE_ID
+            LEFT JOIN gene as gene1 ON structural_variant.SITE1_ENTREZ_GENE_ID = gene1.ENTREZ_GENE_ID
+            LEFT JOIN gene as gene2 ON structural_variant.SITE2_ENTREZ_GENE_ID = gene2.ENTREZ_GENE_ID
         <where>
             <include refid="whereCustomAnnotations"/>
             <include refid="whereSVStatus" />u}(jH  (7330e13633afaa967c98ab5edcb30e2f3a0f5044jH  upersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/AlterationMyBatisRepositoryTest.javajH  modifiedjH  K5jH  K#jH  KXjH  https://github.com/cBioPortal/cbioportal/blob/79e373b9c42ffd1d25dca9e0dc309ea94692eaad/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.javajH  https://github.com/cBioPortal/cbioportal/raw/79e373b9c42ffd1d25dca9e0dc309ea94692eaad/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.javajH  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.java?ref=79e373b9c42ffd1d25dca9e0dc309ea94692eaadjH  X=  @@ -19,7 +19,7 @@
 public class AlterationMyBatisRepositoryTest {
 
     //    mutation and cna events in testSql.sql
-    //        SAMPLE_ID,    ENTREZ_GENE_ID, HUGO_GENE_SYMBOL, GENETIC_PROFILE_ID, TYPE, MUTATION_TYPE, DRIVER_FILTER, DRIVER_TIERS_FILTER, PATIENT_ID, MUTATION_TYPE
+    //        SAMPLE_ID,    ENTREZ_GENE_ID, HUGO_GENE_SYMBOL, GENETIC_PROFILE_ID, TYPE, MUTATIONio_TYPE, DRIVER_FILTER, DRIVER_TIERS_FILTER, PATIENT_ID, MUTATION_TYPE
     //        1	    207	    AKT1	2	CNA         -2	                Putative_Driver	    Tier 1  TCGA-A1-A0SB    germline
     //        2	    207	    AKT1	2	CNA         2	                Putative_Passenger	Tier 2  TCGA-A1-A0SD    germline
     //        1	    207	    AKT1	6	MUTATION    Nonsense_Mutation	Putative_Driver	    Tier 1  TCGA-A1-A0SB    germline
@@ -42,7 +42,8 @@ public class AlterationMyBatisRepositoryTest {
     //       15     57670-673   KIAA..-BRAF 13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
     //        1     8031-5979   NCOA4-RET   7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
     //       15     8031-5979   NCOA4-RET   13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
-    //        1     7113-2078   TMPRSS2-ERG 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     7113-2078   TMPRSS2-ERG 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-       NCOA4-      13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
 
     @Autowired
     private AlterationMyBatisRepository alterationMyBatisRepository;
@@ -79,6 +80,7 @@ public void setup() {
         sampleIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SD-01", "study_tcga_pub_gistic"));
         svSampleIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SB-01", "study_tcga_pub_sv"));
         svSampleIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SD-01", "study_tcga_pub_sv"));
+        svSampleIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-B0SO-01", "acc_tcga_sv"));
 
         patientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SB", "study_tcga_pub_mutations"));
         patientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SE", "study_tcga_pub_mutations"));
@@ -91,6 +93,7 @@ public void setup() {
         patientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SD", "study_tcga_pub_gistic"));
         svPatientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SB", "study_tcga_pub_sv"));
         svPatientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SD", "study_tcga_pub_sv"));
+        svPatientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-B0SO", "acc_tcga_sv"));
 
         entrezGeneIds = Select.byValues(Arrays.asList(207, 208, 672, 2064));
         svEntrezGeneIds = Select.byValues(Arrays.asList(57670, 8031, 27436, 7113));
@@ -881,11 +884,14 @@ public void getSampleStructuralVariantCountIncludeOnlyGermline() throws Exceptio
 
         AlterationCountByGene result57670 = result.stream().filter(r -> r.getEntrezGeneId() == 57670).findFirst().get();
         AlterationCountByGene result27436 = result.stream().filter(r -> r.getEntrezGeneId() == 27436).findFirst().get();
-        Assert.assertEquals(2, result.size());
+        AlterationCountByGene result7113 = result.stream().filter(r -> r.getEntrezGeneId() == 7113).findFirst().get();
+        Assert.assertEquals(3, result.size());
         Assert.assertEquals((Integer) 1, result57670.getTotalCount());
         Assert.assertEquals((Integer) 1, result57670.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result27436.getTotalCount());
         Assert.assertEquals((Integer) 1, result27436.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, result7113.getTotalCount());
+        Assert.assertEquals((Integer) 1, result7113.getNumberOfAlteredCases());
     }
 
     @Test
@@ -905,10 +911,10 @@ public void getSampleStructuralVariantCountIncludeOnlySomatic() throws Exception
         AlterationCountByGene result8031 = result.stream().filter(r -> r.getEntrezGeneId() == 8031).findFirst().get();
         AlterationCountByGene result27436 = result.stream().filter(r -> r.getEntrezGeneId() == 27436).findFirst().get();
         AlterationCountByGene result7113 = result.stream().filter(r -> r.getEntrezGeneId() == 7113).findFirst().get();
-        Assert.assertEquals((Integer) 2, result57670.getTotalCount());
-        Assert.assertEquals((Integer) 2, result57670.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 1, result8031.getTotalCount());
-        Assert.assertEquals((Integer) 1, result8031.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, result57670.getTotalCount());
+        Assert.assertEquals((Integer) 3, result57670.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, result8031.getTotalCount());
+        Assert.assertEquals((Integer) 2, result8031.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result27436.getTotalCount());
         Assert.assertEquals((Integer) 1, result27436.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result7113.getTotalCount());
@@ -969,14 +975,17 @@ public void getPatientStructuralVariantCountIncludeOnlyGermline() throws Excepti
             svEntrezGeneIds,
             alterationFilter);
         // two structural variants in testSql.sql are germline mutations
-        Assert.assertEquals(2, result.size());
+        Assert.assertEquals(3, result.size());
 
         AlterationCountByGene result57670 = result.stream().filter(r -> r.getEntrezGeneId() == 57670).findFirst().get();
         AlterationCountByGene result27436 = result.stream().filter(r -> r.getEntrezGeneId() == 27436).findFirst().get();
+        AlterationCountByGene result7113 = result.stream().filter(r -> r.getEntrezGeneId() == 7113).findFirst().get();
         Assert.assertEquals((Integer) 1, result57670.getTotalCount());
         Assert.assertEquals((Integer) 1, result57670.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result27436.getTotalCount());
         Assert.assertEquals((Integer) 1, result27436.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, result7113.getTotalCount());
+        Assert.assertEquals((Integer) 1, result7113.getNumberOfAlteredCases());
     }
 
     @Test
@@ -996,10 +1005,10 @@ public void getPatientStructuralVariantCountIncludeOnlySomatic() throws Exceptio
         AlterationCountByGene result8031 = result.stream().filter(r -> r.getEntrezGeneId() == 8031).findFirst().get();
         AlterationCountByGene result27436 = result.stream().filter(r -> r.getEntrezGeneId() == 27436).findFirst().get();
         AlterationCountByGene result7113 = result.stream().filter(r -> r.getEntrezGeneId() == 7113).findFirst().get();
-        Assert.assertEquals((Integer) 2, result57670.getTotalCount());
-        Assert.assertEquals((Integer) 2, result57670.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 1, result8031.getTotalCount());
-        Assert.assertEquals((Integer) 1, result8031.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, result57670.getTotalCount());
+        Assert.assertEquals((Integer) 3, result57670.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, result8031.getTotalCount());
+        Assert.assertEquals((Integer) 2, result8031.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result27436.getTotalCount());
         Assert.assertEquals((Integer) 1, result27436.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result7113.getTotalCount());
@@ -1049,27 +1058,29 @@ public void getPatientStructuralVariantCountIncludeCustomDriverAnnotationsExclud
         );
         Assert.assertEquals(1, result.size());
     }
-    
     @Test
     public void getSampleStructuralVariantCount() throws Exception {
         List<AlterationCountByStructuralVariant> result = alterationMyBatisRepository.getSampleStructuralVariantCounts(
             svSampleIdToProfileId,
             alterationFilter);
 
-        // Should be one KIAA154-BRAF and one NCOA4-RET
-        Assert.assertEquals(4, result.size());
+        // Should be one KIAA154-BRAF, one NCOA4-RET and one NCOA4-null
+        Assert.assertEquals(5, result.size());
         AlterationCountByStructuralVariant resultEmlAlk = findStructVarCount("EML4", "ALK", result);
         AlterationCountByStructuralVariant resultKiaaBraf= findStructVarCount("KIAA1549", "BRAF", result);
         AlterationCountByStructuralVariant resultTmprsErg = findStructVarCount("TMPRSS2", "ERG", result);
         AlterationCountByStructuralVariant resultNcoRet = findStructVarCount("NCOA4", "RET", result);
+        AlterationCountByStructuralVariant resultNcoNull = findStructVarCount("NCOA4", null, result);
         Assert.assertEquals((Integer) 2, resultEmlAlk.getTotalCount());
         Assert.assertEquals((Integer) 2, resultEmlAlk.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 3, resultKiaaBraf.getTotalCount());
-        Assert.assertEquals((Integer) 2, resultKiaaBraf.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 1, resultNcoRet.getTotalCount());
-        Assert.assertEquals((Integer) 1, resultNcoRet.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 1, resultTmprsErg.getTotalCount());
-        Assert.assertEquals((Integer) 1, resultTmprsErg.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 4, resultKiaaBraf.getTotalCount());
+        Assert.assertEquals((Integer) 3, resultKiaaBraf.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, resultNcoNull.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultNcoNull.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultTmprsErg.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultTmprsErg.getNumberOfAlteredCases());
     }
 
     @Test
@@ -1096,13 +1107,16 @@ public void getSampleStructuralVariantCountSomaticSvStatusExcluded() throws Exce
             svSampleIdToProfileId,
             alterationFilter);
 
-        Assert.assertEquals(2, result.size());
+        Assert.assertEquals(3, result.size());
         AlterationCountByStructuralVariant resultKiaaBraf= findStructVarCount("KIAA1549", "BRAF", result);
         AlterationCountByStructuralVariant resultEmlAlk = findStructVarCount("EML4", "ALK", result);
+        AlterationCountByStructuralVariant resultTmprsErg = findStructVarCount("TMPRSS2", "ERG", result);
         Assert.assertEquals((Integer) 1, resultKiaaBraf.getTotalCount());
         Assert.assertEquals((Integer) 1, resultKiaaBraf.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, resultEmlAlk.getTotalCount());
         Assert.assertEquals((Integer) 1, resultEmlAlk.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, resultTmprsErg.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultTmprsErg.getNumberOfAlteredCases());
     }
 
     @Test
@@ -1114,17 +1128,20 @@ public void getSampleStructuralVariantCountGermlineSvStatusExcluded() throws Exc
             svSampleIdToProfileId,
             alterationFilter);
 
-        Assert.assertEquals(4, result.size());
+        Assert.assertEquals(5, result.size());
         AlterationCountByStructuralVariant resultEmlAlk = findStructVarCount("EML4", "ALK", result);
         AlterationCountByStructuralVariant resultKiaaBraf= findStructVarCount("KIAA1549", "BRAF", result);
         AlterationCountByStructuralVariant resultTmprsErg = findStructVarCount("TMPRSS2", "ERG", result);
         AlterationCountByStructuralVariant resultNcoRet = findStructVarCount("NCOA4", "RET", result);
+        AlterationCountByStructuralVariant resultNcoNull = findStructVarCount("NCOA4", null, result);
         Assert.assertEquals((Integer) 1, resultEmlAlk.getTotalCount());
         Assert.assertEquals((Integer) 1, resultEmlAlk.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 2, resultKiaaBraf.getTotalCount());
-        Assert.assertEquals((Integer) 2, resultKiaaBraf.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 1, resultNcoRet.getTotalCount());
-        Assert.assertEquals((Integer) 1, resultNcoRet.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, resultKiaaBraf.getTotalCount());
+        Assert.assertEquals((Integer) 3, resultKiaaBraf.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, resultNcoNull.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultNcoNull.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, resultTmprsErg.getTotalCount());
         Assert.assertEquals((Integer) 1, resultTmprsErg.getNumberOfAlteredCases());
     }
@@ -1142,20 +1159,21 @@ public void getPatientStructuralVariantCount() throws Exception {
         AlterationCountByStructuralVariant resultNcoRet = findStructVarCount("NCOA4", "RET", result);
         Assert.assertEquals((Integer) 2, resultEmlAlk.getTotalCount());
         Assert.assertEquals((Integer) 2, resultEmlAlk.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 3, resultKiaaBraf.getTotalCount());
-        Assert.assertEquals((Integer) 2, resultKiaaBraf.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 1, resultNcoRet.getTotalCount());
-        Assert.assertEquals((Integer) 1, resultNcoRet.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 1, resultTmprsErg.getTotalCount());
-        Assert.assertEquals((Integer) 1, resultTmprsErg.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 4, resultKiaaBraf.getTotalCount());
+        Assert.assertEquals((Integer) 3, resultKiaaBraf.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultTmprsErg.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultTmprsErg.getNumberOfAlteredCases());
     }
 
     private AlterationCountByStructuralVariant findStructVarCount(String gene1HugoSymbol,
                                                                   String gene2HugoSymbol,
                                                                   List<AlterationCountByStructuralVariant> counts) {
         return counts.stream().filter(
-            c -> c.getGene1HugoGeneSymbol().equals(gene1HugoSymbol)
-                && c.getGene2HugoGeneSymbol().equals(gene2HugoSymbol)).findFirst().get();
+            c -> ((c.getGene1HugoGeneSymbol() == null && gene1HugoSymbol == null) || (c.getGene1HugoGeneSymbol() != null && c.getGene1HugoGeneSymbol().equals(gene1HugoSymbol)))
+              && ((c.getGene2HugoGeneSymbol() == null && gene2HugoSymbol == null) || (c.getGene2HugoGeneSymbol() != null && c.getGene2HugoGeneSymbol().equals(gene2HugoSymbol)))
+            ).findFirst().get();
     }
     
 }ueu(9665e463a464f5506e36ab3f1d7130b377f8f059}(sha(9665e463a464f5506e36ab3f1d7130b377f8f059node_idEC_kwDOAe-hB9oAKDk2NjVlNDYzYTQ2NGY1NTA2ZTM2YWIzZjFkNzEzMGIzNzdmOGYwNTkcommit}(author}(name
Bas Leenknegtemailbasleenknegt@thehyve.nldate2023-06-13T11:41:07Zu	committer}(jI  
Bas LeenknegtjI  basleenknegt@thehyve.nljI  2023-06-13T11:41:07ZumessagemChanges after PR reviews

- Rename StructVar* to StructuralVariant*
- Revert JsonInclude Always to NON_NULL
-tree}(jI  (104d96811cbfbc5d9d52d688df4e64f06f7741b9urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/104d96811cbfbc5d9d52d688df4e64f06f7741b9ujI  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/9665e463a464f5506e36ab3f1d7130b377f8f059
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujI  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9665e463a464f5506e36ab3f1d7130b377f8f059html_urlXhttps://github.com/cBioPortal/cbioportal/commit/9665e463a464f5506e36ab3f1d7130b377f8f059comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/9665e463a464f5506e36ab3f1d7130b377f8f059/commentsj
I  }(loginBasLeeidJ~2 jI  MDQ6VXNlcjMzMjMwMDY=
avatar_url3https://avatars.githubusercontent.com/u/3323006?v=4gravatar_idh5jI  #https://api.github.com/users/BasLeej(I  https://github.com/BasLee
followers_url-https://api.github.com/users/BasLee/followers
following_url:https://api.github.com/users/BasLee/following{/other_user}	gists_url3https://api.github.com/users/BasLee/gists{/gist_id}starred_url:https://api.github.com/users/BasLee/starred{/owner}{/repo}subscriptions_url1https://api.github.com/users/BasLee/subscriptionsorganizations_url(https://api.github.com/users/BasLee/orgs	repos_url)https://api.github.com/users/BasLee/repos
events_url4https://api.github.com/users/BasLee/events{/privacy}received_events_url3https://api.github.com/users/BasLee/received_eventstypeUser
site_adminujI  }(j-I  BasLeej/I  J~2 jI  MDQ6VXNlcjMzMjMwMDY=j1I  3https://avatars.githubusercontent.com/u/3323006?v=4j3I  h5jI  #https://api.github.com/users/BasLeej(I  https://github.com/BasLeej6I  -https://api.github.com/users/BasLee/followersj8I  :https://api.github.com/users/BasLee/following{/other_user}j:I  3https://api.github.com/users/BasLee/gists{/gist_id}j<I  :https://api.github.com/users/BasLee/starred{/owner}{/repo}j>I  1https://api.github.com/users/BasLee/subscriptionsj@I  (https://api.github.com/users/BasLee/orgsjBI  )https://api.github.com/users/BasLee/reposjDI  4https://api.github.com/users/BasLee/events{/privacy}jFI  3https://api.github.com/users/BasLee/received_eventsjHI  UserjJI  uparents]}(jI  (4d989c9a9550651b209f84367c67970fcf8d2f76jI  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4d989c9a9550651b209f84367c67970fcf8d2f76j(I  Xhttps://github.com/cBioPortal/cbioportal/commit/4d989c9a9550651b209f84367c67970fcf8d2f76uastats}(totalKo	additionsK7	deletionsK8ufiles](}(jI  (0b857f2367a25249e10cd617d73894bf7a53d800filenameJmodel/src/main/java/org/cbioportal/model/StructuralVariantFilterQuery.javastatusrenamedjdI  KjeI  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/9665e463a464f5506e36ab3f1d7130b377f8f059/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantFilterQuery.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/9665e463a464f5506e36ab3f1d7130b377f8f059/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantFilterQuery.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantFilterQuery.java?ref=9665e463a464f5506e36ab3f1d7130b377f8f059patchX(	  @@ -5,25 +5,25 @@
 
 import java.io.Serializable;
 
-public class StructVarFilterQuery extends BaseAlterationFilter implements Serializable {
+public class StructuralVariantFilterQuery extends BaseAlterationFilter implements Serializable {
     
     private StructuralVariantGeneSubQuery gene1Query;
     private StructuralVariantGeneSubQuery gene2Query;
     
-    public StructVarFilterQuery() {}
-
-    public StructVarFilterQuery(String gene1HugoSymbol,
-                                @Nullable Integer gene1EntrezId,
-                                String gene2HugoSymbol,
-                                @Nullable Integer gene2EntrezId,
-                                boolean includeDriver,
-                                boolean includeVUS,
-                                boolean includeUnknownOncogenicity,
-                                Select<String> tiersSelect,
-                                boolean includeUnknownTier,
-                                boolean includeGermline,
-                                boolean includeSomatic,
-                                boolean includeUnknownStatus) {
+    public StructuralVariantFilterQuery() {}
+
+    public StructuralVariantFilterQuery(String gene1HugoSymbol,
+                                        @Nullable Integer gene1EntrezId,
+                                        String gene2HugoSymbol,
+                                        @Nullable Integer gene2EntrezId,
+                                        boolean includeDriver,
+                                        boolean includeVUS,
+                                        boolean includeUnknownOncogenicity,
+                                        Select<String> tiersSelect,
+                                        boolean includeUnknownTier,
+                                        boolean includeGermline,
+                                        boolean includeSomatic,
+                                        boolean includeUnknownStatus) {
         super(includeDriver, includeVUS, includeUnknownOncogenicity, includeGermline, includeSomatic, includeUnknownStatus, tiersSelect, includeUnknownTier);
         this.gene1Query = new StructuralVariantGeneSubQuery(gene1HugoSymbol, gene1EntrezId);
         this.gene2Query = new StructuralVariantGeneSubQuery(gene2HugoSymbol, gene2EntrezId);previous_filenameBmodel/src/main/java/org/cbioportal/model/StructVarFilterQuery.javau}(jI  (84584fb7a595ab211c423ef9830a999429241f7cjjI  Nmodel/src/main/java/org/cbioportal/model/StudyViewStructuralVariantFilter.javajlI  modifiedjdI  KjeI  KjnI  KjoI  https://github.com/cBioPortal/cbioportal/blob/9665e463a464f5506e36ab3f1d7130b377f8f059/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStudyViewStructuralVariantFilter.javajqI  https://github.com/cBioPortal/cbioportal/raw/9665e463a464f5506e36ab3f1d7130b377f8f059/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStudyViewStructuralVariantFilter.javajsI  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStudyViewStructuralVariantFilter.java?ref=9665e463a464f5506e36ab3f1d7130b377f8f059juI  X8  @@ -8,7 +8,7 @@
 public class StudyViewStructuralVariantFilter implements Serializable {
 
     private Set<String> molecularProfileIds;
-    private List<List<StructVarFilterQuery>> structVarQueries;
+    private List<List<StructuralVariantFilterQuery>> structVarQueries;
 
     @AssertTrue(message = "'specialValue' field of gene1/gene2 StructVarGeneSubQueries cannot be both ANY_GENE or NO_GENE.")
     private boolean isGeneQueriesSpecialValueCorrect() {
@@ -53,11 +53,11 @@ public void setMolecularProfileIds(Set<String> molecularProfileIds) {
         this.molecularProfileIds = molecularProfileIds;
     }
 
-    public List<List<StructVarFilterQuery>> getStructVarQueries() {
+    public List<List<StructuralVariantFilterQuery>> getStructVarQueries() {
         return structVarQueries;
     }
 
-    public void setStructVarQueries(List<List<StructVarFilterQuery>> structVarQueries) {
+    public void setStructVarQueries(List<List<StructuralVariantFilterQuery>> structVarQueries) {
         this.structVarQueries = structVarQueries;
     }
 }
\ No newline at end of fileu}(jI  (8818779e19301d18a688c354ba820e0d87ff7022jjI  epersistence/persistence-api/src/main/java/org/cbioportal/persistence/StructuralVariantRepository.javajlI  modifiedjdI  KjeI  KjnI  KjoI  https://github.com/cBioPortal/cbioportal/blob/9665e463a464f5506e36ab3f1d7130b377f8f059/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStructuralVariantRepository.javajqI  https://github.com/cBioPortal/cbioportal/raw/9665e463a464f5506e36ab3f1d7130b377f8f059/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStructuralVariantRepository.javajsI  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStructuralVariantRepository.java?ref=9665e463a464f5506e36ab3f1d7130b377f8f059juI  X  @@ -3,7 +3,7 @@
 import java.util.List;
 
 import org.cbioportal.model.GeneFilterQuery;
-import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 import org.springframework.cache.annotation.Cacheable;
@@ -25,5 +25,5 @@ List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String> molecu
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
     List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
                                                              List<String> sampleIds,
-                                                             List<StructVarFilterQuery> structVarQueries);
+                                                             List<StructuralVariantFilterQuery> structVarQueries);
 }u}(jI  (2a24f753b0d705cad523959bd9c7d946721489c1jjI  mpersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/StructuralVariantMapper.javajlI  modifiedjdI  KjeI  KjnI  KjoI  https://github.com/cBioPortal/cbioportal/blob/9665e463a464f5506e36ab3f1d7130b377f8f059/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.javajqI  https://github.com/cBioPortal/cbioportal/raw/9665e463a464f5506e36ab3f1d7130b377f8f059/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.javajsI  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.java?ref=9665e463a464f5506e36ab3f1d7130b377f8f059juI  XP  @@ -26,7 +26,7 @@
 import java.util.List;
 
 import org.cbioportal.model.GeneFilterQuery;
-import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 
@@ -43,5 +43,5 @@ List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String> molecu
 
     List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
                                                                       List<String> sampleIds,
-                                                                      List<StructVarFilterQuery> structVarQueries);
+                                                                      List<StructuralVariantFilterQuery> structVarQueries);
 }u}(jI  (f03d42130dab8f88ac125c31cc6da20f1255fd83jjI  xpersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/StructuralVariantMyBatisRepository.javajlI  modifiedjdI  KjeI  KjnI  KjoI  https://github.com/cBioPortal/cbioportal/blob/9665e463a464f5506e36ab3f1d7130b377f8f059/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepository.javajqI  https://github.com/cBioPortal/cbioportal/raw/9665e463a464f5506e36ab3f1d7130b377f8f059/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepository.javajsI  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepository.java?ref=9665e463a464f5506e36ab3f1d7130b377f8f059juI  X  @@ -24,7 +24,7 @@
 package org.cbioportal.persistence.mybatis;
 
 import org.cbioportal.model.GeneFilterQuery;
-import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 import org.cbioportal.persistence.StructuralVariantRepository;
@@ -84,7 +84,7 @@ public List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String>
     @Override
     public List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
                                                                              List<String> sampleIds,
-                                                                             List<StructVarFilterQuery> structVarQueries) {
+                                                                             List<StructuralVariantFilterQuery> structVarQueries) {
         if (structVarQueries == null || structVarQueries.isEmpty()
             || molecularProfileIds == null || molecularProfileIds.isEmpty()) {
             return new ArrayList<>();u}(jI  (72f882290e4f3c6fff0045368c39bc13bc7b0d4cjjI  |persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/StructuralVariantMyBatisRepositoryTest.javajlI  modifiedjdI  K
jeI  K
jnI  KjoI  https://github.com/cBioPortal/cbioportal/blob/9665e463a464f5506e36ab3f1d7130b377f8f059/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepositoryTest.javajqI  https://github.com/cBioPortal/cbioportal/raw/9665e463a464f5506e36ab3f1d7130b377f8f059/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepositoryTest.javajsI  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepositoryTest.java?ref=9665e463a464f5506e36ab3f1d7130b377f8f059juI  X
  @@ -24,7 +24,7 @@
 package org.cbioportal.persistence.mybatis;
 
 import org.cbioportal.model.GeneFilterQuery;
-import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantGeneSubQuery;
 import org.cbioportal.model.StructuralVariantQuery;
@@ -98,11 +98,11 @@ public void init() {
         geneQueries =  Arrays.asList(geneFilterQuery1, geneFilterQuery2, geneFilterQuery3, geneFilterQuery4);
 
         // Only search for the KIAA1549-BRAF and EML4-ALK fusions.
-        structVarFilterQuery1 = new StructVarFilterQuery("KIAA1549", 57670, "BRAF", 673, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
-        structVarFilterQuery2 = new StructVarFilterQuery("EML4", 27436, "ALK", 238, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
+        structVarFilterQuery1 = new StructuralVariantFilterQuery("KIAA1549", 57670, "BRAF", 673, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
+        structVarFilterQuery2 = new StructuralVariantFilterQuery("EML4", 27436, "ALK", 238, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
         structVarQueries = Arrays.asList(structVarFilterQuery1, structVarFilterQuery2);
-        structVarFilterQueryNullGene1 = new StructVarFilterQuery(null, null, "BRAF", 673, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
-        structVarFilterQueryNullGene2 = new StructVarFilterQuery("NCOA4", 8031, null, null, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
+        structVarFilterQueryNullGene1 = new StructuralVariantFilterQuery(null, null, "BRAF", 673, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
+        structVarFilterQueryNullGene2 = new StructuralVariantFilterQuery("NCOA4", 8031, null, null, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
     }
 
     List<String> molecularProfileIds = new ArrayList<>();
@@ -118,11 +118,11 @@ public void init() {
     private List<GeneFilterQuery> geneQueries;
     List<Integer> noEntrezIds = Collections.emptyList();
     private List<StructuralVariantQuery> noStructVars = Collections.emptyList();
-    private List<StructVarFilterQuery> structVarQueries;
-    private StructVarFilterQuery structVarFilterQuery1;
-    private StructVarFilterQuery structVarFilterQuery2;
-    private StructVarFilterQuery structVarFilterQueryNullGene1;
-    private StructVarFilterQuery structVarFilterQueryNullGene2;
+    private List<StructuralVariantFilterQuery> structVarQueries;
+    private StructuralVariantFilterQuery structVarFilterQuery1;
+    private StructuralVariantFilterQuery structVarFilterQuery2;
+    private StructuralVariantFilterQuery structVarFilterQueryNullGene1;
+    private StructuralVariantFilterQuery structVarFilterQueryNullGene2;
 
     @Test
     public void fetchStructuralVariantsNoSampleIdentifiers() {u}(jI  (6fe7dc5d34d4c72498fa43daa6751eb394b4654cjjI  Jservice/src/main/java/org/cbioportal/service/StructuralVariantService.javajlI  modifiedjdI  KjeI  KjnI  KjoI  https://github.com/cBioPortal/cbioportal/blob/9665e463a464f5506e36ab3f1d7130b377f8f059/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStructuralVariantService.javajqI  https://github.com/cBioPortal/cbioportal/raw/9665e463a464f5506e36ab3f1d7130b377f8f059/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStructuralVariantService.javajsI  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStructuralVariantService.java?ref=9665e463a464f5506e36ab3f1d7130b377f8f059juI  Xl  @@ -26,7 +26,7 @@
 import java.util.List;
 
 import org.cbioportal.model.GeneFilterQuery;
-import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 
@@ -45,5 +45,5 @@ List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String> molecu
 
     List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
                                                                       List<String> sampleIds,
-                                                                      List<StructVarFilterQuery> structVarQueries);
+                                                                      List<StructuralVariantFilterQuery> structVarQueries);
 }
\ No newline at end of fileu      }(jI  (bbb420b2b2d035acd398ff99ead9ccbfaad68f5ajjI  Sservice/src/main/java/org/cbioportal/service/impl/StructuralVariantServiceImpl.javajlI  modifiedjdI  KjeI  KjnI  KjoI  https://github.com/cBioPortal/cbioportal/blob/9665e463a464f5506e36ab3f1d7130b377f8f059/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStructuralVariantServiceImpl.javajqI  https://github.com/cBioPortal/cbioportal/raw/9665e463a464f5506e36ab3f1d7130b377f8f059/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStructuralVariantServiceImpl.javajsI  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStructuralVariantServiceImpl.java?ref=9665e463a464f5506e36ab3f1d7130b377f8f059juI  XW  @@ -24,12 +24,11 @@
 package org.cbioportal.service.impl;
 
 import org.cbioportal.model.GeneFilterQuery;
-import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 import org.cbioportal.persistence.StructuralVariantRepository;
 import org.cbioportal.service.StructuralVariantService;
-import org.springframework.beans.PropertyValues;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import java.util.List;
@@ -64,7 +63,7 @@ public List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String>
     @Override
     public List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
                                                                              List<String> sampleIds,
-                                                                             List<StructVarFilterQuery> structVarQueries) {
+                                                                             List<StructuralVariantFilterQuery> structVarQueries) {
         return structuralVariantRepository.fetchStructuralVariantsByStructVarQueries(
             molecularProfileIds, sampleIds, structVarQueries);
     }u}(jI  (6a9e8c9b5a090c4009b997ce92ecaa613e5d8adcjjI  Cweb/src/main/java/org/cbioportal/web/parameter/StudyViewFilter.javajlI  modifiedjdI  KjeI  KjnI  KjoI  https://github.com/cBioPortal/cbioportal/blob/9665e463a464f5506e36ab3f1d7130b377f8f059/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FStudyViewFilter.javajqI  https://github.com/cBioPortal/cbioportal/raw/9665e463a464f5506e36ab3f1d7130b377f8f059/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FStudyViewFilter.javajsI  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FStudyViewFilter.java?ref=9665e463a464f5506e36ab3f1d7130b377f8f059juI  @@ -17,7 +17,7 @@
 import org.cbioportal.web.parameter.filter.*;
 
 @JsonIgnoreProperties(ignoreUnknown = true)
-@JsonInclude(Include.ALWAYS)
+@JsonInclude(Include.NON_NULL)
 public class StudyViewFilter implements Serializable {
 
     @Size(min = 1)u}(jI  (0c92bb446a5e2ba93f3c4d41edeacbf3516ffb36jjI  Bweb/src/main/java/org/cbioportal/web/util/StudyViewFilterUtil.javajlI  modifiedjdI  KjeI  KjnI  KjoI  https://github.com/cBioPortal/cbioportal/blob/9665e463a464f5506e36ab3f1d7130b377f8f059/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javajqI  https://github.com/cBioPortal/cbioportal/raw/9665e463a464f5506e36ab3f1d7130b377f8f059/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javajsI  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.java?ref=9665e463a464f5506e36ab3f1d7130b377f8f059juI  Xg  @@ -15,7 +15,7 @@
 import org.cbioportal.model.GeneFilterQuery;
 import org.cbioportal.model.Patient;
 import org.cbioportal.model.SampleList;
-import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariantSpecialValue;
 import org.cbioportal.service.GeneService;
 import org.cbioportal.service.util.CustomDataSession;
@@ -292,7 +292,7 @@ private Map<String, Integer> getStringIntegerMap(List<String> hugoGeneSymbols) {
         return symbolToEntrezGeneId;
     }
 
-    public List<StructVarFilterQuery> resolveEntrezGeneIds(List<StructVarFilterQuery> structVarQueries) {
+    public List<StructuralVariantFilterQuery> resolveEntrezGeneIds(List<StructuralVariantFilterQuery> structVarQueries) {
 
         List<String> hugoGeneSymbols = structVarQueries
             .stream()u}(jI  (9367c54884b028616e93f45bb9039886c7153fe3jjI  Yweb/src/main/java/org/cbioportal/web/util/appliers/StructuralVariantSubFilterApplier.javajlI  modifiedjdI  KjeI  KjnI  KjoI  https://github.com/cBioPortal/cbioportal/blob/9665e463a464f5506e36ab3f1d7130b377f8f059/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.javajqI  https://github.com/cBioPortal/cbioportal/raw/9665e463a464f5506e36ab3f1d7130b377f8f059/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.javajsI  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.java?ref=9665e463a464f5506e36ab3f1d7130b377f8f059juI  X  @@ -1,7 +1,7 @@
 package org.cbioportal.web.util.appliers;
 
 import org.cbioportal.model.MolecularProfile;
-import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StudyViewStructuralVariantFilter;
 import org.cbioportal.service.MolecularProfileService;
 import org.cbioportal.service.StructuralVariantService;
@@ -59,7 +59,7 @@ public List<SampleIdentifier> filter(List<SampleIdentifier> toFilter, StudyViewF
                 .stream()
                 .collect(Collectors.groupingBy(MolecularProfile::getCancerStudyIdentifier));
 
-            for (List<StructVarFilterQuery> structVarQueries: structuralVariantFilter.getStructVarQueries()) {
+            for (List<StructuralVariantFilterQuery> structVarQueries: structuralVariantFilter.getStructVarQueries()) {
 
                 // Remove samples in remainingSampleIdentifiers that belong to a study that is not accessible to the current user
                 // (do not appear in the molecularProfileMap argument). 
@@ -75,7 +75,7 @@ public List<SampleIdentifier> filter(List<SampleIdentifier> toFilter, StudyViewF
                         .map(SampleIdentifier::getSampleId)
                         .collect(Collectors.toList());
 
-                final List<StructVarFilterQuery> entrezIdEnhancedSvQueries = studyViewFilterUtil.resolveEntrezGeneIds(structVarQueries);
+                final List<StructuralVariantFilterQuery> entrezIdEnhancedSvQueries = studyViewFilterUtil.resolveEntrezGeneIds(structVarQueries);
                 remainingSampleIdentifiers = structuralVariantService
                     .fetchStructuralVariantsByStructVarQueries(molecularProfileIds, sampleIds, entrezIdEnhancedSvQueries)
                     .stream()u}(jI  (046069eadb0818f553c6a05576e2f8dc4ea0bf37jjI  Aweb/src/test/java/org/cbioportal/web/StudyViewControllerTest.javajlI  modifiedjdI  KjeI  KjnI  K
joI  https://github.com/cBioPortal/cbioportal/blob/9665e463a464f5506e36ab3f1d7130b377f8f059/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javajqI  https://github.com/cBioPortal/cbioportal/raw/9665e463a464f5506e36ab3f1d7130b377f8f059/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javajsI  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.java?ref=9665e463a464f5506e36ab3f1d7130b377f8f059juI  X  @@ -859,7 +859,7 @@ public void validateStructVarFilter() throws Exception {
         StudyViewFilter studyViewFilter = new StudyViewFilter();
         studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
 
-        final StructVarFilterQuery structVarFilterQuery = new StructVarFilterQuery("A", null, "B", null,
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery("A", null, "B", null,
             true, true, true, Select.all(),
             true, true, true, true);
         final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
@@ -886,7 +886,7 @@ public void validateStructVarFilterBothAnyGene() throws Exception {
         StudyViewFilter studyViewFilter = new StudyViewFilter();
         studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
 
-        final StructVarFilterQuery structVarFilterQuery = new StructVarFilterQuery("A", null, "B", null,
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery("A", null, "B", null,
             true, true, true, Select.all(),
             true, true, true, true);
         final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
@@ -914,7 +914,7 @@ public void validateStructVarFilterBothNoGene() throws Exception {
         StudyViewFilter studyViewFilter = new StudyViewFilter();
         studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
 
-        final StructVarFilterQuery structVarFilterQuery = new StructVarFilterQuery("A", null, "B", null,
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery("A", null, "B", null,
             true, true, true, Select.all(),
             true, true, true, true);
         final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
@@ -943,7 +943,7 @@ public void validateStructVarFilterBothNoGeneId() throws Exception {
         studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
 
         // Test case:
-        final StructVarFilterQuery structVarFilterQuery = new StructVarFilterQuery(null, null, null, null,
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery(null, null, null, null,
             true, true, true, Select.all(),
             true, true, true, true);
             
@@ -969,7 +969,7 @@ public void validateStructVarFilterBothGeneIdAndSpecialValueNull() throws Except
         studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
 
         // Test case:
-        final StructVarFilterQuery structVarFilterQuery = new StructVarFilterQuery(null, null, "B", null,
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery(null, null, "B", null,
             true, true, true, Select.all(),
             true, true, true, true);
         structVarFilterQuery.getGene1Query().setSpecialValue(null);u}(jI  (e8bd8efba6d188222d0992dd3282008e6123bd58jjI  ]web/src/test/java/org/cbioportal/web/util/appliers/StructuralVariantSubFilterApplierTest.javajlI  modifiedjdI  KjeI  KjnI  KjoI  https://github.com/cBioPortal/cbioportal/blob/9665e463a464f5506e36ab3f1d7130b377f8f059/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.javajqI  https://github.com/cBioPortal/cbioportal/raw/9665e463a464f5506e36ab3f1d7130b377f8f059/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.javajsI  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.java?ref=9665e463a464f5506e36ab3f1d7130b377f8f059juI  Xs  @@ -1,7 +1,7 @@
 package org.cbioportal.web.util.appliers;
 
 import org.cbioportal.model.MolecularProfile;
-import org.cbioportal.model.StructVarFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StudyViewStructuralVariantFilter;
 import org.cbioportal.model.util.Select;
@@ -55,9 +55,9 @@ public void setUp() throws Exception {
         // For the test this arrangement does not matter much. What is more important
         // is the SVs returned by the structuralVariantService service mock in response to
         // subsequent query filter calls.
-        List<StructVarFilterQuery> svA = Arrays.asList(createQuery(G1, G2));
-        List<StructVarFilterQuery> svB = Arrays.asList(createQuery(G1, G2));
-        List<List<StructVarFilterQuery>> svA_and_svB_filterQuery = Arrays.asList(svA, svB);
+        List<StructuralVariantFilterQuery> svA = Arrays.asList(createQuery(G1, G2));
+        List<StructuralVariantFilterQuery> svB = Arrays.asList(createQuery(G1, G2));
+        List<List<StructuralVariantFilterQuery>> svA_and_svB_filterQuery = Arrays.asList(svA, svB);
 
         final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
         structuralVariantFilter.setStructVarQueries(svA_and_svB_filterQuery);
@@ -119,8 +119,8 @@ public void shouldApplyFilter() {
         Assert.assertTrue(subject.shouldApplyFilter(structVarStudyViewFilter)); 
     }
     
-    private StructVarFilterQuery createQuery(String gene1, String gene2) {
-        return new StructVarFilterQuery(gene1, null, gene2, null,
+    private StructuralVariantFilterQuery createQuery(String gene1, String gene2) {
+        return new StructuralVariantFilterQuery(gene1, null, gene2, null,
             true, true, true, Select.all(),
             true, true, true, true);
     }ueu(b1420144361284ea024062c5f0b35bd96e9b3038}(sha(b1420144361284ea024062c5f0b35bd96e9b3038node_idEC_kwDOAe-hB9oAKGIxNDIwMTQ0MzYxMjg0ZWEwMjQwNjJjNWYwYjM1YmQ5NmU5YjMwMzgcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-13T22:04:37Zu	committer}(jI  Djokovic0311jI  .55948986+Djokovic0311@users.noreply.github.comjI  2023-08-15T19:12:44Zumessagemodify expressionenrichmenttree}(jI  (a99fc46506807ea836cd01079dd7f21f6b0f74f9urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/a99fc46506807ea836cd01079dd7f21f6b0f74f9ujI  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/b1420144361284ea024062c5f0b35bd96e9b3038
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujI  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b1420144361284ea024062c5f0b35bd96e9b3038html_urlXhttps://github.com/cBioPortal/cbioportal/commit/b1420144361284ea024062c5f0b35bd96e9b3038comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/b1420144361284ea024062c5f0b35bd96e9b3038/commentsjI  }(loginDjokovic0311idJUjI  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5jI  )https://api.github.com/users/Djokovic0311jI  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminujI  }(jJ  Djokovic0311jJ  JUjI  MDQ6VXNlcjU1OTQ4OTg2jJ  4https://avatars.githubusercontent.com/u/55948986?v=4j
J  h5jI  )https://api.github.com/users/Djokovic0311jI  https://github.com/Djokovic0311j
J  3https://api.github.com/users/Djokovic0311/followersjJ  @https://api.github.com/users/Djokovic0311/following{/other_user}jJ  9https://api.github.com/users/Djokovic0311/gists{/gist_id}jJ  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}jJ  7https://api.github.com/users/Djokovic0311/subscriptionsjJ  .https://api.github.com/users/Djokovic0311/orgsjJ  /https://api.github.com/users/Djokovic0311/reposjJ  :https://api.github.com/users/Djokovic0311/events{/privacy}jJ  9https://api.github.com/users/Djokovic0311/received_eventsjJ  Userj!J  uparents]}(jI  (6bccdb96143f3a4f522b5a687f14c6df5505e2dajI  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/6bccdb96143f3a4f522b5a687f14c6df5505e2dajI  Xhttps://github.com/cBioPortal/cbioportal/commit/6bccdb96143f3a4f522b5a687f14c6df5505e2dauastats}(totalK	additionsK	deletionsKufiles](}(jI  (d3c2a444bd8ba08264b678a96fce3344bd45fcc7filenameMservice/src/main/java/org/cbioportal/service/ExpressionEnrichmentService.javastatusmodifiedj;J  Kj<J  KchangesK	blob_urlhttps://github.com/cBioPortal/cbioportal/blob/b1420144361284ea024062c5f0b35bd96e9b3038/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/b1420144361284ea024062c5f0b35bd96e9b3038/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.java?ref=b1420144361284ea024062c5f0b35bd96e9b3038patchX  @@ -3,19 +3,18 @@
 import java.util.List;
 import java.util.Map;
 
-import org.cbioportal.model.GenericAssayBinaryEnrichment;
-import org.cbioportal.model.GenericAssayCategoricalEnrichment;
+import org.cbioportal.model.EnrichmentType;
 import org.cbioportal.model.GenericAssayEnrichment;
 import org.cbioportal.model.GenomicEnrichment;
-import org.cbioportal.model.EnrichmentType;
-
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
+import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 
 public interface ExpressionEnrichmentService {
 
     List<GenomicEnrichment> getGenomicEnrichments(String molecularProfileId,
-                                                  Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+            Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
             throws MolecularProfileNotFoundException;
 
     List<GenericAssayEnrichment> getGenericAssayNumericalEnrichments(String molecularProfileId,u}(jI  (45eb9ae478ec5e52251ea8e073fc58bc5fbc2172jAJ  Vservice/src/main/java/org/cbioportal/service/impl/ExpressionEnrichmentServiceImpl.javajCJ  modifiedj;J  Kj<J  KjEJ  KjFJ  https://github.com/cBioPortal/cbioportal/blob/b1420144361284ea024062c5f0b35bd96e9b3038/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.javajHJ  https://github.com/cBioPortal/cbioportal/raw/b1420144361284ea024062c5f0b35bd96e9b3038/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.javajJJ  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.java?ref=b1420144361284ea024062c5f0b35bd96e9b3038jLJ  X  @@ -89,7 +89,7 @@ public List<GenomicEnrichment> getGenomicEnrichments(String molecularProfileId,
     // transaction needs to be setup here in order to return Iterable from
     // molecularDataRepository in getGenericAssayMolecularAlterationsIterable
     @Transactional(readOnly = true)
-    public List<GenericAssayEnrichment> getGenericAssayEnrichments(String molecularProfileId,
+    public List<GenericAssayEnrichment> getGenericAssayNumericalEnrichments(String molecularProfileId,
                                                                    Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
         throws MolecularProfileNotFoundException {
         MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
@@ -203,7 +203,7 @@ public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichm
             return enrichmentDatum;
         }).collect(Collectors.toList());
     }
-    
+
     private MolecularProfile getAndValidateMolecularProfile(String molecularProfileId, String dataType) throws MolecularProfileNotFoundException {
         MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
         validateMolecularProfile(molecularProfile, Arrays.asList(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY), dataType);
@@ -266,5 +266,10 @@ private <T extends GenericAssayEnrichment> void calcQValues(List<T> enrichments)
             enrichments.get(i).setqValue(qValues[i]);
         }
     }
-
+    private void validateMolecularProfile(MolecularProfile molecularProfile,
+                                          List<MolecularAlterationType> validMolecularAlterationTypes) throws MolecularProfileNotFoundException {
+        if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
+            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+        }
+    }
 }ueu(dbee06e6f0877ed5030d2ba208753f7955877916}(sha(dbee06e6f0877ed5030d2ba208753f7955877916node_idEC_kwDOAe-hB9oAKGRiZWUwNmU2ZjA4NzdlZDUwMzBkMmJhMjA4NzUzZjc5NTU4Nzc5MTYcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-01T13:35:48Zu	committer}(j`J  Gaofei ZhaojbJ  ,15748980+dippindots@users.noreply.github.comjdJ  2023-08-01T13:57:29Zumessage5Allow redis service unavailable when Redis is enabledtree}(jXJ  (0d67edd90b5290c65b752ec385b61bfe29497c2furlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/0d67edd90b5290c65b752ec385b61bfe29497c2fujpJ  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/dbee06e6f0877ed5030d2ba208753f7955877916
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujpJ  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/dbee06e6f0877ed5030d2ba208753f7955877916html_urlXhttps://github.com/cBioPortal/cbioportal/commit/dbee06e6f0877ed5030d2ba208753f7955877916comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/dbee06e6f0877ed5030d2ba208753f7955877916/commentsj^J  }(login
dippindotsidJtO jZJ  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5jpJ  'https://api.github.com/users/dippindotsj|J  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminujfJ  }(jJ  
dippindotsjJ  JtO jZJ  MDQ6VXNlcjE1NzQ4OTgwjJ  4https://avatars.githubusercontent.com/u/15748980?v=4jJ  h5jpJ  'https://api.github.com/users/dippindotsj|J  https://github.com/dippindotsjJ  1https://api.github.com/users/dippindots/followersjJ  >https://api.github.com/users/dippindots/following{/other_user}jJ  7https://api.github.com/users/dippindots/gists{/gist_id}jJ  >https://api.github.com/users/dippindots/starred{/owner}{/repo}jJ  5https://api.github.com/users/dippindots/subscriptionsjJ  ,https://api.github.com/users/dippindots/orgsjJ  -https://api.github.com/users/dippindots/reposjJ  8https://api.github.com/users/dippindots/events{/privacy}jJ  7https://api.github.com/users/dippindots/received_eventsjJ  UserjJ  uparents]}(jXJ  (70f459760dd6a22b794a47b2d33eeea2b35587e6jpJ  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/70f459760dd6a22b794a47b2d33eeea2b35587e6j|J  Xhttps://github.com/cBioPortal/cbioportal/commit/70f459760dd6a22b794a47b2d33eeea2b35587e6uastats}(totalK3	additionsK3	deletionsK ufiles](}(jXJ  (2da81e8787c9c0aa846a08dfa3d2fa80a233ee13filename\persistence/persistence-api/src/main/java/org/cbioportal/persistence/config/RedisConfig.javastatusmodifiedjJ  KjJ  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/dbee06e6f0877ed5030d2ba208753f7955877916/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fconfig%2FRedisConfig.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/dbee06e6f0877ed5030d2ba208753f7955877916/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fconfig%2FRedisConfig.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fconfig%2FRedisConfig.java?ref=dbee06e6f0877ed5030d2ba208753f7955877916patchX  @@ -2,14 +2,17 @@
 
 import org.cbioportal.persistence.util.CustomKeyGenerator;
 import org.cbioportal.persistence.util.CustomRedisCachingProvider;
+import org.cbioportal.persistence.util.LoggingCacheErrorHandler;
 import org.cbioportal.utils.config.annotation.ConditionalOnProperty;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cache.CacheManager;
 import org.springframework.cache.annotation.CachingConfigurerSupport;
 import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.cache.interceptor.CacheErrorHandler;
 import org.springframework.cache.interceptor.CacheResolver;
 import org.springframework.cache.interceptor.KeyGenerator;
 import org.springframework.cache.interceptor.NamedCacheResolver;
+
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 
@@ -29,6 +32,11 @@ public CacheManager cacheManager() {
         );
     }
 
+    @Override
+    public CacheErrorHandler errorHandler() {
+        return new LoggingCacheErrorHandler();
+    }
+
     @Bean
     @Override
     public KeyGenerator keyGenerator() {u}(jXJ  (a682c568dca5e0286e1f79b19b80f118f35d3316jJ  gpersistence/persistence-api/src/main/java/org/cbioportal/persistence/util/LoggingCacheErrorHandler.javajJ  addedjJ  K+jJ  K jJ  K+jJ  https://github.com/cBioPortal/cbioportal/blob/dbee06e6f0877ed5030d2ba208753f7955877916/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Futil%2FLoggingCacheErrorHandler.javajJ  https://github.com/cBioPortal/cbioportal/raw/dbee06e6f0877ed5030d2ba208753f7955877916/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Futil%2FLoggingCacheErrorHandler.javajJ  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Futil%2FLoggingCacheErrorHandler.java?ref=dbee06e6f0877ed5030d2ba208753f7955877916jJ  X  @@ -0,0 +1,43 @@
+package org.cbioportal.persistence.util;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.cache.Cache;
+import org.springframework.cache.interceptor.CacheErrorHandler;
+
+/**
+ * Implementation of org.springframework.cache.interceptor.CacheErrorHandler
+ * that logs the error messages when performing Redis operations.
+ * Redis will throw a RuntimeException causing our APIs to return HTTP 500 responses, so we defined
+ * this class to just log the errors and allow our app fallback to the non-cached version.
+ */
+
+public class LoggingCacheErrorHandler implements CacheErrorHandler {
+
+    private static final Logger LOG = LoggerFactory.getLogger(LoggingCacheErrorHandler.class);
+
+    @Override
+    public void handleCacheGetError(RuntimeException exception, Cache cache, Object key) {
+        LOG.error(String.format("Cache '%s' failed to get entry with key '%s'", cache.getName(), key), exception);
+        LOG.error(String.format("Cache error message: '%s'", exception.getMessage()));
+    }
+
+    @Override
+    public void handleCachePutError(RuntimeException exception, Cache cache, Object key, Object value) {
+        LOG.error(String.format("Cache '%s' failed to put entry with key '%s'", cache.getName(), key), exception);
+        LOG.error(String.format("Cache error message: '%s'", exception.getMessage()));
+    }
+
+    @Override
+    public void handleCacheEvictError(RuntimeException exception, Cache cache, Object key) {
+        LOG.error(String.format("Cache '%s' failed to evict entry with key '%s'", cache.getName(), key), exception);
+        LOG.error(String.format("Cache error message: '%s'", exception.getMessage()));
+    }
+
+    @Override
+    public void handleCacheClearError(RuntimeException exception, Cache cache) {
+        LOG.error(String.format("Cache '%s' failed to clear entries", cache.getName()), exception);
+        LOG.error(String.format("Cache error message: '%s'", exception.getMessage()));
+    }
+
+}ueu(e696f225d3c7ffd9a61d637679ada49a40573e64}(sha(e696f225d3c7ffd9a61d637679ada49a40573e64node_idEC_kwDOAe-hB9oAKGU2OTZmMjI1ZDNjN2ZmZDlhNjFkNjM3Njc5YWRhNDlhNDA1NzNlNjQcommit}(author}(namehaynescdemailhaynescd@chop.edudate2023-06-30T15:28:01Zu	committer}(jJ  haynescdjJ  haynescd@chop.edujJ  2023-06-30T15:28:01Zumessage0Add Categorical Filtering for SampleClinicalDatatree}(jJ  (258667aca1ce7604c9fa40414e2835ca014826a4urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/258667aca1ce7604c9fa40414e2835ca014826a4ujJ  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/e696f225d3c7ffd9a61d637679ada49a40573e64
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujJ  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/e696f225d3c7ffd9a61d637679ada49a40573e64html_urlXhttps://github.com/cBioPortal/cbioportal/commit/e696f225d3c7ffd9a61d637679ada49a40573e64comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/e696f225d3c7ffd9a61d637679ada49a40573e64/commentsjJ  }(loginhaynescdidJ jJ  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5jJ  %https://api.github.com/users/haynescdjJ  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminujJ  }(jJ  haynescdj K  J jJ  MDQ6VXNlcjMzNjA4OTIwjK  4https://avatars.githubusercontent.com/u/33608920?v=4jK  h5jJ  %https://api.github.com/users/haynescdjJ  https://github.com/haynescdjK  /https://api.github.com/users/haynescd/followersj	K  <https://api.github.com/users/haynescd/following{/other_user}jK  5https://api.github.com/users/haynescd/gists{/gist_id}j
K  <https://api.github.com/users/haynescd/starred{/owner}{/repo}jK  3https://api.github.com/users/haynescd/subscriptionsjK  *https://api.github.com/users/haynescd/orgsjK  +https://api.github.com/users/haynescd/reposjK  6https://api.github.com/users/haynescd/events{/privacy}jK  5https://api.github.com/users/haynescd/received_eventsjK  UserjK  uparents]}(jJ  (e2821be287184655e99a2cd0dd0f4373f66ba53djJ  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/e2821be287184655e99a2cd0dd0f4373f66ba53djJ  Xhttps://github.com/cBioPortal/cbioportal/commit/e2821be287184655e99a2cd0dd0f4373f66ba53duastats}(totalK^	additionsKD	deletionsKufiles](}(jJ  (a78c17c9d6cb710b2c73f00fd613074629826733filenametpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmlstatusmodifiedj5K  K3j6K  KchangesKMblob_urlhttps://github.com/cBioPortal/cbioportal/blob/e696f225d3c7ffd9a61d637679ada49a40573e64/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/e696f225d3c7ffd9a61d637679ada49a40573e64/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=e696f225d3c7ffd9a61d637679ada49a40573e64patchX  @@ -78,32 +78,6 @@
                     </trim>
                 </where>
             </if>
-            <!-- <if test="clinicalDataFilters != null and !clinicalDataFilters.isEmpty()">
-                INTERSECT
-                SELECT sample_unique_id
-                FROM sample
-                WHERE patient_unique_id IN (
-                    SELECT patient_unique_id
-                    FROM patient_clinical_attribute_numeric
-                    WHERE
-                    <trim prefixOverrides="AND">
-                        <foreach item="clinicalDataFilter" collection="clinicalDataFilters" open="(" separator=") AND (" close=")">
-                            <foreach item="dataFilterValue" collection="clinicalDataFilter.values" open="(" separator=") OR (" close=")">
-                                attribute_name = '${clinicalDataFilter.attributeId}'
-                                <if test="dataFilterValue.value eq 'NA'">
-                                    AND attribute_value = -1000000
-                                </if>
-                                <if test="dataFilterValue.start != null">
-                                    AND attribute_value &gt; ${dataFilterValue.start}
-                                </if>
-                                <if test="dataFilterValue.end != null">
-                                    AND attribute_value &lt;= ${dataFilterValue.end}
-                                </if>
-                            </foreach>
-                        </foreach>
-                    </trim>
-                 )
-            </if>  -->
             <if test="categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters() != null and !categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters().isEmpty()">
                 <foreach item="clinicalDataFilter" collection="categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters()" open="INTERSECT" separator="INTERSECT">
                     SELECT sample_unique_id
@@ -131,6 +105,57 @@
                     </foreach>
                 </foreach>
             </if>
+            <if test="categorizedClinicalDataCountFilter.getSampleCategoricalClinicalDataFilters() != null and !categorizedClinicalDataCountFilter.getSampleCategoricalClinicalDataFilters().isEmpty()">
+                <foreach item="clinicalDataFilter" collection="categorizedClinicalDataCountFilter.getSampleCategoricalClinicalDataFilters()" open="INTERSECT" separator="INTERSECT">
+                    SELECT sample_unique_id
+                    FROM sample_clinical_attribute_categorical
+                    WHERE attribute_name = '${clinicalDataFilter.attributeId}'
+                    <foreach item="dataFilterValue" collection="clinicalDataFilter.values" open=" AND ((" separator=") OR (" close="))">
+                        <trim prefix="" prefixOverrides="AND">
+                            AND attribute_value = '${dataFilterValue.value}'
+                        </trim>
+                    </foreach>
+                </foreach>
+            </if>
+            <if test="categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters() != null and !categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters().isEmpty()">
+                <foreach item="clinicalDataFilter" collection="categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters()" open="INTERSECT" separator="INTERSECT">
+                    SELECT sample_unique_id
+                    FROM patient_clinical_attribute_numeric
+                    WHERE attribute_name = '${clinicalDataFilter.attributeId}'
+                    <foreach item="dataFilterValue" collection="clinicalDataFilter.values" open=" AND ((" separator=") OR (" close="))">
+                        <trim prefix="" prefixOverrides="AND">
+                            <if test="dataFilterValue.value eq 'NA'">
+                                AND attribute_value = -1000000
+                            </if>
+                            <choose>
+                                <when test="dataFilterValue.start == dataFilterValue.end">
+                                    AND ABS(attribute_value - ${dataFilterValue.start}) &lt; EXP(-11)
+                                </when>
+                                <otherwise>
+                                    <if test="dataFilterValue.start != null">
+                                        AND attribute_value &gt; ${dataFilterValue.start}
+                                    </if>
+                                    <if test="dataFilterValue.end != null">
+                                        AND attribute_value &lt;= ${dataFilterValue.end}
+                                    </if>
+                                </otherwise>
+                            </choose>
+                        </trim>
+                    </foreach>
+                </foreach>
+            </if>
+            <if test="categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters() != null and !categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters().isEmpty()">
+                <foreach item="clinicalDataFilter" collection="categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters()" open="INTERSECT" separator="INTERSECT">
+                    SELECT sample_unique_id
+                    FROM patient_clinical_attribute_categorical
+                    WHERE attribute_name = '${clinicalDataFilter.attributeId}'
+                    <foreach item="dataFilterValue" collection="clinicalDataFilter.values" open=" AND ((" separator=") OR (" close="))">
+                        <trim prefix="" prefixOverrides="AND">
+                            AND attribute_value = '${dataFilterValue.value}'
+                        </trim>
+                    </foreach>
+                </foreach>
+            </if>
             <!-- ... extend for other elements of the StudyViewFilter object -->
         </trim>
     </sql>u}(jJ  (66d76380e94dc539064b7da56eb4c438c47a759dj;K  persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepositoryTest.javaj=K  modifiedj5K  Kj6K  K j?K  Kj@K  https://github.com/cBioPortal/cbioportal/blob/e696f225d3c7ffd9a61d637679ada49a40573e64/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javajBK  https://github.com/cBioPortal/cbioportal/raw/e696f225d3c7ffd9a61d637679ada49a40573e64/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javajDK  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.java?ref=e696f225d3c7ffd9a61d637679ada49a40573e64jFK  X3  @@ -9,6 +9,7 @@
 import org.cbioportal.webparam.DataFilterValue;
 import org.cbioportal.webparam.StudyViewFilter;
 import org.junit.Assert;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -107,13 +108,15 @@ private ClinicalDataFilter generateClinicalDataFilter(String attributeId, String
         return dataFilterValue;
     };
     @Test
+    @Ignore
     public void getClinicalAttributeNames() {
         List<String> names = studyViewMyBatisRepository.getClinicalDataAttributeNames(ClinicalAttributeDataSource.PATIENT, ClinicalAttributeDataType.CATEGORICAL);
         Assert.assertTrue(names.size() > 0);
         Assert.assertTrue(names.contains("OS_STATUS"));
     }
     
     @Test
+    @Ignore
     public void getFilterSamplesWithClinicalDataFilter() {
         ClinicalDataFilter clinicalDataFilter = new ClinicalDataFilter();
         clinicalDataFilter.setAttributeId("TMB_NONSYNONYMOUS");
@@ -134,4 +137,18 @@ public void getFilterSamplesWithClinicalDataFilter() {
         List<Sample> samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, categorizedClinicalDataCountFilter);
         Assert.assertEquals(4507, samples.size()); 
     }
+    
+    @Test
+    @Ignore
+    public void getFilterSamplesWithCategoricalSampleClinicalDataFilter() {
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(
+            new String[]{"msk_ch_2020"},null
+        );
+        CategorizedClinicalDataCountFilter clincalDataCountFilters = CategorizedClinicalDataCountFilter.getBuilder()
+            .setSampleCategoricalClinicalDataFilters(Arrays.asList(generateCategoricalClinicalDataFilter("CANCER_TYPE", new String[]{"Bladder Cancer", "Cancer of Unknown Primary"})))
+            .build();
+        
+        List<Sample> filteredSamples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter, clincalDataCountFilters);
+        Assert.assertEquals(1435, filteredSamples.size());
+    }
 }
\ No newline at end of fileueu(18819b109ea7cdcb4ad54e526332806d00cabdf1}(sha(18819b109ea7cdcb4ad54e526332806d00cabdf1node_idEC_kwDOAe-hB9oAKDE4ODE5YjEwOWVhN2NkY2I0YWQ1NGU1MjYzMzI4MDZkMDBjYWJkZjEcommit}(author}(name
Onur Sumeremails.onur.sumer@gmail.comdate2023-06-29T22:18:55Zu	committer}(jZK  GitHubj\K  noreply@github.comj^K  2023-06-29T22:18:55Zumessage,add tests for clinical data filters (#10249)tree}(jRK  (b79b39c5b128b23be8b5395bb61041d374bc7e70urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/b79b39c5b128b23be8b5395bb61041d374bc7e70ujjK  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/18819b109ea7cdcb4ad54e526332806d00cabdf1
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkngNPCRBK7hj4Ov3rIwAANJwIAJeXSNAlV0fzATfyVLUnqzx3
eEum8KZnoLDBktufkqd/gW673d0/pEoSKJOvB4PX4yP+RdkkcFVt+gwSkZ/2IgWv
MnFD+ZBiEzFjsRccpyJT9hXd5nc/yLp8wjF+flMQbVfXfXEE6U2CVFqx6BPHbR/I
bwL2UF1QUZUY86sOFjs1HooSlIX4I6MGcuhlMoA1Ip+HPxjcMr795AJO3/PlHUXF
TAfZk4p0VjH12DV6s9GnvTjPvY+EG5ZMnkX1yfTcj6SXzvB7p3o7998YF9FDXkXz
q0oxlKhmxdeNx9+d9Xw7kz1O/2E3WwcbJzizrxtQDbYO4TrR+xYZSfY1xSDrGCw=
=UPyl
-----END PGP SIGNATURE-----
payloadX   tree b79b39c5b128b23be8b5395bb61041d374bc7e70
parent 047cb2640b5cde4cd78944dac3eee9fe735d1ab9
author Onur Sumer <s.onur.sumer@gmail.com> 1688077135 -0400
committer GitHub <noreply@github.com> 1688077135 -0400

add tests for clinical data filters (#10249)

uujjK  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/18819b109ea7cdcb4ad54e526332806d00cabdf1html_urlXhttps://github.com/cBioPortal/cbioportal/commit/18819b109ea7cdcb4ad54e526332806d00cabdf1comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/18819b109ea7cdcb4ad54e526332806d00cabdf1/commentsjXK  }(login	onursumeridJ6 jTK  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5jjK  &https://api.github.com/users/onursumerjxK  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminuj`K  }(j}K  web-flowjK  J/jTK  MDQ6VXNlcjE5ODY0NDQ3jK  4https://avatars.githubusercontent.com/u/19864447?v=4jK  h5jjK  %https://api.github.com/users/web-flowjxK  https://github.com/web-flowjK  /https://api.github.com/users/web-flow/followersjK  <https://api.github.com/users/web-flow/following{/other_user}jK  5https://api.github.com/users/web-flow/gists{/gist_id}jK  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jK  3https://api.github.com/users/web-flow/subscriptionsjK  *https://api.github.com/users/web-flow/orgsjK  +https://api.github.com/users/web-flow/reposjK  6https://api.github.com/users/web-flow/events{/privacy}jK  5https://api.github.com/users/web-flow/received_eventsjK  UserjK  uparents]}(jRK  (047cb2640b5cde4cd78944dac3eee9fe735d1ab9jjK  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/047cb2640b5cde4cd78944dac3eee9fe735d1ab9jxK  Xhttps://github.com/cBioPortal/cbioportal/commit/047cb2640b5cde4cd78944dac3eee9fe735d1ab9uastats}(totalKg	additionsKX	deletionsKufiles](}(jRK  (49d487a128ead9451607aeba6c27687dc8af03fcfilenametpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmlstatusmodifiedjK  KjK  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/18819b109ea7cdcb4ad54e526332806d00cabdf1/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/18819b109ea7cdcb4ad54e526332806d00cabdf1/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=18819b109ea7cdcb4ad54e526332806d00cabdf1patchXH  @@ -122,8 +122,7 @@
                             </if>
                         </trim>
                     </foreach>
-                </foreach>
-                )
+                </foreach>                
             </if>
             <!-- ... extend for other elements of the StudyViewFilter object -->
         </trim>u}(jRK  (b8862780fccd750d01e4e384e9ec7b82d621d6c2jK  persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepositoryTest.javajK  modifiedjK  KDjK  K
jK  KQjK  https://github.com/cBioPortal/cbioportal/blob/18819b109ea7cdcb4ad54e526332806d00cabdf1/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javajK  https://github.com/cBioPortal/cbioportal/raw/18819b109ea7cdcb4ad54e526332806d00cabdf1/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javajK  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.java?ref=18819b109ea7cdcb4ad54e526332806d00cabdf1jK  X  @@ -2,6 +2,8 @@
 
 import org.cbioportal.model.AlterationCountByGene;
 import org.cbioportal.model.Sample;
+import org.cbioportal.webparam.ClinicalDataFilter;
+import org.cbioportal.webparam.DataFilterValue;
 import org.cbioportal.webparam.StudyViewFilter;
 import org.junit.Assert;
 import org.junit.Test;
@@ -11,8 +13,10 @@
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
-import java.util.ArrayList;
-import java.util.List;
+import java.math.BigDecimal;
+import java.util.*;
+import java.util.function.Function;
+import java.util.stream.Collectors;
 
 @RunWith(SpringJUnit4ClassRunner.class)
 @ContextConfiguration("/testContextDatabaseClickhouse.xml")
@@ -24,26 +28,77 @@ public class StudyViewMyBatisRepositoryTest {
 
     @Test
     public void getFilteredSamples() {
-        StudyViewFilter studyViewFilter = new StudyViewFilter();
-
-        List<String> studyIds = new ArrayList<>();
-        studyIds.add("msk_ch_2020");
-        studyViewFilter.setStudyIds(studyIds);
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(new String[]{"msk_ch_2020", "msk_impact_2017"}, null);
         
+        // test total number of samples
         List<Sample> samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter);
-        Assert.assertEquals(3, samples.size());
+        Assert.assertEquals(11, samples.size());
+        
+        // test sample numerical clinical attributes
+        studyViewFilter = generateStudyViewFilter(
+            new String[]{"msk_impact_2017"},
+            Collections.singletonList(
+                generateNumericalClinicalDataFilter("TUMOR_PURITY", new String[]{"20-35"})
+            )
+        );
+
+        samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter);
+        Assert.assertEquals(2, samples.size());
     }
 
     @Test
     public void getMutatedGenes() {
-        StudyViewFilter studyViewFilter = new StudyViewFilter();
-
-        List<String> studyIds = new ArrayList<>();
-        studyIds.add("msk_ch_2020");
-        studyViewFilter.setStudyIds(studyIds);
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(new String[]{"msk_ch_2020"}, null);
 
         List<AlterationCountByGene> mutations = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter);
         Assert.assertEquals(2, mutations.size());
     }
 
+    
+    private StudyViewFilter generateStudyViewFilter(
+        String[] studyIds,
+        List<ClinicalDataFilter> clinicalDataFilters
+    ) {
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(studyIds));
+        studyViewFilter.setClinicalDataFilters(clinicalDataFilters);
+        
+        return studyViewFilter;
+    }
+    
+    private ClinicalDataFilter generateCategoricalClinicalDataFilter(String attributeId, String[] values) {
+        return generateClinicalDataFilter(attributeId, values, mapCategoricalValues);
+    }
+
+    private ClinicalDataFilter generateNumericalClinicalDataFilter(String attributeId, String[] values) {
+        return generateClinicalDataFilter(attributeId, values, mapNumericalValues);
+    }
+
+    private ClinicalDataFilter generateClinicalDataFilter(String attributeId, String[] values, Function<String, DataFilterValue> mapper) {
+        ClinicalDataFilter clinicalDataFilter = new ClinicalDataFilter();
+        List<DataFilterValue> dataFilterValues = Arrays.stream(values).map(mapper).collect(Collectors.toList());
+
+        clinicalDataFilter.setValues(dataFilterValues);
+        clinicalDataFilter.setAttributeId(attributeId);
+
+        return clinicalDataFilter;
+    }
+    
+    private final Function<String, DataFilterValue> mapCategoricalValues = v -> {
+        DataFilterValue dataFilterValue = new DataFilterValue();
+        dataFilterValue.setValue(v);
+        return dataFilterValue;
+    };
+    
+    private final Function<String, DataFilterValue> mapNumericalValues = v -> {
+        DataFilterValue dataFilterValue = new DataFilterValue();
+
+        String[] parts = v.split("-");
+        long start = Long.parseLong(parts[0]);
+        long end = parts.length > 1 ? Long.parseLong(parts[1]) : start;
+        dataFilterValue.setStart(BigDecimal.valueOf(start));
+        dataFilterValue.setEnd(BigDecimal.valueOf(end));
+        
+        return dataFilterValue;
+    };
 }
\ No newline at end of fileu}(jRK  (f5f5add90d24e823c16653d17e6d1c8358bbc722jK  Hpersistence/persistence-mybatis/src/test/resources/clickhouseTestSql.sqljK  modifiedjK  KjK  K jK  KjK  https://github.com/cBioPortal/cbioportal/blob/18819b109ea7cdcb4ad54e526332806d00cabdf1/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseTestSql.sqljK  https://github.com/cBioPortal/cbioportal/raw/18819b109ea7cdcb4ad54e526332806d00cabdf1/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseTestSql.sqljK  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseTestSql.sql?ref=18819b109ea7cdcb4ad54e526332806d00cabdf1jK  X  @@ -8,9 +8,28 @@ INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_nam
 INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000023', 'TIME_FROM_DX_TO_SEQ', 245, 'msk_ch_2020');
 INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000023', 'TIME_TO_BLOOD_DRAW_FROM_TX', 166, 'msk_ch_2020');
 
+INSERT INTO sample_clinical_attribute_numeric (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_impact_2017_P-0012622', 'msk_impact_2017_P-0000004-T01-IM3', 'TUMOR_PURITY', 50, 'msk_impact_2017');
+INSERT INTO sample_clinical_attribute_numeric (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_impact_2017_P-0012622', 'msk_impact_2017_P-0000015-T01-IM3', 'TUMOR_PURITY', 40, 'msk_impact_2017');
+INSERT INTO sample_clinical_attribute_numeric (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_impact_2017_P-0012622', 'msk_impact_2017_P-0000023-T01-IM3', 'TUMOR_PURITY', 30, 'msk_impact_2017');
+INSERT INTO sample_clinical_attribute_numeric (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_impact_2017_P-0012622', 'msk_impact_2017_P-0000024-T01-IM3', 'TUMOR_PURITY', 40, 'msk_impact_2017');
+INSERT INTO sample_clinical_attribute_numeric (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_impact_2017_P-0012622', 'msk_impact_2017_P-0000025-T02-IM5', 'TUMOR_PURITY', 30, 'msk_impact_2017');
+INSERT INTO sample_clinical_attribute_numeric (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_impact_2017_P-0012622', 'msk_impact_2017_P-0000026-T01-IM3', 'TUMOR_PURITY', 10, 'msk_impact_2017');
+INSERT INTO sample_clinical_attribute_numeric (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_impact_2017_P-0012622', 'msk_impact_2017_P-0000030-T01-IM3', 'TUMOR_PURITY', 40, 'msk_impact_2017');
+INSERT INTO sample_clinical_attribute_numeric (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_impact_2017_P-0012622', 'msk_impact_2017_P-0000034-T01-IM3', 'TUMOR_PURITY', 40, 'msk_impact_2017');
+
 INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000004-N01', '', 'P-0000004-N01', 'msk_ch_2020_P-0000004', '', 'P-0000004', 'msk_ch_2020');
 INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000015-N01', '', 'P-0000015-N01', 'msk_ch_2020_P-0000015', '', 'P-0000015', 'msk_ch_2020');
 INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000023-N01', '', 'P-0000023-N01', 'msk_ch_2020_P-0000023', '', 'P-0000023', 'msk_ch_2020');
+
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_impact_2017_P-0000004-T01-IM3', '', 'P-0000004-T01-IM3', 'msk_impact_2017_P-0012622', '', 'P-0012622', 'msk_impact_2017');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_impact_2017_P-0000015-T01-IM3', '', 'P-0000015-T01-IM3', 'msk_impact_2017_P-0012622', '', 'P-0012622', 'msk_impact_2017');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_impact_2017_P-0000023-T01-IM3', '', 'P-0000023-T01-IM3', 'msk_impact_2017_P-0012622', '', 'P-0012622', 'msk_impact_2017');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_impact_2017_P-0000024-T01-IM3', '', 'P-0000024-T01-IM3', 'msk_impact_2017_P-0012622', '', 'P-0012622', 'msk_impact_2017');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_impact_2017_P-0000025-T02-IM5', '', 'P-0000025-T02-IM5', 'msk_impact_2017_P-0012622', '', 'P-0012622', 'msk_impact_2017');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_impact_2017_P-0000026-T01-IM3', '', 'P-0000026-T01-IM3', 'msk_impact_2017_P-0012622', '', 'P-0012622', 'msk_impact_2017');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_impact_2017_P-0000030-T01-IM3', '', 'P-0000030-T01-IM3', 'msk_impact_2017_P-0012622', '', 'P-0012622', 'msk_impact_2017');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_impact_2017_P-0000034-T01-IM3', '', 'P-0000034-T01-IM3', 'msk_impact_2017_P-0012622', '', 'P-0012622', 'msk_impact_2017');
+
 -- 
 INSERT INTO genomic_event (sample_unique_id, variant, hugo_gene_symbol, gene_panel_stable_id, cancer_study_identifier, genetic_profile_stable_id) VALUES ('msk_ch_2020_P-0000004-N01', 'p.R1051Q', 'KDR', '', 'msk_ch_2020', 'msk_ch_2020_mutations');
 INSERT INTO genomic_event (sample_unique_id, variant, hugo_gene_symbol, gene_panel_stable_id, cancer_study_identifier, genetic_profile_stable_id) VALUES ('msk_ch_2020_P-0000004-N01', 'p.T1884I', 'TET2', '', 'msk_ch_2020', 'msk_ch_2020_mutations');ueu(731bd621429536b2c9c10751007c46f5c06d79c5}(sha(731bd621429536b2c9c10751007c46f5c06d79c5node_idEC_kwDOAe-hB9oAKDczMWJkNjIxNDI5NTM2YjJjOWMxMDc1MTAwN2M0NmY1YzA2ZDc5YzUcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-01T14:58:19Zu	committer}(jK  GitHubjK  noreply@github.comjK  2023-08-01T14:58:19ZumessagerMerge pull request #10305 from dippindots/catch-redis-error

Allow Redis service unavailable when Redis is enabledtree}(jK  (0d67edd90b5290c65b752ec385b61bfe29497c2furlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/0d67edd90b5290c65b752ec385b61bfe29497c2fujK  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/731bd621429536b2c9c10751007c46f5c06d79c5
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkyR2LCRBK7hj4Ov3rIwAAhVMIAIJExAgZvWdGJc8TGKSoHcKi
QN9yOPU70KF91RHQbgnjwsogIyVYtYSYGtDyA2iLTfn44mCRZZHQi7nO+MTTaS3h
I3NBop52OfK1iZRJM6d2LMXMinFtxgKP7E/I7r6QV7Jj5djz+Pa7uBGr4/0AVs77
CXnjnrfjD+31wFRXjS2HM9ESSkDqpFXm12GIfOUPiaSMir40GGcc5IfqYAIAoZUO
JiCmnLxrFcgadc3dv8dFydMMt7deowD/xhTLfqzG5nhGcJ3wfF/xY2YFlP0WHTOR
xbDbSIk0Dd/4l5gyr/s0cYKtEJp+M2MP3x5S6ogkQWKDNaiGi849B2QMILcIq1Y=
=PiMh
-----END PGP SIGNATURE-----
payloadX  tree 0d67edd90b5290c65b752ec385b61bfe29497c2f
parent 70f459760dd6a22b794a47b2d33eeea2b35587e6
parent dbee06e6f0877ed5030d2ba208753f7955877916
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1690901899 -0400
committer GitHub <noreply@github.com> 1690901899 -0400

Merge pull request #10305 from dippindots/catch-redis-error

Allow Redis service unavailable when Redis is enableduujK  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/731bd621429536b2c9c10751007c46f5c06d79c5html_urlXhttps://github.com/cBioPortal/cbioportal/commit/731bd621429536b2c9c10751007c46f5c06d79c5comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/731bd621429536b2c9c10751007c46f5c06d79c5/commentsjK  }(login
dippindotsidJtO jK  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5jK  'https://api.github.com/users/dippindotsjK  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminujK  }(jL  web-flowjL  J/jK  MDQ6VXNlcjE5ODY0NDQ3jL  4https://avatars.githubusercontent.com/u/19864447?v=4j
L  h5jK  %https://api.github.com/users/web-flowjK  https://github.com/web-flowj
L  /https://api.github.com/users/web-flow/followersjL  <https://api.github.com/users/web-flow/following{/other_user}jL  5https://api.github.com/users/web-flow/gists{/gist_id}jL  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jL  3https://api.github.com/users/web-flow/subscriptionsjL  *https://api.github.com/users/web-flow/orgsjL  +https://api.github.com/users/web-flow/reposjL  6https://api.github.com/users/web-flow/events{/privacy}jL  5https://api.github.com/users/web-flow/received_eventsjL  Userj!L  uparents](}(jK  (70f459760dd6a22b794a47b2d33eeea2b35587e6jK  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/70f459760dd6a22b794a47b2d33eeea2b35587e6jK  Xhttps://github.com/cBioPortal/cbioportal/commit/70f459760dd6a22b794a47b2d33eeea2b35587e6u}(jK  (dbee06e6f0877ed5030d2ba208753f7955877916jK  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/dbee06e6f0877ed5030d2ba208753f7955877916jK  Xhttps://github.com/cBioPortal/cbioportal/commit/dbee06e6f0877ed5030d2ba208753f7955877916uestats}(totalK3	additionsK3	deletionsK ufiles](}(jK  (2da81e8787c9c0aa846a08dfa3d2fa80a233ee13filename\persistence/persistence-api/src/main/java/org/cbioportal/persistence/config/RedisConfig.javastatusmodified      j?L  Kj@L  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/731bd621429536b2c9c10751007c46f5c06d79c5/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fconfig%2FRedisConfig.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/731bd621429536b2c9c10751007c46f5c06d79c5/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fconfig%2FRedisConfig.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fconfig%2FRedisConfig.java?ref=731bd621429536b2c9c10751007c46f5c06d79c5patchX  @@ -2,14 +2,17 @@
 
 import org.cbioportal.persistence.util.CustomKeyGenerator;
 import org.cbioportal.persistence.util.CustomRedisCachingProvider;
+import org.cbioportal.persistence.util.LoggingCacheErrorHandler;
 import org.cbioportal.utils.config.annotation.ConditionalOnProperty;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cache.CacheManager;
 import org.springframework.cache.annotation.CachingConfigurerSupport;
 import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.cache.interceptor.CacheErrorHandler;
 import org.springframework.cache.interceptor.CacheResolver;
 import org.springframework.cache.interceptor.KeyGenerator;
 import org.springframework.cache.interceptor.NamedCacheResolver;
+
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 
@@ -29,6 +32,11 @@ public CacheManager cacheManager() {
         );
     }
 
+    @Override
+    public CacheErrorHandler errorHandler() {
+        return new LoggingCacheErrorHandler();
+    }
+
     @Bean
     @Override
     public KeyGenerator keyGenerator() {u}(jK  (a682c568dca5e0286e1f79b19b80f118f35d3316jEL  gpersistence/persistence-api/src/main/java/org/cbioportal/persistence/util/LoggingCacheErrorHandler.javajGL  addedj?L  K+j@L  K jIL  K+jJL  https://github.com/cBioPortal/cbioportal/blob/731bd621429536b2c9c10751007c46f5c06d79c5/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Futil%2FLoggingCacheErrorHandler.javajLL  https://github.com/cBioPortal/cbioportal/raw/731bd621429536b2c9c10751007c46f5c06d79c5/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Futil%2FLoggingCacheErrorHandler.javajNL  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Futil%2FLoggingCacheErrorHandler.java?ref=731bd621429536b2c9c10751007c46f5c06d79c5jPL  X  @@ -0,0 +1,43 @@
+package org.cbioportal.persistence.util;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.cache.Cache;
+import org.springframework.cache.interceptor.CacheErrorHandler;
+
+/**
+ * Implementation of org.springframework.cache.interceptor.CacheErrorHandler
+ * that logs the error messages when performing Redis operations.
+ * Redis will throw a RuntimeException causing our APIs to return HTTP 500 responses, so we defined
+ * this class to just log the errors and allow our app fallback to the non-cached version.
+ */
+
+public class LoggingCacheErrorHandler implements CacheErrorHandler {
+
+    private static final Logger LOG = LoggerFactory.getLogger(LoggingCacheErrorHandler.class);
+
+    @Override
+    public void handleCacheGetError(RuntimeException exception, Cache cache, Object key) {
+        LOG.error(String.format("Cache '%s' failed to get entry with key '%s'", cache.getName(), key), exception);
+        LOG.error(String.format("Cache error message: '%s'", exception.getMessage()));
+    }
+
+    @Override
+    public void handleCachePutError(RuntimeException exception, Cache cache, Object key, Object value) {
+        LOG.error(String.format("Cache '%s' failed to put entry with key '%s'", cache.getName(), key), exception);
+        LOG.error(String.format("Cache error message: '%s'", exception.getMessage()));
+    }
+
+    @Override
+    public void handleCacheEvictError(RuntimeException exception, Cache cache, Object key) {
+        LOG.error(String.format("Cache '%s' failed to evict entry with key '%s'", cache.getName(), key), exception);
+        LOG.error(String.format("Cache error message: '%s'", exception.getMessage()));
+    }
+
+    @Override
+    public void handleCacheClearError(RuntimeException exception, Cache cache) {
+        LOG.error(String.format("Cache '%s' failed to clear entries", cache.getName()), exception);
+        LOG.error(String.format("Cache error message: '%s'", exception.getMessage()));
+    }
+
+}ueu(5b51b70049aa3aaaa555eebba577505bb92d3993}(sha(5b51b70049aa3aaaa555eebba577505bb92d3993node_idEC_kwDOAe-hB9oAKDViNTFiNzAwNDlhYTNhYWFhNTU1ZWViYmE1Nzc1MDViYjkyZDM5OTMcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-06-28T14:39:59Zu	committer}(jdL  GitHubjfL  noreply@github.comjhL  2023-06-28T14:39:59ZumessageFrontend v5.3.13tree}(j\L  (95a11a46970dceecfdec51eb4462965784e6c8d2urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/95a11a46970dceecfdec51eb4462965784e6c8d2ujtL  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/5b51b70049aa3aaaa555eebba577505bb92d3993
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJknEY/CRBK7hj4Ov3rIwAA6r4IAD1s2PirYwoBuq0FjX24rdOE
nde61ln7zZutI3S7tOx0YKA5U+MAGgmjx9YCYM/Um1pFSF41Leu/hXNfqkVCEMnh
NbxnbIKygVsYyrvgRWdJUtbjF1C1iJZPZoTNmqJQhzk2JQNJbn/vwTvYVZqN9OaI
Z/FE06miZy/NQmbboCljic5sxG/zZRUyiqtqHJenfC5JkV9zGEAT4hn9jF8B9QUm
g+m+tS/kkpZmrdwBtIM5UFBYkZo4QeNnVR4S2dhpEHXYgXRJGW13NL2FpppiC3vz
Jh3Lxj+Vv7HrPHWq8Y/tShhZ2oXDRB4WfW3NJFeif/7d9DxaPc5EuaClvwHF6RU=
=6io0
-----END PGP SIGNATURE-----
payloadtree 95a11a46970dceecfdec51eb4462965784e6c8d2
parent 670337a1e3c1655561947d10beac9aa551318e6a
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1687963199 -0400
committer GitHub <noreply@github.com> 1687963199 -0400

Frontend v5.3.13uujtL  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/5b51b70049aa3aaaa555eebba577505bb92d3993html_urlXhttps://github.com/cBioPortal/cbioportal/commit/5b51b70049aa3aaaa555eebba577505bb92d3993comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/5b51b70049aa3aaaa555eebba577505bb92d3993/commentsjbL  }(login
dippindotsidJtO j^L  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5jtL  'https://api.github.com/users/dippindotsjL  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminujjL  }(jL  web-flowjL  J/j^L  MDQ6VXNlcjE5ODY0NDQ3jL  4https://avatars.githubusercontent.com/u/19864447?v=4jL  h5jtL  %https://api.github.com/users/web-flowjL  https://github.com/web-flowjL  /https://api.github.com/users/web-flow/followersjL  <https://api.github.com/users/web-flow/following{/other_user}jL  5https://api.github.com/users/web-flow/gists{/gist_id}jL  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jL  3https://api.github.com/users/web-flow/subscriptionsjL  *https://api.github.com/users/web-flow/orgsjL  +https://api.github.com/users/web-flow/reposjL  6https://api.github.com/users/web-flow/events{/privacy}jL  5https://api.github.com/users/web-flow/received_eventsjL  UserjL  uparents]}(j\L  (670337a1e3c1655561947d10beac9aa551318e6ajtL  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/670337a1e3c1655561947d10beac9aa551318e6ajL  Xhttps://github.com/cBioPortal/cbioportal/commit/670337a1e3c1655561947d10beac9aa551318e6auastats}(totalK	additionsK	deletionsKufiles]}(j\L  (56c2b78fed7d102a4b1ef778466b813e0963bbfefilenamepom.xmlstatusmodifiedjL  KjL  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/5b51b70049aa3aaaa555eebba577505bb92d3993/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/5b51b70049aa3aaaa555eebba577505bb92d3993/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=5b51b70049aa3aaaa555eebba577505bb92d3993patchXY  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.12</frontend.version>
+    <frontend.version>v5.3.13</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(dbf43585e403ac393ec1d69fe2e24353ae61bc04}(sha(dbf43585e403ac393ec1d69fe2e24353ae61bc04node_idEC_kwDOAe-hB9oAKGRiZjQzNTg1ZTQwM2FjMzkzZWMxZDY5ZmUyZTI0MzUzYWU2MWJjMDQcommit}(author}(namehaynescdemailhaynescd@chop.edudate2023-07-05T14:04:01Zu	committer}(jL  haynescdjL  haynescd@chop.edujL  2023-07-05T14:04:01Zumessage=Update Studyview Filter to abstract common clinicalDataFiltertree}(jL  (895671e5d5dd3e608714ca2ecedf80499cbf8158urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/895671e5d5dd3e608714ca2ecedf80499cbf8158ujL  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/dbf43585e403ac393ec1d69fe2e24353ae61bc04
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujL  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/dbf43585e403ac393ec1d69fe2e24353ae61bc04html_urlXhttps://github.com/cBioPortal/cbioportal/commit/dbf43585e403ac393ec1d69fe2e24353ae61bc04comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/dbf43585e403ac393ec1d69fe2e24353ae61bc04/commentsjL  }(loginhaynescdidJ jL  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5jL  %https://api.github.com/users/haynescdjL  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminujL  }(jL  haynescdjL  J jL  MDQ6VXNlcjMzNjA4OTIwj M  4https://avatars.githubusercontent.com/u/33608920?v=4jM  h5jL  %https://api.github.com/users/haynescdjL  https://github.com/haynescdjM  /https://api.github.com/users/haynescd/followersjM  <https://api.github.com/users/haynescd/following{/other_user}j	M  5https://api.github.com/users/haynescd/gists{/gist_id}jM  <https://api.github.com/users/haynescd/starred{/owner}{/repo}j
M  3https://api.github.com/users/haynescd/subscriptionsjM  *https://api.github.com/users/haynescd/orgsjM  +https://api.github.com/users/haynescd/reposjM  6https://api.github.com/users/haynescd/events{/privacy}jM  5https://api.github.com/users/haynescd/received_eventsjM  UserjM  uparents]}(jL  (e696f225d3c7ffd9a61d637679ada49a40573e64jL  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/e696f225d3c7ffd9a61d637679ada49a40573e64jL  Xhttps://github.com/cBioPortal/cbioportal/commit/e696f225d3c7ffd9a61d637679ada49a40573e64uastats}(totalK	additionsKO	deletionsKLufiles](}(jL  (b8993d9399138bc85af558269ae625d78c77adc7filenameppersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.javastatusmodifiedj3M  Kj4M  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/dbf43585e403ac393ec1d69fe2e24353ae61bc04/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/dbf43585e403ac393ec1d69fe2e24353ae61bc04/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.java?ref=dbf43585e403ac393ec1d69fe2e24353ae61bc04patchX"  @@ -8,8 +8,8 @@
 import java.util.List;
 
 public interface StudyViewMapper {
-    List<Sample> getFilteredSamples(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
-    List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter);
+    List<Sample> getFilteredSamples(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters);
+    List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters);
    
     List<String> getClinicalAttributeNames(String tableName);
 }u}(jL  (7c6362cad048fa7b624bc1d0666804de57113284j9M  {persistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepository.javaj;M  modifiedj3M  Kj4M  Kj=M  K
j>M  https://github.com/cBioPortal/cbioportal/blob/dbf43585e403ac393ec1d69fe2e24353ae61bc04/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.javaj@M  https://github.com/cBioPortal/cbioportal/raw/dbf43585e403ac393ec1d69fe2e24353ae61bc04/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.javajBM  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepository.java?ref=dbf43585e403ac393ec1d69fe2e24353ae61bc04jDM  X  @@ -20,12 +20,13 @@ public class StudyViewMyBatisRepository implements StudyViewRepository {
     
     @Override
     public List<Sample> getFilteredSamplesFromColumnstore(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) {
-        return studyViewMapper.getFilteredSamples(studyViewFilter, categorizedClinicalDataCountFilter);
+        
+        return studyViewMapper.getFilteredSamples(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter));
     }
     
     @Override
     public List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) {
-        return studyViewMapper.getMutatedGenes(studyViewFilter, categorizedClinicalDataCountFilter);
+        return studyViewMapper.getMutatedGenes(studyViewFilter, categorizedClinicalDataCountFilter, shouldApplyPatientIdFilters(categorizedClinicalDataCountFilter));
     }
 
     @Override
@@ -34,5 +35,8 @@ public List<String> getClinicalDataAttributeNames(ClinicalAttributeDataSource cl
         return studyViewMapper.getClinicalAttributeNames(tableName);
     }
 
-
+    private boolean shouldApplyPatientIdFilters(CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter) {
+        return categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters().isEmpty()
+            || categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters() != null && !categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters().isEmpty();
+    }
 }
\ No newline at end of fileu}(jL  (20eb9484da42948e5d4c27304e3e8aa8b158789aj9M  tpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmlj;M  modifiedj3M  KFj4M  KGj=M  Kj>M  https://github.com/cBioPortal/cbioportal/blob/dbf43585e403ac393ec1d69fe2e24353ae61bc04/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlj@M  https://github.com/cBioPortal/cbioportal/raw/dbf43585e403ac393ec1d69fe2e24353ae61bc04/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmljBM  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=dbf43585e403ac393ec1d69fe2e24353ae61bc04jDM  X(  @@ -12,10 +12,13 @@
             sample_unique_id_base64 as uniqueSampleKey,
             patient_unique_id_base64 as uniquePatientKey
         FROM sample
-        WHERE sample_unique_id IN (
-            <!-- Study View Filter-->
-            <include refid="sampleUniqueIdsFromStudyViewFilter" />
-        )
+        <where>
+            sample_unique_id IN ( <include refid="sampleUniqueIdsFromStudyViewFilter"/>)
+            
+            <if test="applyPatientIdFilters == true">
+                AND patient_unique_id IN (<include refid="patientUniqueIdsFromStudyViewFilter"/>)
+            </if>
+        </where>
         ORDER BY sample_stable_id ASC;
     </select>
 
@@ -29,9 +32,9 @@
             COUNT(DISTINCT sample_unique_id) as numberOfAlteredCases,
             COUNT(*) as totalCount
         FROM mutation
-        WHERE sample_unique_id IN (
-            <include refid="sampleUniqueIdsFromStudyViewFilter" />
-        )
+        <where>
+           sample_unique_id IN ( <include refid="sampleUniqueIdsFromStudyViewFilter"/>)
+        </where>
         GROUP BY hugo_gene_symbol
         ORDER BY totalCount DESC;
     </select>
@@ -80,85 +83,81 @@
             </if>
             <if test="categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters() != null and !categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters().isEmpty()">
                 <foreach item="clinicalDataFilter" collection="categorizedClinicalDataCountFilter.getSampleNumericalClinicalDataFilters()" open="INTERSECT" separator="INTERSECT">
-                    SELECT sample_unique_id
-                    FROM sample_clinical_attribute_numeric
-                    WHERE attribute_name = '${clinicalDataFilter.attributeId}'
-                    <foreach item="dataFilterValue" collection="clinicalDataFilter.values" open=" AND ((" separator=") OR (" close="))">
-                        <trim prefix="" prefixOverrides="AND">
-                            <if test="dataFilterValue.value eq 'NA'">
-                                AND attribute_value = -1000000
-                            </if>
-                            <choose>
-                                <when test="dataFilterValue.start == dataFilterValue.end">
-                                    AND ABS(attribute_value - ${dataFilterValue.start}) &lt; EXP(-11) 
-                                </when>
-                                <otherwise>
-                                    <if test="dataFilterValue.start != null">
-                                        AND attribute_value &gt; ${dataFilterValue.start}
-                                    </if>
-                                    <if test="dataFilterValue.end != null">
-                                        AND attribute_value &lt;= ${dataFilterValue.end}
-                                    </if>
-                                </otherwise>
-                            </choose>
-                        </trim>
-                    </foreach>
+                    <include refid="numericalClinicalDataCountFilter">
+                        <property name="unique_id" value="sample_unique_id"/>
+                        <property name="table_name" value="sample_clinical_attribute_numeric"/>
+                    </include>
                 </foreach>
             </if>
             <if test="categorizedClinicalDataCountFilter.getSampleCategoricalClinicalDataFilters() != null and !categorizedClinicalDataCountFilter.getSampleCategoricalClinicalDataFilters().isEmpty()">
                 <foreach item="clinicalDataFilter" collection="categorizedClinicalDataCountFilter.getSampleCategoricalClinicalDataFilters()" open="INTERSECT" separator="INTERSECT">
-                    SELECT sample_unique_id
-                    FROM sample_clinical_attribute_categorical
-                    WHERE attribute_name = '${clinicalDataFilter.attributeId}'
-                    <foreach item="dataFilterValue" collection="clinicalDataFilter.values" open=" AND ((" separator=") OR (" close="))">
-                        <trim prefix="" prefixOverrides="AND">
-                            AND attribute_value = '${dataFilterValue.value}'
-                        </trim>
-                    </foreach>
+                    <include refid="categoricalClinicalDataCountFilter">
+                        <property name="unique_id" value="sample_unique_id"/>
+                        <property name="table_name" value="sample_clinical_attribute_categorical"/>
+                    </include>
                 </foreach>
             </if>
+            <!-- ... extend for other elements of the StudyViewFilter object -->
+        </trim>
+    </sql>
+
+    <sql id="patientUniqueIdsFromStudyViewFilter">
+        <trim prefixOverrides="INTERSECT">
             <if test="categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters() != null and !categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters().isEmpty()">
                 <foreach item="clinicalDataFilter" collection="categorizedClinicalDataCountFilter.getPatientNumericalClinicalDataFilters()" open="INTERSECT" separator="INTERSECT">
-                    SELECT sample_unique_id
-                    FROM patient_clinical_attribute_numeric
-                    WHERE attribute_name = '${clinicalDataFilter.attributeId}'
-                    <foreach item="dataFilterValue" collection="clinicalDataFilter.values" open=" AND ((" separator=") OR (" close="))">
-                        <trim prefix="" prefixOverrides="AND">
-                            <if test="dataFilterValue.value eq 'NA'">
-                                AND attribute_value = -1000000
-                            </if>
-                            <choose>
-                                <when test="dataFilterValue.start == dataFilterValue.end">
-                                    AND ABS(attribute_value - ${dataFilterValue.start}) &lt; EXP(-11)
-                                </when>
-                                <otherwise>
-                                    <if test="dataFilterValue.start != null">
-                                        AND attribute_value &gt; ${dataFilterValue.start}
-                                    </if>
-                                    <if test="dataFilterValue.end != null">
-                                        AND attribute_value &lt;= ${dataFilterValue.end}
-                                    </if>
-                                </otherwise>
-                            </choose>
-                        </trim>
-                    </foreach>
+                    <include refid="numericalClinicalDataCountFilter">
+                        <property name="unique_id" value="patient_unique_id"/>
+                        <property name="table_name" value="patient_clinical_attribute_numeric"/>
+                    </include>
                 </foreach>
             </if>
             <if test="categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters() != null and !categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters().isEmpty()">
                 <foreach item="clinicalDataFilter" collection="categorizedClinicalDataCountFilter.getPatientCategoricalClinicalDataFilters()" open="INTERSECT" separator="INTERSECT">
-                    SELECT sample_unique_id
-                    FROM patient_clinical_attribute_categorical
-                    WHERE attribute_name = '${clinicalDataFilter.attributeId}'
-                    <foreach item="dataFilterValue" collection="clinicalDataFilter.values" open=" AND ((" separator=") OR (" close="))">
-                        <trim prefix="" prefixOverrides="AND">
-                            AND attribute_value = '${dataFilterValue.value}'
-                        </trim>
-                    </foreach>
+                    <include refid="categoricalClinicalDataCountFilter">
+                        <property name="unique_id" value="patient_unique_id"/>
+                        <property name="table_name" value="patient_clinical_attribute_categorical"/>
+                    </include>
                 </foreach>
-            </if>
-            <!-- ... extend for other elements of the StudyViewFilter object -->
+            </if> 
         </trim>
     </sql>
+   
+    <sql id="numericalClinicalDataCountFilter">
+            SELECT ${unique_id}
+            FROM ${table_name}
+            WHERE attribute_name = '${clinicalDataFilter.attributeId}'
+            <foreach item="dataFilterValue" collection="clinicalDataFilter.values" open=" AND ((" separator=") OR (" close="))">
+                <trim prefix="" prefixOverrides="AND">
+                    <if test="dataFilterValue.value eq 'NA'">
+                        AND attribute_value = -1000000
+                    </if>
+                    <choose>
+                        <when test="dataFilterValue.start == dataFilterValue.end">
+                            AND ABS(attribute_value - ${dataFilterValue.start}) &lt; EXP(-11)
+                        </when>
+                        <otherwise>
+                            <if test="dataFilterValue.start != null">
+                                AND attribute_value &gt; ${dataFilterValue.start}
+                            </if>
+                            <if test="dataFilterValue.end != null">
+                                AND attribute_value &lt;= ${dataFilterValue.end}
+                            </if>
+                        </otherwise>
+                    </choose>
+                </trim>
+            </foreach>
+
+    </sql>
+    <sql id="categoricalClinicalDataCountFilter">
+            SELECT ${unique_id}
+            FROM ${table_name}
+            WHERE attribute_name = '${clinicalDataFilter.attributeId}'
+            <foreach item="dataFilterValue" collection="clinicalDataFilter.values" open=" AND ((" separator=") OR (" close="))">
+                <trim prefix="" prefixOverrides="AND">
+                    AND attribute_value = '${dataFilterValue.value}'
+                </trim>
+            </foreach>
+    </sql>
 
     <select id="getClinicalAttributeNames" resultType="String">
         SELECTueu(65edfbb72074d3bc96b9b52130379c18225ee668}(sha(65edfbb72074d3bc96b9b52130379c18225ee668node_idEC_kwDOAe-hB9oAKDY1ZWRmYmI3MjA3NGQzYmM5NmI5YjUyMTMwMzc5YzE4MjI1ZWU2Njgcommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-07-25T14:05:29Zu	committer}(j`M  
pvannieropjbM  pim@thehyve.nljdM  2023-07-25T14:05:29ZumessageFix type

PR Review Olytree}(jXM  (5f7c54901d1646552708658170b400dd083bd32eurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/5f7c54901d1646552708658170b400dd083bd32eujpM  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/65edfbb72074d3bc96b9b52130379c18225ee668
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujpM  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/65edfbb72074d3bc96b9b52130379c18225ee668html_urlXhttps://github.com/cBioPortal/cbioportal/commit/65edfbb72074d3bc96b9b52130379c18225ee668comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/65edfbb72074d3bc96b9b52130379c18225ee668/commentsj^M  }(login
pvannieropidJa jZM  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5jpM  'https://api.github.com/users/pvannieropj|M  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminujfM  }(jM  
pvannieropjM  Ja jZM  MDQ6VXNlcjc0NTg4NQ==jM  2https://avatars.githubusercontent.com/u/745885?v=4jM  h5jpM  'https://api.github.com/users/pvannieropj|M  https://github.com/pvannieropjM  1https://api.github.com/users/pvannierop/followersjM  >https://api.github.com/users/pvannierop/following{/other_user}jM  7https://api.github.com/users/pvannierop/gists{/gist_id}jM  >https://api.github.com/users/pvannierop/starred{/owner}{/repo}jM  5https://api.github.com/users/pvannierop/subscriptionsjM  ,https://api.github.com/users/pvannierop/orgsjM  -https://api.github.com/users/pvannierop/reposjM  8https://api.github.com/users/pvannierop/events{/privacy}jM  7https://api.github.com/users/pvannierop/received_eventsjM  UserjM  uparents]}(jXM  (f332e687c1d6c03fbbdac1010f78b0077fc93647jpM  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/f332e687c1d6c03fbbdac1010f78b0077fc93647j|M  Xhttps://github.com/cBioPortal/cbioportal/commit/f332e687c1d6c03fbbdac1010f78b0077fc93647uastats}(totalK	additionsK	deletionsKufiles]}(jXM  (63ce5eea200baa4ab5b72ac5bf8ca544285ade8efilename@core/src/main/java/org/mskcc/cbio/portal/dao/JdbcDataSource.javastatusmodifiedjM  KjM  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/65edfbb72074d3bc96b9b52130379c18225ee668/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fdao%2FJdbcDataSource.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/65edfbb72074d3bc96b9b52130379c18225ee668/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fdao%2FJdbcDataSource.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fdao%2FJdbcDataSource.java?ref=65edfbb72074d3bc96b9b52130379c18225ee668patchX5  @@ -41,7 +41,7 @@ public JdbcDataSource () {
                 " Or preferably, set the 'db.connection_string' and remove 'db.host', 'db.portal_db_name' and 'db.use_ssl (best practice).");
             System.out.println("\n----------------------------------------------------------------------------------------------------------------");
             System.out.println("-- Deprecation warning:");
-            System.out.println("-- You are connection to the database using the deprecated 'db.host', 'db.portal_db_name' and 'db.use_ssl' properties.");
+            System.out.println("-- You are connecting to the database using the deprecated 'db.host', 'db.portal_db_name' and 'db.use_ssl' properties.");
             System.out.println("-- Please use the 'db.connection_string' instead (see https://docs.cbioportal.org/deployment/customization/portal.properties-reference/).");
             System.out.println("----------------------------------------------------------------------------------------------------------------\n");
             connectionURL = String.format(uau(6b5a0a2309f8814a1f8cf67205cbd7fad5248279}(sha(6b5a0a2309f8814a1f8cf67205cbd7fad5248279node_idEC_kwDOAe-hB9oAKDZiNWEwYTIzMDlmODgxNGExZjhjZjY3MjA1Y2JkN2ZhZDUyNDgyNzkcommit}(author}(name
Onur Sumeremails.onur.sumer@gmail.comdate2023-06-27T16:03:04Zu	committer}(jM  GitHubjM  noreply@github.comjM  2023-06-27T16:03:04ZumessageRevert original Study View endpoints (#10216)

* revert study view controller original endpoints and rename clickhouse endpoints

* add mybatiscolumnstore to test application contexttree}(jM  (76bc9a8f8f36169e31ad76a6efba75ba19e3b310urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/76bc9a8f8f36169e31ad76a6efba75ba19e3b310ujM  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/6b5a0a2309f8814a1f8cf67205cbd7fad5248279
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkmwg4CRBK7hj4Ov3rIwAAPYwIAI/vVtF5GBSF/Q7bnSlIj/f7
+n2JJLetlvqn4pwBsWjGV5JITjw5Owdklu86TOJHf4NvCm2N7LdQ7IpKVDDgS1st
PXyt8kX4f8nhX/p1sdNwXb1szCA3z83uqsE+c8uS4XlE2VN9TazWc/0U1ATBL5IA
HvLc9mdLl5KlHESy50m5G8812QABrVk8/wuYrdni/hdvKI/ASNmv/qT/xumBpi6Q
hZYPjXJX5WGr1Gjovl6Ow1xaDi9MxF6W84Arx/TEEeWO+B1B/DdLqn5bsomRTAHh
HSmYywyY+INFMABCdnm32QzJG4zxgtoIBB3QRG9rv2Le6ipx/Qb+N6kVBYBQm9o=
=4fVL
-----END PGP SIGNATURE-----
payloadX  tree 76bc9a8f8f36169e31ad76a6efba75ba19e3b310
parent 60a5146809b3efbe1c798ca87f004f30748dcd8b
author Onur Sumer <s.onur.sumer@gmail.com> 1687881784 -0400
committer GitHub <noreply@github.com> 1687881784 -0400

Revert original Study View endpoints (#10216)

* revert study view controller original endpoints and rename clickhouse endpoints

* add mybatiscolumnstore to test application contextuujM  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/6b5a0a2309f8814a1f8cf67205cbd7fad5248279html_urlXhttps://github.com/cBioPortal/cbioportal/commit/6b5a0a2309f8814a1f8cf67205cbd7fad5248279comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/6b5a0a2309f8814a1f8cf67205cbd7fad5248279/commentsjM  }(login	onursumeridJ6 jM  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5jM  &https://api.github.com/users/onursumerjM  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminujM  }(jM  web-flowjM  J/jM  MDQ6VXNlcjE5ODY0NDQ3jM  4https://avatars.githubusercontent.com/u/19864447?v=4jM  h5jM  %https://api.github.com/users/web-flowjM  https://github.com/web-flowjN  /https://api.github.com/users/web-flow/followersjN  <https://api.github.com/users/web-flow/following{/other_user}jN  5https://api.github.com/users/web-flow/gists{/gist_id}jN  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j	N  3https://api.github.com/users/web-flow/subscriptionsjN  *https://api.github.com/users/web-flow/orgsj
N  +https://api.github.com/users/web-flow/reposjN  6https://api.github.com/users/web-flow/events{/privacy}jN  5https://api.github.com/users/web-flow/received_eventsjN  UserjN  uparents]}(jM  (60a5146809b3efbe1c798ca87f004f30748dcd8bjM  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/60a5146809b3efbe1c798ca87f004f30748dcd8bjM  Xhttps://github.com/cBioPortal/cbioportal/commit/60a5146809b3efbe1c798ca87f004f30748dcd8buastats}(totalK.	additionsK-	deletionsKufiles](}(jM  (00830ee9241dd61eb827f69b1699d1aa63a5e581filename2core/src/test/resources/applicationContext-dao.xmlstatusmodifiedj/N  Kj0N  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/6b5a0a2309f8814a1f8cf67205cbd7fad5248279/core%2Fsrc%2Ftest%2Fresources%2FapplicationContext-dao.xmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/6b5a0a2309f8814a1f8cf67205cbd7fad5248279/core%2Fsrc%2Ftest%2Fresources%2FapplicationContext-dao.xmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fresources%2FapplicationContext-dao.xml?ref=6b5a0a2309f8814a1f8cf67205cbd7fad5248279patchX  @@ -80,7 +80,7 @@
     
     <!-- scan for mappers and let them be autowired -->
     <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
-        <property name="basePackage" value="org.mskcc.cbio.portal.persistence,org.cbioportal.persistence.mybatis" />
+        <property name="basePackage" value="org.mskcc.cbio.portal.persistence,org.cbioportal.persistence.mybatis,org.cbioportal.persistence.mybatiscolumnstore" />
     </bean>
 
     <!-- enable component scanning (beware that this does not enable mapper scanning!) -->u}(jM  (43ccd35dc6fed10857f3493f242a85773cfead5bj5N  =web/src/main/java/org/cbioportal/web/StudyViewController.javaj7N  modifiedj/N  K,j0N  K j9N  K,j:N  https://github.com/cBioPortal/cbioportal/blob/6b5a0a2309f8814a1f8cf67205cbd7fad5248279/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj<N  https://github.com/cBioPortal/cbioportal/raw/6b5a0a2309f8814a1f8cf67205cbd7fad5248279/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj>N  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=6b5a0a2309f8814a1f8cf67205cbd7fad5248279j@N  X  @@ -203,6 +203,23 @@ public ResponseEntity<List<AlterationCountByGene>> fetchMutatedGenes(
         @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
         @ApiIgnore // 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
+    ) throws StudyNotFoundException {
+        boolean singleStudyUnfiltered = studyViewFilterUtil.isSingleStudyUnfiltered(interceptedStudyViewFilter);
+        List<AlterationCountByGene> alterationCountByGenes = instance.cachedFetchMutatedGenes(interceptedStudyViewFilter, singleStudyUnfiltered);
+        return new ResponseEntity<>(alterationCountByGenes, HttpStatus.OK);
+    }
+    
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @RequestMapping(value = "/column-store/mutated-genes/fetch", method = RequestMethod.POST,
+        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch mutated genes by study view filter")
+    public ResponseEntity<List<AlterationCountByGene>> fetchMutatedGenesFromColumnStore(
+        @ApiParam(required = true, value = "Study view filter")
+        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiIgnore // 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<>(
             studyViewService.getMutatedGenesFromColumnstore(interceptedStudyViewFilter),
@@ -319,6 +336,33 @@ public ResponseEntity<List<Sample>> fetchFilteredSamples(
         @ApiParam(required = true, value = "Study view filter")
         @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter) {
 
+        List<String> studyIds = new ArrayList<>();
+        List<String> sampleIds = new ArrayList<>();
+
+        studyViewFilterUtil.extractStudyAndSampleIds(
+            studyViewFilterApplier.apply(interceptedStudyViewFilter, negateFilters), studyIds, sampleIds);
+
+        List<Sample> result = new ArrayList<>();
+        if (!sampleIds.isEmpty()) {
+            result = sampleService.fetchSamples(studyIds, sampleIds, Projection.ID.name());
+        }
+        return new ResponseEntity<>(result, HttpStatus.OK);
+    }
+
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @RequestMapping(value = "/column-store/filtered-samples/fetch", method = RequestMethod.POST,
+        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch sample IDs by study view filter")
+    public ResponseEntity<List<Sample>> fetchFilteredSamplesFromColumnStore(
+        @ApiParam("Whether to negate the study view filters")
+        @RequestParam(defaultValue = "false") Boolean negateFilters,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiIgnore // 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,
+        @ApiParam(required = true, value = "Study view filter")
+        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter) {
+
         return new ResponseEntity<>(
             studyViewService.getFilteredSamplesFromColumnstore(interceptedStudyViewFilter),
             HttpStatus.OKueu(5f8caf7e118286e9260a1d8a8739703c6e24ed40}(sha(5f8caf7e118286e9260a1d8a8739703c6e24ed40node_idEC_kwDOAe-hB9oAKDVmOGNhZjdlMTE4Mjg2ZTkyNjBhMWQ4YTg3Mzk3MDNjNmUyNGVkNDAcommit}(author}(nameKarthikemailkalletlakarthik@gmail.comdate2023-08-11T16:42:33Zu	committer}(jTN  KarthikjVN  kalletlakarthik@gmail.comjXN  2023-08-11T16:42:33ZumessageUpdate and more teststree}(jLN  (12e316e399d633bed04e52a69f476989800b23bdurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/12e316e399d633bed04e52a69f476989800b23bdujdN  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/5f8caf7e118286e9260a1d8a8739703c6e24ed40
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujdN  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/5f8caf7e118286e9260a1d8a8739703c6e24ed40html_urlXhttps://github.com/cBioPortal/cbioportal/commit/5f8caf7e118286e9260a1d8a8739703c6e24ed40comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/5f8caf7e118286e9260a1d8a8739703c6e24ed40/commentsjRN  }(login	kalletlakidJƴ jNN  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5jdN  &https://api.github.com/users/kalletlakjpN  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminujZN  }(juN  	kalletlakjwN  Jƴ jNN  MDQ6VXNlcjEyOTU2ODcwjyN  4https://avatars.githubusercontent.com/u/12956870?v=4j{N  h5jdN  &https://api.github.com/users/kalletlakjpN  https://github.com/kalletlakj~N  0https://api.github.com/users/kalletlak/followersjN  =https://api.github.com/users/kalletlak/following{/other_user}jN  6https://api.github.com/users/kalletlak/gists{/gist_id}jN  =https://api.github.com/users/kalletlak/starred{/owner}{/repo}jN  4https://api.github.com/users/kalletlak/subscriptionsjN  +https://api.github.com/users/kalletlak/orgsjN  ,https://api.github.com/users/kalletlak/reposjN  7https://api.github.com/users/kalletlak/events{/privacy}jN  6https://api.github.com/users/kalletlak/received_eventsjN  UserjN  uparents]}(jLN  (bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78jdN  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78jpN  Xhttps://github.com/cBioPortal/cbioportal/commit/bb9a48ffed4644ce5ff5b4c49ee4ff8ad3811f78uastats}(totalK	additionsK	deletionsKufiles](}(jLN  (f6905da3aecd9a5efae4893661f5722f45ab8ce6filenameCcore/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.javastatusmodifiedjN  KjN  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/5f8caf7e118286e9260a1d8a8739703c6e24ed40/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/5f8caf7e118286e9260a1d8a8739703c6e24ed40/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.java?ref=5f8caf7e118286e9260a1d8a8739703c6e24ed40patchX  @@ -369,6 +369,10 @@ public static String parseUrl(String url)
     public void setDownloadGroup(String property) { downloadGroup = property; }
 
     public static final String DEFAULT_DAT_METHOD = "none";
+
+    private static String dataAccessTokenMethod;
+    @Value("${dat.method:none}") // default is empty string
+    public void setDataAccessTokenMethod(String property) { dataAccessTokenMethod = property; }
     
     private static String tokenAccessUserRole;
     @Value("${dat.filter_user_role:}") // default is empty string
@@ -1305,7 +1309,6 @@ public static String getDownloadControl() {
 
     public static String getDataAccessTokenMethod() {
         Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
-        String dataAccessTokenMethod = getProperty("dat.method");
         
         if (authentication != null &&
             StringUtils.isNotEmpty(tokenAccessUserRole)) {u}(jLN  (e6cc09e0f37a4024b7299729965cb32b537e8545jN  Gweb/src/test/java/org/cbioportal/web/DataAccessTokenControllerTest.javajN  modifiedjN  KjN  K jN  KjN  https://github.com/cBioPortal/cbioportal/blob/5f8caf7e118286e9260a1d8a8739703c6e24ed40/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenControllerTest.javajN  https://github.com/cBioPortal/cbioportal/raw/5f8caf7e118286e9260a1d8a8739703c6e24ed40/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenControllerTest.javajN  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FDataAccessTokenControllerTest.java?ref=5f8caf7e118286e9260a1d8a8739703c6e24ed40jN  X_  @@ -268,4 +268,15 @@ public Void answer(InvocationOnMock getAllTokensInvocation) {
             Assert.fail("Unexpected argument passed to service class. Expected argument: " + MOCK_USER + " Received argument: " + receivedArgument);
         }
     }
+
+    @Test
+    public void createTokenNotLoggedIn() throws Exception {
+        ReflectionTestUtils.setField(DataAccessTokenController.class, "userRoleToAccessToken", "TEST");
+        Mockito.when(tokenService.createDataAccessToken(ArgumentMatchers.anyString())).thenReturn(MOCK_TOKEN_INFO);
+        MvcResult result = mockMvc.perform(MockMvcRequestBuilders.post("/data-access-tokens")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON))
+            .andExpect(MockMvcResultMatchers.status().isUnauthorized())
+            .andReturn();
+    }
 }ueu(6709c733e98f25dfb9966c212061ec1dafe3130e}(sha(6709c733e98f25dfb9966c212061ec1dafe3130enode_idEC_kwDOAe-hB9oAKDY3MDljNzMzZTk4ZjI1ZGZiOTk2NmMyMTIwNjFlYzFkYWZlMzEzMGUcommit}(author}(nameKarthikemailkalletlakarthik@gmail.comdate2023-07-03T04:15:09Zu	committer}(jN  KarthikjN  kalletlakarthik@gmail.comjN  2023-07-03T16:57:41Zumessage!Changes related to download grouptree}(jN  (f660fd661371de8d8fa0c727661c062d05841bd6urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/f660fd661371de8d8fa0c727661c062d05841bd6ujN  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/6709c733e98f25dfb9966c212061ec1dafe3130e
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujN  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/6709c733e98f25dfb9966c212061ec1dafe3130ehtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/6709c733e98f25dfb9966c212061ec1dafe3130ecomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/6709c733e98f25dfb9966c212061ec1dafe3130e/commentsjN  }(login	kalletlakidJƴ jN  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5jN  &https://api.github.com/users/kalletlakjN  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminujN  }(jN  	kalletlakjN  Jƴ jN  MDQ6VXNlcjEyOTU2ODcwjN  4https://avatars.githubusercontent.com/u/12956870?v=4jN  h5jN  &https://api.github.com/users/kalletlakjN  https://github.com/kalletlakjN  0https://api.github.com/users/kalletlak/followersjN  =https://api.github.com/users/kalletlak/following{/other_user}jN  6https://api.github.com/users/kalletlak/gists{/gist_id}jO  =https://api.github.com/users/kalletlak/starred{/owner}{/repo}jO  4https://api.github.com/users/kalletlak/subscriptionsjO  +https://api.github.com/users/kalletlak/orgsjO  ,https://api.github.com/users/kalletlak/reposj	O  7https://api.github.com/users/kalletlak/events{/privacy}jO  6https://api.github.com/users/kalletlak/received_eventsj
O  UserjO  uparents]}(jN  (49adca078e192f8bfde71270b47f6d4db3894e4djN  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/49adca078e192f8bfde71270b47f6d4db3894e4djN  Xhttps://github.com/cBioPortal/cbioportal/commit/49adca078e192f8bfde71270b47f6d4db3894e4duastats}(totalK	additionsK	deletionsKufiles](}(jN  (c3b7eeefda98b14826dbe12b15a932b3b6280828filenameCcore/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.javastatusmodifiedj)O  Kj*O  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/6709c733e98f25dfb9966c212061ec1dafe3130e/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/6709c733e98f25dfb9966c212061ec1dafe3130e/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.java?ref=6709c733e98f25dfb9966c212061ec1dafe3130epatchX  @@ -50,11 +50,13 @@
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.commons.lang.StringUtils;
 import org.cbioportal.security.spring.authentication.PortalUserDetails;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Component;
 import org.springframework.util.ResourceUtils;
@@ -362,6 +364,10 @@ public static String parseUrl(String url)
     @Value("${frontend.url.runtime:}") 
     public void setFrontendUrlRuntime(String property) { frontendUrlRuntime = property; }
 
+    private static String downloadGroup;
+    @Value("${download_group:}") // default is empty string
+    public void setDownloadGroup(String property) { downloadGroup = property; }
+
     private static Logger LOG = LoggerFactory.getLogger(GlobalProperties.class);
     private static ConfigPropertyResolver portalProperties = new ConfigPropertyResolver();
     private static Properties mavenProperties = initializeProperties(MAVEN_PROPERTIES_FILE_NAME);
@@ -551,6 +557,18 @@ public static String getAuthenticatedUserEmail() {
         }
     }
 
+    public static String hideDownloadControls() {
+        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+
+        if(authentication != null &&
+            StringUtils.isNotEmpty(downloadGroup) &&
+            authentication.getAuthorities().contains(new SimpleGrantedAuthority(downloadGroup))) {
+            return "false";
+        }else {
+            return getProperty("skin.hide_download_controls");
+        }
+    }
+
     public static String getAppName()
     {
         String appName = portalProperties.getProperty(APP_NAME);u}(jN  (a116aeb6d14c8a2098a5b48247dbc4fa8c9b0acdj/O  )portal/src/main/webapp/config_service.jspj1O  modifiedj)O  Kj*O  Kj3O  Kj4O  https://github.com/cBioPortal/cbioportal/blob/6709c733e98f25dfb9966c212061ec1dafe3130e/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj6O  https://github.com/cBioPortal/cbioportal/raw/6709c733e98f25dfb9966c212061ec1dafe3130e/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj8O  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=6709c733e98f25dfb9966c212061ec1dafe3130ej:O  X  @@ -146,7 +146,6 @@
             "skin.patient_view.copy_number_table.columns.show_on_init",
             "skin.patient_view.structural_variant_table.columns.show_on_init",
             "comparison.categorical_na_values",
-            "skin.hide_download_controls",
             "study_download_url",
             "skin.home_page.show_reference_genome"
         };
@@ -203,6 +202,8 @@
         obj.put("oncoKbTokenDefined", !StringUtils.isEmpty(GlobalProperties.getOncoKbToken()));
 
         obj.put("sessionServiceEnabled", !StringUtils.isEmpty(GlobalProperties.getSessionServiceUrl()));
+        
+        obj.put("skin_hide_download_controls", GlobalProperties.hideDownloadControls());
 
         out.println(obj.toJSONString());
 u}(jN  (5e292fb2dae5be9035542c4feeca195e779d2a08j/O  ,src/main/resources/portal.properties.EXAMPLEj1O  modifiedj)O  Kj*O  Kj3O  Kj4O  https://github.com/cBioPortal/cbioportal/blob/6709c733e98f25dfb9966c212061ec1dafe3130e/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj6O  https://github.com/cBioPortal/cbioportal/raw/6709c733e98f25dfb9966c212061ec1dafe3130e/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj8O  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=6709c733e98f25dfb9966c212061ec1dafe3130ej:O  X-  @@ -433,4 +433,6 @@ persistence.cache_type=no-cache
 
 # Set StudyDownloadLinkUrl
 # Allows download links within DataSets Tab (See Portal.Properties documentation for more info)
-# study_download_url=
\ No newline at end of file
+# study_download_url=
+
+# download_group=
\ No newline at end of fileueu(d035bb17653da699592fd650682c3ef35db16fcc}(sha(d035bb17653da699592fd650682c3ef35db16fccnode_idEC_kwDOAe-hB9oAKGQwMzViYjE3NjUzZGE2OTk1OTJmZDY1MDY4MmMzZWYzNWRiMTZmY2Mcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-03T16:27:33Zu	committer}(jVO  GitHubjXO  noreply@github.comjZO  2023-08-03T16:27:33ZumessageUpdate two-sided fisher tests news (#10312)

* Add two-sided fisher tests news

---------

Co-authored-by: Ino de Bruijn <ino@ino.bio>tree}(jNO  (c13bbaddb9f4f62f36005e51ccc43bb318744c87urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c13bbaddb9f4f62f36005e51ccc43bb318744c87ujfO  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/d035bb17653da699592fd650682c3ef35db16fcc
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJky9V1CRBK7hj4Ov3rIwAATrEIAEd2TF5RfZaymt3Gu7oAg1ES
rrNpf8MtblFzQbMv/xrinM+PqRBZ9/ANUnjrGZ8XrPzLtSJKWwuF2tO2COXNajc+
TKAj9tbs36b/mi+QckGn0RpDnfRkjw5CUvfzABG7oSpcQJZzQ5ejnD1Zi1VEoPoQ
36oCRhunsJ621GzYKILy5WElqOqJlp1ordLxw9RmKZuhVuhEopz64aQW7EH1EWOG
wUhWYheWvMZx0vBOkNP852a2RdXnQ1DNrH2ZsyjBscgxXWYXc5aBu0OMUbqRQ1fx
kUKq0g1LM9ZqABLw44tI4EeVQi5YCszdeAowqr5x/HkqSiM4w7PVvdhyMSLi5Gs=
=V+SX
-----END PGP SIGNATURE-----
payloadXs  tree c13bbaddb9f4f62f36005e51ccc43bb318744c87
parent 58a9cbe48c327c00913673471442986a42422241
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1691080053 -0400
committer GitHub <noreply@github.com> 1691080053 -0400

Update two-sided fisher tests news (#10312)

* Add two-sided fisher tests news

---------

Co-authored-by: Ino de Bruijn <ino@ino.bio>uujfO  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d035bb17653da699592fd650682c3ef35db16fcchtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/d035bb17653da699592fd650682c3ef35db16fcccomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/d035bb17653da699592fd650682c3ef35db16fcc/commentsjTO  }(login
dippindotsidJtO jPO  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5jfO  'https://api.github.com/users/dippindotsjtO  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj\O  }(jyO  web-flowj{O  J/jPO  MDQ6VXNlcjE5ODY0NDQ3j}O  4https://avatars.githubusercontent.com/u/19864447?v=4jO  h5jfO  %https://api.github.com/users/web-flowjtO  https://github.com/web-flowjO  /https://api.github.com/users/web-flow/followersjO  <https://api.github.com/users/web-flow/following{/other_user}jO  5https://api.github.com/users/web-flow/gists{/gist_id}jO  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jO  3https://api.github.com/users/web-flow/subscriptionsjO  *https://api.github.com/users/web-flow/orgsjO  +https://api.github.com/users/web-flow/reposjO  6https://api.github.com/users/web-flow/events{/privacy}jO  5https://api.github.com/users/web-flow/received_eventsjO  UserjO  uparents]}(jNO  (58a9cbe48c327c00913673471442986a42422241jfO  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/58a9cbe48c327c00913673471442986a42422241jtO  Xhttps://github.com/cBioPortal/cbioportal/commit/58a9cbe48c327c00913673471442986a42422241uastats}(totalK	additionsK	deletionsK ufiles]}(jNO  (257defa35dd967cc83d1841e8d9765e215f70e65filenamedocs/News.mdstatusmodifiedjO  KjO  K changesKblob_urlehttps://github.com/cBioPortal/cbioportal/blob/d035bb17653da699592fd650682c3ef35db16fcc/docs%2FNews.mdraw_urldhttps://github.com/cBioPortal/cbioportal/raw/d035bb17653da699592fd650682c3ef35db16fcc/docs%2FNews.mdcontents_urlwhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FNews.md?ref=d035bb17653da699592fd650682c3ef35db16fccpatchX  @@ -1,3 +1,14 @@
+## Aug 1, 2023
+*   **Enhancement**: One-sided Fisher's exact tests were changed to be two-sided. The affected pages are:
+    *    Results View Page - Mutual Exclusivity Tab
+    *    Results View Page - Comparison Tab - Genomic Alterations Tab
+    *    Comparison Page - Genomic Alterations Tab
+    *    Comparison Page - Mutations Tab
+    
+    Please note that the Mutations tab on the Comparison page is a recent feature and was introduced with the two-sided Fisher's exact test already implemented.
+
+    Several users pointed out that using a one-sided test was incorrect for these comparisons. Please see discussions [here](https://github.com/cBioPortal/cbioportal/issues/9943) for more information.
+
 ## May 2, 2023
 *   **New Feature**: The mutations tab now shows variant annotations from the [repository of Variant with Unexpected Effects (reVUE)](https://www.cancerrevue.org/).
     <img src="https://user-images.githubusercontent.com/16869603/234271379-6a0876ea-8477-426e-a0e4-5e0b0b66aef9.gif" width="700" />uau(dc487c2831b6152397ab9be6baded7b2264369eb}(sha(dc487c2831b6152397ab9be6baded7b2264369ebnode_idEC_kwDOAe-hB9oAKGRjNDg3YzI4MzFiNjE1MjM5N2FiOWJlNmJhZGVkN2IyMjY0MzY5ZWIcommit}(author}(nameKarthikemailkalletlakarthik@gmail.comdate2023-07-12T15:28:04Zu	committer}(jO  KarthikjO  kalletlakarthik@gmail.comjO  2023-07-12T15:28:04ZumessageAdd more tests and commentstree}(jO  (7b5592aa395cf40b4548b736c9771c78caee0ef9urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/7b5592aa395cf40b4548b736c9771c78caee0ef9ujO  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/dc487c2831b6152397ab9be6baded7b2264369eb
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujO  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/dc487c2831b6152397ab9be6baded7b2264369ebhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/dc487c2831b6152397ab9be6baded7b2264369ebcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/dc487c2831b6152397ab9be6baded7b2264369eb/commentsjO  }(login	kalletlakidJƴ jO  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5jO  &https://api.github.com/users/kalletlakjO  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos     
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminujO  }(jO  	kalletlakjO  Jƴ jO  MDQ6VXNlcjEyOTU2ODcwjO  4https://avatars.githubusercontent.com/u/12956870?v=4jO  h5jO  &https://api.github.com/users/kalletlakjO  https://github.com/kalletlakjO  0https://api.github.com/users/kalletlak/followersjO  =https://api.github.com/users/kalletlak/following{/other_user}jO  6https://api.github.com/users/kalletlak/gists{/gist_id}jO  =https://api.github.com/users/kalletlak/starred{/owner}{/repo}jO  4https://api.github.com/users/kalletlak/subscriptionsjP  +https://api.github.com/users/kalletlak/orgsjP  ,https://api.github.com/users/kalletlak/reposjP  7https://api.github.com/users/kalletlak/events{/privacy}jP  6https://api.github.com/users/kalletlak/received_eventsj	P  UserjP  uparents]}(jO  (fcac80a9b0b0ad5026e0535d022051f4c057947ajO  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/fcac80a9b0b0ad5026e0535d022051f4c057947ajO  Xhttps://github.com/cBioPortal/cbioportal/commit/fcac80a9b0b0ad5026e0535d022051f4c057947auastats}(totalK!	additionsK	deletionsK
ufiles](}(jO  (e61e23cb8074ac5fdf46548fa33505965d089f72filenametpersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/TreatmentMyBatisRepositoryTest.javastatusmodifiedj%P  K
j&P  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/dc487c2831b6152397ab9be6baded7b2264369eb/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepositoryTest.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/dc487c2831b6152397ab9be6baded7b2264369eb/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepositoryTest.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepositoryTest.java?ref=dc487c2831b6152397ab9be6baded7b2264369ebpatchX  @@ -135,16 +135,19 @@ public void getShallowSamplesByPatientId() {
 
     @Test
     public void hasTreatmentData() {
-        Boolean actual = treatmentRepository.hasTreatmentData(Collections.singletonList("study_tcga_pub"), ClinicalEventKeyCode.Agent);
-        
-        Assert.assertEquals(actual, true);
+
+        Assert.assertEquals(true, treatmentRepository.hasTreatmentData(Collections.singletonList("study_tcga_pub"), ClinicalEventKeyCode.Agent));
+
+        Assert.assertEquals(false, treatmentRepository.hasTreatmentData(Collections.singletonList("acc_tcga"), ClinicalEventKeyCode.Agent));
+
     }
 
     @Test
-    public void getSampleCount() {
-        Boolean actual = treatmentRepository.hasSampleTimelineData(Collections.singletonList("study_tcga_pub"));
-        
-        Assert.assertEquals(actual, true);
+    public void hasSampleTimelineData() {
+
+        Assert.assertEquals(true, treatmentRepository.hasSampleTimelineData(Collections.singletonList("study_tcga_pub")));
+
+        Assert.assertEquals(false, treatmentRepository.hasSampleTimelineData(Collections.singletonList("acc_tcga")));
     }
     
 }
\ No newline at end of fileu}(jO  (75784a01c150196e8496cfbec4e9e15e064817dej+P  Kservice/src/main/java/org/cbioportal/service/impl/TreatmentServiceImpl.javaj-P  modifiedj%P  K
j&P  Kj/P  Kj0P  https://github.com/cBioPortal/cbioportal/blob/dc487c2831b6152397ab9be6baded7b2264369eb/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImpl.javaj2P  https://github.com/cBioPortal/cbioportal/raw/dc487c2831b6152397ab9be6baded7b2264369eb/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImpl.javaj4P  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImpl.java?ref=dc487c2831b6152397ab9be6baded7b2264369ebj6P  X'  @@ -12,8 +12,6 @@
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
-import static java.util.stream.Collectors.*;
-
 @Service
 public class TreatmentServiceImpl implements TreatmentService {
     @Autowired
@@ -163,20 +161,26 @@ public List<PatientTreatmentRow> getAllPatientTreatmentRows(
 
         Map<String, List<Treatment>> treatmentSet = treatmentRepository.getTreatments(sampleIds, studyIds, key)
             .stream()
-            .collect(groupingBy(Treatment::getTreatment));
+            .collect(Collectors.groupingBy(Treatment::getTreatment));
 
+        /*
+            This logic transforms treatmentSet to list of PatientTreatmentRow. transformation steps:
+            - key in treatmentSet is going to be treatment
+            - get all unique patient ids -> this is going to give count
+            - get all clinicalEventSamples using above unique patient ids
+         */
         return treatmentSet.entrySet()
             .stream()
             .map(entry -> {
                 String treatment = entry.getKey();
-                Set<String> patientIds = entry.getValue().stream().map(Treatment::getPatientId).collect(toSet());
+                Set<String> patientIds = entry.getValue().stream().map(Treatment::getPatientId).collect(Collectors.toSet());
                 Set<ClinicalEventSample> clinicalEventSamples = patientIds
                     .stream()
                     .flatMap(patientId -> samplesByPatient.getOrDefault(patientId, new ArrayList<>()).stream())
-                    .collect(toSet());
+                    .collect(Collectors.toSet());
                 return new PatientTreatmentRow(treatment, patientIds.size(), clinicalEventSamples);
             })
-            .collect(toList());
+            .collect(Collectors.toList());
     }
 
     @Overrideueu(8ef0de437d740dcf3f4e0b5941eda852cb87da18}(sha(8ef0de437d740dcf3f4e0b5941eda852cb87da18node_idEC_kwDOAe-hB9oAKDhlZjBkZTQzN2Q3NDBkY2YzZjRlMGI1OTQxZWRhODUyY2I4N2RhMTgcommit}(author}(nameGaofeiemail,15748980+dippindots@users.noreply.github.comdate2023-06-02T05:26:58Zu	committer}(jJP  GaofeijLP  ,15748980+dippindots@users.noreply.github.comjNP  2023-06-02T05:26:58Zumessage)update fisher exact test and update teststree}(jBP  (4a431200d03f82c9922c5fe96b37f3e804cdf216urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/4a431200d03f82c9922c5fe96b37f3e804cdf216ujZP  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/8ef0de437d740dcf3f4e0b5941eda852cb87da18
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujZP  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8ef0de437d740dcf3f4e0b5941eda852cb87da18html_urlXhttps://github.com/cBioPortal/cbioportal/commit/8ef0de437d740dcf3f4e0b5941eda852cb87da18comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/8ef0de437d740dcf3f4e0b5941eda852cb87da18/commentsjHP  }(login
dippindotsidJtO jDP  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5jZP  'https://api.github.com/users/dippindotsjfP  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminujPP  }(jkP  
dippindotsjmP  JtO jDP  MDQ6VXNlcjE1NzQ4OTgwjoP  4https://avatars.githubusercontent.com/u/15748980?v=4jqP  h5jZP  'https://api.github.com/users/dippindotsjfP  https://github.com/dippindotsjtP  1https://api.github.com/users/dippindots/followersjvP  >https://api.github.com/users/dippindots/following{/other_user}jxP  7https://api.github.com/users/dippindots/gists{/gist_id}jzP  >https://api.github.com/users/dippindots/starred{/owner}{/repo}j|P  5https://api.github.com/users/dippindots/subscriptionsj~P  ,https://api.github.com/users/dippindots/orgsjP  -https://api.github.com/users/dippindots/reposjP  8https://api.github.com/users/dippindots/events{/privacy}jP  7https://api.github.com/users/dippindots/received_eventsjP  UserjP  uparents]}(jBP  (d3a508c19ebf16f3698c7f7a9170cf4eb53873e4jZP  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d3a508c19ebf16f3698c7f7a9170cf4eb53873e4jfP  Xhttps://github.com/cBioPortal/cbioportal/commit/d3a508c19ebf16f3698c7f7a9170cf4eb53873e4uastats}(totalMU	additionsMG	deletionsKufiles](}(jBP  (92f8f83955924145d906564446465c5750ab3d2ffilename=core/src/main/java/org/mskcc/cbio/portal/stats/OddsRatio.javastatusmodifiedjP  KjP  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/8ef0de437d740dcf3f4e0b5941eda852cb87da18/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/8ef0de437d740dcf3f4e0b5941eda852cb87da18/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.java?ref=8ef0de437d740dcf3f4e0b5941eda852cb87da18patch@@ -103,7 +103,7 @@ public double getOddsRatio() {
         return oddsRatio;
     }
 
-    public double getCumulativeP() {
+    public double getTwoTailedP() {
         return pValue;
     }
 u}(jBP  (75c20f31b5a3246825d14802b12fe2a248db2c91jP  Acore/src/test/java/org/mskcc/cbio/portal/stats/TestOddsRatio.javajP  modifiedjP  KjP  KjP  KjP  https://github.com/cBioPortal/cbioportal/blob/8ef0de437d740dcf3f4e0b5941eda852cb87da18/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.javajP  https://github.com/cBioPortal/cbioportal/raw/8ef0de437d740dcf3f4e0b5941eda852cb87da18/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.javajP  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.java?ref=8ef0de437d740dcf3f4e0b5941eda852cb87da18jP  X  @@ -70,7 +70,7 @@ public void testFisherExact() throws IOException {
 
         OddsRatio oddsRatio = new OddsRatio(pDataSummary, "BRCA1", "BRCA2");
         double oddsRatioValue = oddsRatio.getOddsRatio();
-        double p = oddsRatio.getCumulativeP();
+        double p = oddsRatio.getTwoTailedP();
         assertEquals(0.16666, oddsRatioValue, 0.0001);
         assertEquals(0.0849, p, 0.0001);
         //System.out.println (oddsRatio.getRCommand());u}(jBP  (58095fa346423636bbb4efaa1ae5285c89980eafjP  Oservice/src/main/java/org/cbioportal/service/util/AlterationEnrichmentUtil.javajP  modifiedjP  KjP  KjP  K	jP  https://github.com/cBioPortal/cbioportal/blob/8ef0de437d740dcf3f4e0b5941eda852cb87da18/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javajP  https://github.com/cBioPortal/cbioportal/raw/8ef0de437d740dcf3f4e0b5941eda852cb87da18/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javajP  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.java?ref=8ef0de437d740dcf3f4e0b5941eda852cb87da18jP  Xf  @@ -29,9 +29,7 @@
 
 @Component
 public class AlterationEnrichmentUtil<T extends AlterationCountByGene> {
-
-    @Autowired
-    private FisherExactTestCalculator fisherExactTestCalculator;
+    
     @Autowired
     private GeneService geneService;
     @Autowired
@@ -131,7 +129,10 @@ public List<AlterationEnrichment> createAlterationEnrichments(Map<String, Pair<L
                         int alteredOnlyInQueryGenesCount = counts.get(0).getProfiledCount()
                             - counts.get(0).getAlteredCount();
 
-                        pValue = fisherExactTestCalculator.getCumulativePValue(alteredInNoneCount,
+                        FisherExact fisher = new FisherExact(alteredInNoneCount +
+                            counts.get(1).getAlteredCount() + alteredOnlyInQueryGenesCount +
+                            counts.get(0).getAlteredCount());
+                        pValue = fisher.getTwoTailedP(alteredInNoneCount,
                             counts.get(1).getAlteredCount(), alteredOnlyInQueryGenesCount,
                             counts.get(0).getAlteredCount());
                     } else {u}(jBP  (a031d4dce060b8d47dbd51f75eb00d99726e1ffajP  Bservice/src/main/java/org/cbioportal/service/util/FisherExact.javajP  addedjP  M?jP  K jP  M?jP  https://github.com/cBioPortal/cbioportal/blob/8ef0de437d740dcf3f4e0b5941eda852cb87da18/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExact.javajP  https://github.com/cBioPortal/cbioportal/raw/8ef0de437d740dcf3f4e0b5941eda852cb87da18/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExact.javajP  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExact.java?ref=8ef0de437d740dcf3f4e0b5941eda852cb87da18jP  Xw-  @@ -0,0 +1,319 @@
+/*
+ * Copyright (c) 2015 Memorial Sloan-Kettering Cancer Center.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS
+ * FOR A PARTICULAR PURPOSE. The software and documentation provided hereunder
+ * is on an "as is" basis, and Memorial Sloan-Kettering Cancer Center has no
+ * obligations to provide maintenance, support, updates, enhancements or
+ * modifications. In no event shall Memorial Sloan-Kettering Cancer Center be
+ * liable to any party for direct, indirect, special, incidental or
+ * consequential damages, including lost profits, arising out of the use of this
+ * software and its documentation, even if Memorial Sloan-Kettering Cancer
+ * Center has been advised of the possibility of such damage.
+ */
+
+/*
+ * This file is part of cBioPortal.
+ *
+ * cBioPortal is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.cbioportal.service.util;
+
+/**
+ * This does a Fisher Exact test.  The Fisher's Exact test procedure calculates an exact probability value
+ * for the relationship between two dichotomous variables, as found in a two by two crosstable. The program
+ * calculates the difference between the data observed and the data expected, considering the given marginal
+ * and the assumptions of the model of independence. It works in exactly the same way as the Chi-square test
+ * for independence; however, the Chi-square gives only an estimate of the true probability value, an estimate
+ * which might not be very accurate if the marginal is very uneven or if there is a small value (less than five)
+ * in one of the cells.
+ * <p/>
+ * It uses an array of factorials initialized at the beginning to provide speed.
+ * There could be better ways to do this.
+ *
+ * @author Ed Buckler
+ * @version $Id: FisherExact.java,v 1
+ */
+
+public class FisherExact {
+    private static final boolean DEBUG = false;
+    private double[] f;
+    int maxSize;
+
+    /**
+     * constructor for FisherExact table
+     *
+     * @param maxSize is the maximum sum that will be encountered by the table (a+b+c+d)
+     */
+    public FisherExact(int maxSize) {
+        this.maxSize = maxSize;
+        double cf = 1.0;
+        f = new double[maxSize + 1];
+        f[0] = 0.0;
+        for (int i = 1; i <= this.maxSize; i++) {
+            f[i] = f[i - 1] + Math.log(i);
+        }
+    }
+
+    /**
+     * calculates the P-value for this specific state
+     *
+     * @param a a, b, c, d are the four cells in a 2x2 matrix
+     * @param b
+     * @param c
+     * @param d
+     * @return the P-value
+     */
+    public final double getP(int a, int b, int c, int d) {
+        int n = a + b + c + d;
+        if (n > maxSize) {
+            return Double.NaN;
+        }
+        double p;
+        p = (f[a + b] + f[c + d] + f[a + c] + f[b + d]) - (f[a] + f[b] + f[c] + f[d] + f[n]);
+        return Math.exp(p);
+    }
+
+    /**
+     * Calculates the one-tail P-value for the Fisher Exact test.  Determines whether to calculate the right- or left-
+     * tail, thereby always returning the smallest p-value.
+     *
+     * @param a a, b, c, d are the four cells in a 2x2 matrix
+     * @param b
+     * @param c
+     * @param d
+     * @return one-tailed P-value (right or left, whichever is smallest)
+     */
+    public final double getCumlativeP(int a, int b, int c, int d) {
+        int min, i;
+        int n = a + b + c + d;
+        if (n > maxSize) {
+            return Double.NaN;
+        }
+        double p = 0;
+
+        p += getP(a, b, c, d);
+        if (DEBUG) {
+            System.out.println("p = " + p);
+        }
+        if ((a * d) >= (b * c)) {
+            if (DEBUG) {
+                System.out.println("doing R-tail: a=" + a + " b=" + b + " c=" + c + " d=" + d);
+            }
+            min = (c < b) ? c : b;
+            for (i = 0; i < min; i++) {
+                if (DEBUG) {
+                    System.out.print("doing round " + i);
+                }
+                p += getP(++a, --b, --c, ++d);
+                if (DEBUG) {
+                    System.out.println("\ta=" + a + " b=" + b + " c=" + c + " d=" + d);
+                }
+            }
+        }
+        if ((a * d) < (b * c)) {
+            if (DEBUG) {
+                System.out.println("doing L-tail: a=" + a + " b=" + b + " c=" + c + " d=" + d);
+            }
+            min = (a < d) ? a : d;
+            for (i = 0; i < min; i++) {
+                if (DEBUG) {
+                    System.out.print("doing round " + i);
+                }
+                double pTemp = getP(--a, ++b, ++c, --d);
+                if (DEBUG) {
+                    System.out.print("\tpTemp = " + pTemp);
+                }
+                p += pTemp;
+                if (DEBUG) {
+                    System.out.println("\ta=" + a + " b=" + b + " c=" + c + " d=" + d);
+                }
+            }
+        }
+        return p;
+    }
+
+    /**
+     * Calculates the right-tail P-value for the Fisher Exact test.
+     *
+     * @param a a, b, c, d are the four cells in a 2x2 matrix
+     * @param b
+     * @param c
+     * @param d
+     * @return one-tailed P-value (right-tail)
+     */
+    public final double getRightTailedP(int a, int b, int c, int d) {
+        int min, i;
+        int n = a + b + c + d;
+        if (n > maxSize) {
+            return Double.NaN;
+        }
+        double p = 0;
+
+        p += getP(a, b, c, d);
+        if (DEBUG) {
+            System.out.println("p = " + p);
+        }
+        if (DEBUG) {
+            System.out.println("doing R-tail: a=" + a + " b=" + b + " c=" + c + " d=" + d);
+        }
+        min = (c < b) ? c : b;
+        for (i = 0; i < min; i++) {
+            p += getP(++a, --b, --c, ++d);
+
+        }
+        return p;
+    }
+
+    /**
+     * Calculates the left-tail P-value for the Fisher Exact test.
+     *
+     * @param a a, b, c, d are the four cells in a 2x2 matrix
+     * @param b
+     * @param c
+     * @param d
+     * @return one-tailed P-value (left-tail)
+     */
+    public final double getLeftTailedP(int a, int b, int c, int d) {
+        int min, i;
+        int n = a + b + c + d;
+        if (n > maxSize) {
+            return Double.NaN;
+        }
+        double p = 0;
+
+        p += getP(a, b, c, d);
+        if (DEBUG) {
+            System.out.println("p = " + p);
+        }
+        if (DEBUG) {
+            System.out.println("doing L-tail: a=" + a + " b=" + b + " c=" + c + " d=" + d);
+        }
+        min = (a < d) ? a : d;
+        for (i = 0; i < min; i++) {
+            if (DEBUG) {
+                System.out.print("doing round " + i);
+            }
+            double pTemp = getP(--a, ++b, ++c, --d);
+            if (DEBUG) {
+                System.out.print("\tpTemp = " + pTemp);
+            }
+            p += pTemp;
+            if (DEBUG) {
+                System.out.println("\ta=" + a + " b=" + b + " c=" + c + " d=" + d);
+            }
+        }
+
+
+        return p;
+    }
+
+    /**
+     * Calculates the two-tailed P-value for the Fisher Exact test.
+     * <p/>
+     * In order for a table under consideration to have its p-value included
+     * in the final result, it must have a p-value less than the original table's P-value, i.e.
+     * Fisher's exact test computes the probability, given the observed marginal
+     * frequencies, of obtaining exactly the frequencies observed and any configuration more extreme.
+     * By "more extreme," we mean any configuration (given observed marginals) with a smaller probability of
+     * occurrence in the same direction (one-tailed) or in both directions (two-tailed).
+     *
+     * @param a a, b, c, d are the four cells in a 2x2 matrix
+     * @param b
+     * @param c
+     * @param d
+     * @return two-tailed P-value, 
+     * we generally prefer to use this value for research purposes
+     * consult with statisticians on if a new feature is going to use a one-sided Fisher's test value
+     */
+    public final double getTwoTailedP(int a, int b, int c, int d) {
+        int min, i;
+        int n = a + b + c + d;
+        if (n > maxSize) {
+            return Double.NaN;
+        }
+        double p = 0;
+
+        double baseP = getP(a, b, c, d);
+//         in order for a table under consideration to have its p-value included
+//         in the final result, it must have a p-value less than the baseP, i.e.
+//         Fisher's exact test computes the probability, given the observed marginal
+//         frequencies, of obtaining exactly the frequencies observed and any configuration more extreme.
+//         By "more extreme," we mean any configuration (given observed marginals) with a smaller probability of
+//         occurrence in the same direction (one-tailed) or in both directions (two-tailed).
+
+        if (DEBUG) {
+            System.out.println("baseP = " + baseP);
+        }
+        int initialA = a, initialB = b, initialC = c, initialD = d;
+        p += baseP;
+        if (DEBUG) {
+            System.out.println("p = " + p);
+        }
+        if (DEBUG) {
+            System.out.println("Starting with R-tail: a=" + a + " b=" + b + " c=" + c + " d=" + d);
+        }
+        min = (c < b) ? c : b;
+        for (i = 0; i < min; i++) {
+            if (DEBUG) {
+                System.out.print("doing round " + i);
+            }
+            double tempP = getP(++a, --b, --c, ++d);
+            if (tempP <= baseP) {
+                if (DEBUG) {
+                    System.out.print("\ttempP (" + tempP + ") is less than baseP (" + baseP + ")");
+                }
+                p += tempP;
+            }
+            if (DEBUG) {
+                System.out.println(" a=" + a + " b=" + b + " c=" + c + " d=" + d);
+            }
+        }
+
+        // reset the values to their original so we can repeat this process for the other side
+        a = initialA;
+        b = initialB;
+        c = initialC;
+        d = initialD;
+
+        if (DEBUG) {
+            System.out.println("Now doing L-tail: a=" + a + " b=" + b + " c=" + c + " d=" + d);
+        }
+        min = (a < d) ? a : d;
+        if (DEBUG) {
+            System.out.println("min = " + min);
+        }
+        for (i = 0; i < min; i++) {
+            if (DEBUG) {
+                System.out.print("doing round " + i);
+            }
+            double pTemp = getP(--a, ++b, ++c, --d);
+            if (DEBUG) {
+                System.out.println("  pTemp = " + pTemp);
+            }
+            if (pTemp <= baseP) {
+                if (DEBUG) {
+                    System.out.print("\ttempP (" + pTemp + ") is less than baseP (" + baseP + ")");
+                }
+                p += pTemp;
+            }
+            if (DEBUG) {
+                System.out.println(" a=" + a + " b=" + b + " c=" + c + " d=" + d);
+            }
+        }
+        return p;
+    }
+}
\ No newline at end of fileu}(jBP  (71888a12983404395f8252c9b496cf052565ea2fjP  Sservice/src/test/java/org/cbioportal/service/util/AlterationEnrichmentUtilTest.javajP  modifiedjP  KjP  KjP  K	jP  https://github.com/cBioPortal/cbioportal/blob/8ef0de437d740dcf3f4e0b5941eda852cb87da18/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.javajP  https://github.com/cBioPortal/cbioportal/raw/8ef0de437d740dcf3f4e0b5941eda852cb87da18/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.javajP  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.java?ref=8ef0de437d740dcf3f4e0b5941eda852cb87da18jP  X  @@ -17,13 +17,9 @@ public class AlterationEnrichmentUtilTest {
 
     @InjectMocks
     private AlterationEnrichmentUtil alterationEnrichmentUtil;
-
-    @Mock
-    private FisherExactTestCalculator fisherExactTestCalculator;
+    
     @Mock
     private GeneService geneService;
-    @Mock
-    private ProfiledCasesCounter profiledCasesCounter;
 
     @Test
     public void createAlterationEnrichments() throws Exception {
@@ -101,9 +97,6 @@ public void createAlterationEnrichments() throws Exception {
 
         // START: for 2 groups
 
-        Mockito.when(fisherExactTestCalculator.getCumulativePValue(1, 1, 2, 0)).thenReturn(1.0);
-        Mockito.when(fisherExactTestCalculator.getCumulativePValue(2, 0, 0, 2)).thenReturn(0.3);
-
         List<AlterationEnrichment> result = alterationEnrichmentUtil.createAlterationEnrichments(
                 mutationCountsbyEntrezGeneIdAndGroup);
 ueu(b40d245a48542ab54b0efe25516243d55cd129b3}(sha(b40d245a48542ab54b0efe25516243d55cd129b3node_idEC_kwDOAe-hB9oAKGI0MGQyNDVhNDg1NDJhYjU0YjBlZmUyNTUxNjI0M2Q1NWNkMTI5YjMcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-07-26T18:17:22Zu	committer}(jP  Djokovic0311jP  .55948986+Djokovic0311@users.noreply.github.comjP  2023-07-27T16:46:30Zumessagefinish teststree}(jP  (e439f9c6afd1b454105e2c7628ba4adebd2e2998urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/e439f9c6afd1b454105e2c7628ba4adebd2e2998ujP  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/b40d245a48542ab54b0efe25516243d55cd129b3
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujP  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b40d245a48542ab54b0efe25516243d55cd129b3html_urlXhttps://github.com/cBioPortal/cbioportal/commit/b40d245a48542ab54b0efe25516243d55cd129b3comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/b40d245a48542ab54b0efe25516243d55cd129b3/commentsjP  }(loginDjokovic0311idJUjP  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5jP  )https://api.github.com/users/Djokovic0311jP  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminujP  }(j Q  Djokovic0311jQ  JUjP  MDQ6VXNlcjU1OTQ4OTg2jQ  4https://avatars.githubusercontent.com/u/55948986?v=4jQ  h5jP  )https://api.github.com/users/Djokovic0311jP  https://github.com/Djokovic0311j	Q  3https://api.github.com/users/Djokovic0311/followersjQ  @https://api.github.com/users/Djokovic0311/following{/other_user}j
Q  9https://api.github.com/users/Djokovic0311/gists{/gist_id}jQ  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}jQ  7https://api.github.com/users/Djokovic0311/subscriptionsjQ  .https://api.github.com/users/Djokovic0311/orgsjQ  /https://api.github.com/users/Djokovic0311/reposjQ  :https://api.github.com/users/Djokovic0311/events{/privacy}jQ  9https://api.github.com/users/Djokovic0311/received_eventsjQ  UserjQ  uparents]}(jP  (bd6c334749154d50a3d786d9d88acaddc20ae72ajP  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/bd6c334749154d50a3d786d9d88acaddc20ae72ajP  Xhttps://github.com/cBioPortal/cbioportal/commit/bd6c334749154d50a3d786d9d88acaddc20ae72auastats}(totalK	additionsKB	deletionsK?ufiles](}(jP  (7ffc558f0ea78a7db6d4832760ae5aa621042ff6filenameXservice/src/main/java/org/cbioportal/service/impl/GenericAssayBinaryDataServiceImpl.javastatusmodifiedj7Q  Kj8Q  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/b40d245a48542ab54b0efe25516243d55cd129b3/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImpl.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/b40d245a48542ab54b0efe25516243d55cd129b3/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImpl.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImpl.java?ref=b40d245a48542ab54b0efe25516243d55cd129b3patchX  @@ -14,6 +14,7 @@
 import org.cbioportal.service.util.FisherExactTestCalculator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
 import java.util.*;
@@ -33,14 +34,15 @@ public class GenericAssayBinaryDataServiceImpl implements GenericAssayBinaryData
     private MolecularProfileService molecularProfileService;
 
     @Autowired
-    private FisherExactTestCalculator fisherExactTestCalculator;
+    private FisherExactTestCalculator fisherExactTestCalculator = new FisherExactTestCalculator();
 
     @Autowired
     private ExpressionEnrichmentUtil expressionEnrichmentUtil;
     @Autowired
     private GenericAssayService genericAssayService;
 
     @Override
+    @Transactional(readOnly = true)
     public List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
         String molecularProfileId,
         Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType) 
@@ -90,6 +92,7 @@ public int compare(GenericAssayBinaryEnrichment c1, GenericAssayBinaryEnrichment
 
         // Extract pValues and calculate qValues.
         BigDecimal[] pValues = genericAssayBinaryEnrichments.stream().map(a -> a.getpValue()).toArray(BigDecimal[]::new);
+
         BigDecimal[] qValues = fisherExactTestCalculator.calcqValue(pValues);
 
         // Assign qValues back to the objects.u}(jP  (99b1c6e91f515abdbcc9e2a42e128095752f19f4j=Q  ]service/src/main/java/org/cbioportal/service/impl/GenericAssayCategoricalDataServiceImpl.javaj?Q  modifiedj7Q  Kj8Q  KjAQ  KjBQ  https://github.com/cBioPortal/cbioportal/blob/b40d245a48542ab54b0efe25516243d55cd129b3/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayCategoricalDataServiceImpl.javajDQ  https://github.com/cBioPortal/cbioportal/raw/b40d245a48542ab54b0efe25516243d55cd129b3/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayCategoricalDataServiceImpl.javajFQ  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayCategoricalDataServiceImpl.java?ref=b40d245a48542ab54b0efe25516243d55cd129b3jHQ  Xv	  @@ -32,20 +32,20 @@ public class GenericAssayCategoricalDataServiceImpl implements GenericAssayCateg
     private MolecularProfileService molecularProfileService;
 
     @Autowired
-    private FisherExactTestCalculator fisherExactTestCalculator;
+    private FisherExactTestCalculator fisherExactTestCalculator = new FisherExactTestCalculator();
 
     @Autowired
-    private ExpressionEnrichmentUtil expressionEnrichmentUtil;
+    private ExpressionEnrichmentUtil expressionEnrichmentUtil = new ExpressionEnrichmentUtil();
     @Autowired
     private GenericAssayService genericAssayService;
 
     @Override
+    @Transactional(readOnly = true)
     public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId, 
           Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType) 
         throws MolecularProfileNotFoundException {
 
             MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
-
             validateMolecularProfile(molecularProfile, Arrays.asList(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY));
 
             Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
@@ -56,7 +56,10 @@ public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichm
                 List<String> sampleIds = molecularProfileCaseSets.values().stream().flatMap(Collection::stream).map(MolecularProfileCaseIdentifier::getCaseId).collect(Collectors.toList());
                 List<String> studyIds = Collections.nCopies(sampleIds.size(), molecularProfile.getCancerStudyIdentifier());
                 List<Sample> samples = sampleService.fetchSamples(studyIds, sampleIds, "ID");
-                Map<String, Integer> sampleIdToPatientIdMap = samples.stream().collect(Collectors.toMap(Sample::getStableId, Sample::getPatientId));
+
+                Map<String, Integer> sampleIdToPatientIdMap = samples.stream()
+                    .filter(sample -> sample != null && sample.getStableId() != null && sample.getPatientId() != null)
+                    .collect(Collectors.toMap(Sample::getStableId, Sample::getPatientId));
 
                 filteredMolecularProfileCaseSets = new HashMap<>();
                 for (Map.Entry<String, List<MolecularProfileCaseIdentifier>> pair : molecularProfileCaseSets.entrySet()) {u}(jP  (a07454a4b5fbb152856caae159ff4f1e93f81ce2j=Q  Oservice/src/main/java/org/cbioportal/service/util/ExpressionEnrichmentUtil.javaj?Q  modifiedj7Q  Kj8Q  KjAQ  K'jBQ  https://github.com/cBioPortal/cbioportal/blob/b40d245a48542ab54b0efe25516243d55cd129b3/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FExpressionEnrichmentUtil.javajDQ  https://github.com/cBioPortal/cbioportal/raw/b40d245a48542ab54b0efe25516243d55cd129b3/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FExpressionEnrichmentUtil.javajFQ  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FExpressionEnrichmentUtil.java?ref=b40d245a48542ab54b0efe25516243d55cd129b3jHQ  X  @@ -7,6 +7,7 @@
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
 
+import io.swagger.models.auth.In;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.math.NumberUtils;
 import org.apache.commons.math3.stat.StatUtils;
@@ -43,7 +44,6 @@ public <T extends MolecularAlteration, S extends ExpressionEnrichment> List<S> g
 		Map<String, List<Integer>> groupIndicesMap = getGroupIndicesMap(molecularProfileCaseSets, enrichmentType,
 				molecularProfile);
 		for (MolecularAlteration ma : maItr) {
-
 			List<GroupStatistics> groupsStatistics = new ArrayList<GroupStatistics>();
 			// used for p-value calculation
 			List<double[]> groupedValues = new ArrayList<double[]>();
@@ -112,7 +112,7 @@ public <T extends MolecularAlteration, S extends ExpressionEnrichment> List<S> g
         Map<String, Map<String, Integer>> groupCategoryStatistics = new HashMap<>();
         Map<String, List<Integer>> groupIndicesMap = getGroupIndicesMap(molecularProfileCaseSets, enrichmentType,
             molecularProfile);
-        
+
         for (MolecularAlteration ma : maItr) {
             List<GroupStatistics> groupsStatistics = new ArrayList<GroupStatistics>();
             for (Entry<String, List<Integer>> group : groupIndicesMap.entrySet()) {
@@ -136,12 +136,16 @@ public <T extends MolecularAlteration, S extends ExpressionEnrichment> List<S> g
             }
 
             // calculate p-value and add enrichment if atleast 2 groups have data
+
             if (groupsStatistics.size() > 1) {
                 long[][] array = getCategoricalValues(groupCategoryStatistics);
                 double pValue;
-
-                ChiSquareTest chiSquareTest = new ChiSquareTest();
-                pValue = chiSquareTest.chiSquareTest(array);
+                if(array[0].length <= 1) {
+                    pValue = 1;
+                } else {
+                    ChiSquareTest chiSquareTest = new ChiSquareTest();
+                    pValue = chiSquareTest.chiSquareTest(array);
+                }
 
                 // set p-value to 1 when the cases in all groups are altered
                 if (Double.isNaN(pValue)) {
@@ -179,16 +183,8 @@ public <T extends MolecularAlteration, S extends ExpressionEnrichment> List<S> g
             for (Entry<String, List<Integer>> group : groupIndicesMap.entrySet()) {
                 GenericAssayCountSummary genericAssayCountSummary = new GenericAssayCountSummary();
                 genericAssayCountSummary.setName(group.getKey());
-                // Get the corresponding split values for the group
-                List<String> groupValues = group.getValue().stream()
-                    .map(sampleIndex -> ma.getSplitValues()[sampleIndex])
-                    .collect(Collectors.toList());
-                // Group and count the split values
-                Map<String, Integer> groupedSplitValues = groupValues.stream()
-                    .collect(Collectors.toMap(Function.identity(), v -> 1, Integer::sum));
 
                 // get expression values to all the indices in the group, filter NA and map binary values
-                //unaltered:1:1,0 2:0,1 altered:1:1,1 2:0,0
                 List<String> molecularDataValues = group.getValue().stream()
                     .map(sampleIndex -> ma.getSplitValues()[sampleIndex])
                     .filter(StringUtils::isNotEmpty)
@@ -199,9 +195,12 @@ public <T extends MolecularAlteration, S extends ExpressionEnrichment> List<S> g
                 if (molecularDataValues.size() < 2) {
                     continue;
                 }
-
+                genericAssayCountSummary.setTotalCount(molecularDataValues.size());
+                
                 double[] values = getAlterationValues(molecularDataValues, molecularProfile.getStableId());
-
+                genericAssayCountSummary.setCount((int) Arrays.stream(values)
+                    .filter(num -> num == 1)
+                    .count());
                 GroupStatistics groupStatistics = new GroupStatistics();
                 double alteredMean = StatUtils.mean(values);
                 double alteredStandardDeviation = calculateStandardDeviation(values);
@@ -217,11 +216,11 @@ public <T extends MolecularAlteration, S extends ExpressionEnrichment> List<S> g
                 groupStatistics.setStandardDeviation(BigDecimal.valueOf(alteredStandardDeviation));
                 groupsStatistics.add(groupStatistics);
                 genericAssayCountSummaries.add(genericAssayCountSummary);
-
             }
 
             // calculate p-value and add enrichment if atleast 2 groups have data
             if (groupsStatistics.size() > 1) {
+
                 double pValue = calculatePValue(groupedValues);
                 if (Double.isNaN(pValue)) {
                     continue;
@@ -388,11 +387,5 @@ private Map<String, List<Integer>> getCaseIdToInternalIdsMap(
 					.collect(Collectors.toMap(Sample::getStableId, x -> Arrays.asList(x.getInternalId())));
 		}
 	}
-    public static void main(String[] args) {
-        List<double[]> alteredValues = null;
-        alteredValues.add(new double[]{0, 0});
-        alteredValues.add(new double[]{0, 1});
-        double pValue = TestUtils.tTest(alteredValues.get(0), alteredValues.get(1));
-        System.out.println("Calculated p-value: " + pValue);
-    }
+
 }u}(jP  (a06e1b0cf5d917fcd4597e8a5c4973042408151cj=Q  Pservice/src/main/java/org/cbioportal/service/util/FisherExactTestCalculator.javaj?Q  modifiedj7Q  Kj8Q  KjAQ  KjBQ  https://github.com/cBioPortal/cbioportal/blob/b40d245a48542ab54b0efe25516243d55cd129b3/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javajDQ  https://github.com/cBioPortal/cbioportal/raw/b40d245a48542ab54b0efe25516243d55cd129b3/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javajFQ  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.java?ref=b40d245a48542ab54b0efe25516243d55cd129b3jHQ  Xy  @@ -53,7 +53,7 @@ public BigDecimal[] calcqValue(BigDecimal[] pValuesInIncreasingOrder) {
         for (int i = 0; i < dataLength; i++) {
             if (i > 0) {
                 BigDecimal calculatedValue = cachedElement.min(
-                    (pValuesInIncreasingOrder[i].multiply(new BigDecimal(dataLength))).divide(new BigDecimal(dataLength - i))
+                    (pValuesInIncreasingOrder[i].multiply(new BigDecimal(dataLength))).divide(new BigDecimal(dataLength - i), BigDecimal.ROUND_HALF_UP)
                 );
                 cachedElement = calculatedValue;
                 reversedQValues[i] = calculatedValue;u}(jP  (f7f423f6cdadb039ae53bac7b1873dfa07bd3ebbj=Q  \service/src/test/java/org/cbioportal/service/impl/GenericAssayBinaryDataServiceImplTest.javaj?Q  modifiedj7Q  K
j8Q  KjAQ  KjBQ  https://github.com/cBioPortal/cbioportal/blob/b40d245a48542ab54b0efe25516243d55cd129b3/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImplTest.javajDQ  https://github.com/cBioPortal/cbioportal/raw/b40d245a48542ab54b0efe25516243d55cd129b3/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImplTest.javajFQ  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImplTest.java?ref=b40d245a48542ab54b0efe25516243d55cd129b3jHQ  XA  @@ -9,6 +9,7 @@
 import org.cbioportal.service.SampleService;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.util.ExpressionEnrichmentUtil;
+import org.cbioportal.service.util.FisherExactTestCalculator;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -36,8 +37,7 @@ public class GenericAssayBinaryDataServiceImplTest extends BaseServiceImplTest{
     private MolecularProfileService molecularProfileService;
     @Mock
     private MolecularDataRepository molecularDataRepository;
-    @Mock
-    private GeneService geneService;
+
     @Spy
     @InjectMocks
     private ExpressionEnrichmentUtil expressionEnrichmentUtil;
@@ -50,6 +50,8 @@ public class GenericAssayBinaryDataServiceImplTest extends BaseServiceImplTest{
     List<Sample> samples = new ArrayList<>();
     Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets = new HashMap<>();
     Map<String, List<MolecularProfileCaseIdentifier>> molecularProfilePatientLevelCaseSets = new HashMap<>();
+    private FisherExactTestCalculator fisherExactTestCalculator;
+
     // patient level only data
     public static final String SAMPLE_ID5 = "sample_id5";
 
@@ -175,15 +177,15 @@ public void getGenericAssayBinaryEnrichments() throws Exception {
         GroupStatistics unalteredGroupStats = genericAssayBinaryEnrichment.getGroupsStatistics().get(0);
         Assert.assertEquals("unaltered samples", unalteredGroupStats.getName());
         Assert.assertEquals(new BigDecimal("0.5"), unalteredGroupStats.getMeanExpression());
-        Assert.assertEquals(new BigDecimal("0.707106781186548"), unalteredGroupStats.getStandardDeviation());
+        Assert.assertEquals(new BigDecimal("0.7071067811865476"), unalteredGroupStats.getStandardDeviation());
 
         GroupStatistics alteredGroupStats = genericAssayBinaryEnrichment.getGroupsStatistics().get(1);
         Assert.assertEquals("altered samples", alteredGroupStats.getName());
-        Assert.assertEquals(new BigDecimal("1"), alteredGroupStats.getMeanExpression());
-        Assert.assertEquals(new BigDecimal("0"), alteredGroupStats.getStandardDeviation());
+        Assert.assertEquals(new BigDecimal("1.0"), alteredGroupStats.getMeanExpression());
+        Assert.assertEquals(new BigDecimal("0.0"), alteredGroupStats.getStandardDeviation());
 
-        Assert.assertEquals(new BigDecimal("0.0416666666666667"), genericAssayBinaryEnrichment.getpValue());
-        Assert.assertEquals(new BigDecimal("0.0833333333333334"), genericAssayBinaryEnrichment.getqValue());
+        Assert.assertEquals(new BigDecimal("0.49999999999999983"), genericAssayBinaryEnrichment.getpValue());
+        Assert.assertEquals(new BigDecimal("0.99999999999999966"), genericAssayBinaryEnrichment.getqValue());
 
         genericAssayBinaryEnrichment = result.get(1);
         Assert.assertEquals(HUGO_GENE_SYMBOL_2, genericAssayBinaryEnrichment.getStableId());
@@ -192,15 +194,15 @@ public void getGenericAssayBinaryEnrichments() throws Exception {
         unalteredGroupStats = genericAssayBinaryEnrichment.getGroupsStatistics().get(0);
         Assert.assertEquals("unaltered samples", unalteredGroupStats.getName());
         Assert.assertEquals(new BigDecimal("0.5"), unalteredGroupStats.getMeanExpression());
-        Assert.assertEquals(new BigDecimal("0.707106781186548"), unalteredGroupStats.getStandardDeviation());
+        Assert.assertEquals(new BigDecimal("0.7071067811865476"), unalteredGroupStats.getStandardDeviation());
 
         alteredGroupStats = genericAssayBinaryEnrichment.getGroupsStatistics().get(1);
         Assert.assertEquals("altered samples", alteredGroupStats.getName());
         Assert.assertEquals(new BigDecimal("0.5"), alteredGroupStats.getMeanExpression());
-        Assert.assertEquals(new BigDecimal("0.707106781186548"), alteredGroupStats.getStandardDeviation());
+        Assert.assertEquals(new BigDecimal("0.7071067811865476"), alteredGroupStats.getStandardDeviation());
 
-        Assert.assertEquals(new BigDecimal("1"), genericAssayBinaryEnrichment.getpValue());
-        Assert.assertEquals(new BigDecimal("1"), genericAssayBinaryEnrichment.getqValue());
+        Assert.assertEquals(new BigDecimal("1.0"), genericAssayBinaryEnrichment.getpValue());
+        Assert.assertEquals(new BigDecimal("1.0"), genericAssayBinaryEnrichment.getqValue());
     }
 
 u}(jP  (405641dfc92bb1095c2d91cb47b2aa580ee43451j=Q  aservice/src/test/java/org/cbioportal/service/impl/GenericAssayCategoricalDataServiceImplTest.javaj?Q  modifiedj7Q  Kj8Q  KjAQ  K
jBQ  https://github.com/cBioPortal/cbioportal/blob/b40d245a48542ab54b0efe25516243d55cd129b3/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayCategoricalDataServiceImplTest.javajDQ  https://github.com/cBioPortal/cbioportal/raw/b40d245a48542ab54b0efe25516243d55cd129b3/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayCategoricalDataServiceImplTest.javajFQ  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayCategoricalDataServiceImplTest.java?ref=b40d245a48542ab54b0efe25516243d55cd129b3jHQ  XV	  @@ -24,8 +24,6 @@
 
 @RunWith(MockitoJUnitRunner.class)
 public class GenericAssayCategoricalDataServiceImplTest extends BaseServiceImplTest{
-    @InjectMocks
-    private ExpressionEnrichmentServiceImpl enrichmentServiceImpl;
     @InjectMocks
     private GenericAssayCategoricalDataServiceImpl genericAssayCategoricalDataServiceImpl;
     @Mock
@@ -34,8 +32,7 @@ public class GenericAssayCategoricalDataServiceImplTest extends BaseServiceImplT
     private MolecularProfileService molecularProfileService;
     @Mock
     private MolecularDataRepository molecularDataRepository;
-    @Mock
-    private GeneService geneService;
+
     @Spy
     @InjectMocks
     private ExpressionEnrichmentUtil expressionEnrichmentUtil;
@@ -174,8 +171,8 @@ public void getGenericAssayCategoricalEnrichments() throws MolecularProfileNotFo
         GroupStatistics alteredGroupStats = genericAssayCategoricalEnrichment.getGroupsStatistics().get(1);
         Assert.assertEquals("altered samples", alteredGroupStats.getName());
 
-        Assert.assertEquals(new BigDecimal("0.31731050786291115"), genericAssayCategoricalEnrichment.getpValue());
-        Assert.assertEquals(new BigDecimal("0.31731050786291115"), genericAssayCategoricalEnrichment.getqValue());
+        Assert.assertEquals(new BigDecimal("0.04550026389635764"), genericAssayCategoricalEnrichment.getpValue());
+        Assert.assertEquals(new BigDecimal("0.04550026389635764"), genericAssayCategoricalEnrichment.getqValue());
 
         genericAssayCategoricalEnrichment = result.get(1);
         Assert.assertEquals(HUGO_GENE_SYMBOL_2, genericAssayCategoricalEnrichment.getStableId());
@@ -187,8 +184,8 @@ public void getGenericAssayCategoricalEnrichments() throws MolecularProfileNotFo
         alteredGroupStats = genericAssayCategoricalEnrichment.getGroupsStatistics().get(1);
         Assert.assertEquals("altered samples", alteredGroupStats.getName());
 
-        Assert.assertEquals(new BigDecimal("0.31731050786291115"), genericAssayCategoricalEnrichment.getpValue());
-        Assert.assertEquals(new BigDecimal("0.31731050786291115"), genericAssayCategoricalEnrichment.getqValue());
+        Assert.assertEquals(new BigDecimal("0.04550026389635764"), genericAssayCategoricalEnrichment.getpValue());
+        Assert.assertEquals(new BigDecimal("0.04550026389635764"), genericAssayCategoricalEnrichment.getqValue());
     }
 
 }u}(jP  (60a7fddc58df58e20d42cfa84980a8098b2093d1j=Q  Jweb/src/main/java/org/cbioportal/web/GenericAssayBinaryDataController.javaj?Q  modifiedj7Q  Kj8Q  KjAQ  KjBQ  https://github.com/cBioPortal/cbioportal/blob/b40d245a48542ab54b0efe25516243d55cd129b3/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayBinaryDataController.javajDQ  https://github.com/cBioPortal/cbioportal/raw/b40d245a48542ab54b0efe25516243d55cd129b3/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayBinaryDataController.javajFQ  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayBinaryDataController.java?ref=b40d245a48542ab54b0efe25516243d55cd129b3jHQ  X  @@ -41,7 +41,7 @@ public class GenericAssayBinaryDataController {
         method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE,
         produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Fetch generic assay binary data enrichments in a molecular profile")
-    public ResponseEntity<List<GenericAssayBinaryEnrichment>> fetchGenericAssayCategoricalDataEnrichmentInMultipleMolecularProfiles(
+    public ResponseEntity<List<GenericAssayBinaryEnrichment>> fetchGenericAssayBinaryDataEnrichmentInMultipleMolecularProfiles(
         @ApiIgnore
         @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
         @ApiParam("Type of the enrichment e.g. SAMPLE or PATIENT")u}(jP  (c3344ce94e98e3c3b009d1deab47e0d8871c4d04j=Q  Oweb/src/main/java/org/cbioportal/web/GenericAssayCategoricalDataController.javaj?Q  modifiedj7Q  Kj8Q  K
jAQ  KjBQ  https://github.com/cBioPortal/cbioportal/blob/b40d245a48542ab54b0efe25516243d55cd129b3/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayCategoricalDataController.javajDQ  https://github.com/cBioPortal/cbioportal/raw/b40d245a48542ab54b0efe25516243d55cd129b3/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayCategoricalDataController.javajFQ  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayCategoricalDataController.java?ref=b40d245a48542ab54b0efe25516243d55cd129b3jHQ  XI  @@ -4,10 +4,7 @@
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import org.apache.commons.lang3.StringUtils;
-import org.cbioportal.model.EnrichmentType;
-import org.cbioportal.model.GenericAssayData;
-import org.cbioportal.model.GenericAssayCategoricalEnrichment;
-import org.cbioportal.model.MolecularProfileCaseIdentifier;
+import org.cbioportal.model.*;
 import org.cbioportal.service.GenericAssayCategoricalDataService;
 import org.cbioportal.service.GenericAssayService;
 import org.cbioportal.service.SampleService;
@@ -56,7 +53,13 @@ public ResponseEntity<List<GenericAssayCategoricalEnrichment>> fetchGenericAssay
         @ApiIgnore
         @Valid @RequestAttribute(required = false, value = "interceptedMolecularProfileCasesGroupFilters") List<MolecularProfileCasesGroupFilter> interceptedMolecularProfileCasesGroupFilters)
         throws MolecularProfileNotFoundException, UnsupportedOperationException {
-
+        
+        return new ResponseEntity<>(fetchExpressionEnrichments(enrichmentType, interceptedMolecularProfileCasesGroupFilters),
+            HttpStatus.OK);
+    }
+    private List<GenericAssayCategoricalEnrichment> fetchExpressionEnrichments(EnrichmentType enrichmentType,
+                                                                                List<MolecularProfileCasesGroupFilter> interceptedMolecularProfileCasesGroupFilters
+                                                                                ) throws MolecularProfileNotFoundException {
         Map<String, List<MolecularProfileCaseIdentifier>> groupCaseIdentifierSet = interceptedMolecularProfileCasesGroupFilters
             .stream().collect(Collectors.toMap(MolecularProfileCasesGroupFilter::getName,
                 MolecularProfileCasesGroupFilter::getMolecularProfileCaseIdentifiers));
@@ -65,15 +68,13 @@ public ResponseEntity<List<GenericAssayCategoricalEnrichment>> fetchGenericAssay
             .flatMap(molecularProfileCaseSet -> molecularProfileCaseSet.stream()
                 .map(MolecularProfileCaseIdentifier::getMolecularProfileId))
             .collect(Collectors.toSet());
-        
+
         if (molecularProfileIds.size() > 1) {
-            throw new UnsupportedOperationException("Multi-study enrichments is not yet implemented");
+            throw new UnsupportedOperationException("Multi-study expression enrichments is not yet implemented");
         }
-
-        return new ResponseEntity<>(
-            genericAssayCategoricalDataService.getGenericAssayCategoricalEnrichments(
-                molecularProfileIds.iterator().next(), groupCaseIdentifierSet, enrichmentType),
-            HttpStatus.OK);
+        return genericAssayCategoricalDataService.getGenericAssayCategoricalEnrichments(
+            molecularProfileIds.iterator().next(), groupCaseIdentifierSet, enrichmentType);
     }
-
 }
+
+u}(jP  (bfb15d1c6a7d3068c08f7841e267df3af0787be5j=Q  Vweb/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.javaj?Q  modifiedj7Q  Kj8Q  KjAQ  KjBQ  https://github.com/cBioPortal/cbioportal/blob/b40d245a48542ab54b0efe25516243d55cd129b3/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javajDQ  https://github.com/cBioPortal/cbioportal/raw/b40d245a48542ab54b0efe25516243d55cd129b3/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javajFQ  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.java?ref=b40d245a48542ab54b0efe25516243d55cd129b3jHQ  X  @@ -101,6 +101,8 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
     public static final String TREATMENTS_PATIENT_PATH = "/treatments/patient";
     public static final String TREATMENTS_SAMPLE_PATH = "/treatments/sample";
     public static final String GENERIC_ASSAY_ENRICHMENT_FETCH_PATH = "/generic-assay-enrichments/fetch";
+    public static final String GENERIC_ASSAY_CATEGORICAL_ENRICHMENT_FETCH_PATH = "/generic-assay-enrichments/categorical/fetch";
+    public static final String GENERIC_ASSAY_BINARY_ENRICHMENT_FETCH_PATH = "/generic-assay-enrichments/binary/fetch";
     public static final String CLINICAL_EVENT_TYPE_COUNT_FETCH_PATH = "/clinical-event-type-counts/fetch";
 
     @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
@@ -148,7 +150,9 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
         } else if (requestPathInfo.equals(MUTATION_ENRICHMENT_FETCH_PATH) ||
         		requestPathInfo.equals(COPY_NUMBER_ENRICHMENT_FETCH_PATH) ||
         		requestPathInfo.equals(EXPRESSION_ENRICHMENT_FETCH_PATH) ||
-        		requestPathInfo.equals(GENERIC_ASSAY_ENRICHMENT_FETCH_PATH)) {
+        		requestPathInfo.equals(GENERIC_ASSAY_ENRICHMENT_FETCH_PATH) ||
+                requestPathInfo.equals(GENERIC_ASSAY_CATEGORICAL_ENRICHMENT_FETCH_PATH) ||
+                requestPathInfo.equals(GENERIC_ASSAY_BINARY_ENRICHMENT_FETCH_PATH)) {
             return extractAttributesFromMolecularProfileCasesGroups(request);
         } else if (requestPathInfo.equals(ALTERATION_ENRICHMENT_FETCH_PATH)) {
             return extractAttributesFromMolecularProfileCasesGroupsAndAlterationTypes(request);ueu(47968c9c43f398813e341f61ec97c58cc34cf1a7}(sha(47968c9c43f398813e341f61ec97c58cc34cf1a7node_idEC_kwDOAe-hB9oAKDQ3OTY4YzljNDNmMzk4ODEzZTM0MWY2MWVjOTdjNThjYzM0Y2YxYTccommit}(author}(nameSowmiyaa Kumaremail1109506589+sowmiyaa-kumar@users.noreply.github.comdate2023-06-20T17:01:17Zu	committer}(jQ  Gaofei ZhaojQ  ,15748980+dippindots@users.noreply.github.comjQ  2023-08-10T19:49:00ZumessageUpdate validateData.py

Fixed an error in naming alleles for the mutation file checks in SNP, DNP, and TNP. (tumor_seq_allele1 was repeated twice, instead of tumor_seq_allele2)tree}(jQ  (e603a25c80a63cd04475d3eca601e3dbe704d3a2urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/e603a25c80a63cd04475d3eca601e3dbe704d3a2ujQ  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/47968c9c43f398813e341f61ec97c58cc34cf1a7
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujQ  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/47968c9c43f398813e341f61ec97c58cc34cf1a7html_urlXhttps://github.com/cBioPortal/cbioportal/commit/47968c9c43f398813e341f61ec97c58cc34cf1a7comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/47968c9c43f398813e341f61ec97c58cc34cf1a7/commentsjQ  }(loginsowmiyaa-kumaridJjQ  U_kgDOBobwHQ
avatar_url5https://avatars.githubusercontent.com/u/109506589?v=4gravatar_idh5jQ  +https://api.github.com/users/sowmiyaa-kumarjQ  !https://github.com/sowmiyaa-kumar
followers_url5https://api.github.com/users/sowmiyaa-kumar/followers
following_urlBhttps://api.github.com/users/sowmiyaa-kumar/following{/other_user}	gists_url;https://api.github.com/users/sowmiyaa-kumar/gists{/gist_id}starred_urlBhttps://api.github.com/users/sowmiyaa-kumar/starred{/owner}{/repo}subscriptions_url9https://api.github.com/users/sowmiyaa-kumar/subscriptionsorganizations_url0https://api.github.com/users/sowmiyaa-kumar/orgs	repos_url1https://api.github.com/users/sowmiyaa-kumar/repos
events_url<https://api.github.com/users/sowmiyaa-kumar/events{/privacy}received_events_url;https://api.github.com/users/sowmiyaa-kumar/received_eventstypeUser
site_adminujQ  }(jQ  
dippindotsjQ  JtO jQ  MDQ6VXNlcjE1NzQ4OTgwjQ  4https://avatars.githubusercontent.com/u/15748980?v=4jQ  h5jQ  'https://api.github.com/users/dippindotsjQ  https://github.com/dippindotsjQ  1https://api.github.com/users/dippindots/followersjQ  >https://api.github.com/users/dippindots/following{/other_user}jQ  7https://api.github.com/users/dippindots/gists{/gist_id}jQ  >https://api.github.com/users/dippindots/starred{/owner}{/repo}jQ  5https://api.github.com/users/dippindots/subscriptionsjQ  ,https://api.github.com/users/dippindots/orgsjQ  -https://api.github.com/users/dippindots/reposjQ  8https://api.github.com/users/dippindots/events{/privacy}jQ  7https://api.github.com/users/dippindots/received_eventsjQ  UserjQ  uparents]}(jQ  (7b2bbe2c40efdd42715c4f337cb3959deeb431b2jQ  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7b2bbe2c40efdd42715c4f337cb3959deeb431b2jQ  Xhttps://github.com/cBioPortal/cbioportal/commit/7b2bbe2c40efdd42715c4f337cb3959deeb431b2uastats}(totalK	additionsK	deletionsKufiles]}(jQ  (e6cf2c63f7b5346101d69d66e53504b43ca4d9b2filename.core/src/main/scripts/importer/validateData.pystatusmodifiedjQ  KjQ  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/47968c9c43f398813e341f61ec97c58cc34cf1a7/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.pyraw_urlhttps://github.com/cBioPortal/cbioportal/raw/47968c9c43f398813e341f61ec97c58cc34cf1a7/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.pycontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.py?ref=47968c9c43f398813e341f61ec97c58cc34cf1a7patchX  @@ -1928,23 +1928,23 @@ def checkAlleleMAFFormat(self, data):
 
             if variant_type == "SNP":
                 # Expect alleles to have length 2 when variant type is SNP
-                if not (len(ref_allele) == 1 and len(tumor_seq_allele1) == 1 and len(tumor_seq_allele1) == 1):
+                if not (len(ref_allele) == 1 and len(tumor_seq_allele1) == 1 and len(tumor_seq_allele2) == 1):
                     log_message = "Variant_Type indicates a SNP, but length of Reference_Allele, Tumor_Seq_Allele1 " \
                                   "and/or Tumor_Seq_Allele2 do not equal 1."
                     extra_dict = {'line_number': self.line_number,
                                   'cause': '(%s, %s, %s)' % (ref_allele, tumor_seq_allele1, tumor_seq_allele2)}
                     self.send_log_message(self.strict_maf_checks, log_message, extra_dict)
             if variant_type == "DNP":
                 # Expect alleles to have length 2 when variant type is DNP
-                if not (len(ref_allele) == 2 and len(tumor_seq_allele1) == 2 and len(tumor_seq_allele1) == 2):
+                if not (len(ref_allele) == 2 and len(tumor_seq_allele1) == 2 and len(tumor_seq_allele2) == 2):
                     log_message = "Variant_Type indicates a DNP, but length of Reference_Allele, Tumor_Seq_Allele1 " \
                                   "and/or Tumor_Seq_Allele2 do not equal 2."
                     extra_dict = {'line_number': self.line_number,
                                   'cause': '(%s, %s, %s)' % (ref_allele, tumor_seq_allele1, tumor_seq_allele2)}
                     self.send_log_message(self.strict_maf_checks, log_message, extra_dict)
             if variant_type == "TNP":
                 # Expect alleles to have length 3 when variant type is TNP
-                if not (len(ref_allele) == 3 and len(tumor_seq_allele1) == 3 and len(tumor_seq_allele1) == 3):
+                if not (len(ref_allele) == 3 and len(tumor_seq_allele1) == 3 and len(tumor_seq_allele2) == 3):
                     log_message = "Variant_Type indicates a TNP, but length of Reference_Allele, Tumor_Seq_Allele1 " \
                                   "and/or Tumor_Seq_Allele2 do not equal 3."
                     extra_dict = {'line_number': self.line_number,uau      (9d7c2b38fba7b0573088fd403706ac4ab035d5e7}(sha(9d7c2b38fba7b0573088fd403706ac4ab035d5e7node_idEC_kwDOAe-hB9oAKDlkN2MyYjM4ZmJhN2IwNTczMDg4ZmQ0MDM3MDZhYzRhYjAzNWQ1ZTccommit}(author}(name
Bas Leenknegtemailbasleenknegt@thehyve.nldate2023-06-14T12:39:29Zu	committer}(j	R  
Bas LeenknegtjR  basleenknegt@thehyve.nlj
R  2023-06-14T12:42:24Zumessage$Rename *SampleClinicalTable* methodstree}(jR  (b8c6acd2380fb0282e96668db2f6f85e1d006dc2urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/b8c6acd2380fb0282e96668db2f6f85e1d006dc2ujR  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/9d7c2b38fba7b0573088fd403706ac4ab035d5e7
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujR  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9d7c2b38fba7b0573088fd403706ac4ab035d5e7html_urlXhttps://github.com/cBioPortal/cbioportal/commit/9d7c2b38fba7b0573088fd403706ac4ab035d5e7comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/9d7c2b38fba7b0573088fd403706ac4ab035d5e7/commentsjR  }(loginBasLeeidJ~2 jR  MDQ6VXNlcjMzMjMwMDY=
avatar_url3https://avatars.githubusercontent.com/u/3323006?v=4gravatar_idh5jR  #https://api.github.com/users/BasLeej%R  https://github.com/BasLee
followers_url-https://api.github.com/users/BasLee/followers
following_url:https://api.github.com/users/BasLee/following{/other_user}	gists_url3https://api.github.com/users/BasLee/gists{/gist_id}starred_url:https://api.github.com/users/BasLee/starred{/owner}{/repo}subscriptions_url1https://api.github.com/users/BasLee/subscriptionsorganizations_url(https://api.github.com/users/BasLee/orgs	repos_url)https://api.github.com/users/BasLee/repos
events_url4https://api.github.com/users/BasLee/events{/privacy}received_events_url3https://api.github.com/users/BasLee/received_eventstypeUser
site_adminujR  }(j*R  BasLeej,R  J~2 jR  MDQ6VXNlcjMzMjMwMDY=j.R  3https://avatars.githubusercontent.com/u/3323006?v=4j0R  h5jR  #https://api.github.com/users/BasLeej%R  https://github.com/BasLeej3R  -https://api.github.com/users/BasLee/followersj5R  :https://api.github.com/users/BasLee/following{/other_user}j7R  3https://api.github.com/users/BasLee/gists{/gist_id}j9R  :https://api.github.com/users/BasLee/starred{/owner}{/repo}j;R  1https://api.github.com/users/BasLee/subscriptionsj=R  (https://api.github.com/users/BasLee/orgsj?R  )https://api.github.com/users/BasLee/reposjAR  4https://api.github.com/users/BasLee/events{/privacy}jCR  3https://api.github.com/users/BasLee/received_eventsjER  UserjGR  uparents]}(jR  (f828ee078dd0b5819a0a11d1f3781a7dbdf5f8f9jR  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/f828ee078dd0b5819a0a11d1f3781a7dbdf5f8f9j%R  Xhttps://github.com/cBioPortal/cbioportal/commit/f828ee078dd0b5819a0a11d1f3781a7dbdf5f8f9uastats}(totalKV	additionsK*	deletionsK,ufiles](}(jR  (2ff7c09087f076874a8b964d260f8f340f4e79d7filename`persistence/persistence-api/src/main/java/org/cbioportal/persistence/ClinicalDataRepository.javastatusmodifiedjaR  KjbR  KchangesK
blob_urlhttps://github.com/cBioPortal/cbioportal/blob/9d7c2b38fba7b0573088fd403706ac4ab035d5e7/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FClinicalDataRepository.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/9d7c2b38fba7b0573088fd403706ac4ab035d5e7/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FClinicalDataRepository.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FClinicalDataRepository.java?ref=9d7c2b38fba7b0573088fd403706ac4ab035d5e7patchXN  @@ -47,13 +47,13 @@ BaseMeta fetchMetaClinicalDataInStudy(String studyId, List<String> ids, List<Str
     List<ClinicalData> fetchClinicalData(List<String> studyIds, List<String> ids, List<String> attributeIds,
                                          String clinicalDataType, String projection);
 
-    List<ClinicalData> fetchSampleClinicalDataClinicalTable(List<String> studyIds, List<String> ids,
-                                                            Integer pageSize, Integer pageNumber, String searchTerm,
-                                                            String sortBy, String direction);
+    List<ClinicalData> fetchSampleClinicalTable(List<String> studyIds, List<String> ids,
+                                                Integer pageSize, Integer pageNumber, String searchTerm,
+                                                String sortBy, String direction);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    Integer fetchSampleClinicalDataClinicalTableCount(List<String> studyIds, List<String> ids, String searchTerm, 
-                                                      String sortBy, String direction);
+    Integer fetchSampleClinicalTableCount(List<String> studyIds, List<String> ids, String searchTerm,
+                                          String sortBy, String direction);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
     BaseMeta fetchMetaClinicalData(List<String> studyIds, List<String> ids, List<String> attributeIds,u}(jR  (1f4209deffbd08bf72a2d44f3a41ed8187320620jgR  hpersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/ClinicalDataMapper.javajiR  modifiedjaR  KjbR  KjkR  K
jlR  https://github.com/cBioPortal/cbioportal/blob/9d7c2b38fba7b0573088fd403706ac4ab035d5e7/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.javajnR  https://github.com/cBioPortal/cbioportal/raw/9d7c2b38fba7b0573088fd403706ac4ab035d5e7/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.javajpR  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.java?ref=9d7c2b38fba7b0573088fd403706ac4ab035d5e7jrR  X  @@ -18,12 +18,12 @@ List<ClinicalData> getPatientClinicalData(List<String> studyIds, List<String> pa
                                               String projection, Integer limit, Integer offset, String sortby,
                                               String direction);
 
-    List<ClinicalData> getSampleClinicalDataClinicalTable(List<String> studyIds, List<String> sampleIds, String projection, 
-                                                          Integer limit, Integer offset, String searchTerm,
-                                                          String sortBy, String direction);
+    List<ClinicalData> getSampleClinicalTable(List<String> studyIds, List<String> sampleIds, String projection,
+                                              Integer limit, Integer offset, String searchTerm,
+                                              String sortBy, String direction);
 
-    Integer getSampleClinicalDataClinicalTableCount(List<String> studyIds, List<String> sampleIds, String projection, 
-                                                          String searchTerm, String sortBy, String direction);
+    Integer getSampleClinicalTableCount(List<String> studyIds, List<String> sampleIds, String projection,
+                                        String searchTerm, String sortBy, String direction);
 
     BaseMeta getMetaPatientClinicalData(List<String> studyIds, List<String> patientIds, List<String> attributeIds);
 u}(jR  (15c692f84bcb017c9f83f2c6fc3ff25ffccf7f51jgR  spersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/ClinicalDataMyBatisRepository.javajiR  modifiedjaR  KjbR  KjkR  KjlR  https://github.com/cBioPortal/cbioportal/blob/9d7c2b38fba7b0573088fd403706ac4ab035d5e7/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMyBatisRepository.javajnR  https://github.com/cBioPortal/cbioportal/raw/9d7c2b38fba7b0573088fd403706ac4ab035d5e7/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMyBatisRepository.javajpR  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMyBatisRepository.java?ref=9d7c2b38fba7b0573088fd403706ac4ab035d5e7jrR  XQ  @@ -138,21 +138,21 @@ public List<ClinicalData> fetchClinicalData(List<String> studyIds, List<String>
     }
 
     @Override
-    public List<ClinicalData> fetchSampleClinicalDataClinicalTable(List<String> studyIds, List<String> ids,
-                                                                   Integer pageSize, Integer pageNumber, String searchTerm,
-                                                                   String sortBy, String direction) {
+    public List<ClinicalData> fetchSampleClinicalTable(List<String> studyIds, List<String> ids,
+                                                       Integer pageSize, Integer pageNumber, String searchTerm,
+                                                       String sortBy, String direction) {
         if (ids.isEmpty()) {
             return new ArrayList<>();
         }
         int offset = offsetCalculator.calculate(pageSize, pageNumber);
-        return clinicalDataMapper.getSampleClinicalDataClinicalTable(studyIds, ids,"SUMMARY", pageSize,
+        return clinicalDataMapper.getSampleClinicalTable(studyIds, ids,"SUMMARY", pageSize,
             offset, searchTerm, sortBy, direction);
     }
 
     @Override
-    public Integer fetchSampleClinicalDataClinicalTableCount(List<String> studyIds, List<String> sampleIds, 
-                                                             String searchTerm, String sortBy, String direction) {
-        return clinicalDataMapper.getSampleClinicalDataClinicalTableCount(studyIds, sampleIds,"SUMMARY", 
+    public Integer fetchSampleClinicalTableCount(List<String> studyIds, List<String> sampleIds,
+                                                 String searchTerm, String sortBy, String direction) {
+        return clinicalDataMapper.getSampleClinicalTableCount(studyIds, sampleIds,"SUMMARY", 
             searchTerm, sortBy, direction);
     }
 u}(jR  (29e6cd536c59c8a5a75ed8b29ab4ec8f3edde60fjgR  lpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatis/ClinicalDataMapper.xmljiR  modifiedjaR  KjbR  KjkR  KjlR  https://github.com/cBioPortal/cbioportal/blob/9d7c2b38fba7b0573088fd403706ac4ab035d5e7/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.xmljnR  https://github.com/cBioPortal/cbioportal/raw/9d7c2b38fba7b0573088fd403706ac4ab035d5e7/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.xmljpR  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.xml?ref=9d7c2b38fba7b0573088fd403706ac4ab035d5e7jrR  X$  @@ -226,7 +226,7 @@
         GROUP BY clinical_patient.ATTR_ID, clinical_patient.ATTR_VALUE
     </select>
 
-    <select id="getSampleClinicalDataClinicalTable" resultType="org.cbioportal.model.ClinicalData">
+    <select id="getSampleClinicalTable" resultType="org.cbioportal.model.ClinicalData">
         SELECT
         <include refid="selectSample">
             <property name="prefix" value=""/>
@@ -235,7 +235,7 @@
         <include refid="whereSampleSearchAndPagination"/>
     </select>
 
-    <select id="getSampleClinicalDataClinicalTableCount" resultType="Integer">
+    <select id="getSampleClinicalTableCount" resultType="Integer">
         SELECT count(DISTINCT clinical_sample.INTERNAL_ID)
         <include refid="fromSample"/>
         <include refid="whereSampleSearchAndPagination"/>u}(jR  (406e830c8fb8db33c04c693951f4c689ad814cdbjgR  wpersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/ClinicalDataMyBatisRepositoryTest.javajiR  modifiedjaR  KjbR  KjkR  KjlR  https://github.com/cBioPortal/cbioportal/blob/9d7c2b38fba7b0573088fd403706ac4ab035d5e7/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMyBatisRepositoryTest.javajnR  https://github.com/cBioPortal/cbioportal/raw/9d7c2b38fba7b0573088fd403706ac4ab035d5e7/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMyBatisRepositoryTest.javajpR  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMyBatisRepositoryTest.java?ref=9d7c2b38fba7b0573088fd403706ac4ab035d5e7jrR  X  @@ -354,9 +354,9 @@ public void fetchClinicalDataNullAttributeSummaryProjection() {
     @Test
     public void fetchClinicalSampleDataClinicalTabPagingSuccess() {
 
-        List<ClinicalData> resultFirstPage = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(studyIds,
+        List<ClinicalData> resultFirstPage = clinicalDataMyBatisRepository.fetchSampleClinicalTable(studyIds,
             sampleIds, 1, 0, noSearch, noSort, "DESC");
-        List<ClinicalData> resultSecondPage = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(studyIds,
+        List<ClinicalData> resultSecondPage = clinicalDataMyBatisRepository.fetchSampleClinicalTable(studyIds,
             sampleIds, 1, 1, noSearch, noSort, "DESC");
 
         Assert.assertEquals(4, resultFirstPage.size());
@@ -380,7 +380,7 @@ public void fetchClinicalSampleDataClinicalTabPagingSuccess() {
     public void fetchClinicalSampleDataClinicalTablePagingHandleNoneExistingPage() {
 
         // There are only two patients in total. The second page (index 1) with pageSize 2 does not refer to any records.
-        List<ClinicalData> resultNonExistingPage = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(
+        List<ClinicalData> resultNonExistingPage = clinicalDataMyBatisRepository.fetchSampleClinicalTable(
             studyIds, sampleIds, 2, 1, noSearch, noSort, "DESC");
 
         Assert.assertEquals(0, resultNonExistingPage.size());
@@ -389,15 +389,15 @@ public void fetchClinicalSampleDataClinicalTablePagingHandleNoneExistingPage() {
     @Test
     public void fetchClinicalSampleDataClinicalTabSearchTermSuccess() {
 
-        List<ClinicalData> resultSample1 = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(
+        List<ClinicalData> resultSample1 = clinicalDataMyBatisRepository.fetchSampleClinicalTable(
             studyIds, sampleIds, noPaging, noPaging, "5C631CE8", noSort, "DESC");
             
         Assert.assertEquals(4, resultSample1.size());
         List<String> observedSampleIds = resultSample1.stream().map(s -> s.getSampleId()).distinct().collect(Collectors.toList());
         Assert.assertEquals(1, observedSampleIds.size());
         Assert.assertEquals("TCGA-A1-A0SB-01", observedSampleIds.get(0));
 
-        List<ClinicalData> resultSample2 = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(
+        List<ClinicalData> resultSample2 = clinicalDataMyBatisRepository.fetchSampleClinicalTable(
             studyIds, sampleIds, noPaging, noPaging, "F3408556-9259", noSort, "DESC");
 
         Assert.assertEquals(4, resultSample2.size());
@@ -409,7 +409,7 @@ public void fetchClinicalSampleDataClinicalTabSearchTermSuccess() {
     @Test
     public void fetchClinicalSampleDataEClinicalTabEmptyStringSearchTerm() {
 
-        List<ClinicalData> result = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(
+        List<ClinicalData> result = clinicalDataMyBatisRepository.fetchSampleClinicalTable(
             studyIds, sampleIds, noPaging, noPaging, "", noSort, "DESC");
             
         Assert.assertEquals(8, result.size());
@@ -418,9 +418,9 @@ public void fetchClinicalSampleDataEClinicalTabEmptyStringSearchTerm() {
     @Test
     public void fetchClinicalSampleDataClinicalTabSortSuccess() {
 
-        List<ClinicalData> resultSortAsc = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(studyIds,
+        List<ClinicalData> resultSortAsc = clinicalDataMyBatisRepository.fetchSampleClinicalTable(studyIds,
             sampleIds, 1, 0, noSearch, "SAMPLE_TYPE", "ASC");
-        List<ClinicalData> resultSortDesc = clinicalDataMyBatisRepository.fetchSampleClinicalDataClinicalTable(studyIds,
+        List<ClinicalData> resultSortDesc = clinicalDataMyBatisRepository.fetchSampleClinicalTable(studyIds,
             sampleIds, 1, 0, noSearch, "SAMPLE_TYPE", "DESC");
 
         Assert.assertEquals(4, resultSortAsc.size());u}(jR  (972913ce2e4cf08e4584eb835de15c159b3fee6ejgR  Eservice/src/main/java/org/cbioportal/service/ClinicalDataService.javajiR  modifiedjaR  KjbR  KjkR  KjlR  https://github.com/cBioPortal/cbioportal/blob/9d7c2b38fba7b0573088fd403706ac4ab035d5e7/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FClinicalDataService.javajnR  https://github.com/cBioPortal/cbioportal/raw/9d7c2b38fba7b0573088fd403706ac4ab035d5e7/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FClinicalDataService.javajpR  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FClinicalDataService.java?ref=9d7c2b38fba7b0573088fd403706ac4ab035d5e7jrR  X  @@ -52,9 +52,9 @@ BaseMeta fetchMetaClinicalData(List<String> studyIds, List<String> ids, List<Str
     List<ClinicalData> getPatientClinicalDataDetailedToSample(List<String> studyIds, List<String> patientIds,
             List<String> attributeIds);
 
-    List<ClinicalData> fetchSampleClinicalDataClinicalTable(List<String> studyIds, List<String> sampleIds, Integer pageSize,
-                                                            Integer pageNumber, String searchTerm, String sortBy, String direction);
+    List<ClinicalData> fetchSampleClinicalTable(List<String> studyIds, List<String> sampleIds, Integer pageSize,
+                                                Integer pageNumber, String searchTerm, String sortBy, String direction);
     
-    Integer fetchSampleClinicalDataClinicalTableCount(List<String> studyIds, List<String> sampleIds, String searchTerm, 
-                                                      String sortBy, String direction);
+    Integer fetchSampleClinicalTableCount(List<String> studyIds, List<String> sampleIds, String searchTerm,
+                                          String sortBy, String direction);
 }u}(jR  (a4d41a8f3438310a4dcd64a44f747bcc9ea7885ejgR  Nservice/src/main/java/org/cbioportal/service/impl/ClinicalDataServiceImpl.javajiR  modifiedjaR  KjbR  KjkR  KjlR  https://github.com/cBioPortal/cbioportal/blob/9d7c2b38fba7b0573088fd403706ac4ab035d5e7/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FClinicalDataServiceImpl.javajnR  https://github.com/cBioPortal/cbioportal/raw/9d7c2b38fba7b0573088fd403706ac4ab035d5e7/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FClinicalDataServiceImpl.javajpR  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FClinicalDataServiceImpl.java?ref=9d7c2b38fba7b0573088fd403706ac4ab035d5e7jrR  X)  @@ -1,6 +1,5 @@
 package org.cbioportal.service.impl;
 
-import org.apache.commons.collections4.list.UnmodifiableList;
 import org.cbioportal.model.*;
 import org.cbioportal.model.meta.BaseMeta;
 import org.cbioportal.persistence.ClinicalDataRepository;
@@ -228,17 +227,17 @@ public List<ClinicalData> getPatientClinicalDataDetailedToSample(List<String> st
     }
 
     @Override
-    public List<ClinicalData> fetchSampleClinicalDataClinicalTable(List<String> studyIds, List<String> sampleIds, Integer pageSize,
-                                                                   Integer pageNumber, String searchTerm, String sortBy,
-                                                                   String direction) {
-        return clinicalDataRepository.fetchSampleClinicalDataClinicalTable(studyIds, sampleIds, pageSize, pageNumber, searchTerm,
+    public List<ClinicalData> fetchSampleClinicalTable(List<String> studyIds, List<String> sampleIds, Integer pageSize,
+                                                       Integer pageNumber, String searchTerm, String sortBy,
+                                                       String direction) {
+        return clinicalDataRepository.fetchSampleClinicalTable(studyIds, sampleIds, pageSize, pageNumber, searchTerm,
                                                                             sortBy, direction);
     }
 
     @Override
-    public Integer fetchSampleClinicalDataClinicalTableCount(List<String> studyIds, List<String> sampleIds, 
-                                                             String searchTerm, String sortBy, String direction) {
-        return clinicalDataRepository.fetchSampleClinicalDataClinicalTableCount(studyIds, sampleIds, searchTerm, 
+    public Integer fetchSampleClinicalTableCount(List<String> studyIds, List<String> sampleIds,
+                                                 String searchTerm, String sortBy, String direction) {
+        return clinicalDataRepository.fetchSampleClinicalTableCount(studyIds, sampleIds, searchTerm, 
             sortBy, direction);
     }
 }u}(jR  (ca1d405662b69c137e3551d47bfd48d1fd37b8f7jgR  =web/src/main/java/org/cbioportal/web/StudyViewController.javajiR  modifiedjaR  KjbR  KjkR  KjlR  https://github.com/cBioPortal/cbioportal/blob/9d7c2b38fba7b0573088fd403706ac4ab035d5e7/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javajnR  https://github.com/cBioPortal/cbioportal/raw/9d7c2b38fba7b0573088fd403706ac4ab035d5e7/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javajpR  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=9d7c2b38fba7b0573088fd403706ac4ab035d5e7jrR  X  @@ -16,7 +16,6 @@
 import org.cbioportal.web.config.annotation.InternalApi;
 import org.cbioportal.model.AlterationFilter;
 import org.cbioportal.web.parameter.*;
-import org.cbioportal.web.parameter.sort.ClinicalDataSortBy;
 import org.cbioportal.web.util.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.Cacheable;
@@ -884,7 +883,7 @@ public ResponseEntity<List<GenericAssayDataBin>> fetchGenericAssayDataBinCounts(
     @RequestMapping(value = "/clinical-data-table/fetch", method = RequestMethod.POST,
         consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Fetch clinical data for the Clinical Tab of Study View")
-    public ResponseEntity<ClinicalDataCollection> fetchClinicalDataClinicalTable(
+    public ResponseEntity<ClinicalDataCollection> fetchClinicalTable(
         @ApiParam(required = true, value = "Study view filter")
         @Valid @RequestBody(required = false) 
             StudyViewFilter studyViewFilter,
@@ -920,7 +919,7 @@ public ResponseEntity<ClinicalDataCollection> fetchClinicalDataClinicalTable(
         List<SampleIdentifier> filteredSampleIdentifiers = studyViewFilterApplier.apply(interceptedStudyViewFilter);
         studyViewFilterUtil.extractStudyAndSampleIds(filteredSampleIdentifiers, sampleStudyIds, sampleIds);
         
-        List<ClinicalData> sampleClinicalData = clinicalDataService.fetchSampleClinicalDataClinicalTable(
+        List<ClinicalData> sampleClinicalData = clinicalDataService.fetchSampleClinicalTable(
             sampleStudyIds,
             sampleIds,
             pageSize,
@@ -929,7 +928,7 @@ public ResponseEntity<ClinicalDataCollection> fetchClinicalDataClinicalTable(
             sortBy,
             direction.name()
         );
-        Integer total = clinicalDataService.fetchSampleClinicalDataClinicalTableCount(
+        Integer total = clinicalDataService.fetchSampleClinicalTableCount(
             sampleStudyIds,
             sampleIds,
             searchTerm,u}(jR  (374ea1c24fe82abb48ec8f54933b793c1592d693jgR  Aweb/src/test/java/org/cbioportal/web/StudyViewControllerTest.javajiR  modifiedjaR  KjbR  KjkR  KjlR  https://github.com/cBioPortal/cbioportal/blob/9d7c2b38fba7b0573088fd403706ac4ab035d5e7/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javajnR  https://github.com/cBioPortal/cbioportal/raw/9d7c2b38fba7b0573088fd403706ac4ab035d5e7/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javajpR  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.java?ref=9d7c2b38fba7b0573088fd403706ac4ab035d5e7jrR  X  @@ -767,7 +767,7 @@ public void fetchGenericAssayDataCounts() throws Exception {
     public void fetchClinicalDataClinicalTable() throws Exception {
 
         // For this sake of this test the sample clinical data and patient clinical data are identical.
-        when(clinicalDataService.fetchSampleClinicalDataClinicalTable(anyList(), anyList(),
+        when(clinicalDataService.fetchSampleClinicalTable(anyList(), anyList(),
             anyInt(), anyInt(), anyString(), any(), anyString())).thenReturn(clinicalData);
         when(clinicalDataService.fetchClinicalData(anyList(), anyList(),
             any(), anyString(), anyString())).thenReturn(clinicalData);ueu(710e948068af09a4810af2296fd3b92fd73a9b39}(sha(710e948068af09a4810af2296fd3b92fd73a9b39node_idEC_kwDOAe-hB9oAKDcxMGU5NDgwNjhhZjA5YTQ4MTBhZjIyOTZmZDNiOTJmZDczYTliMzkcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-11T15:28:01Zu	committer}(jR  Djokovic0311jR  .55948986+Djokovic0311@users.noreply.github.comjR  2023-08-11T15:28:01Zumessage
modify importtree}(jR  (b4bc2831a6708062f39672d30c89923535e738d9urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/b4bc2831a6708062f39672d30c89923535e738d9ujR  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/710e948068af09a4810af2296fd3b92fd73a9b39
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujR  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/710e948068af09a4810af2296fd3b92fd73a9b39html_urlXhttps://github.com/cBioPortal/cbioportal/commit/710e948068af09a4810af2296fd3b92fd73a9b39comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/710e948068af09a4810af2296fd3b92fd73a9b39/commentsjR  }(loginDjokovic0311idJUjR  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5jR  )https://api.github.com/users/Djokovic0311jR  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminujR  }(jR  Djokovic0311jR  JUjR  MDQ6VXNlcjU1OTQ4OTg2jR  4https://avatars.githubusercontent.com/u/55948986?v=4jR  h5jR  )https://api.github.com/users/Djokovic0311jR  https://github.com/Djokovic0311jR  3https://api.github.com/users/Djokovic0311/followersjR  @https://api.github.com/users/Djokovic0311/following{/other_user}jR  9https://api.github.com/users/Djokovic0311/gists{/gist_id}jR  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}jR  7https://api.github.com/users/Djokovic0311/subscriptionsjR  .https://api.github.com/users/Djokovic0311/orgsjR  /https://api.github.com/users/Djokovic0311/reposjR  :https://api.github.com/users/Djokovic0311/events{/privacy}jR  9https://api.github.com/users/Djokovic0311/received_eventsjR  UserjR  uparents]}(jR  (ebde1ff6769ec990ab1aeae05a0e69749ce433f1jR  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ebde1ff6769ec990ab1aeae05a0e69749ce433f1jR  Xhttps://github.com/cBioPortal/cbioportal/commit/ebde1ff6769ec990ab1aeae05a0e69749ce433f1uastats}(totalK		additionsK	deletionsKufiles]}(jR  (ee2292f7d530eef53a17173de24fab5b90eadda6filenameXservice/src/main/java/org/cbioportal/service/impl/GenericAssayEnrichmentServiceImpl.javastatusmodifiedjS  KjS  KchangesK	blob_urlhttps://github.com/cBioPortal/cbioportal/blob/710e948068af09a4810af2296fd3b92fd73a9b39/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/710e948068af09a4810af2296fd3b92fd73a9b39/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.java?ref=710e948068af09a4810af2296fd3b92fd73a9b39patchX  @@ -1,8 +1,15 @@
 package org.cbioportal.service.impl;
 
 import org.apache.commons.lang3.BooleanUtils;
-import org.cbioportal.model.*;
+import org.cbioportal.model.EnrichmentType;
+import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
+import org.cbioportal.model.GenericAssayMolecularAlteration;
+import org.cbioportal.model.MolecularProfileCaseIdentifier;
 import org.cbioportal.model.meta.GenericAssayMeta;
+import org.cbioportal.model.MolecularProfile;
+import org.cbioportal.model.Sample;
+import org.cbioportal.model.GenericAssayEnrichment;
 import org.cbioportal.persistence.MolecularDataRepository;
 import org.cbioportal.service.GenericAssayEnrichmentService;
 import org.cbioportal.service.GenericAssayService;uau(8116c07da0795a2ef06a6543725c04c9b823b7c8}(sha(8116c07da0795a2ef06a6543725c04c9b823b7c8node_idEC_kwDOAe-hB9oAKDgxMTZjMDdkYTA3OTVhMmVmMDZhNjU0MzcyNWMwNGM5YjgyM2I3Yzgcommit}(author}(nameKarthikemailkalletlakarthik@gmail.comdate2023-07-11T15:25:32Zu	committer}(j3S  Karthikj5S  kalletlakarthik@gmail.comj7S  2023-07-11T15:25:32ZumessageUpdate download control optionstree}(j+S  (d93f5cc98c66486ea9f8f0b0b39b36e6be0030f6urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/d93f5cc98c66486ea9f8f0b0b39b36e6be0030f6ujCS  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/8116c07da0795a2ef06a6543725c04c9b823b7c8
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujCS  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8116c07da0795a2ef06a6543725c04c9b823b7c8html_urlXhttps://github.com/cBioPortal/cbioportal/commit/8116c07da0795a2ef06a6543725c04c9b823b7c8comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/8116c07da0795a2ef06a6543725c04c9b823b7c8/commentsj1S  }(login	kalletlakidJƴ j-S  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5jCS  &https://api.github.com/users/kalletlakjOS  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminuj9S  }(jTS  	kalletlakjVS  Jƴ j-S  MDQ6VXNlcjEyOTU2ODcwjXS  4https://avatars.githubusercontent.com/u/12956870?v=4jZS  h5jCS  &https://api.github.com/users/kalletlakjOS  https://github.com/kalletlakj]S  0https://api.github.com/users/kalletlak/followersj_S  =https://api.github.com/users/kalletlak/following{/other_user}jaS  6https://api.github.com/users/kalletlak/gists{/gist_id}jcS  =https://api.github.com/users/kalletlak/starred{/owner}{/repo}jeS  4https://api.github.com/users/kalletlak/subscriptionsjgS  +https://api.github.com/users/kalletlak/orgsjiS  ,https://api.github.com/users/kalletlak/reposjkS  7https://api.github.com/users/kalletlak/events{/privacy}jmS  6https://api.github.com/users/kalletlak/received_eventsjoS  UserjqS  uparents]}(j+S  (249d4ca1bab7348af6f513bb4b897fac8cf93310jCS  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/249d4ca1bab7348af6f513bb4b897fac8cf93310jOS  Xhttps://github.com/cBioPortal/cbioportal/commit/249d4ca1bab7348af6f513bb4b897fac8cf93310uastats}(totalK	additionsK	deletionsKufiles](}(j+S  (ad5612c67213e693e63929ab5689b4e0e179060dfilenameCcore/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.javastatusmodifiedjS  KjS  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/8116c07da0795a2ef06a6543725c04c9b823b7c8/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/8116c07da0795a2ef06a6543725c04c9b823b7c8/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.java?ref=8116c07da0795a2ef06a6543725c04c9b823b7c8patchXV  @@ -1262,4 +1262,20 @@ public static String getReferenceGenomeName() {
     public static String getOncoKbToken()  {
         return portalProperties.getProperty(ONCOKB_TOKEN, null);
     }
+
+    public static String getDownloadControl() {
+        String downloadControlOption = getProperty("skin.hide_download_controls");
+        /*
+            skin.hide_download_controls   return_value
+                    true                    hide
+                    false                   show
+                    data                    data
+                    null/empty              show
+         */
+        switch ((downloadControlOption != null) ? downloadControlOption.trim().toLowerCase() : "false") {
+            case "true" : return "hide";
+            case "data" : return "data";
+            default: return "show";
+        }
+    }
 }u}(j+S  (b20f514cc23a4e4418c7f98327a5122c92b8860cjS  Hdocs/deployment/customization/Customizing-your-instance-of-cBioPortal.mdjS  modifiedjS  KjS  KjS  KjS  https://github.com/cBioPortal/cbioportal/blob/8116c07da0795a2ef06a6543725c04c9b823b7c8/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdjS  https://github.com/cBioPortal/cbioportal/raw/8116c07da0795a2ef06a6543725c04c9b823b7c8/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdjS  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.md?ref=8116c07da0795a2ef06a6543725c04c9b823b7c8jS  XV  @@ -243,11 +243,9 @@ Below you can find the complete list of all the available skin properties.
         </tr>
 		<tr>
             <td>skin.hide_download_controls</td>
-            <td>removes all download and copy-to-clipboard options.</td>
-            <td>show</td>
-            <td>
-                string. "show" enables all download and copy-to-clipboard options. "data" disables data download but keeps figure and top-level data. "hide" disables all the download and copy-to-keyboard options.
-            </td>
+            <td>controls download options in UI. **true**: hides all download options. **false**:  shows all download options. **data**: disable data download but not figure download</td>
+            <td>false</td>
+            <td>true / false / data</td>
         </tr>
         <tr>
             <td>skin.show_settings_menu</td>u}(j+S  (3dba7cba8c20257809f9bf122aff3f7bcd8842e9jS  )portal/src/main/webapp/config_service.jspjS  modifiedjS  KjS  KjS  KjS  https://github.com/cBioPortal/cbioportal/blob/8116c07da0795a2ef06a6543725c04c9b823b7c8/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspjS  https://github.com/cBioPortal/cbioportal/raw/8116c07da0795a2ef06a6543725c04c9b823b7c8/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspjS  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=8116c07da0795a2ef06a6543725c04c9b823b7c8jS  X  @@ -146,7 +146,6 @@
             "skin.patient_view.copy_number_table.columns.show_on_init",
             "skin.patient_view.structural_variant_table.columns.show_on_init",
             "comparison.categorical_na_values",
-            "skin.hide_download_controls",
             "study_download_url",
             "skin.home_page.show_reference_genome"
         };
@@ -203,6 +202,8 @@
         obj.put("oncoKbTokenDefined", !StringUtils.isEmpty(GlobalProperties.getOncoKbToken()));
 
         obj.put("sessionServiceEnabled", !StringUtils.isEmpty(GlobalProperties.getSessionServiceUrl()));
+        
+        obj.put("skin_hide_download_controls", GlobalProperties.getDownloadControl());
 
         out.println(obj.toJSONString());
 u}(j+S  (ce06c5554dfb518cc4e7df046af786eb1d86f988jS  ,src/main/resources/portal.properties.EXAMPLEjS  modifiedjS  KjS  KjS  KjS  https://github.com/cBioPortal/cbioportal/blob/8116c07da0795a2ef06a6543725c04c9b823b7c8/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEjS  https://github.com/cBioPortal/cbioportal/raw/8116c07da0795a2ef06a6543725c04c9b823b7c8/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEjS  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=8116c07da0795a2ef06a6543725c04c9b823b7c8jS  X  @@ -108,7 +108,7 @@ skin.study_view.link_text=To build your own case set, try out our enhanced Study
 # skin.home_page.show_reference_genome=false
 
 ## setting controlling whether Download tabs and download/copy-to-clipboard controls should be shown
-# skin.hide_download_controls=show
+# skin.hide_download_controls=false
 
 ## setting controlling which name should be used to display the authenticated user (email, or username)
 # skin.user_display_name=emailueu(c70653d349a0a429917360d8d60f6c487005d79a}(sha(c70653d349a0a429917360d8d60f6c487005d79anode_idEC_kwDOAe-hB9oAKGM3MDY1M2QzNDlhMGE0Mjk5MTczNjBkOGQ2MGY2YzQ4NzAwNWQ3OWEcommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-06-09T13:51:06Zu	committer}(jS  
pvannieropjS  pim@thehyve.nljS  2023-06-13T07:04:02Zumessage'Add unit tests for resolveEntrezGeneIdstree}(jS  (2447a60271e5315be03afab804379d4712bf3c7furlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/2447a60271e5315be03afab804379d4712bf3c7fujS  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/c70653d349a0a429917360d8d60f6c487005d79a
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujS  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/c70653d349a0a429917360d8d60f6c487005d79ahtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/c70653d349a0a429917360d8d60f6c487005d79acomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/c70653d349a0a429917360d8d60f6c487005d79a/commentsjS  }(login
pvannieropidJa jS  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5jS  'https://api.github.com/users/pvannieropjS  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminujS  }(jS  
pvannieropjS  Ja jS  MDQ6VXNlcjc0NTg4NQ==jS  2https://avatars.githubusercontent.com/u/745885?v=4jS  h5jS  'https://api.github.com/users/pvannieropjS  https://github.com/pvannieropjS  1https://api.github.com/users/pvannierop/followersjS  >https://api.github.com/users/pvannierop/following{/other_user}jS  7https://api.github.com/users/pvannierop/gists{/gist_id}jS  >https://api.github.com/users/pvannierop/starred{/owner}{/repo}jS  5https://api.github.com/users/pvannierop/subscriptionsjS  ,https://api.github.com/users/pvannierop/orgsjS  -https://api.github.com/users/pvannierop/reposjS  8https://api.github.com/users/pvannierop/events{/privacy}jS  7https://api.github.com/users/pvannierop/received_eventsjS  UserjS  uparents]}(jS  (d6d19e70f12cecc4cfa8794e910c33dda6e9adffjS  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d6d19e70f12cecc4cfa8794e910c33dda6e9adffjS  Xhttps://github.com/cBioPortal/cbioportal/commit/d6d19e70f12cecc4cfa8794e910c33dda6e9adffuastats}(totalK		additionsK	deletionsKufiles](}(jS  (ced8b24d084912d7c9906626f3d68145a5dfc82dfilenameBweb/src/main/java/org/cbioportal/web/util/StudyViewFilterUtil.javastatusmodifiedjT  KjT  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/c70653d349a0a429917360d8d60f6c487005d79a/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/c70653d349a0a429917360d8d60f6c487005d79a/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.java?ref=c70653d349a0a429917360d8d60f6c487005d79apatchX  @@ -292,9 +292,7 @@ private Map<String, Integer> getStringIntegerMap(List<String> hugoGeneSymbols) {
         return symbolToEntrezGeneId;
     }
 
-    // TODO Pim test this logic.
-    // TODO Pim write test.
-    public List<StructVarFilterQuery> addEntrezGeneIds(List<StructVarFilterQuery> structVarQueries) {
+    public List<StructVarFilterQuery> resolveEntrezGeneIds(List<StructVarFilterQuery> structVarQueries) {
 
         List<String> hugoGeneSymbols = structVarQueries
             .stream()u}(jS  (a03bfba5958b1100088129e30d5b83801824bcfdjT  Yweb/src/main/java/org/cbioportal/web/util/appliers/StructuralVariantSubFilterApplier.javaj T  modifiedjT  KjT  Kj"T  Kj#T  https://github.com/cBioPortal/cbioportal/blob/c70653d349a0a429917360d8d60f6c487005d79a/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.javaj%T  https://github.com/cBioPortal/cbioportal/raw/c70653d349a0a429917360d8d60f6c487005d79a/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.javaj'T  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.java?ref=c70653d349a0a429917360d8d60f6c487005d79aj)T  X  @@ -75,7 +75,7 @@ public List<SampleIdentifier> filter(List<SampleIdentifier> toFilter, StudyViewF
                         .map(SampleIdentifier::getSampleId)
                         .collect(Collectors.toList());
 
-                final List<StructVarFilterQuery> entrezIdEnhancedSvQueries = studyViewFilterUtil.addEntrezGeneIds(structVarQueries);
+                final List<StructVarFilterQuery> entrezIdEnhancedSvQueries = studyViewFilterUtil.resolveEntrezGeneIds(structVarQueries);
                 remainingSampleIdentifiers = structuralVariantService
                     .fetchStructuralVariantsByStructVarQueries(molecularProfileIds, sampleIds, entrezIdEnhancedSvQueries)
                     .stream()u}(jS  (fc15795cf0df8da7ed65d5dea4e6572ef42a8852jT  ]web/src/test/java/org/cbioportal/web/util/appliers/StructuralVariantSubFilterApplierTest.javaj T  modifiedjT  KjT  Kj"T  Kj#T  https://github.com/cBioPortal/cbioportal/blob/c70653d349a0a429917360d8d60f6c487005d79a/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.javaj%T  https://github.com/cBioPortal/cbioportal/raw/c70653d349a0a429917360d8d60f6c487005d79a/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.javaj'T  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.java?ref=c70653d349a0a429917360d8d60f6c487005d79aj)T  X  @@ -21,7 +21,6 @@
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 
 import static org.mockito.ArgumentMatchers.anyList;
 import static org.mockito.ArgumentMatchers.eq;
@@ -86,7 +85,7 @@ public void setUp() throws Exception {
             createStructVar("5", ST_1_ID)
         );
         // Subsequently, return results for svA and svB queries.
-        when(studyViewFilterUtil.addEntrezGeneIds(anyList()))
+        when(studyViewFilterUtil.resolveEntrezGeneIds(anyList()))
             .thenReturn(svA, svB);
         when(structuralVariantService.fetchStructuralVariantsByStructVarQueries(anyList(), anyList(), anyList())
         ).thenReturn(structuralVariantsQuerySvA, structuralVariantsQuerySvB);ueu(d4d44a6fe7e8cb1566e495ca6adf6c7a097b82f9}(sha(d4d44a6fe7e8cb1566e495ca6adf6c7a097b82f9node_idEC_kwDOAe-hB9oAKGQ0ZDQ0YTZmZTdlOGNiMTU2NmU0OTVjYTZhZGY2YzdhMDk3YjgyZjkcommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-06-13T09:58:33Zu	committer}(jET  
pvannieropjGT  pim@thehyve.nljIT  2023-06-13T09:58:33ZumessageUpdate result reporttree}(j=T  (9b3ef2cfab5e56c3b631369c8445d2c67cb5ede8urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/9b3ef2cfab5e56c3b631369c8445d2c67cb5ede8ujUT  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/d4d44a6fe7e8cb1566e495ca6adf6c7a097b82f9
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujUT  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d4d44a6fe7e8cb1566e495ca6adf6c7a097b82f9html_urlXhttps://github.com/cBioPortal/cbioportal/commit/d4d44a6fe7e8cb1566e495ca6adf6c7a097b82f9comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/d4d44a6fe7e8cb1566e495ca6adf6c7a097b82f9/commentsjCT  }(login
pvannieropidJa j?T  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5jUT  'https://api.github.com/users/pvannieropjaT  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminujKT  }(jfT  
pvannieropjhT  Ja j?T  MDQ6VXNlcjc0NTg4NQ==jjT  2https://avatars.githubusercontent.com/u/745885?v=4jlT  h5jUT  'https://api.github.com/users/pvannieropjaT  https://github.com/pvannieropjoT  1https://api.github.com/users/pvannierop/followersjqT  >https://api.github.com/users/pvannierop/following{/other_user}jsT  7https://api.github.com/users/pvannierop/gists{/gist_id}juT  >https://api.github.com/users/pvannierop/starred{/owner}{/repo}jwT  5https://api.github.com/users/pvannierop/subscriptionsjyT  ,https://api.github.com/users/pvannierop/orgsj{T  -https://api.github.com/users/pvannierop/reposj}T  8https://api.github.com/users/pvannierop/events{/privacy}jT  7https://api.github.com/users/pvannierop/received_eventsjT  UserjT  uparents]}(j=T  (d0fb6210aab800573e265132bed356b198c0db73jUT  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d0fb6210aab800573e265132bed356b198c0db73jaT  Xhttps://github.com/cBioPortal/cbioportal/commit/d0fb6210aab800573e265132bed356b198c0db73uastats}(totalK	additionsK	deletionsKufiles]}(j=T  (c3e1fc7a20c7dc41171375f2eb77c512a3de6c3bfilename=core/src/test/scripts/test_data/study_es_0/result_report.htmlstatusmodifiedjT  KjT  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/d4d44a6fe7e8cb1566e495ca6adf6c7a097b82f9/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.htmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/d4d44a6fe7e8cb1566e495ca6adf6c7a097b82f9/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.htmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.html?ref=d4d44a6fe7e8cb1566e495ca6adf6c7a097b82f9patchX
  @@ -142,15 +142,15 @@ <h4 class="panel-title">General</h4>
                 <td><span class="glyphicon glyphicon-cog" aria-hidden="true"></span><span class="sr-only">Debug</span></td>
                 <td>&ndash;</td>
                 <td>&ndash;</td>
-                <td>Retrieving chromosome lengths from &#39;/cbioportal/core/src/main/scripts/importer/chromosome_sizes.json&#39;</td>
+                <td>Retrieving chromosome lengths from &#39;/home/pnp300/git/cbioportal/core/src/main/scripts/importer/chromosome_sizes.json&#39;</td>
                 <td>&ndash;</td>
                 <td></td>
               </tr>
               <tr class="info">
                 <td><span class="glyphicon glyphicon-cog" aria-hidden="true"></span><span class="sr-only">Debug</span></td>
                 <td>&ndash;</td>
                 <td>&ndash;</td>
-                <td>Retrieving chromosome lengths from &#39;/cbioportal/core/src/main/scripts/importer/chromosome_sizes.json&#39;</td>
+                <td>Retrieving chromosome lengths from &#39;/home/pnp300/git/cbioportal/core/src/main/scripts/importer/chromosome_sizes.json&#39;</td>
                 <td>&ndash;</td>
                 <td></td>
               </tr>
@@ -1742,7 +1742,7 @@ <h4 class="panel-title">data_resource_study.txt</h4>
           <a role="button" data-toggle="collapse" aria-expanded="true"
              href="#collapse_ZGF0YV9zdHJ1Y3R1cmFsX3ZhcmlhbnRzLnR4dA",
              aria-controls="collapse_ZGF0YV9zdHJ1Y3R1cmFsX3ZhcmlhbnRzLnR4dA">
-            <span class="badge">3</span>
+            <span class="badge">5</span>
             <h4 class="panel-title">data_structural_variants.txt</h4>
           </a>
         </div>
@@ -1770,6 +1770,22 @@ <h4 class="panel-title">data_structural_variants.txt</h4>
                 <td>&ndash;</td>
                 <td></td>
               </tr>
+              <tr class="success">
+                <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
+                <td>48</td>
+                <td>&ndash;</td>
+                <td>No Entrez gene id or gene symbol provided for site 2. Assuming either the intragenic, deletion, duplication, translocation or inversion variant</td>
+                <td>&ndash;</td>
+                <td></td>
+              </tr>
+              <tr class="success">
+                <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
+                <td>49</td>
+                <td>&ndash;</td>
+                <td>No Entrez gene id or gene symbol provided for site 1. Assuming either the intragenic, deletion, duplication, translocation or inversion variant</td>
+                <td>&ndash;</td>
+                <td></td>
+              </tr>
               <tr class="success">
                 <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
                 <td>&ndash;</td>
@@ -1782,7 +1798,7 @@ <h4 class="panel-title">data_structural_variants.txt</h4>
                 <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
                 <td>&ndash;</td>
                 <td>&ndash;</td>
-                <td>Read 47 lines. Lines with warning: 0. Lines with error: 0</td>
+                <td>Read 49 lines. Lines with warning: 0. Lines with error: 0</td>
                 <td>&ndash;</td>
                 <td></td>
               </tr>uau(1275f9bcaa5ba4a8fb4df1a294eedd2856d567b8}(sha(1275f9bcaa5ba4a8fb4df1a294eedd2856d567b8node_idEC_kwDOAe-hB9oAKDEyNzVmOWJjYWE1YmE0YThmYjRkZjFhMjk0ZWVkZDI4NTZkNTY3Yjgcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-01T13:35:48Zu	committer}(jT  Gaofei ZhaojT  ,15748980+dippindots@users.noreply.github.comjT  2023-08-01T13:38:11Zumessage5Allow redis service unavailable when Redis is enabledtree}(jT  (693a1b1001b29a00c64c7901532bc2704aa01d90urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/693a1b1001b29a00c64c7901532bc2704aa01d90ujT  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/1275f9bcaa5ba4a8fb4df1a294eedd2856d567b8
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujT  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1275f9bcaa5ba4a8fb4df1a294eedd2856d567b8html_urlXhttps://github.com/cBioPortal/cbioportal/commit/1275f9bcaa5ba4a8fb4df1a294eedd2856d567b8comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/1275f9bcaa5ba4a8fb4df1a294eedd2856d567b8/commentsjT  }(login
dippindotsidJtO jT  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5jT  'https://api.github.com/users/dippindotsjT  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminujT  }(jT  
dippindotsjT  JtO jT  MDQ6VXNlcjE1NzQ4OTgwjT  4https://avatars.githubusercontent.com/u/15748980?v=4jT  h5jT  'https://api.github.com/users/dippindotsjT  https://github.com/dippindotsjT  1https://api.github.com/users/dippindots/followersjT  >https://api.github.com/users/dippindots/following{/other_user}jT  7https://api.github.com/users/dippindots/gists{/gist_id}jT  >https://api.github.com/users/dippindots/starred{/owner}{/repo}jT  5https://api.github.com/users/dippindots/subscriptionsjT  ,https://api.github.com/users/dippindots/orgsjT  -https://api.github.com/users/dippindots/reposjT  8https://api.github.com/users/dippindots/events{/privacy}jT  7https://api.github.com/users/dippindots/received_eventsjT  UserjT  uparents]}(jT  (70f459760dd6a22b794a47b2d33eeea2b35587e6jT  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/70f459760dd6a22b794a47b2d33eeea2b35587e6jT  Xhttps://github.com/cBioPortal/cbioportal/commit/70f459760dd6a22b794a47b2d33eeea2b35587e6uastats}(totalK3	additionsK3	deletionsK ufiles](}(jT  (2da81e8787c9c0aa846a08dfa3d2fa80a233ee13filename\persistence/persistence-api/src/main/java/org/cbioportal/persistence/config/RedisConfig.javastatusmodifiedjU  KjU  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/1275f9bcaa5ba4a8fb4df1a294eedd2856d567b8/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fconfig%2FRedisConfig.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/1275f9bcaa5ba4a8fb4df1a294eedd2856d567b8/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fconfig%2FRedisConfig.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fconfig%2FRedisConfig.java?ref=1275f9bcaa5ba4a8fb4df1a294eedd2856d567b8patchX  @@ -2,14 +2,17 @@
 
 import org.cbioportal.persistence.util.CustomKeyGenerator;
 import org.cbioportal.persistence.util.CustomRedisCachingProvider;
+import org.cbioportal.persistence.util.LoggingCacheErrorHandler;
 import org.cbioportal.utils.config.annotation.ConditionalOnProperty;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cache.CacheManager;
 import org.springframework.cache.annotation.CachingConfigurerSupport;
 import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.cache.interceptor.CacheErrorHandler;
 import org.springframework.cache.interceptor.CacheResolver;
 import org.springframework.cache.interceptor.KeyGenerator;
 import org.springframework.cache.interceptor.NamedCacheResolver;
+
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 
@@ -29,6 +32,11 @@ public CacheManager cacheManager() {
         );
     }
 
+    @Override
+    public CacheErrorHandler errorHandler() {
+        return new LoggingCacheErrorHandler();
+    }
+
     @Bean
     @Override
     public KeyGenerator keyGenerator() {u}(jT  (70007bb896609c8f4e841897ff756cf3ec343cdbjU  gpersistence/persistence-api/src/main/java/org/cbioportal/persistence/util/LoggingCacheErrorHandler.javajU  addedjU  K+jU  K jU  K+jU  https://github.com/cBioPortal/cbioportal/blob/1275f9bcaa5ba4a8fb4df1a294eedd2856d567b8/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Futil%2FLoggingCacheErrorHandler.javajU  https://github.com/cBioPortal/cbioportal/raw/1275f9bcaa5ba4a8fb4df1a294eedd2856d567b8/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Futil%2FLoggingCacheErrorHandler.javaj!U  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Futil%2FLoggingCacheErrorHandler.java?ref=1275f9bcaa5ba4a8fb4df1a294eedd2856d567b8j#U  X  @@ -0,0 +1,43 @@
+package org.cbioportal.persistence.util;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.cache.Cache;
+import org.springframework.cache.interceptor.CacheErrorHandler;
+
+/**
+ * Implementation of org.springframework.cache.interceptor.CacheErrorHandler
+ * that logs the error messages when performing Redis operations.
+ * Redis will throw a RuntimeException causing our APIs to return HTTP 500 responses, so we defined
+ * this class to just log the errors and allow our app fallback to the non-cached version.
+ */
+
+public class LoggingCacheErrorHandler implements CacheErrorHandler {
+
+    private static final Logger LOG = LoggerFactory.getLogger(LoggingCacheErrorHandler.class);
+
+    @Override
+    public void handleCacheGetError(RuntimeException exception, Cache cache, Object key) {
+        LOG.error(String.format("Cache '%s' failed to get entry with key '%s'", cache.getName(), key), exception);
+        exception.printStackTrace();
+    }
+
+    @Override
+    public void handleCachePutError(RuntimeException exception, Cache cache, Object key, Object value) {
+        LOG.error(String.format("Cache '%s' failed to put entry with key '%s'", cache.getName(), key), exception);
+        exception.printStackTrace();
+    }
+
+    @Override
+    public void handleCacheEvictError(RuntimeException exception, Cache cache, Object key) {
+        LOG.error(String.format("Cache '%s' failed to evict entry with key '%s'", cache.getName(), key), exception);
+        exception.printStackTrace();
+    }
+
+    @Override
+    public void handleCacheClearError(RuntimeException exception, Cache cache) {
+        LOG.error(String.format("Cache '%s' failed to clear entries", cache.getName()), exception);
+        exception.printStackTrace();
+    }
+
+}ueu(9af6061f6a0c46d7fb3b412ca45b38cc0690b14d}(sha(9af6061f6a0c46d7fb3b412ca45b38cc0690b14dnode_idEC_kwDOAe-hB9oAKDlhZjYwNjFmNmEwYzQ2ZDdmYjNiNDEyY2E0NWIzOGNjMDY5MGIxNGQcommit}(author}(nameMatthijs Ponemail-63122826+MatthijsPon@users.noreply.github.comdate2023-05-26T15:54:13Zu	committer}(j7U  GitHubj9U  noreply@github.comj;U  2023-05-26T15:54:13ZumessageBextend File-Formats.md with mutational signature datatype (#10172)tree}(j/U  (789a2cd73749c9fffc2db8284047c0e8af586d11urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/789a2cd73749c9fffc2db8284047c0e8af586d11ujGU  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/9af6061f6a0c46d7fb3b412ca45b38cc0690b14d
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkcNYlCRBK7hj4Ov3rIwAA6ucIAINv7UA5yOSOFKyGv8MRGOX1
2UFWH/MSZzEOySYCroy0c2FDbPZf6t/n76LY6WEzK4MlzWNGoOBJgRES8WLxWzEt
pxQbcuGyZeP+99+wRSUKguupHGt/q/POiylR34x9k4uSGSbYSCVeI+AhUC31bAvL
LEOh3lYPJuCUs/GLGAqC5ZpRMOgt7Rb369j8pHBnViiGp24v9fPpX/bzvvVXXD/I
dTngiz1DRruQdxocoW086Qj4ZW/PaYPM3SrUuMB0XhOwxJcZE+nrM47X8QAXfDOc
ec7XEXYGKesBOq9SPM43HLM03qNqM68LBm1NBaE8wegXxTmBOONaAgBnSALgoZk=
=dzAG
-----END PGP SIGNATURE-----
payloadX/  tree 789a2cd73749c9fffc2db8284047c0e8af586d11
parent d0b7a1df2962cfc6d762dff57daca0bcdc4684ce
author Matthijs Pon <63122826+MatthijsPon@users.noreply.github.com> 1685116453 +0200
committer GitHub <noreply@github.com> 1685116453 -0400

extend File-Formats.md with mutational signature datatype (#10172)

uujGU  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9af6061f6a0c46d7fb3b412ca45b38cc0690b14dhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/9af6061f6a0c46d7fb3b412ca45b38cc0690b14dcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/9af6061f6a0c46d7fb3b412ca45b38cc0690b14d/commentsj5U  }(loginMatthijsPonidJ-j1U  MDQ6VXNlcjYzMTIyODI2
avatar_url4https://avatars.githubusercontent.com/u/63122826?v=4gravatar_idh5jGU  (https://api.github.com/users/MatthijsPonjUU  https://github.com/MatthijsPon
followers_url2https://api.github.com/users/MatthijsPon/followers
following_url?https://api.github.com/users/MatthijsPon/following{/other_user}	gists_url8https://api.github.com/users/MatthijsPon/gists{/gist_id}starred_url?https://api.github.com/users/MatthijsPon/starred{/owner}{/repo}subscriptions_url6https://api.github.com/users/MatthijsPon/subscriptionsorganizations_url-https://api.github.com/users/MatthijsPon/orgs	repos_url.https://api.github.com/users/MatthijsPon/repos
events_url9https://api.github.com/users/MatthijsPon/events{/privacy}received_events_url8https://api.github.com/users/MatthijsPon/received_events      typeUser
site_adminuj=U  }(jZU  web-flowj\U  J/j1U  MDQ6VXNlcjE5ODY0NDQ3j^U  4https://avatars.githubusercontent.com/u/19864447?v=4j`U  h5jGU  %https://api.github.com/users/web-flowjUU  https://github.com/web-flowjcU  /https://api.github.com/users/web-flow/followersjeU  <https://api.github.com/users/web-flow/following{/other_user}jgU  5https://api.github.com/users/web-flow/gists{/gist_id}jiU  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jkU  3https://api.github.com/users/web-flow/subscriptionsjmU  *https://api.github.com/users/web-flow/orgsjoU  +https://api.github.com/users/web-flow/reposjqU  6https://api.github.com/users/web-flow/events{/privacy}jsU  5https://api.github.com/users/web-flow/received_eventsjuU  UserjwU  uparents]}(j/U  (d0b7a1df2962cfc6d762dff57daca0bcdc4684cejGU  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d0b7a1df2962cfc6d762dff57daca0bcdc4684cejUU  Xhttps://github.com/cBioPortal/cbioportal/commit/d0b7a1df2962cfc6d762dff57daca0bcdc4684ceuastats}(totalK	additionsK	deletionsK ufiles]}(j/U  (325eefbde62c4ea297fcc028c2db7b5d92f4f1b0filenamedocs/File-Formats.mdstatusmodifiedjU  KjU  K changesKblob_urlmhttps://github.com/cBioPortal/cbioportal/blob/9af6061f6a0c46d7fb3b412ca45b38cc0690b14d/docs%2FFile-Formats.mdraw_urllhttps://github.com/cBioPortal/cbioportal/raw/9af6061f6a0c46d7fb3b412ca45b38cc0690b14d/docs%2FFile-Formats.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FFile-Formats.md?ref=9af6061f6a0c46d7fb3b412ca45b38cc0690b14dpatchX  @@ -21,6 +21,7 @@
     * [Study Tags file](#study-tags-file)
     * [Generic Assay](#generic-assay)
         * [Arm Level CNA Data](#arm-level-cna-data)
+        * [Mutational Signature Data](#mutational-signature-data)
     * [Resource Data](#resource-data)
     * [Custom namespace columns](#custom-namespace-columns)
 
@@ -1599,6 +1600,32 @@ Allowed values for Arm-level copy-number data are `Loss`, `Gain`, and `Unchanged
 
 Please find example file format here: [Meta file example](https://github.com/cBioPortal/cbioportal-frontend/blob/master/end-to-end-test/local/studies/lgg_ucsf_2014_test_generic_assay/meta_armlevel_CNA.txt) and [Data file example](https://github.com/cBioPortal/cbioportal-frontend/blob/master/end-to-end-test/local/studies/lgg_ucsf_2014_test_generic_assay/data_armlevel_CNA.txt)
 
+### Mutational Signature Data
+Mutational Signature data is a predefined subtype of Generic Assay Data. Setting `generic_assay_type: MUTATIONAL_SIGNATURE` 
+in the meta file will make cBioPortal interpret the data as Mutational Signature data.
+
+#### Mutational Signature meta files
+The mutational signature meta files follow the same convention as the [Generic Assay Meta file](#generic-assay-meta-file),
+however there are some key differences:
+- `genetic_assay_type` should be set to `MUTATIONAL_SIGNATURE`
+- `datatype` should be set to `LIMIT_VALUE`
+- `stable_id` values should end with: `_{filetype}_{identifier}`, where:
+  - `filetype` is either `contribution`, `pvalue` or `counts`
+  - `identifier` is consistent between files belonging to the same analysis
+  - Multiple signatures can be added to a single study, as long as they have different identifiers in their stable id (e.g., `contribution_SBS` and `contribution_DBS`)
+- In `generic_entity_meta_properties` the `NAME` value is required. The `DESCRIPTION` and `URL` values can be added 
+  to display more information and link to external resources in the mutational signatures tab.
+
+#### Mutational Signature data files
+The mutational signature data files follow the same convention as the [Generic Assay Data file](#generic-assay-data-file).
+Each collection of mutational signatures can consist of up to three different data files, each with an accompanying meta file.
+- Signature _contribution_ file (**required**)
+  - Data file containing the contribution of each signature-sample pair. Values are expected to be 0 ≥ x ≥ 1.
+- Signature _pvalue_ file (optional)
+  - Data file containing p-values for each signature-sample pair. Values below 0.05 will be shown as significant.
+- Mutational _counts_ matrix file (optional)
+  - Data file containing nucleotide changes of a sample. cBioPortal has specific visualization options for single-base substitutions (96 channels), double-base substitutions (72 channels) and insertion/deletions (83 channels), following the signatures defined by [COSMIC](https://cancer.sanger.ac.uk/signatures/). But other channels can also be used. Values are expected to be positive integers.
+
 ## Resource Data
 
 The resource data is used to capture resource data in patients, samples and studies. The resources will be represented by URLs with meta data. The types of resources include:uau(38911ab8bf7129a3da88bbc221a0727e8edf3458}(sha(38911ab8bf7129a3da88bbc221a0727e8edf3458node_idEC_kwDOAe-hB9oAKDM4OTExYWI4YmY3MTI5YTNkYTg4YmJjMjIxYTA3MjdlOGVkZjM0NTgcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-13T20:53:16Zu	committer}(jU  Djokovic0311jU  .55948986+Djokovic0311@users.noreply.github.comjU  2023-08-13T20:53:16Zumessage
test checktree}(jU  (a603ce01667c1fcb08a879a93b51f58b734cbc8burlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/a603ce01667c1fcb08a879a93b51f58b734cbc8bujU  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/38911ab8bf7129a3da88bbc221a0727e8edf3458
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujU  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/38911ab8bf7129a3da88bbc221a0727e8edf3458html_urlXhttps://github.com/cBioPortal/cbioportal/commit/38911ab8bf7129a3da88bbc221a0727e8edf3458comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/38911ab8bf7129a3da88bbc221a0727e8edf3458/commentsjU  }(loginDjokovic0311idJUjU  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5jU  )https://api.github.com/users/Djokovic0311jU  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminujU  }(jU  Djokovic0311jU  JUjU  MDQ6VXNlcjU1OTQ4OTg2jU  4https://avatars.githubusercontent.com/u/55948986?v=4jU  h5jU  )https://api.github.com/users/Djokovic0311jU  https://github.com/Djokovic0311jU  3https://api.github.com/users/Djokovic0311/followersjU  @https://api.github.com/users/Djokovic0311/following{/other_user}jU  9https://api.github.com/users/Djokovic0311/gists{/gist_id}jU  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}jU  7https://api.github.com/users/Djokovic0311/subscriptionsjU  .https://api.github.com/users/Djokovic0311/orgsjU  /https://api.github.com/users/Djokovic0311/reposjU  :https://api.github.com/users/Djokovic0311/events{/privacy}jU  9https://api.github.com/users/Djokovic0311/received_eventsjU  UserjU  uparents]}(jU  (ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbdjU  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbdjU  Xhttps://github.com/cBioPortal/cbioportal/commit/ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbduastats}(totalMh	additionsKA	deletionsM'ufiles](}(jU  (51d28da2b77a4a02c65157cd33d6786cbd7a8777filenameMservice/src/main/java/org/cbioportal/service/ExpressionEnrichmentService.javastatusmodifiedjV  KjV  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/38911ab8bf7129a3da88bbc221a0727e8edf3458/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/38911ab8bf7129a3da88bbc221a0727e8edf3458/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.java?ref=38911ab8bf7129a3da88bbc221a0727e8edf3458patchX  @@ -18,7 +18,7 @@ List<GenomicEnrichment> getGenomicEnrichments(String molecularProfileId,
                                                   Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
             throws MolecularProfileNotFoundException;
 
-    List<GenericAssayEnrichment> getGenericAssayEnrichments(String molecularProfileId,
+    List<GenericAssayEnrichment> getGenericAssayNumericalEnrichments(String molecularProfileId,
             Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
             throws MolecularProfileNotFoundException;
     List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(u}(jU  (80451d6e7e9f9aae6c5e4647c3259b046ed95cebjV  Oservice/src/main/java/org/cbioportal/service/GenericAssayEnrichmentService.javajV  removedjV  K jV  KjV  KjV  https://github.com/cBioPortal/cbioportal/blob/ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbd/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayEnrichmentService.javajV  https://github.com/cBioPortal/cbioportal/raw/ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbd/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayEnrichmentService.javajV  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayEnrichmentService.java?ref=ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbdjV  X  @@ -1,23 +0,0 @@
-package org.cbioportal.service;
-
-import org.cbioportal.model.EnrichmentType;
-import org.cbioportal.model.GenericAssayBinaryEnrichment;
-import org.cbioportal.model.GenericAssayCategoricalEnrichment;
-import org.cbioportal.model.MolecularProfileCaseIdentifier;
-import org.cbioportal.service.exception.MolecularProfileNotFoundException;
-
-import java.util.List;
-import java.util.Map;
-
-public interface GenericAssayEnrichmentService {
-    List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
-        String molecularProfileId,
-        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
-        EnrichmentType enrichmentType)
-        throws MolecularProfileNotFoundException;
-
-    List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
-                                                                                  Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
-                                                                                  EnrichmentType enrichmentType)
-        throws MolecularProfileNotFoundException;
-}u}(jU  (94dc510ecca2e7b97bcf8eca8b195f16fb2a9600jV  Vservice/src/main/java/org/cbioportal/service/impl/ExpressionEnrichmentServiceImpl.javajV  modifiedjV  K8jV  KKjV  KjV  https://github.com/cBioPortal/cbioportal/blob/38911ab8bf7129a3da88bbc221a0727e8edf3458/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.javajV  https://github.com/cBioPortal/cbioportal/raw/38911ab8bf7129a3da88bbc221a0727e8edf3458/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.javajV  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.java?ref=38911ab8bf7129a3da88bbc221a0727e8edf3458jV  X7  @@ -5,9 +5,19 @@
 import java.util.stream.Collectors;
 
 import org.apache.commons.lang3.BooleanUtils;
-import org.cbioportal.model.*;
 import org.cbioportal.model.MolecularProfile.MolecularAlterationType;
 import org.cbioportal.model.meta.GenericAssayMeta;
+import org.cbioportal.model.EnrichmentType;
+import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
+import org.cbioportal.model.GenericAssayMolecularAlteration;
+import org.cbioportal.model.MolecularProfileCaseIdentifier;
+import org.cbioportal.model.MolecularProfile;
+import org.cbioportal.model.Sample;
+import org.cbioportal.model.GenericAssayEnrichment;
+import org.cbioportal.model.GenomicEnrichment;
+import org.cbioportal.model.Gene;
+import org.cbioportal.model.GeneMolecularAlteration;
 import org.cbioportal.persistence.MolecularDataRepository;
 import org.cbioportal.service.ExpressionEnrichmentService;
 import org.cbioportal.service.GeneService;
@@ -43,62 +53,49 @@ public class ExpressionEnrichmentServiceImpl implements ExpressionEnrichmentServ
     // molecularDataService in fetchCoExpressions
     @Transactional(readOnly = true)
     public List<GenomicEnrichment> getGenomicEnrichments(String molecularProfileId,
-            Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
-            throws MolecularProfileNotFoundException {
-
+                                                         Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException {
         MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
-
         List<MolecularAlterationType> validGenomicMolecularAlterationTypes = Arrays.asList(
-                MolecularAlterationType.MICRO_RNA_EXPRESSION, MolecularAlterationType.MRNA_EXPRESSION,
-                MolecularAlterationType.MRNA_EXPRESSION_NORMALS, MolecularAlterationType.RNA_EXPRESSION,
-                MolecularAlterationType.METHYLATION, MolecularAlterationType.METHYLATION_BINARY,
-                MolecularAlterationType.PHOSPHORYLATION, MolecularAlterationType.PROTEIN_LEVEL,
-                MolecularAlterationType.PROTEIN_ARRAY_PROTEIN_LEVEL,
-                MolecularAlterationType.PROTEIN_ARRAY_PHOSPHORYLATION);
-
+            MolecularAlterationType.MICRO_RNA_EXPRESSION, MolecularAlterationType.MRNA_EXPRESSION,
+            MolecularAlterationType.MRNA_EXPRESSION_NORMALS, MolecularAlterationType.RNA_EXPRESSION,
+            MolecularAlterationType.METHYLATION, MolecularAlterationType.METHYLATION_BINARY,
+            MolecularAlterationType.PHOSPHORYLATION, MolecularAlterationType.PROTEIN_LEVEL,
+            MolecularAlterationType.PROTEIN_ARRAY_PROTEIN_LEVEL,
+            MolecularAlterationType.PROTEIN_ARRAY_PHOSPHORYLATION);
         validateMolecularProfile(molecularProfile, validGenomicMolecularAlterationTypes);
-
         Iterable<GeneMolecularAlteration> maItr = molecularDataRepository
-                .getGeneMolecularAlterationsIterableFast(molecularProfile.getStableId());
-
+            .getGeneMolecularAlterationsIterableFast(molecularProfile.getStableId());
         List<GenomicEnrichment> expressionEnrichments = expressionEnrichmentUtil.getEnrichments(molecularProfile,
-                molecularProfileCaseSets, enrichmentType, maItr);
-
+            molecularProfileCaseSets, enrichmentType, maItr);
         List<Integer> entrezGeneIds = expressionEnrichments.stream().map(GenomicEnrichment::getEntrezGeneId)
-                .collect(Collectors.toList());
-
+            .collect(Collectors.toList());
         Map<Integer, List<Gene>> geneMapByEntrezId = geneService
-                .fetchGenes(entrezGeneIds.stream().map(Object::toString).collect(Collectors.toList()), "ENTREZ_GENE_ID",
-                        "SUMMARY")
-                .stream().collect(Collectors.groupingBy(Gene::getEntrezGeneId));
-
+            .fetchGenes(entrezGeneIds.stream().map(Object::toString).collect(Collectors.toList()), "ENTREZ_GENE_ID",
+                "SUMMARY")
+            .stream().collect(Collectors.groupingBy(Gene::getEntrezGeneId));
         return expressionEnrichments.stream()
-                // filter Enrichments having no gene reference object(this
-                // happens when multiple
-                // entrez ids map to same hugo gene symbol)
-                .filter(expressionEnrichment -> geneMapByEntrezId.containsKey(expressionEnrichment.getEntrezGeneId()))
-                .map(expressionEnrichment -> {
-                    Gene gene = geneMapByEntrezId.get(expressionEnrichment.getEntrezGeneId()).get(0);
-                    expressionEnrichment.setHugoGeneSymbol(gene.getHugoGeneSymbol());
-                    return expressionEnrichment;
-                }).collect(Collectors.toList());
+            // filter Enrichments having no gene reference object(this
+            // happens when multiple
+            // entrez ids map to same hugo gene symbol)
+            .filter(expressionEnrichment -> geneMapByEntrezId.containsKey(expressionEnrichment.getEntrezGeneId()))
+            .map(expressionEnrichment -> {
+                Gene gene = geneMapByEntrezId.get(expressionEnrichment.getEntrezGeneId()).get(0);
+                expressionEnrichment.setHugoGeneSymbol(gene.getHugoGeneSymbol());
+                return expressionEnrichment;
+            }).collect(Collectors.toList());
     }
-
     @Override
     // transaction needs to be setup here in order to return Iterable from
     // molecularDataRepository in getGenericAssayMolecularAlterationsIterable
     @Transactional(readOnly = true)
     public List<GenericAssayEnrichment> getGenericAssayEnrichments(String molecularProfileId,
-            Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
-            throws MolecularProfileNotFoundException {
-
+                                                                   Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException {
         MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
-
         validateMolecularProfile(molecularProfile, Arrays.asList(MolecularAlterationType.GENERIC_ASSAY));
-
         Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
-                .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
-
+            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
         Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets;
         if (BooleanUtils.isTrue(molecularProfile.getPatientLevel())) {
             // Build sampleIdToPatientIdMap to quick find if a sample has shared patientId with other samples
@@ -120,34 +117,25 @@ public List<GenericAssayEnrichment> getGenericAssayEnrichments(String molecularP
                 filteredMolecularProfileCaseSets.put(pair.getKey(), identifierListUniqueByPatientId);
             }
         } else {
-                filteredMolecularProfileCaseSets = molecularProfileCaseSets;
+            filteredMolecularProfileCaseSets = molecularProfileCaseSets;
         }
         List<GenericAssayEnrichment> genericAssayEnrichments = expressionEnrichmentUtil.getEnrichments(molecularProfile,
-                filteredMolecularProfileCaseSets, enrichmentType, maItr);
+            filteredMolecularProfileCaseSets, enrichmentType, maItr);
         List<String> getGenericAssayStableIds = genericAssayEnrichments.stream()
-                .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
+            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
         Map<String, GenericAssayMeta> genericAssayMetaByStableId = genericAssayService
-                .getGenericAssayMetaByStableIdsAndMolecularIds(getGenericAssayStableIds,
-                        getGenericAssayStableIds.stream().map(stableId -> molecularProfileId)
-                                .collect(Collectors.toList()),
-                        "SUMMARY")
-                .stream().collect(Collectors.toMap(GenericAssayMeta::getStableId, Function.identity()));
+            .getGenericAssayMetaByStableIdsAndMolecularIds(getGenericAssayStableIds,
+                getGenericAssayStableIds.stream().map(stableId -> molecularProfileId)
+                    .collect(Collectors.toList()),
+                "SUMMARY")
+            .stream().collect(Collectors.toMap(GenericAssayMeta::getStableId, Function.identity()));
         return genericAssayEnrichments.stream().map(enrichmentDatum -> {
             enrichmentDatum.setGenericEntityMetaProperties(
-                    genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
+                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
             return enrichmentDatum;
         }).collect(Collectors.toList());
     }
 
-
-    private void validateMolecularProfile(MolecularProfile molecularProfile,
-            List<MolecularAlterationType> validMolecularAlterationTypes) throws MolecularProfileNotFoundException {
-        if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
-            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-        }
-    }
-
-
     @Override
     @Transactional(readOnly = true)
     public List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
@@ -156,7 +144,7 @@ public List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
         throws MolecularProfileNotFoundException {
 
         // Validate and fetch molecular profile
-        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, true);
+        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, "BINARY");
 
         // Get the molecular alterations for the provided profile
         Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
@@ -193,13 +181,12 @@ public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichm
                                                                                          Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
         throws MolecularProfileNotFoundException {
 
-        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, false);
+        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, "CATEGORICAL");
 
         Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
             .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
 
-        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets;
-        filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
+        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
 
         List<GenericAssayCategoricalEnrichment> genericAssayCategoricalEnrichments = expressionEnrichmentUtil.getGenericAssayCategoricalEnrichments(molecularProfile,
             filteredMolecularProfileCaseSets, enrichmentType, maItr);
@@ -216,30 +203,24 @@ public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichm
             return enrichmentDatum;
         }).collect(Collectors.toList());
     }
-
-    private MolecularProfile getAndValidateMolecularProfile(String molecularProfileId, boolean isBinary) throws MolecularProfileNotFoundException {
+    
+    private MolecularProfile getAndValidateMolecularProfile(String molecularProfileId, String dataType) throws MolecularProfileNotFoundException {
         MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
-        validateMolecularProfile(molecularProfile, Arrays.asList(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY), isBinary);
+        validateMolecularProfile(molecularProfile, Arrays.asList(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY), dataType);
         return molecularProfile;
     }
 
     private void validateMolecularProfile(MolecularProfile molecularProfile,
                                           List<MolecularProfile.MolecularAlterationType> validMolecularAlterationTypes,
-                                          boolean isBinary) throws MolecularProfileNotFoundException {
+                                          String dataType) throws MolecularProfileNotFoundException {
         if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
             // Check alteration type
             throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
         }
         // Check datatype for binary or categorical
-        if(isBinary) {
-            if(!molecularProfile.getDatatype().equals("BINARY")) {
-                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-            }
-        } else {
-            if(!molecularProfile.getDatatype().equals("CATEGORICAL")) {
-                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-            }
-        }
+        if(molecularProfile.getMolecularAlterationType().equals(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY) &&
+            !molecularProfile.getDatatype().equals(dataType))
+            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
     }
 
     private Map<String, List<MolecularProfileCaseIdentifier>> filterMolecularProfileCaseSets(MolecularProfile molecularProfile, Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets) {u}(jU  (ee2292f7d530eef53a17173de24fab5b90eadda6jV  Xservice/src/main/java/org/cbioportal/service/impl/GenericAssayEnrichmentServiceImpl.javajV  removedjV  K jV  KjV  KjV  https://github.com/cBioPortal/cbioportal/blob/ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbd/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.javajV  https://github.com/cBioPortal/cbioportal/raw/ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbd/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.javajV  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.java?ref=ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbdjV  XP)  @@ -1,188 +0,0 @@
-package org.cbioportal.service.impl;
-
-import org.apache.commons.lang3.BooleanUtils;
-import org.cbioportal.model.EnrichmentType;
-import org.cbioportal.model.GenericAssayBinaryEnrichment;
-import org.cbioportal.model.GenericAssayCategoricalEnrichment;
-import org.cbioportal.model.GenericAssayMolecularAlteration;
-import org.cbioportal.model.MolecularProfileCaseIdentifier;
-import org.cbioportal.model.meta.GenericAssayMeta;
-import org.cbioportal.model.MolecularProfile;
-import org.cbioportal.model.Sample;
-import org.cbioportal.model.GenericAssayEnrichment;
-import org.cbioportal.persistence.MolecularDataRepository;
-import org.cbioportal.service.GenericAssayEnrichmentService;
-import org.cbioportal.service.GenericAssayService;
-import org.cbioportal.service.MolecularProfileService;
-import org.cbioportal.service.SampleService;
-import org.cbioportal.service.exception.MolecularProfileNotFoundException;
-import org.cbioportal.service.util.ExpressionEnrichmentUtil;
-import org.cbioportal.service.util.FisherExactTestCalculator;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.math.BigDecimal;
-import java.util.*;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-
-@Service
-public class GenericAssayEnrichmentServiceImpl implements GenericAssayEnrichmentService {
-
-    @Autowired
-    private MolecularDataRepository molecularDataRepository;
-
-    @Autowired
-    private SampleService sampleService;
-
-    @Autowired
-    private MolecularProfileService molecularProfileService;
-
-    @Autowired
-    private FisherExactTestCalculator fisherExactTestCalculator = new FisherExactTestCalculator();
-
-    @Autowired
-    private ExpressionEnrichmentUtil expressionEnrichmentUtil;
-    @Autowired
-    private GenericAssayService genericAssayService;
-
-    @Override
-    @Transactional(readOnly = true)
-    public List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
-        String molecularProfileId,
-        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
-        throws MolecularProfileNotFoundException {
-
-        // Validate and fetch molecular profile
-        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, true);
-
-        // Get the molecular alterations for the provided profile
-        Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
-            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
-
-        // Filter the case sets based on molecular profile
-        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
-
-        // Obtain binary enrichments from the utility
-        List<GenericAssayBinaryEnrichment> genericAssayBinaryEnrichments = expressionEnrichmentUtil.getGenericAssayBinaryEnrichments(molecularProfile,
-            filteredMolecularProfileCaseSets, enrichmentType, maItr);
-
-        // Calculate q-values for enrichments
-        calcQValues(genericAssayBinaryEnrichments);
-
-        // Extract stable IDs from binary enrichments
-        List<String> getGenericAssayStableIds = genericAssayBinaryEnrichments.stream()
-            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
-
-        // Fetch metadata of generic assays by their stable IDs
-        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
-
-        // Assign meta properties to each enrichment
-        return genericAssayBinaryEnrichments.stream().map(enrichmentDatum -> {
-            enrichmentDatum.setGenericEntityMetaProperties(
-                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
-            return enrichmentDatum;
-        }).collect(Collectors.toList());
-    }
-
-    @Override
-    @Transactional(readOnly = true)
-    public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
-                                                                                         Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
-        throws MolecularProfileNotFoundException {
-
-        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, false);
-
-        Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
-            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
-
-        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets;
-        filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
-
-        List<GenericAssayCategoricalEnrichment> genericAssayCategoricalEnrichments = expressionEnrichmentUtil.getGenericAssayCategoricalEnrichments(molecularProfile,
-            filteredMolecularProfileCaseSets, enrichmentType, maItr);
-
-        calcQValues(genericAssayCategoricalEnrichments);
-
-        List<String> getGenericAssayStableIds = genericAssayCategoricalEnrichments.stream()
-            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
-        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
-
-        return genericAssayCategoricalEnrichments.stream().map(enrichmentDatum -> {
-            enrichmentDatum.setGenericEntityMetaProperties(
-                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
-            return enrichmentDatum;
-        }).collect(Collectors.toList());
-    }
-
-    private MolecularProfile getAndValidateMolecularProfile(String molecularProfileId, boolean isBinary) throws MolecularProfileNotFoundException {
-        MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
-        validateMolecularProfile(molecularProfile, Arrays.asList(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY), isBinary);
-        return molecularProfile;
-    }
-
-    private void validateMolecularProfile(MolecularProfile molecularProfile,
-                                          List<MolecularProfile.MolecularAlterationType> validMolecularAlterationTypes, 
-                                          boolean isBinary) throws MolecularProfileNotFoundException {
-        if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
-            // Check alteration type
-            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-        }
-        // Check datatype for binary or categorical
-        if(isBinary) {
-            if(!molecularProfile.getDatatype().equals("BINARY")) {
-                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-            }            
-        } else {
-            if(!molecularProfile.getDatatype().equals("CATEGORICAL")) {
-                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-            }            
-        }
-    }
-
-    private Map<String, List<MolecularProfileCaseIdentifier>> filterMolecularProfileCaseSets(MolecularProfile molecularProfile, Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets) {
-        if (BooleanUtils.isTrue(molecularProfile.getPatientLevel())) {
-            // If patient level, filter duplicates by patient id
-            // For now we only support sample level for samples
-            List<String> sampleIds = molecularProfileCaseSets.values().stream().flatMap(Collection::stream).map(MolecularProfileCaseIdentifier::getCaseId).collect(Collectors.toList());
-            List<String> studyIds = Collections.nCopies(sampleIds.size(), molecularProfile.getCancerStudyIdentifier());
-            List<Sample> samples = sampleService.fetchSamples(studyIds, sampleIds, "ID");
-            Map<String, Integer> sampleIdToPatientIdMap = samples.stream().collect(Collectors.toMap(Sample::getStableId, Sample::getPatientId));
-
-            Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = new HashMap<>();
-            for (Map.Entry<String, List<MolecularProfileCaseIdentifier>> pair : molecularProfileCaseSets.entrySet()) {
-                Set<Integer> patientSet = new HashSet<Integer>();
-                List<MolecularProfileCaseIdentifier> identifierListUniqueByPatientId = new ArrayList<>();
-                for (MolecularProfileCaseIdentifier caseIdentifier : pair.getValue()) {
-                    if (!patientSet.contains(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()))) {
-                        identifierListUniqueByPatientId.add(caseIdentifier);
-                        patientSet.add(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()));
-                    }
-                }
-                filteredMolecularProfileCaseSets.put(pair.getKey(), identifierListUniqueByPatientId);
-            }
-            return filteredMolecularProfileCaseSets;
-        } else {
-            return molecularProfileCaseSets;
-        }
-    }
-
-    private Map<String, GenericAssayMeta> getGenericAssayMetaByStableId(List<String> stableIds, String molecularProfileId) {
-        return genericAssayService.getGenericAssayMetaByStableIdsAndMolecularIds(stableIds, stableIds.stream().map(sid -> molecularProfileId)
-            .collect(Collectors.toList()), "SUMMARY").stream()
-            .collect(Collectors.toMap(GenericAssayMeta::getStableId, Function.identity()));
-    }
-
-    private <T extends GenericAssayEnrichment> void calcQValues(List<T> enrichments) {
-        // Sort enrichments by pValue
-        Collections.sort(enrichments, GenericAssayEnrichment::compare);
-        BigDecimal[] pValues = enrichments.stream().map(T::getpValue).toArray(BigDecimal[]::new);
-        BigDecimal[] qValues = fisherExactTestCalculator.calcqValue(pValues);
-        // Assign q-values to enrichments
-        for (int i = 0; i < enrichments.size(); i++) {
-            enrichments.get(i).setqValue(qValues[i]);
-        }
-    }
-}u}(jU  (a777176e26ad028ead7bdd29894c4d5c16aaed87jV  Zservice/src/test/java/org/cbioportal/service/impl/ExpressionEnrichmentServiceImplTest.javajV  modifiedjV  KjV  KjV  KjV  https://github.com/cBioPortal/cbioportal/blob/38911ab8bf7129a3da88bbc221a0727e8edf3458/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImplTest.javajV  https://github.com/cBioPortal/cbioportal/raw/38911ab8bf7129a3da88bbc221a0727e8edf3458/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImplTest.javajV  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImplTest.java?ref=38911ab8bf7129a3da88bbc221a0727e8edf3458jV  XL  @@ -207,7 +207,7 @@ public void getGenomicEnrichments() throws Exception {
     }
 
     @Test
-    public void getGenericAssayEnrichments() throws Exception {
+    public void getGenericAssayNumericalEnrichments() throws Exception {
         geneMolecularProfile.setMolecularAlterationType(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY);
 
         List<GenericAssayMolecularAlteration> molecularDataList = new ArrayList<GenericAssayMolecularAlteration>();
@@ -229,7 +229,7 @@ public void getGenericAssayEnrichments() throws Exception {
                 .thenReturn(Arrays.asList(new GenericAssayMeta(HUGO_GENE_SYMBOL_1),
                         new GenericAssayMeta(HUGO_GENE_SYMBOL_2)));
 
-        List<GenericAssayEnrichment> result = enrichmentServiceImpl.getGenericAssayEnrichments(MOLECULAR_PROFILE_ID,
+        List<GenericAssayEnrichment> result = enrichmentServiceImpl.getGenericAssayNumericalEnrichments(MOLECULAR_PROFILE_ID,
                 molecularProfileCaseSets, EnrichmentType.SAMPLE);
 
         Assert.assertEquals(2, result.size());
@@ -301,7 +301,7 @@ public void getGenericAssayPatientLevelEnrichments() throws Exception {
 
         Mockito.when(sampleService.fetchSamples(Arrays.asList(STUDY_ID, STUDY_ID, STUDY_ID, STUDY_ID, STUDY_ID), Arrays.asList(SAMPLE_ID3, SAMPLE_ID4, SAMPLE_ID5, SAMPLE_ID1, SAMPLE_ID2), "ID")).thenReturn(samples);
 
-        List<GenericAssayEnrichment> result = enrichmentServiceImpl.getGenericAssayEnrichments(MOLECULAR_PROFILE_ID, molecularProfilePatientLevelCaseSets, EnrichmentType.SAMPLE);
+        List<GenericAssayEnrichment> result = enrichmentServiceImpl.getGenericAssayNumericalEnrichments(MOLECULAR_PROFILE_ID, molecularProfilePatientLevelCaseSets, EnrichmentType.SAMPLE);
 
         Assert.assertEquals(2, result.size());
         GenericAssayEnrichment genericAssayEnrichment = result.get(0);u}(jU  (0adf6f5d5562f4ae61784b9d2a953214342295f7jV  \service/src/test/java/org/cbioportal/service/impl/GenericAssayEnrichmentServiceImplTest.javajV  modifiedjV  KjV  KjV  KjV  https://github.com/cBioPortal/cbioportal/blob/38911ab8bf7129a3da88bbc221a0727e8edf3458/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.javajV  https://github.com/cBioPortal/cbioportal/raw/38911ab8bf7129a3da88bbc221a0727e8edf3458/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.javajV  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.java?ref=38911ab8bf7129a3da88bbc221a0727e8edf3458jV  X}  @@ -29,7 +29,7 @@
 @RunWith(MockitoJUnitRunner.class)
 public class GenericAssayEnrichmentServiceImplTest extends BaseServiceImplTest{
     @InjectMocks
-    private GenericAssayEnrichmentServiceImpl genericAssayEnrichmentServiceImpl;
+    private ExpressionEnrichmentServiceImpl expressionEnrichmentServiceImpl;
     @Mock
     private SampleService sampleService;
     @Mock
@@ -164,7 +164,7 @@ public void getGenericAssayBinaryEnrichments() throws Exception {
             .thenReturn(Arrays.asList(new GenericAssayMeta(HUGO_GENE_SYMBOL_1),
                 new GenericAssayMeta(HUGO_GENE_SYMBOL_2)));
 
-        List<GenericAssayBinaryEnrichment> result = genericAssayEnrichmentServiceImpl.getGenericAssayBinaryEnrichments(MOLECULAR_PROFILE_ID,
+        List<GenericAssayBinaryEnrichment> result = expressionEnrichmentServiceImpl.getGenericAssayBinaryEnrichments(MOLECULAR_PROFILE_ID,
             molecularProfileCaseSets, EnrichmentType.SAMPLE);
 
         Assert.assertEquals(2, result.size());
@@ -227,7 +227,7 @@ public void getGenericAssayCategoricalEnrichments() throws MolecularProfileNotFo
             .thenReturn(Arrays.asList(new GenericAssayMeta(HUGO_GENE_SYMBOL_1),
                 new GenericAssayMeta(HUGO_GENE_SYMBOL_2)));
 
-        List<GenericAssayCategoricalEnrichment> result = genericAssayEnrichmentServiceImpl.getGenericAssayCategoricalEnrichments(MOLECULAR_PROFILE_ID,
+        List<GenericAssayCategoricalEnrichment> result = expressionEnrichmentServiceImpl.getGenericAssayCategoricalEnrichments(MOLECULAR_PROFILE_ID,
             molecularProfileCaseSets, EnrichmentType.SAMPLE);
 
         Assert.assertEquals(2, result.size());u}(jU  (4072480eb1360b62043c2de3243ab71fc7d731e2jV  Hweb/src/main/java/org/cbioportal/web/ExpressionEnrichmentController.javajV  modifiedjV  KjV  KjV  KjV  https://github.com/cBioPortal/cbioportal/blob/38911ab8bf7129a3da88bbc221a0727e8edf3458/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentController.javajV  https://github.com/cBioPortal/cbioportal/raw/38911ab8bf7129a3da88bbc221a0727e8edf3458/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentController.javajV  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentController.java?ref=38911ab8bf7129a3da88bbc221a0727e8edf3458jV  X  @@ -95,7 +95,7 @@ private <S extends ExpressionEnrichment> List<S> fetchExpressionEnrichments(Enri
         }
 
         if (isRequestForGenericAssayEnrichments) {
-            return (List<S>) expressionEnrichmentService.getGenericAssayEnrichments(
+            return (List<S>) expressionEnrichmentService.getGenericAssayNumericalEnrichments(
                     molecularProfileIds.iterator().next(), groupCaseIdentifierSet, enrichmentType);
         }
         u}(jU  (0abe4a9e3ca0f467b635dfea91bbfcd5fe91a7d0jV  Lweb/src/test/java/org/cbioportal/web/ExpressionEnrichmentControllerTest.javajV  modifiedjV  KjV  KjV  KjV  https://github.com/cBioPortal/cbioportal/blob/38911ab8bf7129a3da88bbc221a0727e8edf3458/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentControllerTest.javajV  https://github.com/cBioPortal/cbioportal/raw/38911ab8bf7129a3da88bbc221a0727e8edf3458/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentControllerTest.javajV  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentControllerTest.java?ref=38911ab8bf7129a3da88bbc221a0727e8edf3458jV  Xt  @@ -186,7 +186,7 @@ public void fetchGenericAssayEnrichments() throws Exception {
         genericAssayEnrichment2.setpValue(TEST_P_VALUE_2);
         genericAssayEnrichments.add(genericAssayEnrichment2);
 
-        Mockito.when(expressionEnrichmentService.getGenericAssayEnrichments(Mockito.anyString(), Mockito.anyMap(),
+        Mockito.when(expressionEnrichmentService.getGenericAssayNumericalEnrichments(Mockito.anyString(), Mockito.anyMap(),
                 Mockito.any(EnrichmentType.class))).thenReturn(genericAssayEnrichments);
 
         mockMvc.perform(MockMvcRequestBuilders.post("/generic-assay-enrichments/fetch")ueu(9d723095f5cc25dd637072d6b892bf44e9ff149b}(sha(9d723095f5cc25dd637072d6b892bf44e9ff149bnode_idEC_kwDOAe-hB9oAKDlkNzIzMDk1ZjVjYzI1ZGQ2MzcwNzJkNmI4OTJiZjQ0ZTlmZjE0OWIcommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-06-13T09:58:33Zu	committer}(j[V  
pvannieropj]V  pim@thehyve.nlj_V  2023-06-14T14:32:40ZumessageUpdate result reporttree}(jSV  (9b3ef2cfab5e56c3b631369c8445d2c67cb5ede8urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/9b3ef2cfab5e56c3b631369c8445d2c67cb5ede8ujkV  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/9d723095f5cc25dd637072d6b892bf44e9ff149b
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujkV  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9d723095f5cc25dd637072d6b892bf44e9ff149bhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/9d723095f5cc25dd637072d6b892bf44e9ff149bcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/9d723095f5cc25dd637072d6b892bf44e9ff149b/commentsjYV  }(login
pvannieropidJa jUV  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5jkV  'https://api.github.com/users/pvannieropjwV  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminujaV  }(j|V  
pvannieropj~V  Ja jUV  MDQ6VXNlcjc0NTg4NQ==jV  2https://avatars.githubusercontent.com/u/745885?v=4jV  h5jkV  'https://api.github.com/users/pvannieropjwV  https://github.com/pvannieropjV  1https://api.github.com/users/pvannierop/followersjV  >https://api.github.com/users/pvannierop/following{/other_user}jV  7https://api.github.com/users/pvannierop/gists{/gist_id}jV  >https://api.github.com/users/pvannierop/starred{/owner}{/repo}jV  5https://api.github.com/users/pvannierop/subscriptionsjV  ,https://api.github.com/users/pvannierop/orgsjV  -https://api.github.com/users/pvannierop/reposjV  8https://api.github.com/users/pvannierop/events{/privacy}jV  7https://api.github.com/users/pvannierop/received_eventsjV  UserjV  uparents]}(jSV  (d0fb6210aab800573e265132bed356b198c0db73jkV  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d0fb6210aab800573e265132bed356b198c0db73jwV  Xhttps://github.com/cBioPortal/cbioportal/commit/d0fb6210aab800573e265132bed356b198c0db73uastats}(totalK	additionsK	deletionsKufiles]}(jSV  (c3e1fc7a20c7dc41171375f2eb77c512a3de6c3bfilename=core/src/test/scripts/test_data/study_es_0/result_report.htmlstatusmodifiedjV  KjV  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/9d723095f5cc25dd637072d6b892bf44e9ff149b/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.htmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/9d723095f5cc25dd637072d6b892bf44e9ff149b/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.htmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.html?ref=9d723095f5cc25dd637072d6b892bf44e9ff149bpatchX
  @@ -142,15 +142,15 @@ <h4 class="panel-title">General</h4>
                 <td><span class="glyphicon glyphicon-cog" aria-hidden="true"></span><span class="sr-only">Debug</span></td>
                 <td>&ndash;</td>
                 <td>&ndash;</td>
-                <td>Retrieving chromosome lengths from &#39;/cbioportal/core/src/main/scripts/importer/chromosome_sizes.json&#39;</td>
+                <td>Retrieving chromosome lengths from &#39;/home/pnp300/git/cbioportal/core/src/main/scripts/importer/chromosome_sizes.json&#39;</td>
                 <td>&ndash;</td>
                 <td></td>
               </tr>
               <tr class="info">
                 <td><span class="glyphicon glyphicon-cog" aria-hidden="true"></span><span class="sr-only">Debug</span></td>
                 <td>&ndash;</td>
                 <td>&ndash;</td>
-                <td>Retrieving chromosome lengths from &#39;/cbioportal/core/src/main/scripts/importer/chromosome_sizes.json&#39;</td>
+                <td>Retrieving chromosome lengths from &#39;/home/pnp300/git/cbioportal/core/src/main/scripts/importer/chromosome_sizes.json&#39;</td>
                 <td>&ndash;</td>
                 <td></td>
               </tr>
@@ -1742,7 +1742,7 @@ <h4 class="panel-title">data_resource_study.txt</h4>
           <a role="button" data-toggle="collapse" aria-expanded="true"
              href="#collapse_ZGF0YV9zdHJ1Y3R1cmFsX3ZhcmlhbnRzLnR4dA",
              aria-controls="collapse_ZGF0YV9zdHJ1Y3R1cmFsX3ZhcmlhbnRzLnR4dA">
-            <span class="badge">3</span>
+            <span class="badge">5</span>
             <h4 class="panel-title">data_structural_variants.txt</h4>
           </a>
         </div>
@@ -1770,6 +1770,22 @@ <h4 class="panel-title">data_structural_variants.txt</h4>
                 <td>&ndash;</td>
                 <td></td>
               </tr>
+              <tr class="success">
+                <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
+                <td>48</td>
+                <td>&ndash;</td>
+                <td>No Entrez gene id or gene symbol provided for site 2. Assuming either the intragenic, deletion, duplication, translocation or inversion variant</td>
+                <td>&ndash;</td>
+                <td></td>
+              </tr>
+              <tr class="success">
+                <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
+                <td>49</td>
+                <td>&ndash;</td>
+                <td>No Entrez gene id or gene symbol provided for site 1. Assuming either the intragenic, deletion, duplication, translocation or inversion variant</td>
+                <td>&ndash;</td>
+                <td></td>
+              </tr>
               <tr class="success">
                 <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
                 <td>&ndash;</td>
@@ -1782,7 +1798,7 @@ <h4 class="panel-title">data_structural_variants.txt</h4>
                 <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
                 <td>&ndash;</td>
                 <td>&ndash;</td>
-                <td>Read 47 lines. Lines with warning: 0. Lines with error: 0</td>
+                <td>Read 49 lines. Lines with warning: 0. Lines with error: 0</td>
                 <td>&ndash;</td>
                 <td></td>
               </tr>uau(bdf7f94609c05d7bb266c698d717e0f9b104da53}(sha(bdf7f94609c05d7bb266c698d717e0f9b104da53node_idEC_kwDOAe-hB9oAKGJkZjdmOTQ2MDljMDVkN2JiMjY2YzY5OGQ3MTdlMGY5YjEwNGRhNTMcommit}(author}(namehaynescdemailhaynescd@chop.edudate2023-07-05T15:30:01Zu	committer}(jV  haynescdjV  haynescd@chop.edujV  2023-07-05T15:30:01Zumessage$Fix bug with null ClinicalDataFiltertree}(jV  (f6a44a7283c026813f9180ef1822b7b2fead64dcurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/f6a44a7283c026813f9180ef1822b7b2fead64dcujV  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/bdf7f94609c05d7bb266c698d717e0f9b104da53
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujV  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/bdf7f94609c05d7bb266c698d717e0f9b104da53html_urlXhttps://github.com/cBioPortal/cbioportal/commit/bdf7f94609c05d7bb266c698d717e0f9b104da53comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/bdf7f94609c05d7bb266c698d717e0f9b104da53/commentsjV  }(loginhaynescdidJ jV  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5jV  %https://api.github.com/users/haynescdjV  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminujV  }(jV  haynescdjV  J jV  MDQ6VXNlcjMzNjA4OTIwjV  4https://avatars.githubusercontent.com/u/33608920?v=4jV  h5jV  %https://api.github.com/users/haynescdjV  https://github.com/haynescdjV  /https://api.github.com/users/haynescd/followersjV  <https://api.github.com/users/haynescd/following{/other_user}jV  5https://api.github.com/users/haynescd/gists{/gist_id}j W  <https://api.github.com/users/haynescd/starred{/owner}{/repo}jW  3https://api.github.com/users/haynescd/subscriptionsjW  *https://api.github.com/users/haynescd/orgsjW  +https://api.github.com/users/haynescd/reposjW  6https://api.github.com/users/haynescd/events{/privacy}j
W  5https://api.github.com/users/haynescd/received_eventsjW  UserjW  uparents]}(jV  (dbf43585e403ac393ec1d69fe2e24353ae61bc04jV  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/dbf43585e403ac393ec1d69fe2e24353ae61bc04jV  Xhttps://github.com/cBioPortal/cbioportal/commit/dbf43585e403ac393ec1d69fe2e24353ae61bc04uastats}(totalK	additionsK	deletionsKufiles](}(jV  (55f6ce7cb091914168b886e1b06df856420ea9f7filenametpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmlstatusmodifiedj(W  Kj)W  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/bdf7f94609c05d7bb266c698d717e0f9b104da53/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/bdf7f94609c05d7bb266c698d717e0f9b104da53/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=bdf7f94609c05d7bb266c698d717e0f9b104da53patchX  @@ -33,7 +33,12 @@
             COUNT(*) as totalCount
         FROM mutation
         <where>
-           sample_unique_id IN ( <include refid="sampleUniqueIdsFromStudyViewFilter"/>)
+           sample_unique_id IN ( <include refid="sampleUniqueIdsFromStudyViewFilter"/>
+            <if test="applyPatientIdFilters == true">
+                INTERSECT <include refid="getSampleIdsFromPatientIds"/>
+            </if> 
+            )
+
         </where>
         GROUP BY hugo_gene_symbol
         ORDER BY totalCount DESC;
@@ -158,6 +163,14 @@
                 </trim>
             </foreach>
     </sql>
+    
+    <sql id="getSampleIdsFromPatientIds">
+        SELECT sample_unique_id
+        FROM sample
+        <where>
+            patient_unique_id IN (<include refid="patientUniqueIdsFromStudyViewFilter"/>) 
+        </where>
+    </sql>
 
     <select id="getClinicalAttributeNames" resultType="String">
         SELECTu}(jV  (a21e077258d50f2f0cf77958438dd7006a289d31j.W  Kservice/src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.javaj0W  modifiedj(W  Kj)W  K j2W  Kj3W  https://github.com/cBioPortal/cbioportal/blob/bdf7f94609c05d7bb266c698d717e0f9b104da53/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj5W  https://github.com/cBioPortal/cbioportal/raw/bdf7f94609c05d7bb266c698d717e0f9b104da53/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj7W  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.java?ref=bdf7f94609c05d7bb266c698d717e0f9b104da53j9W  X  @@ -274,6 +274,10 @@ private CategorizedClinicalDataCountFilter extractClinicalDataCountFilters(final
            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();ueu(7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c}(sha(7c3869b3aed7f34e49122d26eddb5cc73f6a3e4cnode_idEC_kwDOAe-hB9oAKDdjMzg2OWIzYWVkN2YzNGU0OTEyMmQyNmVkZGI1Y2M3M2Y2YTNlNGMcommit}(author}(name	Bryan Laiemaillaib1@mskcc.orgdate2023-07-19T20:48:03Zu	committer}(jMW  	Bryan LaijOW  laib1@mskcc.orgjQW  2023-07-19T21:07:21Zumessage)update one-sided fisher test to two-sidedtree}(jEW  (4dbf397260b62e9b1daff4d9bf07e7b219c04844urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/4dbf397260b62e9b1daff4d9bf07e7b219c04844uj]W  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj]W  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4chtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4ccomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/commentsjKW  NjSW  Nparents]}(jEW  (8f6534e47ba1adb65a1c77ee92e397cfd8a146cfj]W  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8f6534e47ba1adb65a1c77ee92e397cfd8a146cfjiW  Xhttps://github.com/cBioPortal/cbioportal/commit/8f6534e47ba1adb65a1c77ee92e397cfd8a146cfuastats}(totalKM	additionsK>	deletionsKufiles](}(jEW  (16073e48ff0caa8feab78e54ecfb5919ca20eb91filenameIcore/src/main/java/org/mskcc/cbio/portal/servlet/CalcFisherExactTest.javastatusmodifiedjvW  KjwW  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.java?ref=7c3869b3aed7f34e49122d26eddb5cc73f6a3e4cpatchX'  @@ -44,13 +44,13 @@
 import org.mskcc.cbio.portal.stats.FisherExact;
 
 /**
- * Calculate the cumulative (one-tail) p-value out of fisher exact test
+ * Calculate the cumulative (two-tail) p-value out of fisher exact test
  * 
  * @param a a, b, c, d are the four cells in a 2x2 matrix
  * @param b
  * @param c
  * @param d
- * @return one-tailed P-value (right or left, whichever is smallest)
+ * @return two-tailed P-value (right or left, whichever is smallest)
  * 
  */
 public class CalcFisherExactTest extends HttpServlet  {
@@ -86,7 +86,7 @@ protected void doPost(HttpServletRequest httpServletRequest,
                 int c = Integer.parseInt(dataSet.split(" ")[2]);
                 int d = Integer.parseInt(dataSet.split(" ")[3]);    
                 FisherExact fisher = new FisherExact(a + b + c + d);
-                double pValue = fisher.getCumlativeP(a, b, c, d);
+                double pValue = fisher.getTwoTailedP(a, b, c, d);
                 result = result.concat(String.valueOf(pValue) + " ");                
             }
         }u}(jEW  (92f8f83955924145d906564446465c5750ab3d2fj|W  =core/src/main/java/org/mskcc/cbio/portal/stats/OddsRatio.javaj~W  modifiedjvW  KjwW  KjW  KjW  https://github.com/cBioPortal/cbioportal/blob/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.javajW  https://github.com/cBioPortal/cbioportal/raw/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.javajW  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.java?ref=7c3869b3aed7f34e49122d26eddb5cc73f6a3e4cjW  X  @@ -87,7 +87,7 @@ public OddsRatio(ProfileDataSummary pDataSummary, String geneA, String geneB) {
 
         oddsRatio = ((double) (a * d)) / ((double) (b * c));
         FisherExact fisher = new FisherExact(a + b + c + d);
-        pValue = fisher.getCumlativeP(a, b, c, d);
+        pValue = fisher.getTwoTailedP(a, b, c, d);
         lowerConfidenceInterval = Math.exp(Math.log(oddsRatio) - 1.96 * (Math.sqrt(1 / (double) a
                 + 1 / (double) b + 1 / (double) c + 1 / (double) d)));
         upperConfidenceInterval = Math.exp(Math.log(oddsRatio) + 1.96 * (Math.sqrt(1 / (double) a
@@ -103,7 +103,7 @@ public double getOddsRatio() {
         return oddsRatio;
     }
 
-    public double getCumulativeP() {
+    public double getTwoTailedP() {
         return pValue;
     }
 u}(jEW  (c1c4adac53791a81208af5b00182bdaa40e6f0fej|W  Jcore/src/main/java/org/mskcc/cbio/portal/util/EnrichmentsAnalysisUtil.javaj~W  modifiedjvW  KjwW  KjW  KjW  https://github.com/cBioPortal/cbioportal/blob/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FEnrichmentsAnalysisUtil.javajW  https://github.com/cBioPortal/cbioportal/raw/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FEnrichmentsAnalysisUtil.javajW  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FEnrichmentsAnalysisUtil.java?ref=7c3869b3aed7f34e49122d26eddb5cc73f6a3e4cjW  X  @@ -652,7 +652,7 @@ private double runFisherExactTest(HashMap<Integer, String> singleGeneCaseValueMa
             }
         }
         FisherExact fisher = new FisherExact(a + b + c + d);
-        return fisher.getCumlativeP(a, b, c, d);
+        return fisher.getTwoTailedP(a, b, c, d);
     }
 
     private String getCytoband(int geneticEntityId, String geneticProfileStableId) {u
     }(jEW  (06377765dfed89750dc17672a9cb7f4cfefca759j|W  Ccore/src/test/java/org/mskcc/cbio/portal/stats/TestFisherExact.javaj~W  modifiedjvW  KjwW  KjW  KjW  https://github.com/cBioPortal/cbioportal/blob/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestFisherExact.javajW  https://github.com/cBioPortal/cbioportal/raw/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestFisherExact.javajW  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestFisherExact.java?ref=7c3869b3aed7f34e49122d26eddb5cc73f6a3e4cjW  XO  @@ -39,7 +39,7 @@ public class TestFisherExact extends TestCase {
 
     public void testFisherExact() {
         FisherExact fisher = new FisherExact(43 + 2 + 17 + 7);
-        double p = fisher.getCumlativeP(43, 2, 17, 7);
+        double p = fisher.getTwoTailedP(43, 2, 17, 7);
         assertEquals(0.006653, p, 0.00001);
     }
 }u}(jEW  (108fdb5785e60048a79f3c23d5bfb4f01dc550e2j|W  Acore/src/test/java/org/mskcc/cbio/portal/stats/TestOddsRatio.javaj~W  modifiedjvW  KjwW  KjW  KjW  https://github.com/cBioPortal/cbioportal/blob/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.javajW  https://github.com/cBioPortal/cbioportal/raw/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.javajW  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.java?ref=7c3869b3aed7f34e49122d26eddb5cc73f6a3e4cjW  X  @@ -70,9 +70,9 @@ public void testFisherExact() throws IOException {
 
         OddsRatio oddsRatio = new OddsRatio(pDataSummary, "BRCA1", "BRCA2");
         double oddsRatioValue = oddsRatio.getOddsRatio();
-        double p = oddsRatio.getCumulativeP();
+        double p = oddsRatio.getTwoTailedP();
         assertEquals(0.16666, oddsRatioValue, 0.0001);
-        assertEquals(0.0849, p, 0.0001);
+        assertEquals(0.1698, p, 0.0001);
         //System.out.println (oddsRatio.getRCommand());
     }
 }u}(jEW  (ea7d3d653e00ae80f179717fa6f02d7409dfba19j|W  docs/user-guide/faq.mdj~W  modifiedjvW  KjwW  KjW  KjW  qhttps://github.com/cBioPortal/cbioportal/blob/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/docs%2Fuser-guide%2Ffaq.mdjW  phttps://github.com/cBioPortal/cbioportal/raw/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/docs%2Fuser-guide%2Ffaq.mdjW  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fuser-guide%2Ffaq.md?ref=7c3869b3aed7f34e49122d26eddb5cc73f6a3e4cjW  X  @@ -146,7 +146,7 @@ Group Comparison is a suite of analysis features which allows a user to compare
 - Other tabs
     - 2 groups
         - Continuous data: one-sided t-test
-        - Categorical data: one-sided Fisher's exact test
+        - Categorical data: two-sided Fisher's exact test
     - 3 or more groups
         - Continuous data: one-way ANOVA
         - Categorical data: Chi-squared testu}(jEW  (3ea53acf77ec5c9fdaefb19fc9864e431e4b655ej|W  upersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/AlterationMyBatisRepositoryTest.javaj~W  modifiedjvW  KjwW  KjW  KjW  https://github.com/cBioPortal/cbioportal/blob/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.javajW  https://github.com/cBioPortal/cbioportal/raw/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.javajW  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.java?ref=7c3869b3aed7f34e49122d26eddb5cc73f6a3e4cjW  X  @@ -1034,7 +1034,7 @@ public void getPatientStructuralVariantCountIncludeCustomDriverAnnotationsInclud
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        alterationFilter.setSelectedTiers(Select.byValues(List.of("Class 2")));
+        alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Class 2")));
         alterationFilter.setIncludeUnknownTier(true);
         List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,
@@ -1049,7 +1049,7 @@ public void getPatientStructuralVariantCountIncludeCustomDriverAnnotationsExclud
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        alterationFilter.setSelectedTiers(Select.byValues(List.of("Class 2")));
+        alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Class 2")));
         alterationFilter.setIncludeUnknownTier(false);
         List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,u}(jEW  (8113cc63f7380d8cff4cb9026990fc7050114c95j|W  Oservice/src/main/java/org/cbioportal/service/util/AlterationEnrichmentUtil.javaj~W  modifiedjvW  KjwW  KjW  KjW  https://github.com/cBioPortal/cbioportal/blob/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javajW  https://github.com/cBioPortal/cbioportal/raw/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javajW  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.java?ref=7c3869b3aed7f34e49122d26eddb5cc73f6a3e4cjW  X  @@ -132,7 +132,7 @@ public List<AlterationEnrichment> createAlterationEnrichments(Map<String, Pair<L
                         int alteredOnlyInQueryGenesCount = counts.get(0).getProfiledCount()
                             - counts.get(0).getAlteredCount();
 
-                        pValue = fisherExactTestCalculator.getCumulativePValue(alteredInNoneCount,
+                        pValue = fisherExactTestCalculator.getTwoTailedPValue(alteredInNoneCount,
                             counts.get(1).getAlteredCount(), alteredOnlyInQueryGenesCount,
                             counts.get(0).getAlteredCount());
                     } else {u}(jEW  (ed94cad2b5bfc09610d8c17eae97a74684a109ddj|W  Pservice/src/main/java/org/cbioportal/service/util/FisherExactTestCalculator.javaj~W  modifiedjvW  K/jwW  K jW  K/jW  https://github.com/cBioPortal/cbioportal/blob/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javajW  https://github.com/cBioPortal/cbioportal/raw/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javajW  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.java?ref=7c3869b3aed7f34e49122d26eddb5cc73f6a3e4cjW  X(  @@ -40,4 +40,51 @@ public double getCumulativePValue(int a, int b, int c, int d) {
         }
         return p;
     }
+
+    public double getTwoTailedPValue(int a, int b, int c, int d) {
+        
+        int min, i;
+        int n = a + b + c + d;
+        double p = 0;
+        double[] f = new double[n + 1];
+        f[0] = 0.0;
+
+        for (int j = 1; j <= n; j++) {
+            f[j] = f[j - 1] + Math.log(j);
+        }
+
+        double baseP = getPValue(a, b, c, d, f);
+//         in order for a table under consideration to have its p-value included
+//         in the final result, it must have a p-value less than the baseP, i.e.
+//         Fisher's exact test computes the probability, given the observed marginal
+//         frequencies, of obtaining exactly the frequencies observed and any configuration more extreme.
+//         By "more extreme," we mean any configuration (given observed marginals) with a smaller probability of
+//         occurrence in the same direction (one-tailed) or in both directions (two-tailed).
+        
+        int initialA = a, initialB = b, initialC = c, initialD = d;
+        p += baseP;
+        
+        min = (c < b) ? c : b;
+        for (i = 0; i < min; i++) {
+            double tempP = getPValue(++a, --b, --c, ++d, f);
+            if (tempP <= baseP) {
+                p += tempP;
+            }
+        }
+
+        // reset the values to their original so we can repeat this process for the other side
+        a = initialA;
+        b = initialB;
+        c = initialC;
+        d = initialD;
+        
+        min = (a < d) ? a : d;
+        for (i = 0; i < min; i++) {
+            double pTemp = getPValue(--a, ++b, ++c, --d, f);
+            if (pTemp <= baseP) {
+                p += pTemp;
+            }
+        }
+        return p;
+    }
 }u}(jEW  (7020d01ef0eaf51b229e44889e165bd1a5b7955bj|W  Sservice/src/test/java/org/cbioportal/service/util/AlterationEnrichmentUtilTest.javaj~W  modifiedjvW  KjwW  KjW  KjW  https://github.com/cBioPortal/cbioportal/blob/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.javajW  https://github.com/cBioPortal/cbioportal/raw/7c3869b3aed7f34e49122d26eddb5cc73f6a3e4c/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.javajW  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.java?ref=7c3869b3aed7f34e49122d26eddb5cc73f6a3e4cjW  X  @@ -101,8 +101,8 @@ public void createAlterationEnrichments() throws Exception {
 
         // START: for 2 groups
 
-        Mockito.when(fisherExactTestCalculator.getCumulativePValue(1, 1, 2, 0)).thenReturn(1.0);
-        Mockito.when(fisherExactTestCalculator.getCumulativePValue(2, 0, 0, 2)).thenReturn(0.3);
+        Mockito.when(fisherExactTestCalculator.getTwoTailedPValue(1, 1, 2, 0)).thenReturn(1.0);
+        Mockito.when(fisherExactTestCalculator.getTwoTailedPValue(2, 0, 0, 2)).thenReturn(0.3);
 
         List<AlterationEnrichment> result = alterationEnrichmentUtil.createAlterationEnrichments(
                 mutationCountsbyEntrezGeneIdAndGroup);ueu(2712b20be8520460d71e154f155412422f7ba22f}(sha(2712b20be8520460d71e154f155412422f7ba22fnode_idEC_kwDOAe-hB9oAKDI3MTJiMjBiZTg1MjA0NjBkNzFlMTU0ZjE1NTQxMjQyMmY3YmEyMmYcommit}(author}(name	Karthik Kemailkalletlakarthik@gmail.comdate2023-07-12T14:07:46Zu	committer}(jW  GitHubjW  noreply@github.comjW  2023-07-12T14:07:46Zumessage(Update download control options (#10264)tree}(jW  (d93f5cc98c66486ea9f8f0b0b39b36e6be0030f6urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/d93f5cc98c66486ea9f8f0b0b39b36e6be0030f6ujW  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/2712b20be8520460d71e154f155412422f7ba22f
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkrrOyCRBK7hj4Ov3rIwAAJE4IALFtsBo7SSzC6Jw3M9Ie1WTL
sNdEhHpNMd1NRN91ECAXJhpW/uTFHOZ6+LO4Q463wqQCDNvOxWNitbOZobJHq7U6
aea4YOcH/fKX/a/IRtzoLdNznXWLx+Iw4TTkgSoTixrd21zrAyKTLk+5L74nDnGz
ROfsDNgmftBl2KDgPbb2r5O5upb+4A7M7jbKXyK656ANIIIao/DwDJcD5OGCu7Fc
PU6eLrdsg3v1Y0aoiHlJebGrguPyYuhOjzhbl8+nMtmdIAKG20XeHGbWfGQvo1uf
Qnb+YSPrdeZIzVYw3cZIAQTPul2Xro+4HSdrXlRzBkPveTgGeSHrhx0lGIYWtpg=
=KKhq
-----END PGP SIGNATURE-----
payloadtree d93f5cc98c66486ea9f8f0b0b39b36e6be0030f6
parent 249d4ca1bab7348af6f513bb4b897fac8cf93310
author Karthik K <kalletlakarthik@gmail.com> 1689170866 -0400
committer GitHub <noreply@github.com> 1689170866 -0400

Update download control options (#10264)

uujW  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2712b20be8520460d71e154f155412422f7ba22fhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/2712b20be8520460d71e154f155412422f7ba22fcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/2712b20be8520460d71e154f155412422f7ba22f/commentsjW  }(login	kalletlakidJƴ jW  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5jW  &https://api.github.com/users/kalletlakjW  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminujW  }(jW  web-flowj X  J/jW  MDQ6VXNlcjE5ODY0NDQ3jX  4https://avatars.githubusercontent.com/u/19864447?v=4jX  h5jW  %https://api.github.com/users/web-flowjW  https://github.com/web-flowjX  /https://api.github.com/users/web-flow/followersj	X  <https://api.github.com/users/web-flow/following{/other_user}jX  5https://api.github.com/users/web-flow/gists{/gist_id}j
X  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jX  3https://api.github.com/users/web-flow/subscriptionsjX  *https://api.github.com/users/web-flow/orgsjX  +https://api.github.com/users/web-flow/reposjX  6https://api.github.com/users/web-flow/events{/privacy}jX  5https://api.github.com/users/web-flow/received_eventsjX  UserjX  uparents]}(jW  (249d4ca1bab7348af6f513bb4b897fac8cf93310jW  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/249d4ca1bab7348af6f513bb4b897fac8cf93310jW  Xhttps://github.com/cBioPortal/cbioportal/commit/249d4ca1bab7348af6f513bb4b897fac8cf93310uastats}(totalK	additionsK	deletionsKufiles](}(jW  (ad5612c67213e693e63929ab5689b4e0e179060dfilenameCcore/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.javastatusmodifiedj5X  Kj6X  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/2712b20be8520460d71e154f155412422f7ba22f/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/2712b20be8520460d71e154f155412422f7ba22f/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.java?ref=2712b20be8520460d71e154f155412422f7ba22fpatchXV  @@ -1262,4 +1262,20 @@ public static String getReferenceGenomeName() {
     public static String getOncoKbToken()  {
         return portalProperties.getProperty(ONCOKB_TOKEN, null);
     }
+
+    public static String getDownloadControl() {
+        String downloadControlOption = getProperty("skin.hide_download_controls");
+        /*
+            skin.hide_download_controls   return_value
+                    true                    hide
+                    false                   show
+                    data                    data
+                    null/empty              show
+         */
+        switch ((downloadControlOption != null) ? downloadControlOption.trim().toLowerCase() : "false") {
+            case "true" : return "hide";
+            case "data" : return "data";
+            default: return "show";
+        }
+    }
 }u}(jW  (b20f514cc23a4e4418c7f98327a5122c92b8860cj;X  Hdocs/deployment/customization/Customizing-your-instance-of-cBioPortal.mdj=X  modifiedj5X  Kj6X  Kj?X  Kj@X  https://github.com/cBioPortal/cbioportal/blob/2712b20be8520460d71e154f155412422f7ba22f/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdjBX  https://github.com/cBioPortal/cbioportal/raw/2712b20be8520460d71e154f155412422f7ba22f/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdjDX  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.md?ref=2712b20be8520460d71e154f155412422f7ba22fjFX  XV  @@ -243,11 +243,9 @@ Below you can find the complete list of all the available skin properties.
         </tr>
 		<tr>
             <td>skin.hide_download_controls</td>
-            <td>removes all download and copy-to-clipboard options.</td>
-            <td>show</td>
-            <td>
-                string. "show" enables all download and copy-to-clipboard options. "data" disables data download but keeps figure and top-level data. "hide" disables all the download and copy-to-keyboard options.
-            </td>
+            <td>controls download options in UI. **true**: hides all download options. **false**:  shows all download options. **data**: disable data download but not figure download</td>
+            <td>false</td>
+            <td>true / false / data</td>
         </tr>
         <tr>
             <td>skin.show_settings_menu</td>u}(jW  (3dba7cba8c20257809f9bf122aff3f7bcd8842e9j;X  )portal/src/main/webapp/config_service.jspj=X  modifiedj5X  Kj6X  Kj?X  Kj@X  https://github.com/cBioPortal/cbioportal/blob/2712b20be8520460d71e154f155412422f7ba22f/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspjBX  https://github.com/cBioPortal/cbioportal/raw/2712b20be8520460d71e154f155412422f7ba22f/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspjDX  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=2712b20be8520460d71e154f155412422f7ba22fjFX  X  @@ -146,7 +146,6 @@
             "skin.patient_view.copy_number_table.columns.show_on_init",
             "skin.patient_view.structural_variant_table.columns.show_on_init",
             "comparison.categorical_na_values",
-            "skin.hide_download_controls",
             "study_download_url",
             "skin.home_page.show_reference_genome"
         };
@@ -203,6 +202,8 @@
         obj.put("oncoKbTokenDefined", !StringUtils.isEmpty(GlobalProperties.getOncoKbToken()));
 
         obj.put("sessionServiceEnabled", !StringUtils.isEmpty(GlobalProperties.getSessionServiceUrl()));
+        
+        obj.put("skin_hide_download_controls", GlobalProperties.getDownloadControl());
 
         out.println(obj.toJSONString());
 u}(jW  (ce06c5554dfb518cc4e7df046af786eb1d86f988j;X  ,src/main/resources/portal.properties.EXAMPLEj=X  modifiedj5X  Kj6X  Kj?X  Kj@X  https://github.com/cBioPortal/cbioportal/blob/2712b20be8520460d71e154f155412422f7ba22f/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEjBX  https://github.com/cBioPortal/cbioportal/raw/2712b20be8520460d71e154f155412422f7ba22f/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEjDX  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=2712b20be8520460d71e154f155412422f7ba22fjFX  X  @@ -108,7 +108,7 @@ skin.study_view.link_text=To build your own case set, try out our enhanced Study
 # skin.home_page.show_reference_genome=false
 
 ## setting controlling whether Download tabs and download/copy-to-clipboard controls should be shown
-# skin.hide_download_controls=show
+# skin.hide_download_controls=false
 
 ## setting controlling which name should be used to display the authenticated user (email, or username)
 # skin.user_display_name=emailueu(7d4072f1564a604ea2900b2007b4885c67b5a8bf}(sha(7d4072f1564a604ea2900b2007b4885c67b5a8bfnode_idEC_kwDOAe-hB9oAKDdkNDA3MmYxNTY0YTYwNGVhMjkwMGIyMDA3YjQ4ODVjNjdiNWE4YmYcommit}(author}(nameRuslan Forostianovemailforo.ru@gmail.comdate2023-06-23T14:40:34Zu	committer}(jjX  GitHubjlX  noreply@github.comjnX  2023-06-23T14:40:34Zumessage[Apply suggestions from code review

Co-authored-by: pieterlukasse <pieterlukasse@gmail.com>tree}(jbX  (f40ea94f2545f9ff53463f1c65425a6d08ecbedaurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/f40ea94f2545f9ff53463f1c65425a6d08ecbedaujzX  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/7d4072f1564a604ea2900b2007b4885c67b5a8bf
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkla7iCRBK7hj4Ov3rIwAALkIIABpxE9hKPVzALt2+/ODfl5i3
dT6Tk7gndNyPqFC9iDYwm6Rn14vT9Zq8TZtEjuVpEZQK5102yak8KhhNeBzBP3ga
sAv0T3XWwC7PTSLeLNwlXfm0+sKAb+jQc0px4fa+TeOyda9fn3G8LM+VFDqAa4h+
uVxZAOdxfvR4LE21c/r0Vx14qRZfvGW7xhEJ/3BmUFYicJAbsTJemXX7KNn5ujpa
jXMIDjPeS+qIkuDef5SkBFWY+O1reeD7eB8vNz66sdJBoL2zFjkUeA2c3cBjXis7
eT8VpqVCdEqgIuVDYe6nJPNIbjMqiG0XEQgVTHyBfebpgS6Oxprcr2jqZbruilk=
=ylMv
-----END PGP SIGNATURE-----
payloadX0  tree f40ea94f2545f9ff53463f1c65425a6d08ecbeda
parent b870456d016f434ae7295826f93f14ea557068d6
author Ruslan Forostianov <foro.ru@gmail.com> 1687531234 +0200
committer GitHub <noreply@github.com> 1687531234 +0200

Apply suggestions from code review

Co-authored-by: pieterlukasse <pieterlukasse@gmail.com>uujzX  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7d4072f1564a604ea2900b2007b4885c67b5a8bfhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/7d4072f1564a604ea2900b2007b4885c67b5a8bfcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/7d4072f1564a604ea2900b2007b4885c67b5a8bf/commentsjhX  }(loginforusidJ jdX  MDQ6VXNlcjQ5MjE3NQ==
avatar_url2https://avatars.githubusercontent.com/u/492175?v=4gravatar_idh5jzX  "https://api.github.com/users/forusjX  https://github.com/forus
followers_url,https://api.github.com/users/forus/followers
following_url9https://api.github.com/users/forus/following{/other_user}	gists_url2https://api.github.com/users/forus/gists{/gist_id}starred_url9https://api.github.com/users/forus/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/forus/subscriptionsorganizations_url'https://api.github.com/users/forus/orgs	repos_url(https://api.github.com/users/forus/repos
events_url3https://api.github.com/users/forus/events{/privacy}received_events_url2https://api.github.com/users/forus/received_eventstypeUser
site_adminujpX  }(jX  web-flowjX  J/jdX  MDQ6VXNlcjE5ODY0NDQ3jX  4https://avatars.githubusercontent.com/u/19864447?v=4jX  h5jzX  %https://api.github.com/users/web-flowjX  https://github.com/web-flowjX  /https://api.github.com/users/web-flow/followersjX  <https://api.github.com/users/web-flow/following{/other_user}jX  5https://api.github.com/users/web-flow/gists{/gist_id}jX  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jX  3https://api.github.com/users/web-flow/subscriptionsjX  *https://api.github.com/users/web-flow/orgsjX  +https://api.github.com/users/web-flow/reposjX  6https://api.github.com/users/web-flow/events{/privacy}jX  5https://api.github.com/users/web-flow/received_eventsjX  UserjX  uparents]}(jbX  (b870456d016f434ae7295826f93f14ea557068d6jzX  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b870456d016f434ae7295826f93f14ea557068d6jX  Xhttps://github.com/cBioPortal/cbioportal/commit/b870456d016f434ae7295826f93f14ea557068d6uastats}(totalK	additionsK	deletionsKufiles]}(jbX  (caecba4873ccf8ef54fa84dcbb91426044c32aa3filenameedocs/deployment/authorization-and-authentication/Authenticating-and-Authorizing-Users-via-keycloak.mdstatusmodifiedjX  KjX  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/7d4072f1564a604ea2900b2007b4885c67b5a8bf/docs%2Fdeployment%2Fauthorization-and-authentication%2FAuthenticating-and-Authorizing-Users-via-keycloak.mdraw_urlhttps://github.com/cBioPortal/cbioportal/raw/7d4072f1564a604ea2900b2007b4885c67b5a8bf/docs%2Fdeployment%2Fauthorization-and-authentication%2FAuthenticating-and-Authorizing-Users-via-keycloak.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fauthorization-and-authentication%2FAuthenticating-and-Authorizing-Users-via-keycloak.md?ref=7d4072f1564a604ea2900b2007b4885c67b5a8bfpatchX(  @@ -91,7 +91,7 @@ curl -o client-tailored-saml-idp-metadata.xml "http://localhost:8081/auth/realms
 #### II. Export via GUI (legacy)
 1. Next, navigate to the **Installation** tab for the same client.
 2. Select _SAML Metadata IDPSSODescriptor_ as the Format Option and click the **Download** button.
-**Note:** This GUI option removed from the newer versions of keycloak.
+⚠️ This GUI option has been removed from the newer versions of Keycloak.
 ![](/images/previews/download-IDPSSODescriptor-file.png)
 
 After you've downloaded the XML file with one of the above ways, move it to `portal/src/main/resources/` if you're compiling cBioPortal yourself or if you're using the Docker container, mount the file in the `/cbioportal-webapp` folder with `-v /path/to/client-tailored-saml-idp-metadata.xml:/cbioportal-webapp/WEB-INF/classes/client-tailored-saml-idp-metadata.xml`.
@@ -375,7 +375,7 @@ This can be done via `src/main/resources/logback.xml`. See [logback.DEBUG.EXAMPL
 
 Then, rebuild the WAR, redeploy, and try to authenticate again.  Your log file will then include hundreds of SAML-specific messages, even the full XML of each SAML message, and this should help you debug the error.
 
-if you're using the Docker container, mount the file instead with `-v ./logback.xml:/cbioportal-webapp/WEB-INF/classes/logback.xml`.
+If you're using the Docker container, mount the file instead with `-v ./logback.xml:/cbioportal-webapp/WEB-INF/classes/logback.xml`.
 
 #### Determining jwtRolesPath for OAuth2 Token
 By default user-roles are extracted from path `resource_access::cbioportal::roles` in the JWT json. Changes to the configuration of roles at the realm and client level in Keycloak instance can alter this path and must be set acordingly with the `dat.oauth2.jwtRolesPath` property in the `portal.properties` file. uau(fede09ed2d1737ff366f3a15219ea1f14f678d1a}(sha(fede09ed2d1737ff366f3a15219ea1f14f678d1anode_idEC_kwDOAe-hB9oAKGZlZGUwOWVkMmQxNzM3ZmYzNjZmM2ExNTIxOWVhMWYxNGY2NzhkMWEcommit}(author}(name
Ino de Bruijnemailino@ino.biodate2023-06-14T23:05:08Zu	committer}(jX  GitHubjX  noreply@github.comjX  2023-06-14T23:05:08ZumessageNupdate members about us page

add calla & bryan, move several people to alumnitree}(jX  (34a69bb5c0030223632eafdb0b962cc3eec36823urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/34a69bb5c0030223632eafdb0b962cc3eec36823ujX  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/fede09ed2d1737ff366f3a15219ea1f14f678d1a
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkikekCRBK7hj4Ov3rIwAAF3gIAGRv9sKDiIM29vFNb9F49RO8
sli8sq5Ee803kpmuUi7h4OIiQ0w4Y8WgImSg0AmxJi0gcrkctciBYlkprpOpIkzg
2VnSbxIadRVmhJuo8OCiKh6+qVsXr1AEXjjqiePNZiMFYMrcZFN7FXmtAOcVGJc/
5PGUHs9d7KpwhtN41bTKD9d1AtTlmNxGPqYlR4O/ZuJ0k9EHtcEnzL29S9zuEmz2
jqyL5Pc0ufI721yjuhV/Dp/goLtMJh1GMdbW3ld/lDAnPBQXrLQZ+A33DH6K2h+Y
RWCf82fOGQTCcdl0FLg3Z2UOBbrh88ZjQtcxgn4tjOkkGCcf7Q46Lk9zTPD5oiM=
=Hnng
-----END PGP SIGNATURE-----
payloadX  tree 34a69bb5c0030223632eafdb0b962cc3eec36823
parent 1654557bcb2cf24fc310866ffaf313ad3a7c640c
author Ino de Bruijn <ino@ino.bio> 1686783908 -0400
committer GitHub <noreply@github.com> 1686783908 -0400

update members about us page

add calla & bryan, move several people to alumniuujX  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/fede09ed2d1737ff366f3a15219ea1f14f678d1ahtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/fede09ed2d1737ff366f3a15219ea1f14f678d1acomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/fede09ed2d1737ff366f3a15219ea1f14f678d1a/commentsjX  }(logininodbidJZ jX  MDQ6VXNlcjEzMzQwMDQ=
avatar_url3https://avatars.githubusercontent.com/u/1334004?v=4gravatar_idh5jX  "https://api.github.com/users/inodbjX  https://github.com/inodb
followers_url,https://api.github.com/users/inodb/followers
following_url9https://api.github.com/users/inodb/following{/other_user}	gists_url2https://api.github.com/users/inodb/gists{/gist_id}starred_url9https://api.github.com/users/inodb/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/inodb/subscriptionsorganizations_url'https://api.github.com/users/inodb/orgs	repos_url(https://api.github.com/users/inodb/repos
events_url3https://api.github.com/users/inodb/events{/privacy}received_events_url2https://api.github.com/users/inodb/received_eventstypeUser
site_adminujX  }(jY  web-flowjY  J/jX  MDQ6VXNlcjE5ODY0NDQ3jY  4https://avatars.githubusercontent.com/u/19864447?v=4j
Y  h5jX  %https://api.github.com/users/web-flowjX  https://github.com/web-flowj
Y  /https://api.github.com/users/web-flow/followersjY  <https://api.github.com/users/web-flow/following{/other_user}jY  5https://api.github.com/users/web-flow/gists{/gist_id}jY  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jY  3https://api.github.com/users/web-flow/subscriptionsjY  *https://api.github.com/users/web-flow/orgsjY  +https://api.github.com/users/web-flow/reposjY  6https://api.github.com/users/web-flow/events{/privacy}jY  5https://api.github.com/users/web-flow/received_eventsjY  Userj!Y  uparents]}(jX  (1654557bcb2cf24fc310866ffaf313ad3a7c640cjX  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1654557bcb2cf24fc310866ffaf313ad3a7c640cjX  Xhttps://github.com/cBioPortal/cbioportal/commit/1654557bcb2cf24fc310866ffaf313ad3a7c640cuastats}(totalK	additionsK	deletionsKufiles]}(jX  (0bf1c2367dd3d3abfb2682036efa9aea4d9e8067filenamedocs/About-Us.mdstatusmodifiedj;Y  Kj<Y  KchangesKblob_urlihttps://github.com/cBioPortal/cbioportal/blob/fede09ed2d1737ff366f3a15219ea1f14f678d1a/docs%2FAbout-Us.mdraw_urlhhttps://github.com/cBioPortal/cbioportal/raw/fede09ed2d1737ff366f3a15219ea1f14f678d1a/docs%2FAbout-Us.mdcontents_url{https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FAbout-Us.md?ref=fede09ed2d1737ff366f3a15219ea1f14f678d1apatchX  @@ -3,9 +3,7 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 ## Memorial Sloan Kettering Cancer Center
 * Benjamin Gross
 * S Onur Sumer
-* Yichao Sun
 * Hongxin Zhang
-* Adam Abeshouse
 * Ritika Kundra
 * Ino de Bruijn
 * Robert Sheridan
@@ -16,8 +14,9 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 * Ramyasree Madupuri
 * Gaofei Zhao
 * Xiang Li
+* Bryan Lai
+* Calla Chennault
 * Anusha Satravada
-* Divya Madala
 * Nikolaus Schultz
 
 ## Dana-Farber Cancer Institute
@@ -65,6 +64,7 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 * Yusuf Ziya Sengul
 
 ## Alumni
+* Adam Abeshouse
 * B Arman Aksoy
 * M Salih Altun
 * Istemi Bahceci
@@ -86,6 +86,7 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 * Peter Kok
 * Erik Larsson
 * Dong Li
+* Divya Madala
 * Tamba Monrose
 * Irina Pulyakhina
 * Pichai Raman
@@ -94,6 +95,7 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 * Alexandros Sigaras
 * Luke Sikina
 * Jing Su
+* Yichao Sun
 * Sander Tan
 * Jiaojiao Wang
 * Stuart Wattuau(131320beba79ed3343c17f1a94d869279fe24deb}(sha(131320beba79ed3343c17f1a94d869279fe24debnode_idEC_kwDOAe-hB9oAKDEzMTMyMGJlYmE3OWVkMzM0M2MxN2YxYTk0ZDg2OTI3OWZlMjRkZWIcommit}(author}(name
Bas Leenknegtemailbasleenknegt@thehyve.nldate2023-06-06T14:33:29Zu	committer}(jXY  
Bas LeenknegtjZY  basleenknegt@thehyve.nlj\Y  2023-06-06T14:36:13Zumessage$Fix distinct in patient attr sortingtree}(jPY  (2a018575d1ca678446aae9e9d450665c9426ca21urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/2a018575d1ca678446aae9e9d450665c9426ca21ujhY  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/131320beba79ed3343c17f1a94d869279fe24deb
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujhY  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/131320beba79ed3343c17f1a94d869279fe24debhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/131320beba79ed3343c17f1a94d869279fe24debcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/131320beba79ed3343c17f1a94d869279fe24deb/commentsjVY  }(loginBasLeeidJ~2 jRY  MDQ6VXNlcjMzMjMwMDY=
avatar_url3https://avatars.githubusercontent.com/u/3323006?v=4gravatar_idh5jhY  #https://api.github.com/users/BasLeejtY  https://github.com/BasLee
followers_url-https://api.github.com/users/BasLee/followers
following_url:https://api.github.com/users/BasLee/following{/other_user}	gists_url3https://api.github.com/users/BasLee/gists{/gist_id}starred_url:https://api.github.com/users/BasLee/starred{/owner}{/repo}subscriptions_url1https://api.github.com/users/BasLee/subscriptionsorganizations_url(https://api.github.com/users/BasLee/orgs	repos_url)https://api.github.com/users/BasLee/repos
events_url4https://api.github.com/users/BasLee/events{/privacy}received_events_url3https://api.github.com/users/BasLee/received_eventstypeUser
site_adminuj^Y  }(jyY  BasLeej{Y  J~2 jRY  MDQ6VXNlcjMzMjMwMDY=j}Y  3https://avatars.githubusercontent.com/u/3323006?v=4jY  h5jhY  #https://api.github.com/users/BasLeejtY  https://github.com/BasLeejY  -https://api.github.com/users/BasLee/followersjY  :https://api.github.com/users/BasLee/following{/other_user}jY  3https://api.github.com/users/BasLee/gists{/gist_id}jY  :https://api.github.com/users/BasLee/starred{/owner}{/repo}jY  1https://api.github.com/users/BasLee/subscriptionsjY  (https://api.github.com/users/BasLee/orgsjY  )https://api.github.com/users/BasLee/reposjY  4https://api.github.com/users/BasLee/events{/privacy}jY  3https://api.github.com/users/BasLee/received_eventsjY  UserjY  uparents]}(jPY  (8c7bf0fd199ca5cec8da8272483f74f2a280429fjhY  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8c7bf0fd199ca5cec8da8272483f74f2a280429fjtY  Xhttps://github.com/cBioPortal/cbioportal/commit/8c7bf0fd199ca5cec8da8272483f74f2a280429fuastats}(totalKD	additionsK%	deletionsKufiles]}(jPY  (7c9125489a8ffb6a9c766361a0d6349f1dc20ddefilenamelpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatis/ClinicalDataMapper.xmlstatusmodifiedjY  K%jY  KchangesKDblob_urlhttps://github.com/cBioPortal/cbioportal/blob/131320beba79ed3343c17f1a94d869279fe24deb/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.xmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/131320beba79ed3343c17f1a94d869279fe24deb/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.xmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FClinicalDataMapper.xml?ref=131320beba79ed3343c17f1a94d869279fe24debpatchX  @@ -47,6 +47,11 @@
         INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
     </sql>
 
+    <sql id="fromSampleAndClinicalPatient">
+        <include refid="fromSample"/>
+        LEFT JOIN clinical_patient ON clinical_patient.INTERNAL_ID = patient.INTERNAL_ID
+    </sql>
+
     <sql id="fromPatient">
         FROM clinical_patient
         INNER JOIN patient ON clinical_patient.INTERNAL_ID = patient.INTERNAL_ID
@@ -238,38 +243,39 @@
     
     <sql id="whereSampleSearchAndPagination">
         INNER JOIN (
-            SELECT DISTINCT sort_subquery.INTERNAL_ID FROM (
-                SELECT clinical_sample.INTERNAL_ID
-                    <if test="_parameter.containsKey('sortBy') and sortBy != null">
-                        <if test="sortBy == 'sampleId'">
-                          , sample.STABLE_ID AS SORT_BY
-                        </if>
-                        <if test="sortBy == 'patientId'">
-                          , patient.STABLE_ID AS SORT_BY
-                        </if>
-                        -- else:
-                        <if test="sortBy != 'sampleId' and sortBy != 'patientId'">
-                          <!-- Mark samples without the attribute to sort by as NULL: -->
-                          , CASE WHEN clinical_sample.ATTR_ID = #{sortBy} THEN clinical_sample.ATTR_VALUE ELSE NULL END as SORT_BY
-                        </if>
-                    </if>
-                    <include refid="fromSample"/>
-                    <include refid="whereSample"/>
-                    <if test="_parameter.containsKey('searchTerm') and searchTerm != null and not searchTerm.isBlank()">
-                        AND
-                        clinical_sample.ATTR_VALUE LIKE CONCAT('%', #{searchTerm}, '%')
-                    </if>
-                    <if test="_parameter.containsKey('sortBy') and sortBy != null">
-                        <!-- Put NULL-attribute samples last: -->
-                        ORDER BY ISNULL(SORT_BY), SORT_BY ${direction}
-                    </if>
-                ) as sort_subquery
-       
-                <!-- Return all samples when no valid limit present: -->
-                <if test="_parameter.containsKey('limit') and limit != null and limit != 0">
-                    LIMIT #{limit} OFFSET #{offset}
+            SELECT DISTINCT clinical_sample.INTERNAL_ID
+            <if test="_parameter.containsKey('sortBy') and sortBy != null">
+                <if test="sortBy == 'sampleId'">
+                  , sample.STABLE_ID AS SORT_BY
+                </if>
+                <if test="sortBy == 'patientId'">
+                  , patient.STABLE_ID AS SORT_BY
+                </if>
+                <!-- else: -->
+                <if test="sortBy != 'sampleId' and sortBy != 'patientId'">
+                  <!-- Mark samples without the sort attribute as NULL: -->
+                  , CASE 
+                        WHEN clinical_sample.ATTR_ID = #{sortBy} THEN clinical_sample.ATTR_VALUE 
+                        WHEN clinical_patient.ATTR_ID = #{sortBy} THEN clinical_patient.ATTR_VALUE 
+                        ELSE NULL 
+                    END AS SORT_BY
                 </if>
-        ) as sample_id_subquery
+            </if>
+            <include refid="fromSampleAndClinicalPatient"/>
+            <include refid="whereSample"/>
+            <if test="_parameter.containsKey('searchTerm') and searchTerm != null and not searchTerm.isBlank()">
+                AND
+                clinical_sample.ATTR_VALUE LIKE CONCAT('%', #{searchTerm}, '%')
+            </if>
+            <if test="_parameter.containsKey('sortBy') and sortBy != null">
+                <!-- Put 'NULL samples' last: -->
+                ORDER BY ISNULL(SORT_BY), SORT_BY ${direction}
+            </if>
+            
+            <if test="_parameter.containsKey('limit') and limit != null and limit != 0">
+                LIMIT #{limit} OFFSET #{offset}
+            </if>
+        ) AS sample_id_subquery
           ON clinical_sample.INTERNAL_ID = sample_id_subquery.INTERNAL_ID
     </sql>
     uau(3c91d6c5a7e9a140bdf99bb301e7401fdca11e4c}(sha(3c91d6c5a7e9a140bdf99bb301e7401fdca11e4cnode_idEC_kwDOAe-hB9oAKDNjOTFkNmM1YTdlOWExNDBiZGY5OWJiMzAxZTc0MDFmZGNhMTFlNGMcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-11T17:57:33Zu	committer}(jY  Djokovic0311jY  .55948986+Djokovic0311@users.noreply.github.comjY  2023-08-11T17:57:33Zumessageupdatetree}(jY  (86a4ce86441415ae32e83e6c0c611918cc4b3803urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/86a4ce86441415ae32e83e6c0c611918cc4b3803ujY  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/3c91d6c5a7e9a140bdf99bb301e7401fdca11e4c
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujY  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/3c91d6c5a7e9a140bdf99bb301e7401fdca11e4chtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/3c91d6c5a7e9a140bdf99bb301e7401fdca11e4ccomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/3c91d6c5a7e9a140bdf99bb301e7401fdca11e4c/commentsjY  }(loginDjokovic0311idJUjY  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5jY  )https://api.github.com/users/Djokovic0311jY  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminujY  }(jY  Djokovic0311jY  JUjY  MDQ6VXNlcjU1OTQ4OTg2jY  4https://avatars.githubusercontent.com/u/55948986?v=4jY  h5jY  )https://api.github.com/users/Djokovic0311jY  https://github.com/Djokovic0311jY  3https://api.github.com/users/Djokovic0311/followersjY  @https://api.github.com/users/Djokovic0311/following{/other_user}jY  9https://api.github.com/users/Djokovic0311/gists{/gist_id}jY  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}jY  7https://api.github.com/users/Djokovic0311/subscriptionsjZ  .https://api.github.com/users/Djokovic0311/orgsjZ  /https://api.github.com/users/Djokovic0311/reposjZ  :https://api.github.com/users/Djokovic0311/events{/privacy}jZ  9https://api.github.com/users/Djokovic0311/received_eventsj	Z  UserjZ  uparents]}(jY  (ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbdjY  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbdjY  Xhttps://github.com/cBioPortal/cbioportal/commit/ddcf44ec06c8b05e4f2e537d0e2ce9d834e2cbbduastats}(totalM	additionsKތ	deletionsKufiles](}(jY  (38a69093c7e511f0edb47ae746b5652a9222d833filenameOservice/src/main/java/org/cbioportal/service/GenericAssayEnrichmentService.javastatusmodifiedj%Z  Kj&Z  KchangesK.blob_urlhttps://github.com/cBioPortal/cbioportal/blob/3c91d6c5a7e9a140bdf99bb301e7401fdca11e4c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayEnrichmentService.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/3c91d6c5a7e9a140bdf99bb301e7401fdca11e4c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayEnrichmentService.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayEnrichmentService.java?ref=3c91d6c5a7e9a140bdf99bb301e7401fdca11e4cpatchX[	  @@ -1,23 +1,23 @@
-package org.cbioportal.service;
-
-import org.cbioportal.model.EnrichmentType;
-import org.cbioportal.model.GenericAssayBinaryEnrichment;
-import org.cbioportal.model.GenericAssayCategoricalEnrichment;
-import org.cbioportal.model.MolecularProfileCaseIdentifier;
-import org.cbioportal.service.exception.MolecularProfileNotFoundException;
-
-import java.util.List;
-import java.util.Map;
-
-public interface GenericAssayEnrichmentService {
-    List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
-        String molecularProfileId,
-        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
-        EnrichmentType enrichmentType)
-        throws MolecularProfileNotFoundException;
-
-    List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
-                                                                                  Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
-                                                                                  EnrichmentType enrichmentType)
-        throws MolecularProfileNotFoundException;
-}
+//package org.cbioportal.service;
+//
+//import org.cbioportal.model.EnrichmentType;
+//import org.cbioportal.model.GenericAssayBinaryEnrichment;
+//import org.cbioportal.model.GenericAssayCategoricalEnrichment;
+//import org.cbioportal.model.MolecularProfileCaseIdentifier;
+//import org.cbioportal.service.exception.MolecularProfileNotFoundException;
+//
+//import java.util.List;
+//import java.util.Map;
+//
+//public interface GenericAssayEnrichmentService {
+//    List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
+//        String molecularProfileId,
+//        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
+//        EnrichmentType enrichmentType)
+//        throws MolecularProfileNotFoundException;
+//
+//    List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
+//                                                                                  Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
+//                                                                                  EnrichmentType enrichmentType)
+//        throws MolecularProfileNotFoundException;
+//}u}(jY  (120156b5d043532bd4258cb3205e3975ca2e6707j+Z  Vservice/src/main/java/org/cbioportal/service/impl/ExpressionEnrichmentServiceImpl.javaj-Z  modifiedj%Z  Kj&Z  Kj/Z  Kj0Z  https://github.com/cBioPortal/cbioportal/blob/3c91d6c5a7e9a140bdf99bb301e7401fdca11e4c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.javaj2Z  https://github.com/cBioPortal/cbioportal/raw/3c91d6c5a7e9a140bdf99bb301e7401fdca11e4c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.javaj4Z  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.java?ref=3c91d6c5a7e9a140bdf99bb301e7401fdca11e4cj6Z  X  @@ -5,9 +5,19 @@
 import java.util.stream.Collectors;
 
 import org.apache.commons.lang3.BooleanUtils;
-import org.cbioportal.model.*;
 import org.cbioportal.model.MolecularProfile.MolecularAlterationType;
 import org.cbioportal.model.meta.GenericAssayMeta;
+import org.cbioportal.model.EnrichmentType;
+import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
+import org.cbioportal.model.GenericAssayMolecularAlteration;
+import org.cbioportal.model.MolecularProfileCaseIdentifier;
+import org.cbioportal.model.MolecularProfile;
+import org.cbioportal.model.Sample;
+import org.cbioportal.model.GenericAssayEnrichment;
+import org.cbioportal.model.GenomicEnrichment;
+import org.cbioportal.model.Gene;
+import org.cbioportal.model.GeneMolecularAlteration;
 import org.cbioportal.persistence.MolecularDataRepository;
 import org.cbioportal.service.ExpressionEnrichmentService;
 import org.cbioportal.service.GeneService;u}(jY  (bdcd89ed023c4aef02682752739f54409698e083j+Z  Xservice/src/main/java/org/cbioportal/service/impl/GenericAssayEnrichmentServiceImpl.javaj-Z  modifiedj%Z  Kj&Z  Kj/Z  Mxj0Z  https://github.com/cBioPortal/cbioportal/blob/3c91d6c5a7e9a140bdf99bb301e7401fdca11e4c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.javaj2Z  https://github.com/cBioPortal/cbioportal/raw/3c91d6c5a7e9a140bdf99bb301e7401fdca11e4c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.javaj4Z  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.java?ref=3c91d6c5a7e9a140bdf99bb301e7401fdca11e4cj6Z  X	T  @@ -1,188 +1,188 @@
-package org.cbioportal.service.impl;
-
-import org.apache.commons.lang3.BooleanUtils;
-import org.cbioportal.model.EnrichmentType;
-import org.cbioportal.model.GenericAssayBinaryEnrichment;
-import org.cbioportal.model.GenericAssayCategoricalEnrichment;
-import org.cbioportal.model.GenericAssayMolecularAlteration;
-import org.cbioportal.model.MolecularProfileCaseIdentifier;
-import org.cbioportal.model.meta.GenericAssayMeta;
-import org.cbioportal.model.MolecularProfile;
-import org.cbioportal.model.Sample;
-import org.cbioportal.model.GenericAssayEnrichment;
-import org.cbioportal.persistence.MolecularDataRepository;
-import org.cbioportal.service.GenericAssayEnrichmentService;
-import org.cbioportal.service.GenericAssayService;
-import org.cbioportal.service.MolecularProfileService;
-import org.cbioportal.service.SampleService;
-import org.cbioportal.service.exception.MolecularProfileNotFoundException;
-import org.cbioportal.service.util.ExpressionEnrichmentUtil;
-import org.cbioportal.service.util.FisherExactTestCalculator;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.math.BigDecimal;
-import java.util.*;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-
-@Service
-public class GenericAssayEnrichmentServiceImpl implements GenericAssayEnrichmentService {
-
-    @Autowired
-    private MolecularDataRepository molecularDataRepository;
-
-    @Autowired
-    private SampleService sampleService;
-
-    @Autowired
-    private MolecularProfileService molecularProfileService;
-
-    @Autowired
-    private FisherExactTestCalculator fisherExactTestCalculator = new FisherExactTestCalculator();
-
-    @Autowired
-    private ExpressionEnrichmentUtil expressionEnrichmentUtil;
-    @Autowired
-    private GenericAssayService genericAssayService;
-
-    @Override
-    @Transactional(readOnly = true)
-    public List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
-        String molecularProfileId,
-        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
-        throws MolecularProfileNotFoundException {
-
-        // Validate and fetch molecular profile
-        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, true);
-
-        // Get the molecular alterations for the provided profile
-        Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
-            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
-
-        // Filter the case sets based on molecular profile
-        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
-
-        // Obtain binary enrichments from the utility
-        List<GenericAssayBinaryEnrichment> genericAssayBinaryEnrichments = expressionEnrichmentUtil.getGenericAssayBinaryEnrichments(molecularProfile,
-            filteredMolecularProfileCaseSets, enrichmentType, maItr);
-
-        // Calculate q-values for enrichments
-        calcQValues(genericAssayBinaryEnrichments);
-
-        // Extract stable IDs from binary enrichments
-        List<String> getGenericAssayStableIds = genericAssayBinaryEnrichments.stream()
-            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
-
-        // Fetch metadata of generic assays by their stable IDs
-        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
-
-        // Assign meta properties to each enrichment
-        return genericAssayBinaryEnrichments.stream().map(enrichmentDatum -> {
-            enrichmentDatum.setGenericEntityMetaProperties(
-                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
-            return enrichmentDatum;
-        }).collect(Collectors.toList());
-    }
-
-    @Override
-    @Transactional(readOnly = true)
-    public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
-                                                                                         Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
-        throws MolecularProfileNotFoundException {
-
-        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, false);
-
-        Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
-            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
-
-        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets;
-        filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
-
-        List<GenericAssayCategoricalEnrichment> genericAssayCategoricalEnrichments = expressionEnrichmentUtil.getGenericAssayCategoricalEnrichments(molecularProfile,
-            filteredMolecularProfileCaseSets, enrichmentType, maItr);
-
-        calcQValues(genericAssayCategoricalEnrichments);
-
-        List<String> getGenericAssayStableIds = genericAssayCategoricalEnrichments.stream()
-            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
-        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
-
-        return genericAssayCategoricalEnrichments.stream().map(enrichmentDatum -> {
-            enrichmentDatum.setGenericEntityMetaProperties(
-                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
-            return enrichmentDatum;
-        }).collect(Collectors.toList());
-    }
-
-    private MolecularProfile getAndValidateMolecularProfile(String molecularProfileId, boolean isBinary) throws MolecularProfileNotFoundException {
-        MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
-        validateMolecularProfile(molecularProfile, Arrays.asList(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY), isBinary);
-        return molecularProfile;
-    }
-
-    private void validateMolecularProfile(MolecularProfile molecularProfile,
-                                          List<MolecularProfile.MolecularAlterationType> validMolecularAlterationTypes, 
-                                          boolean isBinary) throws MolecularProfileNotFoundException {
-        if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
-            // Check alteration type
-            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-        }
-        // Check datatype for binary or categorical
-        if(isBinary) {
-            if(!molecularProfile.getDatatype().equals("BINARY")) {
-                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-            }            
-        } else {
-            if(!molecularProfile.getDatatype().equals("CATEGORICAL")) {
-                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-            }            
-        }
-    }
-
-    private Map<String, List<MolecularProfileCaseIdentifier>> filterMolecularProfileCaseSets(MolecularProfile molecularProfile, Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets) {
-        if (BooleanUtils.isTrue(molecularProfile.getPatientLevel())) {
-            // If patient level, filter duplicates by patient id
-            // For now we only support sample level for samples
-            List<String> sampleIds = molecularProfileCaseSets.values().stream().flatMap(Collection::stream).map(MolecularProfileCaseIdentifier::getCaseId).collect(Collectors.toList());
-            List<String> studyIds = Collections.nCopies(sampleIds.size(), molecularProfile.getCancerStudyIdentifier());
-            List<Sample> samples = sampleService.fetchSamples(studyIds, sampleIds, "ID");
-            Map<String, Integer> sampleIdToPatientIdMap = samples.stream().collect(Collectors.toMap(Sample::getStableId, Sample::getPatientId));
-
-            Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = new HashMap<>();
-            for (Map.Entry<String, List<MolecularProfileCaseIdentifier>> pair : molecularProfileCaseSets.entrySet()) {
-                Set<Integer> patientSet = new HashSet<Integer>();
-                List<MolecularProfileCaseIdentifier> identifierListUniqueByPatientId = new ArrayList<>();
-                for (MolecularProfileCaseIdentifier caseIdentifier : pair.getValue()) {
-                    if (!patientSet.contains(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()))) {
-                        identifierListUniqueByPatientId.add(caseIdentifier);
-                        patientSet.add(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()));
-                    }
-                }
-                filteredMolecularProfileCaseSets.put(pair.getKey(), identifierListUniqueByPatientId);
-            }
-            return filteredMolecularProfileCaseSets;
-        } else {
-            return molecularProfileCaseSets;
-        }
-    }
-
-    private Map<String, GenericAssayMeta> getGenericAssayMetaByStableId(List<String> stableIds, String molecularProfileId) {
-        return genericAssayService.getGenericAssayMetaByStableIdsAndMolecularIds(stableIds, stableIds.stream().map(sid -> molecularProfileId)
-            .collect(Collectors.toList()), "SUMMARY").stream()
-            .collect(Collectors.toMap(GenericAssayMeta::getStableId, Function.identity()));
-    }
-
-    private <T extends GenericAssayEnrichment> void calcQValues(List<T> enrichments) {
-        // Sort enrichments by pValue
-        Collections.sort(enrichments, GenericAssayEnrichment::compare);
-        BigDecimal[] pValues = enrichments.stream().map(T::getpValue).toArray(BigDecimal[]::new);
-        BigDecimal[] qValues = fisherExactTestCalculator.calcqValue(pValues);
-        // Assign q-values to enrichments
-        for (int i = 0; i < enrichments.size(); i++) {
-            enrichments.get(i).setqValue(qValues[i]);
-        }
-    }
-}
+//package org.cbioportal.service.impl;
+//
+//import org.apache.commons.lang3.BooleanUtils;
+//import org.cbioportal.model.EnrichmentType;
+//import org.cbioportal.model.GenericAssayBinaryEnrichment;
+//import org.cbioportal.model.GenericAssayCategoricalEnrichment;
+//import org.cbioportal.model.GenericAssayMolecularAlteration;
+//import org.cbioportal.model.MolecularProfileCaseIdentifier;
+//import org.cbioportal.model.meta.GenericAssayMeta;
+//import org.cbioportal.model.MolecularProfile;
+//import org.cbioportal.model.Sample;
+//import org.cbioportal.model.GenericAssayEnrichment;
+//import org.cbioportal.persistence.MolecularDataRepository;
+//import org.cbioportal.service.GenericAssayEnrichmentService;
+//import org.cbioportal.service.GenericAssayService;
+//import org.cbioportal.service.MolecularProfileService;
+//import org.cbioportal.service.SampleService;
+//import org.cbioportal.service.exception.MolecularProfileNotFoundException;
+//import org.cbioportal.service.util.ExpressionEnrichmentUtil;
+//import org.cbioportal.service.util.FisherExactTestCalculator;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Service;
+//import org.springframework.transaction.annotation.Transactional;
+//
+//import java.math.BigDecimal;
+//import java.util.*;
+//import java.util.function.Function;
+//import java.util.stream.Collectors;
+//
+//
+//@Service
+//public class GenericAssayEnrichmentServiceImpl implements GenericAssayEnrichmentService {
+//
+//    @Autowired
+//    private MolecularDataRepository molecularDataRepository;
+//
+//    @Autowired
+//    private SampleService sampleService;
+//
+//    @Autowired
+//    private MolecularProfileService molecularProfileService;
+//
+//    @Autowired
+//    private FisherExactTestCalculator fisherExactTestCalculator = new FisherExactTestCalculator();
+//
+//    @Autowired
+//    private ExpressionEnrichmentUtil expressionEnrichmentUtil;
+//    @Autowired
+//    private GenericAssayService genericAssayService;
+//
+//    @Override
+//    @Transactional(readOnly = true)
+//    public List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
+//        String molecularProfileId,
+//        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+//        throws MolecularProfileNotFoundException {
+//
+//        // Validate and fetch molecular profile
+//        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, true);
+//
+//        // Get the molecular alterations for the provided profile
+//        Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
+//            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
+//
+//        // Filter the case sets based on molecular profile
+//        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
+//
+//        // Obtain binary enrichments from the utility
+//        List<GenericAssayBinaryEnrichment> genericAssayBinaryEnrichments = expressionEnrichmentUtil.getGenericAssayBinaryEnrichments(molecularProfile,
+//            filteredMolecularProfileCaseSets, enrichmentType, maItr);
+//
+//        // Calculate q-values for enrichments
+//        calcQValues(genericAssayBinaryEnrichments);
+//
+//        // Extract stable IDs from binary enrichments
+//        List<String> getGenericAssayStableIds = genericAssayBinaryEnrichments.stream()
+//            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
+//
+//        // Fetch metadata of generic assays by their stable IDs
+//        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
+//
+//        // Assign meta properties to each enrichment
+//        return genericAssayBinaryEnrichments.stream().map(enrichmentDatum -> {
+//            enrichmentDatum.setGenericEntityMetaProperties(
+//                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
+//            return enrichmentDatum;
+//        }).collect(Collectors.toList());
+//    }
+//
+//    @Override
+//    @Transactional(readOnly = true)
+//    public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
+//                                                                                         Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+//        throws MolecularProfileNotFoundException {
+//
+//        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, false);
+//
+//        Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
+//            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
+//
+//        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets;
+//        filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
+//
+//        List<GenericAssayCategoricalEnrichment> genericAssayCategoricalEnrichments = expressionEnrichmentUtil.getGenericAssayCategoricalEnrichments(molecularProfile,
+//            filteredMolecularProfileCaseSets, enrichmentType, maItr);
+//
+//        calcQValues(genericAssayCategoricalEnrichments);
+//
+//        List<String> getGenericAssayStableIds = genericAssayCategoricalEnrichments.stream()
+//            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
+//        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
+//
+//        return genericAssayCategoricalEnrichments.stream().map(enrichmentDatum -> {
+//            enrichmentDatum.setGenericEntityMetaProperties(
+//                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
+//            return enrichmentDatum;
+//        }).collect(Collectors.toList());
+//    }
+//
+//    private MolecularProfile getAndValidateMolecularProfile(String molecularProfileId, boolean isBinary) throws MolecularProfileNotFoundException {
+//        MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
+//        validateMolecularProfile(molecularProfile, Arrays.asList(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY), isBinary);
+//        return molecularProfile;
+//    }
+//
+//    private void validateMolecularProfile(MolecularProfile molecularProfile,
+//                                          List<MolecularProfile.MolecularAlterationType> validMolecularAlterationTypes, 
+//                                          boolean isBinary) throws MolecularProfileNotFoundException {
+//        if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
+//            // Check alteration type
+//            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+//        }
+//        // Check datatype for binary or categorical
+//        if(isBinary) {
+//            if(!molecularProfile.getDatatype().equals("BINARY")) {
+//                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+//            }            
+//        } else {
+//            if(!molecularProfile.getDatatype().equals("CATEGORICAL")) {
+//                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+//            }            
+//        }
+//    }
+//
+//    private Map<String, List<MolecularProfileCaseIdentifier>> filterMolecularProfileCaseSets(MolecularProfile molecularProfile, Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets) {
+//        if (BooleanUtils.isTrue(molecularProfile.getPatientLevel())) {
+//            // If patient level, filter duplicates by patient id
+//            // For now we only support sample level for samples
+//            List<String> sampleIds = molecularProfileCaseSets.values().stream().flatMap(Collection::stream).map(MolecularProfileCaseIdentifier::getCaseId).collect(Collectors.toList());
+//            List<String> studyIds = Collections.nCopies(sampleIds.size(), molecularProfile.getCancerStudyIdentifier());
+//            List<Sample> samples = sampleService.fetchSamples(studyIds, sampleIds, "ID");
+//            Map<String, Integer> sampleIdToPatientIdMap = samples.stream().collect(Collectors.toMap(Sample::getStableId, Sample::getPatientId));
+//
+//            Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = new HashMap<>();
+//            for (Map.Entry<String, List<MolecularProfileCaseIdentifier>> pair : molecularProfileCaseSets.entrySet()) {
+//                Set<Integer> patientSet = new HashSet<Integer>();
+//                List<MolecularProfileCaseIdentifier> identifierListUniqueByPatientId = new ArrayList<>();
+//                for (MolecularProfileCaseIdentifier caseIdentifier : pair.getValue()) {
+//                    if (!patientSet.contains(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()))) {
+//                        identifierListUniqueByPatientId.add(caseIdentifier);
+//                        patientSet.add(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()));
+//                    }
+//                }
+//                filteredMolecularProfileCaseSets.put(pair.getKey(), identifierListUniqueByPatientId);
+//            }
+//            return filteredMolecularProfileCaseSets;
+//        } else {
+//            return molecularProfileCaseSets;
+//        }
+//    }
+//
+//    private Map<String, GenericAssayMeta> getGenericAssayMetaByStableId(List<String> stableIds, String molecularProfileId) {
+//        return genericAssayService.getGenericAssayMetaByStableIdsAndMolecularIds(stableIds, stableIds.stream().map(sid -> molecularProfileId)
+//            .collect(Collectors.toList()), "SUMMARY").stream()
+//            .collect(Collectors.toMap(GenericAssayMeta::getStableId, Function.identity()));
+//    }
+//
+//    private <T extends GenericAssayEnrichment> void calcQValues(List<T> enrichments) {
+//        // Sort enrichments by pValue
+//        Collections.sort(enrichments, GenericAssayEnrichment::compare);
+//        BigDecimal[] pValues = enrichments.stream().map(T::getpValue).toArray(BigDecimal[]::new);
+//        BigDecimal[] qValues = fisherExactTestCalculator.calcqValue(pValues);
+//        // Assign q-values to enrichments
+//        for (int i = 0; i < enrichments.size(); i++) {
+//            enrichments.get(i).setqValue(qValues[i]);
+//        }
+//    }
+//}ueu     (719e5d25e373bc40109581cb99e64925eca8b7e5}(sha(719e5d25e373bc40109581cb99e64925eca8b7e5node_idEC_kwDOAe-hB9oAKDcxOWU1ZDI1ZTM3M2JjNDAxMDk1ODFjYjk5ZTY0OTI1ZWNhOGI3ZTUcommit}(author}(nameKarthikemailkalletlakarthik@gmail.comdate2023-07-10T16:25:04Zu	committer}(jRZ  KarthikjTZ  kalletlakarthik@gmail.comjVZ  2023-07-10T16:57:05Zumessage&Improve treatment data api performancetree}(jJZ  (9e81c6d4ed92612c03ba639888b2d0a904da49daurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/9e81c6d4ed92612c03ba639888b2d0a904da49daujbZ  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/719e5d25e373bc40109581cb99e64925eca8b7e5
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujbZ  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/719e5d25e373bc40109581cb99e64925eca8b7e5html_urlXhttps://github.com/cBioPortal/cbioportal/commit/719e5d25e373bc40109581cb99e64925eca8b7e5comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/719e5d25e373bc40109581cb99e64925eca8b7e5/commentsjPZ  }(login	kalletlakidJƴ jLZ  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5jbZ  &https://api.github.com/users/kalletlakjnZ  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminujXZ  }(jsZ  	kalletlakjuZ  Jƴ jLZ  MDQ6VXNlcjEyOTU2ODcwjwZ  4https://avatars.githubusercontent.com/u/12956870?v=4jyZ  h5jbZ  &https://api.github.com/users/kalletlakjnZ  https://github.com/kalletlakj|Z  0https://api.github.com/users/kalletlak/followersj~Z  =https://api.github.com/users/kalletlak/following{/other_user}jZ  6https://api.github.com/users/kalletlak/gists{/gist_id}jZ  =https://api.github.com/users/kalletlak/starred{/owner}{/repo}jZ  4https://api.github.com/users/kalletlak/subscriptionsjZ  +https://api.github.com/users/kalletlak/orgsjZ  ,https://api.github.com/users/kalletlak/reposjZ  7https://api.github.com/users/kalletlak/events{/privacy}jZ  6https://api.github.com/users/kalletlak/received_eventsjZ  UserjZ  uparents]}(jJZ  (249d4ca1bab7348af6f513bb4b897fac8cf93310jbZ  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/249d4ca1bab7348af6f513bb4b897fac8cf93310jnZ  Xhttps://github.com/cBioPortal/cbioportal/commit/249d4ca1bab7348af6f513bb4b897fac8cf93310uastats}(totalKU	additionsK-	deletionsK(ufiles](}(jJZ  (2971b3d1be6774b44ec9f00955ceec64e0585d89filename&db-scripts/src/main/resources/cgds.sqlstatusmodifiedjZ  KjZ  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/719e5d25e373bc40109581cb99e64925eca8b7e5/db-scripts%2Fsrc%2Fmain%2Fresources%2Fcgds.sqlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/719e5d25e373bc40109581cb99e64925eca8b7e5/db-scripts%2Fsrc%2Fmain%2Fresources%2Fcgds.sqlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/db-scripts%2Fsrc%2Fmain%2Fresources%2Fcgds.sql?ref=719e5d25e373bc40109581cb99e64925eca8b7e5patch@@ -755,5 +755,5 @@ CREATE TABLE `resource_study` (
 );
 
 -- THIS MUST BE KEPT IN SYNC WITH db.version PROPERTY IN pom.xml
-INSERT INTO info VALUES ('2.13.0', NULL);
+INSERT INTO info VALUES ('2.13.1', NULL);
 u}(jJZ  (eb649e95a1716b82452bbbac92319ed30274b9f7jZ  +db-scripts/src/main/resources/migration.sqljZ  modifiedjZ  KjZ  K jZ  KjZ  https://github.com/cBioPortal/cbioportal/blob/719e5d25e373bc40109581cb99e64925eca8b7e5/db-scripts%2Fsrc%2Fmain%2Fresources%2Fmigration.sqljZ  https://github.com/cBioPortal/cbioportal/raw/719e5d25e373bc40109581cb99e64925eca8b7e5/db-scripts%2Fsrc%2Fmain%2Fresources%2Fmigration.sqljZ  https://api.github.com/repos/cBioPortal/cbioportal/contents/db-scripts%2Fsrc%2Fmain%2Fresources%2Fmigration.sql?ref=719e5d25e373bc40109581cb99e64925eca8b7e5jZ  X=  @@ -1021,3 +1021,9 @@ ALTER TABLE `mutation_event` CHANGE COLUMN `ONCOTATOR_PROTEIN_POS_START` `PROTEI
 ALTER TABLE `mutation_event` CHANGE COLUMN `ONCOTATOR_PROTEIN_POS_END` `PROTEIN_POS_END` int(11);
 UPDATE `info` SET `DB_SCHEMA_VERSION`="2.13.0";
 
+
+##version: 2.13.1
+ALTER TABLE `clinical_event_data` MODIFY COLUMN `VALUE` varchar(3000) NOT NULL;
+CREATE INDEX idx_clinical_event_key ON clinical_event_data (`KEY`);
+CREATE INDEX idx_clinical_event_value ON clinical_event_data (`VALUE`);
+UPDATE `info` SET `DB_SCHEMA_VERSION`="2.13.1";
\ No newline at end of fileu}(jJZ  (99011ef74c8cdb869756c7f4989372ec7fb4913cjZ  ]persistence/persistence-api/src/main/java/org/cbioportal/persistence/TreatmentRepository.javajZ  modifiedjZ  KjZ  KjZ  KjZ  https://github.com/cBioPortal/cbioportal/blob/719e5d25e373bc40109581cb99e64925eca8b7e5/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FTreatmentRepository.javajZ  https://github.com/cBioPortal/cbioportal/raw/719e5d25e373bc40109581cb99e64925eca8b7e5/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FTreatmentRepository.javajZ  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FTreatmentRepository.java?ref=719e5d25e373bc40109581cb99e64925eca8b7e5jZ  Xo  @@ -23,10 +23,10 @@ public interface TreatmentRepository {
     public Set<String> getAllUniqueTreatments(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    public Integer getTreatmentCount(List<String> studies, String key);
+    public Boolean hasTreatmentData(List<String> studies, String key);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    public Integer getSampleCount(List<String> studies);
+    public Boolean hasSampleTimelineData(List<String> studies);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
     public Boolean studyIdHasTreatments(String studyId, ClinicalEventKeyCode key);u}(jJZ  (b92b086e21e59ba245b0a91060d79007abeec280jZ  epersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/TreatmentMapper.javajZ  modifiedjZ  KjZ  KjZ  KjZ  https://github.com/cBioPortal/cbioportal/blob/719e5d25e373bc40109581cb99e64925eca8b7e5/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.javajZ  https://github.com/cBioPortal/cbioportal/raw/719e5d25e373bc40109581cb99e64925eca8b7e5/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.javajZ  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.java?ref=719e5d25e373bc40109581cb99e64925eca8b7e5jZ  X6  @@ -15,9 +15,9 @@ public interface TreatmentMapper {
 
     Set<String> getAllUniqueTreatments(List<String> sampleIds, List<String> studyIds, String key);
 
-    Integer getTreatmentCount(List<String> sampleIds, List<String> studyIds, String key);
+    Boolean hasTreatmentData(List<String> sampleIds, List<String> studyIds, String key);
 
-    Integer getSampleCount(List<String> sampleIds, List<String> studyIds);
+    Boolean hasSampleTimelineData(List<String> sampleIds, List<String> studyIds);
 
     Boolean studyIdHasTreatments(String studyId, String key);
 }u}(jJZ  (768d3a0b7d19d60060179d35f96008503ad6f676jZ  ppersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/TreatmentMyBatisRepository.javajZ  modifiedjZ  KjZ  KjZ  KjZ  https://github.com/cBioPortal/cbioportal/blob/719e5d25e373bc40109581cb99e64925eca8b7e5/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepository.javajZ  https://github.com/cBioPortal/cbioportal/raw/719e5d25e373bc40109581cb99e64925eca8b7e5/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepository.javajZ  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepository.java?ref=719e5d25e373bc40109581cb99e64925eca8b7e5jZ  X  @@ -75,13 +75,13 @@ public Set<String> getAllUniqueTreatments(List<String> sampleIds, List<String> s
     }
 
     @Override
-    public Integer getTreatmentCount(List<String> studies, String key) {
-        return treatmentMapper.getTreatmentCount(null, studies, key);
+    public Boolean hasTreatmentData(List<String> studies, String key) {
+        return treatmentMapper.hasTreatmentData(null, studies, key);
     }
 
     @Override
-    public Integer getSampleCount(List<String> studies) {
-        return treatmentMapper.getSampleCount(null, studies);
+    public Boolean hasSampleTimelineData(List<String> studies) {
+        return treatmentMapper.hasSampleTimelineData(null, studies);
     }
 
     @Overrideu}(jJZ  (3a4aa1a6ad9d2489e4941d5e1d9c09a919fa76c3jZ  ipersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatis/TreatmentMapper.xmljZ  modifiedjZ  K
jZ  KjZ  KjZ  https://github.com/cBioPortal/cbioportal/blob/719e5d25e373bc40109581cb99e64925eca8b7e5/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.xmljZ  https://github.com/cBioPortal/cbioportal/raw/719e5d25e373bc40109581cb99e64925eca8b7e5/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.xmljZ  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.xml?ref=719e5d25e373bc40109581cb99e64925eca8b7e5jZ  X	  @@ -61,22 +61,23 @@
             AND clinical_event_data.KEY = #{key}
     </select>
 
-    <select id="getTreatmentCount" resultType="java.lang.Integer">
-        SELECT
-            COUNT(clinical_event.PATIENT_ID)
+    <select id="hasTreatmentData" resultType="java.lang.Boolean">
+        SELECT EXISTS(SELECT
+            *
         FROM
             clinical_event
             INNER JOIN clinical_event_data ON clinical_event.CLINICAL_EVENT_ID = clinical_event_data.CLINICAL_EVENT_ID
             INNER JOIN patient ON clinical_event.PATIENT_ID = patient.INTERNAL_ID
             INNER JOIN sample ON patient.INTERNAL_ID = sample.PATIENT_ID
             INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
         <include refid="where"/>
-            AND clinical_event_data.KEY = #{key}
+            AND clinical_event_data.KEY = #{key} LIMIT 1
+        )
     </select>
 
-    <select id="getSampleCount" resultType="java.lang.Integer">
-        SELECT
-            COUNT(sample.STABLE_ID)
+    <select id="hasSampleTimelineData" resultType="java.lang.Boolean">
+        SELECT EXISTS(SELECT
+            *
         FROM
             clinical_event
             INNER JOIN clinical_event_data ON clinical_event.CLINICAL_EVENT_ID = clinical_event_data.CLINICAL_EVENT_ID
@@ -85,20 +86,21 @@
             INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
         <include refid="where"/>
             AND clinical_event_data.KEY = 'SAMPLE_ID'
-            AND (clinical_event.EVENT_TYPE LIKE 'Sample Acquisition' OR clinical_event.EVENT_TYPE LIKE 'SPECIMEN')
+            AND (clinical_event.EVENT_TYPE LIKE 'Sample Acquisition' OR clinical_event.EVENT_TYPE LIKE 'SPECIMEN') LIMIT 1)
     </select>
     
+    
     <select id="studyIdHasTreatments" resultType="java.lang.Boolean">
-        SELECT
-            count(cancer_study.CANCER_STUDY_IDENTIFIER) > 0
+        SELECT EXISTS(SELECT
+            *
         FROM
             clinical_event
             INNER JOIN clinical_event_data ON clinical_event.CLINICAL_EVENT_ID = clinical_event_data.CLINICAL_EVENT_ID
             INNER JOIN patient ON clinical_event.PATIENT_ID = patient.INTERNAL_ID
             INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
         WHERE
             clinical_event_data.KEY = #{key}
-            AND cancer_study.CANCER_STUDY_IDENTIFIER = #{studyId}
+            AND cancer_study.CANCER_STUDY_IDENTIFIER = #{studyId} LIMIT 1)
     </select>
 
     <sql id="where">u}(jJZ  (5f4e0bcd1b07cf3c3f00a7767187f5b1d68b9d99jZ  tpersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/TreatmentMyBatisRepositoryTest.javajZ  modifiedjZ  KjZ  KjZ  KjZ  https://github.com/cBioPortal/cbioportal/blob/719e5d25e373bc40109581cb99e64925eca8b7e5/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepositoryTest.javajZ  https://github.com/cBioPortal/cbioportal/raw/719e5d25e373bc40109581cb99e64925eca8b7e5/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepositoryTest.javajZ  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepositoryTest.java?ref=719e5d25e373bc40109581cb99e64925eca8b7e5jZ  X
  @@ -147,19 +147,17 @@ public void getAllUniqueTreatments() {
     }
 
     @Test
-    public void getTreatmentCount() {
-        Integer expected = 1;
-        Integer actual = treatmentRepository.getTreatmentCount(Collections.singletonList("study_tcga_pub"), ClinicalEventKeyCode.Agent.getKey());
+    public void hasTreatmentData() {
+        Boolean actual = treatmentRepository.hasTreatmentData(Collections.singletonList("study_tcga_pub"), ClinicalEventKeyCode.Agent.getKey());
         
-        Assert.assertEquals(actual, expected);
+        Assert.assertEquals(actual, true);
     }
 
     @Test
     public void getSampleCount() {
-        Integer expected = 2;
-        Integer actual = treatmentRepository.getSampleCount(Collections.singletonList("study_tcga_pub"));
+        Boolean actual = treatmentRepository.hasSampleTimelineData(Collections.singletonList("study_tcga_pub"));
         
-        Assert.assertEquals(actual, expected);
+        Assert.assertEquals(actual, true);
     }
     
 }
\ No newline at end of fileu}(jJZ  (ce9685c8f5f72940bbc3e7d7563d5c53bdfd9f14jZ  pom.xmljZ  modifiedjZ  KjZ  KjZ  KjZ  ^https://github.com/cBioPortal/cbioportal/blob/719e5d25e373bc40109581cb99e64925eca8b7e5/pom.xmljZ  ]https://github.com/cBioPortal/cbioportal/raw/719e5d25e373bc40109581cb99e64925eca8b7e5/pom.xmljZ  phttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=719e5d25e373bc40109581cb99e64925eca8b7e5jZ  @@ -314,7 +314,7 @@
     <tomcat.session.timeout>720</tomcat.session.timeout>
 
     <!-- THIS SHOULD BE KEPT IN SYNC TO VERSION IN CGDS.SQL -->
-    <db.version>2.13.0</db.version>
+    <db.version>2.13.1</db.version>
   </properties>
 
   <modules>u}(jJZ  (0409fac2e52a329c09173781730d78e2e88604bdjZ  Kservice/src/main/java/org/cbioportal/service/impl/TreatmentServiceImpl.javajZ  modifiedjZ  KjZ  KjZ  KjZ  https://github.com/cBioPortal/cbioportal/blob/719e5d25e373bc40109581cb99e64925eca8b7e5/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImpl.javajZ  https://github.com/cBioPortal/cbioportal/raw/719e5d25e373bc40109581cb99e64925eca8b7e5/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImpl.javajZ  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImpl.java?ref=719e5d25e373bc40109581cb99e64925eca8b7e5jZ  X  @@ -12,7 +12,7 @@
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
-import static java.util.stream.Collectors.toList;
+import static java.util.stream.Collectors.*;
 
 @Service
 public class TreatmentServiceImpl implements TreatmentService {
@@ -40,16 +40,16 @@ private Pair<List<String>, List<String>> filterIds(List<String> sampleIds, List<
         }
         return new ImmutablePair<>(filteredSampleIds, filteredStudyIds);
     }
-    
+
     @Override
     public List<SampleTreatmentRow> getAllSampleTreatmentRows(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key) {
         Pair<List<String>, List<String>> filteredIds = filterIds(sampleIds, studyIds, key);
         sampleIds = filteredIds.getLeft();
         studyIds = filteredIds.getRight();
 
-        Map<String, List<ClinicalEventSample>> samplesByPatient = 
+        Map<String, List<ClinicalEventSample>> samplesByPatient =
             treatmentRepository.getSamplesByPatientId(sampleIds, studyIds);
-        Map<String, List<Treatment>> treatmentsByPatient = 
+        Map<String, List<Treatment>> treatmentsByPatient =
             treatmentRepository.getTreatmentsByPatientId(sampleIds, studyIds, key);
 
         Stream<SampleTreatmentRow> rows = samplesByPatient.keySet().stream()
@@ -150,16 +150,15 @@ Stream<SampleTreatmentRow> toRows() {
             );
         }
     }
-
     @Override
     public List<PatientTreatmentRow> getAllPatientTreatmentRows(
         List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key
     ) {
         Pair<List<String>, List<String>> filteredIds = filterIds(sampleIds, studyIds, key);
         sampleIds = filteredIds.getLeft();
         studyIds = filteredIds.getRight();
-        
-        Map<String, List<Treatment>> treatmentsByPatient = 
+
+        Map<String, List<Treatment>> treatmentsByPatient =
             treatmentRepository.getTreatmentsByPatientId(sampleIds, studyIds, key);
         Map<String, List<ClinicalEventSample>> samplesByPatient = treatmentRepository
             .getShallowSamplesByPatientId(sampleIds, studyIds)
@@ -204,17 +203,17 @@ private List<Map.Entry<String, List<Treatment>>> matchingPatients(
 
     @Override
     public Boolean containsTreatmentData(List<String> studies, ClinicalEventKeyCode key) {
-        return treatmentRepository.getTreatmentCount(studies, key.getKey()) > 0;
+        return treatmentRepository.hasTreatmentData(studies, key.getKey());
     }
 
     @Override
     public Boolean containsSampleTreatmentData(List<String> studyIds, ClinicalEventKeyCode key) {
         studyIds = studyIds.stream()
             .filter(studyId -> treatmentRepository.studyIdHasTreatments(studyId, key))
             .collect(Collectors.toList());
-        Integer sampleCount = treatmentRepository.getSampleCount(studyIds);
-        Integer treatmentCount = treatmentRepository.getTreatmentCount(studyIds, key.getKey());
-        
-        return sampleCount * treatmentCount > 0;
+        if(studyIds.size() > 0 && treatmentRepository.hasSampleTimelineData(studyIds)) {
+            return treatmentRepository.hasTreatmentData(studyIds, key.getKey());
+        }
+        return false;
     }
 }ueu(dbee688334fbca61c4238ece408b1e323a78240c}(sha(dbee688334fbca61c4238ece408b1e323a78240cnode_idEC_kwDOAe-hB9oAKGRiZWU2ODgzMzRmYmNhNjFjNDIzOGVjZTQwOGIxZTMyM2E3ODI0MGMcommit}(author}(nameoplantalechemailoleguer@thehyve.nldate2023-06-20T12:22:27Zu	committer}(j[  oplantalechj	[  oleguer@thehyve.nlj[  2023-06-20T12:22:27Zumessage6Create property to show reference genome in study listtree}(jZ  (f4c5c9f4c171e8ec78f8ec46159190231021026curlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/f4c5c9f4c171e8ec78f8ec46159190231021026cuj[  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/dbee688334fbca61c4238ece408b1e323a78240c
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj[  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/dbee688334fbca61c4238ece408b1e323a78240chtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/dbee688334fbca61c4238ece408b1e323a78240ccomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/dbee688334fbca61c4238ece408b1e323a78240c/commentsj[  }(loginoplantalechidJj5j[  MDQ6VXNlcjIwMjc4MDEz
avatar_url4https://avatars.githubusercontent.com/u/20278013?v=4gravatar_idh5j[  (https://api.github.com/users/oplantalechj#[  https://github.com/oplantalech
followers_url2https://api.github.com/users/oplantalech/followers
following_url?https://api.github.com/users/oplantalech/following{/other_user}	gists_url8https://api.github.com/users/oplantalech/gists{/gist_id}starred_url?https://api.github.com/users/oplantalech/starred{/owner}{/repo}subscriptions_url6https://api.github.com/users/oplantalech/subscriptionsorganizations_url-https://api.github.com/users/oplantalech/orgs	repos_url.https://api.github.com/users/oplantalech/repos
events_url9https://api.github.com/users/oplantalech/events{/privacy}received_events_url8https://api.github.com/users/oplantalech/received_eventstypeUser
site_adminuj
[  }(j([  oplantalechj*[  Jj5j[  MDQ6VXNlcjIwMjc4MDEzj,[  4https://avatars.githubusercontent.com/u/20278013?v=4j.[  h5j[  (https://api.github.com/users/oplantalechj#[  https://github.com/oplantalechj1[  2https://api.github.com/users/oplantalech/followersj3[  ?https://api.github.com/users/oplantalech/following{/other_user}j5[  8https://api.github.com/users/oplantalech/gists{/gist_id}j7[  ?https://api.github.com/users/oplantalech/starred{/owner}{/repo}j9[  6https://api.github.com/users/oplantalech/subscriptionsj;[  -https://api.github.com/users/oplantalech/orgsj=[  .https://api.github.com/users/oplantalech/reposj?[  9https://api.github.com/users/oplantalech/events{/privacy}jA[  8https://api.github.com/users/oplantalech/received_eventsjC[  UserjE[  uparents]}(jZ  (15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0j[  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0j#[  Xhttps://github.com/cBioPortal/cbioportal/commit/15cf8ce4c617b8e959ee8ff3c2312e7fba7ed4b0uastats}(totalK	additionsK	deletionsKufiles](}(jZ  (19273b2d38a781eff9698b01a7561be22cd9ba57filename<docs/deployment/customization/portal.properties-Reference.mdstatusmodifiedj_[  Kj`[  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/dbee688334fbca61c4238ece408b1e323a78240c/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdraw_urlhttps://github.com/cBioPortal/cbioportal/raw/dbee688334fbca61c4238ece408b1e323a78240c/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.md?ref=dbee688334fbca61c4238ece408b1e323a78240cpatchX  @@ -167,6 +167,13 @@ If _show\_unauthorized\_studies_ feature has been enabled, a message (template)
 skin.home_page.unauthorized_studies_global_message=
 ```
 
+### Show badge with reference genome
+In instances with hg19 and hg38 studies you can show the reference genome in the home page next to the number of samples. This can be done setting this property to `true` (`false` by default):
+
+```
+skin.home_page.show_reference_genome=
+```
+
 ### Control the appearance of the settings menu in study view and group comparison that controls custom annotation-based filtering
 
 A settings menu that allows the user to filter alterations in study view and group comparison may be used when [custom driver annotations](/File-Formats.md#custom-driver-annotations) were loaded for the study or studies displayed in these sections. This menu will only appear, when setting the property _skin.show\_settings\_menu_ to _true_.u}(jZ  (79e16e74df70d482ff59ab39640f0ba1b4e5a316je[  )portal/src/main/webapp/config_service.jspjg[  modifiedj_[  Kj`[  Kji[  Kjj[  https://github.com/cBioPortal/cbioportal/blob/dbee688334fbca61c4238ece408b1e323a78240c/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspjl[  https://github.com/cBioPortal/cbioportal/raw/dbee688334fbca61c4238ece408b1e323a78240c/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspjn[  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=dbee688334fbca61c4238ece408b1e323a78240cjp[  XI  @@ -147,7 +147,8 @@
             "skin.patient_view.structural_variant_table.columns.show_on_init",
             "comparison.categorical_na_values",
             "skin.hide_download_controls",
-            "study_download_url"
+            "study_download_url",
+            "skin.home_page.show_reference_genome"
         };
 
 u}(jZ  (7cfa8b26cf5cda380cb07062abfadeb8b387d4a5je[  ,src/main/resources/portal.properties.EXAMPLEjg[  modifiedj_[  Kj`[  K ji[  Kjj[  https://github.com/cBioPortal/cbioportal/blob/dbee688334fbca61c4238ece408b1e323a78240c/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEjl[  https://github.com/cBioPortal/cbioportal/raw/dbee688334fbca61c4238ece408b1e323a78240c/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEjn[  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=dbee688334fbca61c4238ece408b1e323a78240cjp[  X  @@ -104,6 +104,8 @@ skin.study_view.link_text=To build your own case set, try out our enhanced Study
 # skin.home_page.show_unauthorized_studies=false
 ## enable this to configure a global message for the studies that are unauthorized; the message can contain placecards like {$.Owner.email} for the studies that have the information in the study tags 
 # skin.home_page.unauthorized_studies_global_message=The study is unauthorized. You need to request access.
+## enable this to show reference genome next to the samples
+# skin.home_page.show_reference_genome=false
 
 setting controlling whether Download tabs and download/copy-to-clipboard controls should be shown
 # skin.hide_download_controls=trueueu(d0fb6210aab800573e265132bed356b198c0db73}(sha(d0fb6210aab800573e265132bed356b198c0db73node_idEC_kwDOAe-hB9oAKGQwZmI2MjEwYWFiODAwNTczZTI2NTEzMmJlZDM1NmIxOThjMGRiNzMcommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-06-13T09:28:18Zu	committer}(j[  
pvannieropj[  pim@thehyve.nlj[  2023-06-13T09:28:18ZumessageMChange missing site1 or site2 gene for SV to INFO log level

Was WARN before.tree}(j[  (b5a9526ef459a0ac948d1c99d67a04f453aa87beurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/b5a9526ef459a0ac948d1c99d67a04f453aa87beuj[  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/d0fb6210aab800573e265132bed356b198c0db73
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj[  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d0fb6210aab800573e265132bed356b198c0db73html_urlXhttps://github.com/cBioPortal/cbioportal/commit/d0fb6210aab800573e265132bed356b198c0db73comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/d0fb6210aab800573e265132bed356b198c0db73/commentsj[  }(login
pvannieropidJa j[  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5j[  'https://api.github.com/users/pvannieropj[  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminuj[  }(j[  
pvannieropj[  Ja j[  MDQ6VXNlcjc0NTg4NQ==j[  2https://avatars.githubusercontent.com/u/745885?v=4j[  h5j[  'https://api.github.com/users/pvannieropj[  https://github.com/pvannieropj[  1https://api.github.com/users/pvannierop/followersj[  >https://api.github.com/users/pvannierop/following{/other_user}j[  7https://api.github.com/users/pvannierop/gists{/gist_id}j[  >https://api.github.com/users/pvannierop/starred{/owner}{/repo}j[  5https://api.github.com/users/pvannierop/subscriptionsj[  ,https://api.github.com/users/pvannierop/orgsj[  -https://api.github.com/users/pvannierop/reposj[  8https://api.github.com/users/pvannierop/events{/privacy}j[  7https://api.github.com/users/pvannierop/received_eventsj[  Userj[  uparents]}(j[  (f5edaec004b8432421cb6453ea490c54aec68d2ej[  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/f5edaec004b8432421cb6453ea490c54aec68d2ej[  Xhttps://github.com/cBioPortal/cbioportal/commit/f5edaec004b8432421cb6453ea490c54aec68d2euastats}(totalK	additionsK	deletionsKufiles]}(j[  (28d2d07b4292906aa5f5c5a7745074960a37f3d2filename.core/src/main/scripts/importer/validateData.pystatusmodifiedj[  Kj[  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/d0fb6210aab800573e265132bed356b198c0db73/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.pyraw_urlhttps://github.com/cBioPortal/cbioportal/raw/d0fb6210aab800573e265132bed356b198c0db73/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.pycontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2FvalidateData.py?ref=d0fb6210aab800573e265132bed356b198c0db73patchX  @@ -3270,12 +3270,12 @@ def checkSVstatus(sv_status):
                     'No Entrez gene id or gene symbol provided for site 1 and site 2',
                     extra={'line_number': self.line_number})
         elif site1_gene is None and site2_gene is not None:
-            self.logger.warning(
+            self.logger.info(
                 'No Entrez gene id or gene symbol provided for site 1. '
                 'Assuming either the intragenic, deletion, duplication, translocation or inversion variant',
                 extra={'line_number': self.line_number})
         elif site2_gene is None and site1_gene is not None:
-            self.logger.warning(
+            self.logger.info(
                 'No Entrez gene id or gene symbol provided for site 2. '
                 'Assuming either the intragenic, deletion, duplication, translocation or inversion variant',
                 extra={'line_number': self.line_number})uau(b205cb5a6853f273cd7cc6dd5202abfa6358c891}(sha(b205cb5a6853f273cd7cc6dd5202abfa6358c891node_idEC_kwDOAe-hB9oAKGIyMDVjYjVhNjg1M2YyNzNjZDdjYzZkZDUyMDJhYmZhNjM1OGM4OTEcommit}(author}(name
Qi-Xuan Luemailqlu@carisls.comdate2023-07-07T19:56:06Zu	committer}(j\  
Qi-Xuan Luj\  qlu@carisls.comj\  2023-07-07T19:56:06Zumessage4modify documentation for skin.hide_download_controlstree}(j[  (abc621f465d41a0c50ccb30ae0ce38614d5d0886urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/abc621f465d41a0c50ccb30ae0ce38614d5d0886uj\  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/b205cb5a6853f273cd7cc6dd5202abfa6358c891
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj\  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b205cb5a6853f273cd7cc6dd5202abfa6358c891html_urlXhttps://github.com/cBioPortal/cbioportal/commit/b205cb5a6853f273cd7cc6dd5202abfa6358c891comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/b205cb5a6853f273cd7cc6dd5202abfa6358c891/commentsj[  Nj\  Nparents]}(j[  (8acd3df44484464f15a25f7d12f88b4b75f48265j\  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8acd3df44484464f15a25f7d12f88b4b75f48265j\  Xhttps://github.com/cBioPortal/cbioportal/commit/8acd3df44484464f15a25f7d12f88b4b75f48265uastats}(totalK	additionsK	deletionsKufiles](}(j[  (feee782f5cca62c86cdca59156949d6bc91836a6filenameHdocs/deployment/customization/Customizing-your-instance-of-cBioPortal.mdstatusmodifiedj*\  Kj+\  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/b205cb5a6853f273cd7cc6dd5202abfa6358c891/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdraw_urlhttps://github.com/cBioPortal/cbioportal/raw/b205cb5a6853f273cd7cc6dd5202abfa6358c891/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.md?ref=b205cb5a6853f273cd7cc6dd5202abfa6358c891patchX  @@ -244,8 +244,10 @@ Below you can find the complete list of all the available skin properties.
 		<tr>
             <td>skin.hide_download_controls</td>
             <td>removes all download and copy-to-clipboard options.</td>
-            <td>false</td>
-            <td>true / false</td>
+            <td>show</td>
+            <td>
+                string. "show" enables all download and copy-to-clipboard options. "data" disables data download but keeps figure and top-level data. "hide" disables all the download and copy-to-keyboard options.
+            </td>
         </tr>
         <tr>
             <td>skin.show_settings_menu</td>u}(j[  (408b7ccd3c44b732cc302690449bd46ddb4d024cj0\  ,src/main/resources/portal.properties.EXAMPLEj2\  modifiedj*\  Kj+\  Kj4\  Kj5\  https://github.com/cBioPortal/cbioportal/blob/b205cb5a6853f273cd7cc6dd5202abfa6358c891/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj7\  https://github.com/cBioPortal/cbioportal/raw/b205cb5a6853f273cd7cc6dd5202abfa6358c891/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj9\  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=b205cb5a6853f273cd7cc6dd5202abfa6358c891j;\  X  @@ -107,10 +107,10 @@ skin.study_view.link_text=To build your own case set, try out our enhanced Study
 ## enable this to show reference genome next to the samples
 # skin.home_page.show_reference_genome=false
 
-setting controlling whether Download tabs and download/copy-to-clipboard controls should be shown
-# skin.hide_download_controls=true
+## setting controlling whether Download tabs and download/copy-to-clipboard controls should be shown
+# skin.hide_download_controls=show
 
-setting controlling which name should be used to display the authenticated user (email, or username)
+## setting controlling which name should be used to display the authenticated user (email, or username)
 # skin.user_display_name=email
 
 ## enable and set this property to specify a study group to be used to identify public studies for which no specific authorization entries are needed in the `authorities` tableueu(e075627b45bedd48e75990ef9a33e9909d083aa2}(sha(e075627b45bedd48e75990ef9a33e9909d083aa2node_idEC_kwDOAe-hB9oAKGUwNzU2MjdiNDViZWRkNDhlNzU5OTBlZjlhMzNlOTkwOWQwODNhYTIcommit}(author}(nameKarthikemailkalletlakarthik@gmail.comdate2023-07-18T16:32:40Zu	committer}(jO\  KarthikjQ\  kalletlakarthik@gmail.comjS\  2023-07-18T16:32:40ZumessageCache treatment endpointstree}(jG\  (346031df08eda0e9ba681513a03e45b8e3962b1burlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/346031df08eda0e9ba681513a03e45b8e3962b1buj_\  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/e075627b45bedd48e75990ef9a33e9909d083aa2
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj_\  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/e075627b45bedd48e75990ef9a33e9909d083aa2html_urlXhttps://github.com/cBioPortal/cbioportal/commit/e075627b45bedd48e75990ef9a33e9909d083aa2comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/e075627b45bedd48e75990ef9a33e9909d083aa2/commentsjM\  }(login	kalletlakidJƴ jI\  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5j_\  &https://api.github.com/users/kalletlakjk\  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminujU\  }(jp\  	kalletlakjr\  Jƴ jI\  MDQ6VXNlcjEyOTU2ODcwjt\  4https://avatars.githubusercontent.com/u/12956870?v=4jv\  h5j_\  &https://api.github.com/users/kalletlakjk\  https://github.com/kalletlakjy\  0https://api.github.com/users/kalletlak/followersj{\  =https://api.github.com/users/kalletlak/following{/other_user}j}\  6https://api.github.com/users/kalletlak/gists{/gist_id}j\  =https://api.github.com/users/kalletlak/starred{/owner}{/repo}j\  4https://api.github.com/users/kalletlak/subscriptionsj\  +https://api.github.com/users/kalletlak/orgsj\  ,https://api.github.com/users/kalletlak/reposj\  7https://api.github.com/users/kalletlak/events{/privacy}j\  6https://api.github.com/users/kalletlak/received_eventsj\  Userj\  uparents]}(jG\  (9e90a2ab3e943f9840acbd6e607ca3912a45f210j_\  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9e90a2ab3e943f9840acbd6e607ca3912a45f210jk\  Xhttps://github.com/cBioPortal/cbioportal/commit/9e90a2ab3e943f9840acbd6e607ca3912a45f210uastats}(totalK	additionsK	deletionsKufiles]}(jG\  (4f3590461050eca879c502a6413bb7d273e56b43filename=web/src/main/java/org/cbioportal/web/TreatmentController.javastatusmodifiedj\  Kj\  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/e075627b45bedd48e75990ef9a33e9909d083aa2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FTreatmentController.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/e075627b45bedd48e75990ef9a33e9909d083aa2/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FTreatmentController.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FTreatmentController.java?ref=e075627b45bedd48e75990ef9a33e9909d083aa2patchX  @@ -153,10 +153,15 @@ public ResponseEntity<Boolean> getContainsTreatmentData(
         @RequestBody
         List<String> studyIds
     ) {
-        Boolean containsTreatmentData = treatmentService.containsTreatmentData(studyIds, tier);
+        Boolean containsTreatmentData = instance.cacheableGetContainsTreatmentData(studyIds, tier);
         return new ResponseEntity<>(containsTreatmentData, HttpStatus.OK);
     }
 
+    @Cacheable(cacheResolver = "staticRepositoryCacheOneResolver", condition = "@cacheEnabledConfig.getEnabled()")
+    public Boolean cacheableGetContainsTreatmentData(List<String> studyIds, ClinicalEventKeyCode tier) {
+        return treatmentService.containsTreatmentData(studyIds, tier);
+    }
+
     @PreAuthorize("hasPermission(#studyIds, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/treatments/display-sample", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Should sample level treatments be displayed")
@@ -170,7 +175,12 @@ public ResponseEntity<Boolean> getContainsSampleTreatmentData(
         @RequestBody
         List<String> studyIds
     ) {
-        Boolean containsTreatmentData = treatmentService.containsSampleTreatmentData(studyIds, tier);
+        Boolean containsTreatmentData = instance.cacheableGetContainsSampleTreatmentData(studyIds, tier);
         return new ResponseEntity<>(containsTreatmentData, HttpStatus.OK);
     }
+
+    @Cacheable(cacheResolver = "staticRepositoryCacheOneResolver", condition = "@cacheEnabledConfig.getEnabled()")
+    public Boolean cacheableGetContainsSampleTreatmentData(List<String> studyIds, ClinicalEventKeyCode tier) {
+        return treatmentService.containsSampleTreatmentData(studyIds, tier);
+    }
 }uau(2ab0b942fedbfc6eab47ca283e829fb88db066a3}(sha(2ab0b942fedbfc6eab47ca283e829fb88db066a3node_idEC_kwDOAe-hB9oAKDJhYjBiOTQyZmVkYmZjNmVhYjQ3Y2EyODNlODI5ZmI4OGRiMDY2YTMcommit}(author}(name
Onur Sumeremails.onur.sumer@gmail.comdate2023-07-19T20:17:57Zu	committer}(j\  
Onur Sumerj\  s.onur.sumer@gmail.comj\  2023-07-19T20:17:57ZumessageDget mutation data from genomic event table instead of mutation tabletree}(j\  (5da07d4bf80981f2dd56b5aeab415ea3998610a4urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/5da07d4bf80981f2dd56b5aeab415ea3998610a4uj\  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/2ab0b942fedbfc6eab47ca283e829fb88db066a3
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj\  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2ab0b942fedbfc6eab47ca283e829fb88db066a3html_urlXhttps://github.com/cBioPortal/cbioportal/commit/2ab0b942fedbfc6eab47ca283e829fb88db066a3comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/2ab0b942fedbfc6eab47ca283e829fb88db066a3/commentsj\  }(login	onursumeridJ6 j\  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5j\  &https://api.github.com/users/onursumerj\  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminuj\  }(j\  	onursumerj\  J6 j\  MDQ6VXNlcjM2MDQxOTg=j\  3https://avatars.githubusercontent.com/u/3604198?v=4j\  h5j\  &https://api.github.com/users/onursumerj\  https://github.com/onursumerj\  0https://api.github.com/users/onursumer/followersj\  =https://api.github.com/users/onursumer/following{/other_user}j\  6https://api.github.com/users/onursumer/gists{/gist_id}j\  =https://api.github.com/users/onursumer/starred{/owner}{/repo}j\  4https://api.github.com/users/onursumer/subscriptionsj\  +https://api.github.com/users/onursumer/orgsj\  ,https://api.github.com/users/onursumer/reposj\  7https://api.github.com/users/onursumer/events{/privacy}j\  6https://api.github.com/users/onursumer/received_eventsj ]  Userj]  uparents]}(j\  (69875808bee06e7c7a310712b580da6de58bcea7j\  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/69875808bee06e7c7a310712b580da6de58bcea7j\  Xhttps://github.com/cBioPortal/cbioportal/commit/69875808bee06e7c7a310712b580da6de58bcea7uastats}(totalK	additionsK	deletionsKufiles]}(j\  (4bbc93232d1885633b696e2d563f43d8e58ed818filenametpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmlstatusmodifiedj]  Kj]  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/2ab0b942fedbfc6eab47ca283e829fb88db066a3/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/2ab0b942fedbfc6eab47ca283e829fb88db066a3/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=2ab0b942fedbfc6eab47ca283e829fb88db066a3patchX  @@ -31,14 +31,15 @@
             COUNT(DISTINCT sample_unique_id) as numberOfProfiledCases,
             COUNT(DISTINCT sample_unique_id) as numberOfAlteredCases,
             COUNT(*) as totalCount
-        FROM mutation
+        FROM genomic_event
         <where>
-           sample_unique_id IN ( <include refid="sampleUniqueIdsFromStudyViewFilter"/>
+            variant_type = 'mutation'
+            AND
+            sample_unique_id IN ( <include refid="sampleUniqueIdsFromStudyViewFilter"/>
             <if test="applyPatientIdFilters == true">
                 INTERSECT <include refid="getSampleIdsFromPatientIds"/>
             </if> 
             )
-
         </where>
         GROUP BY hugo_gene_symbol
         ORDER BY totalCount DESC;uau(22efd9c5dfb2b141aef4f1dbbdf2657bfec85038}(sha(22efd9c5dfb2b141aef4f1dbbdf2657bfec85038node_idEC_kwDOAe-hB9oAKDIyZWZkOWM1ZGZiMmIxNDFhZWY0ZjFkYmJkZjI2NTdiZmVjODUwMzgcommit}(author}(nameKarthikemailkalletlakarthik@gmail.comdate2023-07-03T04:15:09Zu	committer}(j9]  Karthikj;]  kalletlakarthik@gmail.comj=]  2023-07-19T13:09:39Zumessage!Changes related to download grouptree}(j1]  (d15353e319107c0cf2446a5ed40bd0fe4926cba2urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/d15353e319107c0cf2446a5ed40bd0fe4926cba2ujI]  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/22efd9c5dfb2b141aef4f1dbbdf2657bfec85038
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujI]  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/22efd9c5dfb2b141aef4f1dbbdf2657bfec85038html_urlXhttps://github.com/cBioPortal/cbioportal/commit/22efd9c5dfb2b141aef4f1dbbdf2657bfec85038comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/22efd9c5dfb2b141aef4f1dbbdf2657bfec85038/commentsj7]  }(login	kalletlakidJƴ j3]  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5jI]  &https://api.github.com/users/kalletlakjU]  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminuj?]  }(jZ]  	kalletlakj\]  Jƴ j3]  MDQ6VXNlcjEyOTU2ODcwj^]  4https://avatars.githubusercontent.com/u/12956870?v=4j`]  h5jI]  &https://api.github.com/users/kalletlakjU]  https://github.com/kalletlakjc]  0https://api.github.com/users/kalletlak/followersje]  =https://api.github.com/users/kalletlak/following{/other_user}jg]  6https://api.github.com/users/kalletlak/gists{/gist_id}ji]  =https://api.github.com/users/kalletlak/starred{/owner}{/repo}jk]  4https://api.github.com/users/kalletlak/subscriptionsjm]  +https://api.github.com/users/kalletlak/orgsjo]  ,https://api.github.com/users/kalletlak/reposjq]  7https://api.github.com/users/kalletlak/events{/privacy}js]  6https://api.github.com/users/kalletlak/received_eventsju]  Userjw]  uparents]}(j1]  (a3794f7cd5a60974b8c04938d5b3d784a5bfb09ajI]  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/a3794f7cd5a60974b8c04938d5b3d784a5bfb09ajU]  Xhttps://github.com/cBioPortal/cbioportal/commit/a3794f7cd5a60974b8c04938d5b3d784a5bfb09auastats}(totalK0	additionsK"	deletionsKufiles](}(j1]  (ba311e72ad546f15e928b0da81d7aa27c78d222dfilenameCcore/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.javastatusmodifiedj]  Kj]  KchangesK*blob_urlhttps://github.com/cBioPortal/cbioportal/blob/22efd9c5dfb2b141aef4f1dbbdf2657bfec85038/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/22efd9c5dfb2b141aef4f1dbbdf2657bfec85038/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.java?ref=22efd9c5dfb2b141aef4f1dbbdf2657bfec85038patchX  @@ -50,11 +50,13 @@
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.commons.lang.StringUtils;
 import org.cbioportal.security.spring.authentication.PortalUserDetails;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Component;
 import org.springframework.util.ResourceUtils;
@@ -362,6 +364,10 @@ public static String parseUrl(String url)
     @Value("${frontend.url.runtime:}") 
     public void setFrontendUrlRuntime(String property) { frontendUrlRuntime = property; }
 
+    private static String downloadGroup;
+    @Value("${download_group:}") // default is empty string
+    public void setDownloadGroup(String property) { downloadGroup = property; }
+
     private static Logger LOG = LoggerFactory.getLogger(GlobalProperties.class);
     private static ConfigPropertyResolver portalProperties = new ConfigPropertyResolver();
     private static Properties mavenProperties = initializeProperties(MAVEN_PROPERTIES_FILE_NAME);
@@ -1264,18 +1270,30 @@ public static String getOncoKbToken()  {
     }
 
     public static String getDownloadControl() {
-        String downloadControlOption = getProperty("skin.hide_download_controls");
-        /*
-            skin.hide_download_controls   return_value
-                    true                    hide
-                    false                   show
-                    data                    data
-                    null/empty              show
-         */
-        switch ((downloadControlOption != null) ? downloadControlOption.trim().toLowerCase() : "false") {
-            case "true" : return "hide";
-            case "data" : return "data";
-            default: return "show";
+        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+
+        if (authentication != null &&
+            StringUtils.isNotEmpty(downloadGroup) &&
+            authentication.getAuthorities().contains(new SimpleGrantedAuthority(downloadGroup))) {
+            return "show";
+        } else {
+            String downloadControlOption = getProperty("skin.hide_download_controls");
+            /*
+                skin.hide_download_controls   return_value
+                        true                    hide
+                        false                   show
+                        data                    data
+                        null/empty              show
+             */
+            switch ((downloadControlOption != null) ? downloadControlOption.trim().toLowerCase() : "false") {
+                case "true":
+                    return "hide";
+                case "data":
+                    return "data";
+                case "false":
+                default:
+                    return "show";
+            }
         }
     }
 }u}(j1]  (ab5bbf48c3e1265677a20e9b240c0521c4e4da03j]  )portal/src/main/webapp/config_service.jspj]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/cBioPortal/cbioportal/blob/22efd9c5dfb2b141aef4f1dbbdf2657bfec85038/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj]  https://github.com/cBioPortal/cbioportal/raw/22efd9c5dfb2b141aef4f1dbbdf2657bfec85038/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj]  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=22efd9c5dfb2b141aef4f1dbbdf2657bfec85038j]  Xp  @@ -202,7 +202,7 @@
         obj.put("oncoKbTokenDefined", !StringUtils.isEmpty(GlobalProperties.getOncoKbToken()));
 
         obj.put("sessionServiceEnabled", !StringUtils.isEmpty(GlobalProperties.getSessionServiceUrl()));
-        
+
         obj.put("skin_hide_download_controls", GlobalProperties.getDownloadControl());
 
         out.println(obj.toJSONString());u}(j1]  (efae1b8c7946f5f768afae5b44f7b2585dab18b9j]  ,src/main/resources/portal.properties.EXAMPLEj]  modifiedj]  Kj]  Kj]  Kj]  https://github.com/cBioPortal/cbioportal/blob/22efd9c5dfb2b141aef4f1dbbdf2657bfec85038/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj]  https://github.com/cBioPortal/cbioportal/raw/22efd9c5dfb2b141aef4f1dbbdf2657bfec85038/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj]  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=22efd9c5dfb2b141aef4f1dbbdf2657bfec85038j]  X-  @@ -433,4 +433,6 @@ persistence.cache_type=no-cache
 
 # Set StudyDownloadLinkUrl
 # Allows download links within DataSets Tab (See Portal.Properties documentation for more info)
-# study_download_url=
\ No newline at end of file
+# study_download_url=
+
+# download_group=
\ No newline at end of fileueu(7a778cc26d2547c4dcfda5024c6fda1b14197da7}(sha(7a778cc26d2547c4dcfda5024c6fda1b14197da7node_idEC_kwDOAe-hB9oAKDdhNzc4Y2MyNmQyNTQ3YzRkY2ZkYTUwMjRjNmZkYTFiMTQxOTdkYTccommit}(author}(name	Bryan Laiemaillaib1@mskcc.orgdate2023-05-22T19:51:49Zu	committer}(j]  
Onur Sumerj]  s.onur.sumer@gmail.comj]  2023-06-14T01:34:31ZumessageUadd mock data and config for clickhouse testing on filtered samples and mutated genestree}(j]  (22a89335c7d15895f9d63bfe353b9e8bce90b54burlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/22a89335c7d15895f9d63bfe353b9e8bce90b54buj]  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/7a778cc26d2547c4dcfda5024c6fda1b14197da7
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj]  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7a778cc26d2547c4dcfda5024c6fda1b14197da7html_urlXhttps://github.com/cBioPortal/cbioportal/commit/7a778cc26d2547c4dcfda5024c6fda1b14197da7comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/7a778cc26d2547c4dcfda5024c6fda1b14197da7/commentsj]  Nj]  }(login	onursumeridJ6 j]  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5j]  &https://api.github.com/users/onursumerj]  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminuparents]}(j]  (0bf78c91d2b9dab7f3c71f71ada3f0a159b9405fj]  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/0bf78c91d2b9dab7f3c71f71ada3f0a159b9405fj]  Xhttps://github.com/cBioPortal/cbioportal/commit/0bf78c91d2b9dab7f3c71f71ada3f0a159b9405fuastats}(totalK	additionsK	deletionsK ufiles](}(j]  (a67cf376d51c9159302ae95dbf431c935f9d63e6filenamepersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepositoryTest.javastatusaddedj^  K1j^  K changesK1blob_urlhttps://github.com/cBioPortal/cbioportal/blob/7a778cc26d2547c4dcfda5024c6fda1b14197da7/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/7a778cc26d2547c4dcfda5024c6fda1b14197da7/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.java?ref=7a778cc26d2547c4dcfda5024c6fda1b14197da7patchX  @@ -0,0 +1,49 @@
+package org.cbioportal.persistence.mybatiscolumnstore;
+
+import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.Sample;
+import org.cbioportal.webparam.StudyViewFilter;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Configurable;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration("/testContextDatabaseClickhouse.xml")
+@Configurable
+public class StudyViewMyBatisRepositoryTest {
+
+    @Autowired
+    private StudyViewMyBatisRepository studyViewMyBatisRepository;
+
+    @Test
+    public void getFilteredSamples() {
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+
+        List<String> studyIds = new ArrayList<>();
+        studyIds.add("msk_ch_2020");
+        studyViewFilter.setStudyIds(studyIds);
+        
+        List<Sample> samples = studyViewMyBatisRepository.getFilteredSamplesFromColumnstore(studyViewFilter);
+        Assert.assertEquals(3, samples.size());
+    }
+
+    @Test
+    public void getMutatedGenes() {
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+
+        List<String> studyIds = new ArrayList<>();
+        studyIds.add("msk_ch_2020");
+        studyViewFilter.setStudyIds(studyIds);
+
+        List<AlterationCountByGene> mutations = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter);
+        Assert.assertEquals(2, mutations.size());
+    }
+
+}
\ No newline at end of fileu}(j]  (37721f014975e2e1560297baa5c47b836594292ej^  Gpersistence/persistence-mybatis/src/test/resources/clickhouseSchema.sqlj^  addedj^  Kyj^  K j^  Kyj^  https://github.com/cBioPortal/cbioportal/blob/7a778cc26d2547c4dcfda5024c6fda1b14197da7/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseSchema.sqlj^  https://github.com/cBioPortal/cbioportal/raw/7a778cc26d2547c4dcfda5024c6fda1b14197da7/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseSchema.sqlj^  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseSchema.sql?ref=7a778cc26d2547c4dcfda5024c6fda1b14197da7j^  X  @@ -0,0 +1,121 @@
+create table cna_discrete
+(
+    sample_unique_id          varchar(255),
+    alteration                int,
+    hugo_gene_symbol          varchar(255),
+    gene_panel_stable_id      varchar(255),
+    cancer_study_identifier   varchar(255),
+    genetic_profile_stable_id varchar(255),
+    PRIMARY KEY (sample_unique_id, alteration, hugo_gene_symbol, cancer_study_identifier)
+);
+
+create table genetic_profile
+(
+    sample_unique_id        varchar(255),
+    genetic_alteration_type varchar(255),
+    datatype                varchar(255),
+    value                   varchar(255),
+    cancer_study_identifier varchar(255),
+    PRIMARY KEY (sample_unique_id, genetic_alteration_type, datatype, value, cancer_study_identifier)
+);
+
+create table genetic_profile_counts
+(
+    sample_unique_id          varchar(255),
+    profile_name              varchar(255),
+    genetic_profile_stable_id varchar(255),
+    cancer_study_identifier   varchar(255),
+    count                     int
+);
+
+create table genomic_event
+(
+    sample_unique_id          varchar(255),
+    variant                   varchar(255),
+    hugo_gene_symbol          varchar(255),
+    gene_panel_stable_id      varchar(255),
+    cancer_study_identifier   varchar(255),
+    genetic_profile_stable_id varchar(255),
+    PRIMARY KEY (sample_unique_id, variant, hugo_gene_symbol, cancer_study_identifier, genetic_profile_stable_id)
+);
+
+create table mutation
+(
+    sample_unique_id          varchar(255),
+    variant                   varchar(255),
+    hugo_gene_symbol          varchar(255),
+    gene_panel_stable_id      varchar(255),
+    cancer_study_identifier   varchar(255),
+    genetic_profile_stable_id varchar(255),
+    PRIMARY KEY (sample_unique_id, variant, hugo_gene_symbol, cancer_study_identifier)
+);
+
+create table patient_clinical_attribute_categorical
+(
+    patient_unique_id       varchar(255),
+    attribute_name          varchar(255),
+    attribute_value         varchar(255),
+    cancer_study_identifier varchar(255),
+    PRIMARY KEY (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier)
+);
+
+create table patient_clinical_attribute_numeric
+(
+    patient_unique_id       varchar(255),
+    attribute_name          varchar(255),
+    attribute_value         float,
+    cancer_study_identifier varchar(255),
+    PRIMARY KEY (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier)
+);
+
+create table sample
+(
+    sample_unique_id         varchar(255),
+    sample_stable_id         varchar(255),
+    patient_unique_id        varchar(255),
+    patient_stable_id        varchar(255),
+    cancer_study_identifier  varchar(255),
+    sample_unique_id_base64  varchar(255),
+    patient_unique_id_base64 varchar(255),
+    PRIMARY KEY (sample_unique_id, patient_unique_id, cancer_study_identifier)
+);
+
+create table sample_clinical_attribute_categorical
+(
+    patient_unique_id       varchar(255),
+    sample_unique_id        varchar(255),
+    attribute_name          varchar(255),
+    attribute_value         varchar(255),
+    cancer_study_identifier varchar(255),
+    PRIMARY KEY (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier)
+);
+
+create table sample_clinical_attribute_numeric
+(
+    patient_unique_id       varchar(255),
+    sample_unique_id        varchar(255),
+    attribute_name          varchar(255),
+    attribute_value         float,
+    cancer_study_identifier varchar(255),
+    PRIMARY KEY (patient_unique_id, sample_unique_id, attribute_name, attribute_value, cancer_study_identifier)
+);
+
+create table sample_list
+(
+    sample_unique_id        varchar(255),
+    sample_list_stable_id   varchar(255),
+    name                    varchar(255),
+    cancer_study_identifier varchar(255),
+    PRIMARY KEY (sample_unique_id, sample_list_stable_id, name, cancer_study_identifier)
+);
+
+create table structural_variant
+(
+    sample_unique_id          varchar(255),
+    hugo_symbol_gene1         varchar(255),
+    hugo_symbol_gene2         varchar(255),
+    gene_panel_stable_id      varchar(255),
+    cancer_study_identifier   varchar(255),
+    genetic_profile_stable_id varchar(255),
+    PRIMARY KEY (sample_unique_id, hugo_symbol_gene1, hugo_symbol_gene2, cancer_study_identifier)
+);u0     }(j]  (a52d4180198a7f7218882238ef64ffb2deb71b61j^  Hpersistence/persistence-mybatis/src/test/resources/clickhouseTestSql.sqlj^  addedj^  Kj^  K j^  Kj^  https://github.com/cBioPortal/cbioportal/blob/7a778cc26d2547c4dcfda5024c6fda1b14197da7/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseTestSql.sqlj^  https://github.com/cBioPortal/cbioportal/raw/7a778cc26d2547c4dcfda5024c6fda1b14197da7/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseTestSql.sqlj^  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FclickhouseTestSql.sql?ref=7a778cc26d2547c4dcfda5024c6fda1b14197da7j^  Xi  @@ -0,0 +1,20 @@
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000004', 'AGE', 39.739902, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000004', 'TIME_FROM_DX_TO_SEQ', 991, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000004', 'TIME_TO_BLOOD_DRAW_FROM_TX', 609, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000015', 'AGE', 44.440792, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000015', 'TIME_FROM_DX_TO_SEQ', 2558, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000015', 'TIME_TO_BLOOD_DRAW_FROM_TX', 5, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000023', 'AGE', 61.319645, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000023', 'TIME_FROM_DX_TO_SEQ', 245, 'msk_ch_2020');
+INSERT INTO patient_clinical_attribute_numeric (patient_unique_id, attribute_name, attribute_value, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000023', 'TIME_TO_BLOOD_DRAW_FROM_TX', 166, 'msk_ch_2020');
+
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000004-N01', '', 'P-0000004-N01', 'msk_ch_2020_P-0000004', '', 'P-0000004', 'msk_ch_2020');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000015-N01', '', 'P-0000015-N01', 'msk_ch_2020_P-0000015', '', 'P-0000015', 'msk_ch_2020');
+INSERT INTO sample (sample_unique_id, sample_unique_id_base64, sample_stable_id, patient_unique_id, patient_unique_id_base64, patient_stable_id, cancer_study_identifier) VALUES ('msk_ch_2020_P-0000023-N01', '', 'P-0000023-N01', 'msk_ch_2020_P-0000023', '', 'P-0000023', 'msk_ch_2020');
+-- 
+INSERT INTO genomic_event (sample_unique_id, variant, hugo_gene_symbol, gene_panel_stable_id, cancer_study_identifier, genetic_profile_stable_id) VALUES ('msk_ch_2020_P-0000004-N01', 'p.R1051Q', 'KDR', '', 'msk_ch_2020', 'msk_ch_2020_mutations');
+INSERT INTO genomic_event (sample_unique_id, variant, hugo_gene_symbol, gene_panel_stable_id, cancer_study_identifier, genetic_profile_stable_id) VALUES ('msk_ch_2020_P-0000004-N01', 'p.T1884I', 'TET2', '', 'msk_ch_2020', 'msk_ch_2020_mutations');
+
+INSERT INTO mutation (sample_unique_id, variant, hugo_gene_symbol, gene_panel_stable_id, cancer_study_identifier, genetic_profile_stable_id) VALUES ('msk_ch_2020_P-0000004-N01', 'p.R1051Q', 'KDR', '', 'msk_ch_2020', 'msk_ch_2020_mutations');
+INSERT INTO mutation (sample_unique_id, variant, hugo_gene_symbol, gene_panel_stable_id, cancer_study_identifier, genetic_profile_stable_id) VALUES ('msk_ch_2020_P-0000004-N01', 'p.T1884I', 'TET2', '', 'msk_ch_2020', 'msk_ch_2020_mutations');
+u}(j]  (4f93f760f8cec9b23d7c894ce85f3e9c66b66423j^  Tpersistence/persistence-mybatis/src/test/resources/testContextDatabaseClickhouse.xmlj^  addedj^  K*j^  K j^  K*j^  https://github.com/cBioPortal/cbioportal/blob/7a778cc26d2547c4dcfda5024c6fda1b14197da7/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestContextDatabaseClickhouse.xmlj^  https://github.com/cBioPortal/cbioportal/raw/7a778cc26d2547c4dcfda5024c6fda1b14197da7/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestContextDatabaseClickhouse.xmlj^  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestContextDatabaseClickhouse.xml?ref=7a778cc26d2547c4dcfda5024c6fda1b14197da7j^  X1	  @@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beans
+    xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:util="http://www.springframework.org/schema/util"
+    xmlns:context="http://www.springframework.org/schema/context"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans
+                      http://www.springframework.org/schema/beans/spring-beans.xsd
+                      http://www.springframework.org/schema/context
+                      http://www.springframework.org/schema/context/spring-context.xsd
+                      http://www.springframework.org/schema/util
+                      http://www.springframework.org/schema/util/spring-util.xsd">
+    <bean id="dbcpDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
+        <property name="url" value="jdbc:h2:mem:;MODE=MySQL;DATABASE_TO_UPPER=false;INIT=RUNSCRIPT FROM 'classpath:clickhouseSchema.sql'\;RUNSCRIPT FROM 'classpath:clickhouseTestSql.sql'"/>
+        <!-- 
+            Enable this to connect to an actual clickhouse Database instead of a mock one.
+            Note that this is only intended for temporary local use, not for automated CI tests.
+        -->         
+<!--        <property name="url" value="jdbc:ch://localhost:8123/cbioportal"/>-->
+<!--        <property name="password" value="cbio_pass"/>-->
+<!--        <property name="username" value="cbio_user"/>-->
+    </bean>
+
+
+    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
+        <property name="dataSource" ref="dbcpDataSource"/>
+        <property name="typeAliasesPackage" value="org.mskcc.cbio.portal.model"/>
+        <property name="typeHandlersPackage" value="org.cbioportal.persistence.mybatis.typehandler"/>
+    </bean>
+
+    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+        <property name="dataSource" ref="dbcpDataSource" />
+    </bean>
+
+    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
+        <property name="basePackage" value="org.cbioportal.persistence.mybatiscolumnstore"/>
+    </bean>
+
+    <context:component-scan base-package="org.cbioportal.persistence.mybatiscolumnstore"/>
+
+</beans>
\ No newline at end of fileueu(eb5a53521c8d413282a25d32efa8eeaa37385c26}(sha(eb5a53521c8d413282a25d32efa8eeaa37385c26node_idEC_kwDOAe-hB9oAKGViNWE1MzUyMWM4ZDQxMzI4MmEyNWQzMmVmYThlZWFhMzczODVjMjYcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-05-24T16:04:23Zu	committer}(j;^  Gaofei Zhaoj=^  ,15748980+dippindots@users.noreply.github.comj?^  2023-05-24T16:04:23ZumessageUpdate local e2etree}(j3^  (dc087300d2c696c44aec5abdf977ea8cacb748beurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/dc087300d2c696c44aec5abdf977ea8cacb748beujK^  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/eb5a53521c8d413282a25d32efa8eeaa37385c26
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujK^  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/eb5a53521c8d413282a25d32efa8eeaa37385c26html_urlXhttps://github.com/cBioPortal/cbioportal/commit/eb5a53521c8d413282a25d32efa8eeaa37385c26comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/eb5a53521c8d413282a25d32efa8eeaa37385c26/commentsj9^  }(login
dippindotsidJtO j5^  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5jK^  'https://api.github.com/users/dippindotsjW^  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminujA^  }(j\^  
dippindotsj^^  JtO j5^  MDQ6VXNlcjE1NzQ4OTgwj`^  4https://avatars.githubusercontent.com/u/15748980?v=4jb^  h5jK^  'https://api.github.com/users/dippindotsjW^  https://github.com/dippindotsje^  1https://api.github.com/users/dippindots/followersjg^  >https://api.github.com/users/dippindots/following{/other_user}ji^  7https://api.github.com/users/dippindots/gists{/gist_id}jk^  >https://api.github.com/users/dippindots/starred{/owner}{/repo}jm^  5https://api.github.com/users/dippindots/subscriptionsjo^  ,https://api.github.com/users/dippindots/orgsjq^  -https://api.github.com/users/dippindots/reposjs^  8https://api.github.com/users/dippindots/events{/privacy}ju^  7https://api.github.com/users/dippindots/received_eventsjw^  Userjy^  uparents]}(j3^  (326e765a4f8b615b2f308dcbab110931362d4eecjK^  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/326e765a4f8b615b2f308dcbab110931362d4eecjW^  Xhttps://github.com/cBioPortal/cbioportal/commit/326e765a4f8b615b2f308dcbab110931362d4eecuastats}(totalK	additionsK	deletionsKufiles]}(j3^  (d9f469cad89dab2a3763ea1661e8eddd52a0b37ffilename.circleci/config.ymlstatusmodifiedj^  Kj^  KchangesKblob_urlmhttps://github.com/cBioPortal/cbioportal/blob/eb5a53521c8d413282a25d32efa8eeaa37385c26/.circleci%2Fconfig.ymlraw_urllhttps://github.com/cBioPortal/cbioportal/raw/eb5a53521c8d413282a25d32efa8eeaa37385c26/.circleci%2Fconfig.ymlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/.circleci%2Fconfig.yml?ref=eb5a53521c8d413282a25d32efa8eeaa37385c26patchX  @@ -154,12 +154,12 @@ jobs:
                 name: Create MySQL data directory
                 command: |
                   docker volume rm --force cbioportal-docker-compose_cbioportal_mysql_data && mkdir -p $CBIO_DB_DATA_DIR && rm -rf $CBIO_DB_DATA_DIR/*
-            - restore_cache:
-                keys:
-                - v8-cbio-database-files-{{ checksum "/tmp/db_data_md5key" }}
-            - restore_cache:
-                keys:
-                - v8-keycloak-database-files-{{ checksum "e2e-localdb-workspace/keycloak/keycloak-config-generated.json" }}
+            # - restore_cache:
+            #     keys:
+            #     - v8-cbio-database-files-{{ checksum "/tmp/db_data_md5key" }}
+            # - restore_cache:
+            #     keys:
+            #     - v8-keycloak-database-files-{{ checksum "e2e-localdb-workspace/keycloak/keycloak-config-generated.json" }}
             - run:
                 name: Init database
                 command: |uau(660ed0a308629da004c8d44b8cd2ad013ee557e7}(sha(660ed0a308629da004c8d44b8cd2ad013ee557e7node_idEC_kwDOAe-hB9oAKDY2MGVkMGEzMDg2MjlkYTAwNGM4ZDQ0YjhjZDJhZDAxM2VlNTU3ZTccommit}(author}(namePrasanna Kumar Jagannathanemail+37613906+jagnathan@users.noreply.github.comdate2023-07-11T21:31:15Zu	committer}(j^  Gaofei Zhaoj^  ,15748980+dippindots@users.noreply.github.comj^  2023-07-17T15:03:27Zumessagefix 10221 - 403 issue

fix 10221 - 403 issue; swagger annotations cause issue in authentication object. If user authorization is enabled, authentication object is obtained from SecurityContextHoldertree}(j^  (6aba383c63c4cb688b925e1add592c5635239a16urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/6aba383c63c4cb688b925e1add592c5635239a16uj^  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/660ed0a308629da004c8d44b8cd2ad013ee557e7
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj^  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/660ed0a308629da004c8d44b8cd2ad013ee557e7html_urlXhttps://github.com/cBioPortal/cbioportal/commit/660ed0a308629da004c8d44b8cd2ad013ee557e7comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/660ed0a308629da004c8d44b8cd2ad013ee557e7/commentsj^  }(login	jagnathanidJR=j^  MDQ6VXNlcjM3NjEzOTA2
avatar_url4https://avatars.githubusercontent.com/u/37613906?v=4gravatar_idh5j^  &https://api.github.com/users/jagnathanj^  https://github.com/jagnathan
followers_url0https://api.github.com/users/jagnathan/followers
following_url=https://api.github.com/users/jagnathan/following{/other_user}	gists_url6https://api.github.com/users/jagnathan/gists{/gist_id}starred_url=https://api.github.com/users/jagnathan/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/jagnathan/subscriptionsorganizations_url+https://api.github.com/users/jagnathan/orgs	repos_url,https://api.github.com/users/jagnathan/repos
events_url7https://api.github.com/users/jagnathan/events{/privacy}received_events_url6https://api.github.com/users/jagnathan/received_eventstypeUser
site_adminuj^  }(j^  
dippindotsj^  JtO j^  MDQ6VXNlcjE1NzQ4OTgwj^  4https://avatars.githubusercontent.com/u/15748980?v=4j^  h5j^  'https://api.github.com/users/dippindotsj^  https://github.com/dippindotsj^  1https://api.github.com/users/dippindots/followersj^  >https://api.github.com/users/dippindots/following{/other_user}j^  7https://api.github.com/users/dippindots/gists{/gist_id}j^  >https://api.github.com/users/dippindots/starred{/owner}{/repo}j^  5https://api.github.com/users/dippindots/subscriptionsj^  ,https://api.github.com/users/dippindots/orgsj^  -https://api.github.com/users/dippindots/reposj^  8https://api.github.com/users/dippindots/events{/privacy}j^  7https://api.github.com/users/dippindots/received_eventsj^  Userj^  uparents]}(j^  (b3400e6aa562d5b7c093300cc94398e5ad0e9e84j^  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b3400e6aa562d5b7c093300cc94398e5ad0e9e84j^  Xhttps://github.com/cBioPortal/cbioportal/commit/b3400e6aa562d5b7c093300cc94398e5ad0e9e84uastats}(totalK	additionsK	deletionsKufiles]}(j^  (faf514f645f75d2626941d290883336abf1f1352filename9web/src/main/java/org/cbioportal/web/StudyController.javastatusmodifiedj_  Kj	_  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/660ed0a308629da004c8d44b8cd2ad013ee557e7/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/660ed0a308629da004c8d44b8cd2ad013ee557e7/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.java?ref=660ed0a308629da004c8d44b8cd2ad013ee557e7patchXb  @@ -23,6 +23,7 @@
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -98,10 +99,10 @@ public ResponseEntity<List<CancerStudy>> getAllStudies(
         @ApiParam("Name of the property that the result list is sorted by")
         @RequestParam(required = false) StudySortBy sortBy,
         @ApiParam("Direction of the sort")
-        @RequestParam(defaultValue = "ASC") Direction direction,
-        @ApiParam(hidden = true, required = false)
-        @RequestParam(required = false) Authentication authentication) {
-        
+        @RequestParam(defaultValue = "ASC") Direction direction)
+        {
+
+        Authentication authentication = null;    
         // Only use this feature on the public portal and make sure it is never used
         // on portals using auth, as in auth setting, different users will have different
         // results.
@@ -115,6 +116,8 @@ public ResponseEntity<List<CancerStudy>> getAllStudies(
                 && direction == Direction.ASC) {
             return new ResponseEntity<>(defaultResponse, HttpStatus.OK);
         }
+        else
+            authentication = SecurityContextHolder.getContext().getAuthentication();
 
         if (projection == Projection.META) {
             HttpHeaders responseHeaders = new HttpHeaders();uau(fb3dc7756a76d11d4580f9df12e03678ab329c0c}(sha(fb3dc7756a76d11d4580f9df12e03678ab329c0cnode_idEC_kwDOAe-hB9oAKGZiM2RjNzc1NmE3NmQxMWQ0NTgwZjlkZjEyZTAzNjc4YWIzMjljMGMcommit}(author}(nameGaofeiemail,15748980+dippindots@users.noreply.github.comdate2023-06-02T05:26:58Zu	committer}(j%_  Gaofeij'_  ,15748980+dippindots@users.noreply.github.comj)_  2023-06-02T06:16:33Zumessage)update fisher exact test and update teststree}(j_  (db5078c72760527ae14b18c2c667174faf5778c2urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/db5078c72760527ae14b18c2c667174faf5778c2uj5_  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/fb3dc7756a76d11d4580f9df12e03678ab329c0c
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj5_  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/fb3dc7756a76d11d4580f9df12e03678ab329c0chtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/fb3dc7756a76d11d4580f9df12e03678ab329c0ccomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/fb3dc7756a76d11d4580f9df12e03678ab329c0c/commentsj#_  }(login
dippindotsidJtO j_  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j5_  'https://api.github.com/users/dippindotsjA_  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj+_  }(jF_  
dippindotsjH_  JtO j_  MDQ6VXNlcjE1NzQ4OTgwjJ_  4https://avatars.githubusercontent.com/u/15748980?v=4jL_  h5j5_  'https://api.github.com/users/dippindotsjA_  https://github.com/dippindotsjO_  1https://api.github.com/users/dippindots/followersjQ_  >https://api.github.com/users/dippindots/following{/other_user}jS_  7https://api.github.com/users/dippindots/gists{/gist_id}jU_  >https://api.github.com/users/dippindots/starred{/owner}{/repo}jW_  5https://api.github.com/users/dippindots/subscriptionsjY_  ,https://api.github.com/users/dippindots/orgsj[_  -https://api.github.com/users/dippindots/reposj]_  8https://api.github.com/users/dippindots/events{/privacy}j__  7https://api.github.com/users/dippindots/received_eventsja_  Userjc_  uparents]}(j_  (d3a508c19ebf16f3698c7f7a9170cf4eb53873e4j5_  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d3a508c19ebf16f3698c7f7a9170cf4eb53873e4jA_  Xhttps://github.com/cBioPortal/cbioportal/commit/d3a508c19ebf16f3698c7f7a9170cf4eb53873e4uastats}(totalMU	additionsMG	deletionsKufiles](}(j_  (92f8f83955924145d906564446465c5750ab3d2ffilename=core/src/main/java/org/mskcc/cbio/portal/stats/OddsRatio.javastatusmodifiedj}_  Kj~_  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/fb3dc7756a76d11d4580f9df12e03678ab329c0c/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/fb3dc7756a76d11d4580f9df12e03678ab329c0c/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.java?ref=fb3dc7756a76d11d4580f9df12e03678ab329c0cpatch@@ -103,7 +103,7 @@ public double getOddsRatio() {
         return oddsRatio;
     }
 
-    public double getCumulativeP() {
+    public double getTwoTailedP() {
         return pValue;
     }
 u}(j_  (75c20f31b5a3246825d14802b12fe2a248db2c91j_  Acore/src/test/java/org/mskcc/cbio/portal/stats/TestOddsRatio.javaj_  modifiedj}_  Kj~_  Kj_  Kj_  https://github.com/cBioPortal/cbioportal/blob/fb3dc7756a76d11d4580f9df12e03678ab329c0c/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.javaj_  https://github.com/cBioPortal/cbioportal/raw/fb3dc7756a76d11d4580f9df12e03678ab329c0c/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.javaj_  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.java?ref=fb3dc7756a76d11d4580f9df12e03678ab329c0cj_  X  @@ -70,7 +70,7 @@ public void testFisherExact() throws IOException {
 
         OddsRatio oddsRatio = new OddsRatio(pDataSummary, "BRCA1", "BRCA2");
         double oddsRatioValue = oddsRatio.getOddsRatio();
-        double p = oddsRatio.getCumulativeP();
+        double p = oddsRatio.getTwoTailedP();
         assertEquals(0.16666, oddsRatioValue, 0.0001);
         assertEquals(0.0849, p, 0.0001);
         //System.out.println (oddsRatio.getRCommand());u}(j_  (86795398fd0b85a80618f2a04459e46e4621f99cj_  Oservice/src/main/java/org/cbioportal/service/util/AlterationEnrichmentUtil.javaj_  modifiedj}_  Kj~_  Kj_  K	j_  https://github.com/cBioPortal/cbioportal/blob/fb3dc7756a76d11d4580f9df12e03678ab329c0c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javaj_  https://github.com/cBioPortal/cbioportal/raw/fb3dc7756a76d11d4580f9df12e03678ab329c0c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javaj_  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.java?ref=fb3dc7756a76d11d4580f9df12e03678ab329c0cj_  Xf  @@ -29,9 +29,7 @@
 
 @Component
 public class AlterationEnrichmentUtil<T extends AlterationCountByGene> {
-
-    @Autowired
-    private FisherExactTestCalculator fisherExactTestCalculator;
+    
     @Autowired
     private GeneService geneService;
     @Autowired
@@ -131,7 +129,10 @@ public List<AlterationEnrichment> createAlterationEnrichments(Map<String, Pair<L
                         int alteredOnlyInQueryGenesCount = counts.get(0).getProfiledCount()
                             - counts.get(0).getAlteredCount();
 
-                        pValue = fisherExactTestCalculator.getCumulativePValue(alteredInNoneCount,
+                        FisherExact fisher = new FisherExact(alteredInNoneCount +
+                            counts.get(1).getAlteredCount() + alteredOnlyInQueryGenesCount +
+                            counts.get(0).getAlteredCount());
+                        pValue = fisher.getCumlativeP(alteredInNoneCount,
                             counts.get(1).getAlteredCount(), alteredOnlyInQueryGenesCount,
                             counts.get(0).getAlteredCount());
                     } else {u}(j_  (a031d4dce060b8d47dbd51f75eb00d99726e1ffaj_  Bservice/src/main/java/org/cbioportal/service/util/FisherExact.javaj_  addedj}_  M?j~_  K j_  M?j_  https://github.com/cBioPortal/cbioportal/blob/fb3dc7756a76d11d4580f9df12e03678ab329c0c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExact.javaj_  https://github.com/cBioPortal/cbioportal/raw/fb3dc7756a76d11d4580f9df12e03678ab329c0c/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExact.javaj_  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExact.java?ref=fb3dc7756a76d11d4580f9df12e03678ab329c0cj_  Xw-  @@ -0,0 +1,319 @@
+/*
+ * Copyright (c) 2015 Memorial Sloan-Kettering Cancer Center.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS
+ * FOR A PARTICULAR PURPOSE. The software and documentation provided hereunder
+ * is on an "as is" basis, and Memorial Sloan-Kettering Cancer Center has no
+ * obligations to provide maintenance, support, updates, enhancements or
+ * modifications. In no event shall Memorial Sloan-Kettering Cancer Center be
+ * liable to any party for direct, indirect, special, incidental or
+ * consequential damages, including lost profits, arising out of the use of this
+ * software and its documentation, even if Memorial Sloan-Kettering Cancer
+ * Center has been advised of the possibility of such damage.
+ */
+
+/*
+ * This file is part of cBioPortal.
+ *
+ * cBioPortal is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.cbioportal.service.util;
+
+/**
+ * This does a Fisher Exact test.  The Fisher's Exact test procedure calculates an exact probability value
+ * for the relationship between two dichotomous variables, as found in a two by two crosstable. The program
+ * calculates the difference between the data observed and the data expected, considering the given marginal
+ * and the assumptions of the model of independence. It works in exactly the same way as the Chi-square test
+ * for independence; however, the Chi-square gives only an estimate of the true probability value, an estimate
+ * which might not be very accurate if the marginal is very uneven or if there is a small value (less than five)
+ * in one of the cells.
+ * <p/>
+ * It uses an array of factorials initialized at the beginning to provide speed.
+ * There could be better ways to do this.
+ *
+ * @author Ed Buckler
+ * @version $Id: FisherExact.java,v 1
+ */
+
+public class FisherExact {
+    private static final boolean DEBUG = false;
+    private double[] f;
+    int maxSize;
+
+    /**
+     * constructor for FisherExact table
+     *
+     * @param maxSize is the maximum sum that will be encountered by the table (a+b+c+d)
+     */
+    public FisherExact(int maxSize) {
+        this.maxSize = maxSize;
+        double cf = 1.0;
+        f = new double[maxSize + 1];
+        f[0] = 0.0;
+        for (int i = 1; i <= this.maxSize; i++) {
+            f[i] = f[i - 1] + Math.log(i);
+        }
+    }
+
+    /**
+     * calculates the P-value for this specific state
+     *
+     * @param a a, b, c, d are the four cells in a 2x2 matrix
+     * @param b
+     * @param c
+     * @param d
+     * @return the P-value
+     */
+    public final double getP(int a, int b, int c, int d) {
+        int n = a + b + c + d;
+        if (n > maxSize) {
+            return Double.NaN;
+        }
+        double p;
+        p = (f[a + b] + f[c + d] + f[a + c] + f[b + d]) - (f[a] + f[b] + f[c] + f[d] + f[n]);
+        return Math.exp(p);
+    }
+
+    /**
+     * Calculates the one-tail P-value for the Fisher Exact test.  Determines whether to calculate the right- or left-
+     * tail, thereby always returning the smallest p-value.
+     *
+     * @param a a, b, c, d are the four cells in a 2x2 matrix
+     * @param b
+     * @param c
+     * @param d
+     * @return one-tailed P-value (right or left, whichever is smallest)
+     */
+    public final double getCumlativeP(int a, int b, int c, int d) {
+        int min, i;
+        int n = a + b + c + d;
+        if (n > maxSize) {
+            return Double.NaN;
+        }
+        double p = 0;
+
+        p += getP(a, b, c, d);
+        if (DEBUG) {
+            System.out.println("p = " + p);
+        }
+        if ((a * d) >= (b * c)) {
+            if (DEBUG) {
+                System.out.println("doing R-tail: a=" + a + " b=" + b + " c=" + c + " d=" + d);
+            }
+            min = (c < b) ? c : b;
+            for (i = 0; i < min; i++) {
+                if (DEBUG) {
+                    System.out.print("doing round " + i);
+                }
+                p += getP(++a, --b, --c, ++d);
+                if (DEBUG) {
+                    System.out.println("\ta=" + a + " b=" + b + " c=" + c + " d=" + d);
+                }
+            }
+        }
+        if ((a * d) < (b * c)) {
+            if (DEBUG) {
+                System.out.println("doing L-tail: a=" + a + " b=" + b + " c=" + c + " d=" + d);
+            }
+            min = (a < d) ? a : d;
+            for (i = 0; i < min; i++) {
+                if (DEBUG) {
+                    System.out.print("doing round " + i);
+                }
+                double pTemp = getP(--a, ++b, ++c, --d);
+                if (DEBUG) {
+                    System.out.print("\tpTemp = " + pTemp);
+                }
+                p += pTemp;
+                if (DEBUG) {
+                    System.out.println("\ta=" + a + " b=" + b + " c=" + c + " d=" + d);
+                }
+            }
+        }
+        return p;
+    }
+
+    /**
+     * Calculates the right-tail P-value for the Fisher Exact test.
+     *
+     * @param a a, b, c, d are the four cells in a 2x2 matrix
+     * @param b
+     * @param c
+     * @param d
+     * @return one-tailed P-value (right-tail)
+     */
+    public final double getRightTailedP(int a, int b, int c, int d) {
+        int min, i;
+        int n = a + b + c + d;
+        if (n > maxSize) {
+            return Double.NaN;
+        }
+        double p = 0;
+
+        p += getP(a, b, c, d);
+        if (DEBUG) {
+            System.out.println("p = " + p);
+        }
+        if (DEBUG) {
+            System.out.println("doing R-tail: a=" + a + " b=" + b + " c=" + c + " d=" + d);
+        }
+        min = (c < b) ? c : b;
+        for (i = 0; i < min; i++) {
+            p += getP(++a, --b, --c, ++d);
+
+        }
+        return p;
+    }
+
+    /**
+     * Calculates the left-tail P-value for the Fisher Exact test.
+     *
+     * @param a a, b, c, d are the four cells in a 2x2 matrix
+     * @param b
+     * @param c
+     * @param d
+     * @return one-tailed P-value (left-tail)
+     */
+    public final double getLeftTailedP(int a, int b, int c, int d) {
+        int min, i;
+        int n = a + b + c + d;
+        if (n > maxSize) {
+            return Double.NaN;
+        }
+        double p = 0;
+
+        p += getP(a, b, c, d);
+        if (DEBUG) {
+            System.out.println("p = " + p);
+        }
+        if (DEBUG) {
+            System.out.println("doing L-tail: a=" + a + " b=" + b + " c=" + c + " d=" + d);
+        }
+        min = (a < d) ? a : d;
+        for (i = 0; i < min; i++) {
+            if (DEBUG) {
+                System.out.print("doing round " + i);
+            }
+            double pTemp = getP(--a, ++b, ++c, --d);
+            if (DEBUG) {
+                System.out.print("\tpTemp = " + pTemp);
+            }
+            p += pTemp;
+            if (DEBUG) {
+                System.out.println("\ta=" + a + " b=" + b + " c=" + c + " d=" + d);
+            }
+        }
+
+
+        return p;
+    }
+
+    /**
+     * Calculates the two-tailed P-value for the Fisher Exact test.
+     * <p/>
+     * In order for a table under consideration to have its p-value included
+     * in the final result, it must have a p-value less than the original table's P-value, i.e.
+     * Fisher's exact test computes the probability, given the observed marginal
+     * frequencies, of obtaining exactly the frequencies observed and any configuration more extreme.
+     * By "more extreme," we mean any configuration (given observed marginals) with a smaller probability of
+     * occurrence in the same direction (one-tailed) or in both directions (two-tailed).
+     *
+     * @param a a, b, c, d are the four cells in a 2x2 matrix
+     * @param b
+     * @param c
+     * @param d
+     * @return two-tailed P-value, 
+     * we generally prefer to use this value for research purposes
+     * consult with statisticians on if a new feature is going to use a one-sided Fisher's test value
+     */
+    public final double getTwoTailedP(int a, int b, int c, int d) {
+        int min, i;
+        int n = a + b + c + d;
+        if (n > maxSize) {
+            return Double.NaN;
+        }
+        double p = 0;
+
+        double baseP = getP(a, b, c, d);
+//         in order for a table under consideration to have its p-value included
+//         in the final result, it must have a p-value less than the baseP, i.e.
+//         Fisher's exact test computes the probability, given the observed marginal
+//         frequencies, of obtaining exactly the frequencies observed and any configuration more extreme.
+//         By "more extreme," we mean any configuration (given observed marginals) with a smaller probability of
+//         occurrence in the same direction (one-tailed) or in both directions (two-tailed).
+
+        if (DEBUG) {
+            System.out.println("baseP = " + baseP);
+        }
+        int initialA = a, initialB = b, initialC = c, initialD = d;
+        p += baseP;
+        if (DEBUG) {
+            System.out.println("p = " + p);
+        }
+        if (DEBUG) {
+            System.out.println("Starting with R-tail: a=" + a + " b=" + b + " c=" + c + " d=" + d);
+        }
+        min = (c < b) ? c : b;
+        for (i = 0; i < min; i++) {
+            if (DEBUG) {
+                System.out.print("doing round " + i);
+            }
+            double tempP = getP(++a, --b, --c, ++d);
+            if (tempP <= baseP) {
+                if (DEBUG) {
+                    System.out.print("\ttempP (" + tempP + ") is less than baseP (" + baseP + ")");
+                }
+                p += tempP;
+            }
+            if (DEBUG) {
+                System.out.println(" a=" + a + " b=" + b + " c=" + c + " d=" + d);
+            }
+        }
+
+        // reset the values to their original so we can repeat this process for the other side
+        a = initialA;
+        b = initialB;
+        c = initialC;
+        d = initialD;
+
+        if (DEBUG) {
+            System.out.println("Now doing L-tail: a=" + a + " b=" + b + " c=" + c + " d=" + d);
+        }
+        min = (a < d) ? a : d;
+        if (DEBUG) {
+            System.out.println("min = " + min);
+        }
+        for (i = 0; i < min; i++) {
+            if (DEBUG) {
+                System.out.print("doing round " + i);
+            }
+            double pTemp = getP(--a, ++b, ++c, --d);
+            if (DEBUG) {
+                System.out.println("  pTemp = " + pTemp);
+            }
+            if (pTemp <= baseP) {
+                if (DEBUG) {
+                    System.out.print("\ttempP (" + pTemp + ") is less than baseP (" + baseP + ")");
+                }
+                p += pTemp;
+            }
+            if (DEBUG) {
+                System.out.println(" a=" + a + " b=" + b + " c=" + c + " d=" + d);
+            }
+        }
+        return p;
+    }
+}
\ No newline at end of fileu}(j_  (71888a12983404395f8252c9b496cf052565ea2fj_  Sservice/src/test/java/org/cbioportal/service/util/AlterationEnrichmentUtilTest.javaj_  modifiedj}_  Kj~_  Kj_  K	j_  https://github.com/cBioPortal/cbioportal/blob/fb3dc7756a76d11d4580f9df12e03678ab329c0c/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.javaj_  https://github.com/cBioPortal/cbioportal/raw/fb3dc7756a76d11d4580f9df12e03678ab329c0c/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.javaj_  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.java?ref=fb3dc7756a76d11d4580f9df12e03678ab329c0cj_  X  @@ -17,13 +17,9 @@ public class AlterationEnrichmentUtilTest {
 
     @InjectMocks
     private AlterationEnrichmentUtil alterationEnrichmentUtil;
-
-    @Mock
-    private FisherExactTestCalculator fisherExactTestCalculator;
+    
     @Mock
     private GeneService geneService;
-    @Mock
-    private ProfiledCasesCounter profiledCasesCounter;
 
     @Test
     public void createAlterationEnrichments() throws Exception {
@@ -101,9 +97,6 @@ public void createAlterationEnrichments() throws Exception {
 
         // START: for 2 groups
 
-        Mockito.when(fisherExactTestCalculator.getCumulativePValue(1, 1, 2, 0)).thenReturn(1.0);
-        Mockito.when(fisherExactTestCalculator.getCumulativePValue(2, 0, 0, 2)).thenReturn(0.3);
-
         List<AlterationEnrichment> result = alterationEnrichmentUtil.createAlterationEnrichments(
                 mutationCountsbyEntrezGeneIdAndGroup);
 ueu(173cb579d47f8d69785473d32d7458e758b0f0a3}(sha(173cb579d47f8d69785473d32d7458e758b0f0a3node_idEC_kwDOAe-hB9oAKDE3M2NiNTc5ZDQ3ZjhkNjk3ODU0NzNkMzJkNzQ1OGU3NThiMGYwYTMcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-07-20T18:53:42Zu	committer}(j_  GitHubj_  noreply@github.comj_  2023-07-20T18:53:42ZumessageUpdate about us pagetree}(j_  (3add0f8eeb2def9c43729c48425d63b195a235f5urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/3add0f8eeb2def9c43729c48425d63b195a235f5uj_  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/173cb579d47f8d69785473d32d7458e758b0f0a3
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkuYK2CRBK7hj4Ov3rIwAA0V0IAAscuxslltB/Z15gcu/r8NGr
4ZGQjllohQ7YdvbBPnbhs7/O0FKrjNQvsBzSCu8GwqQphJ1Gn3IKjtSsfE6XXlc4
WrGLUgv+Dd9fliJqJydgZu35Wl12mJhICFAqTQaR84uEHA9WLxwY//w262DxKIZg
xT+immszFOH40XLpquvGFD2QZqoB4B9TqUz85Msww5kWbqU1NI4lP9mb6dOycdjb
tpbAd+DE9rxr3f3XYYCzlCEZ66vuRDAJjR5MquxZdvazxY4bZjRULQSTGCnpNzjJ
3EtIzRToUpEzrSpC2BP34DUevBKaHa16G27jMdp/e3ZnRFKYn1hPhMkOf9Hr5tc=
=IQ6K
-----END PGP SIGNATURE-----
payloadtree 3add0f8eeb2def9c43729c48425d63b195a235f5
parent 7339191fc545e3a3626aaf96cc2e6e7f63bc2292
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1689879222 -0400
committer GitHub <noreply@github.com> 1689879222 -0400

Update about us pageuuj_  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/173cb579d47f8d69785473d32d7458e758b0f0a3html_urlXhttps://github.com/cBioPortal/cbioportal/commit/173cb579d47f8d69785473d32d7458e758b0f0a3comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/173cb579d47f8d69785473d32d7458e758b0f0a3/commentsj_  }(login
dippindotsidJtO j_  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j_  'https://api.github.com/users/dippindotsj_  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj_  }(j_  web-flowj_  J/j_  MDQ6VXNlcjE5ODY0NDQ3j_  4https://avatars.githubusercontent.com/u/19864447?v=4j_  h5j_  %https://api.github.com/users/web-flowj_  https://github.com/web-flowj_  /https://api.github.com/users/web-flow/followersj_  <https://api.github.com/users/web-flow/following{/other_user}j_  5https://api.github.com/users/web-flow/gists{/gist_id}j_  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j_  3https://api.github.com/users/web-flow/subscriptionsj_  *https://api.github.com/users/web-flow/orgsj_  +https://api.github.com/users/web-flow/reposj_  6https://api.github.com/users/web-flow/events{/privacy}j_  5https://api.github.com/users/web-flow/received_eventsj_  Userj_  uparents]}(j_  (7339191fc545e3a3626aaf96cc2e6e7f63bc2292j_  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7339191fc545e3a3626aaf96cc2e6e7f63bc2292j_  Xhttps://github.com/cBioPortal/cbioportal/commit/7339191fc545e3a3626aaf96cc2e6e7f63bc2292uastats}(totalK	additionsK	deletionsKufiles]}(j_  (eb821670a42a3e0d37dbe90f7b61cee4379dbdc7filenamedocs/About-Us.mdstatusmodifiedj`  Kj`  KchangesKblob_urlihttps://github.com/cBioPortal/cbioportal/blob/173cb579d47f8d69785473d32d7458e758b0f0a3/docs%2FAbout-Us.mdraw_urlhhttps://github.com/cBioPortal/cbioportal/raw/173cb579d47f8d69785473d32d7458e758b0f0a3/docs%2FAbout-Us.mdcontents_url{https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FAbout-Us.md?ref=173cb579d47f8d69785473d32d7458e758b0f0a3patchX  @@ -42,6 +42,7 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 ## Caris Life Sciences
 * Jianjiong Gao
 * Priti Kumari
+* Karthik Kalletla
 
 ## The Hyve
 * Oleguer Plantalech
@@ -82,7 +83,6 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 * Zachary Heins
 * Michael Heuer
 * Anders Jacobsen
-* Karthik Kalletla
 * Peter Kok
 * Erik Larsson
 * Dong Liuau(fede26d6cfe2a09f4493ede7c9a97e3ef19a1b06}(sha(fede26d6cfe2a09f4493ede7c9a97e3ef19a1b06node_idEC_kwDOAe-hB9oAKGZlZGUyNmQ2Y2ZlMmEwOWY0NDkzZWRlN2M5YTk3ZTNlZjE5YTFiMDYcommit}(author}(name
Onur Sumeremails.onur.sumer@gmail.comdate2023-05-31T22:20:22Zu	committer}(j1`  
Onur Sumerj3`  s.onur.sumer@gmail.comj5`  2023-05-31T22:20:22Zumessage2improved clickhouse specific example configurationtree}(j)`  (3d07b07360aed8924ccc4ba3464b684cad96aa10urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/3d07b07360aed8924ccc4ba3464b684cad96aa10ujA`  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/fede26d6cfe2a09f4493ede7c9a97e3ef19a1b06
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujA`  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/fede26d6cfe2a09f4493ede7c9a97e3ef19a1b06html_urlXhttps://github.com/cBioPortal/cbioportal/commit/fede26d6cfe2a09f4493ede7c9a97e3ef19a1b06comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/fede26d6cfe2a09f4493ede7c9a97e3ef19a1b06/commentsj/`  }(login	onursumeridJ6 j+`  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5jA`  &https://api.github.com/users/onursumerjM`  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminuj7`  }(jR`  	onursumerjT`  J6 j+`  MDQ6VXNlcjM2MDQxOTg=jV`  3https://avatars.githubusercontent.com/u/3604198?v=4jX`  h5jA`  &https://api.github.com/users/onursumerjM`  https://github.com/onursumerj[`  0https://api.github.com/users/onursumer/followersj]`  =https://api.github.com/users/onursumer/following{/other_user}j_`  6https://api.github.com/users/onursumer/gists{/gist_id}ja`  =https://api.github.com/users/onursumer/starred{/owner}{/repo}jc`  4https://api.github.com/users/onursumer/subscriptionsje`  +https://api.github.com/users/onursumer/orgsjg`  ,https://api.github.com/users/onursumer/reposji`  7https://api.github.com/users/onursumer/events{/privacy}jk`  6https://api.github.com/users/onursumer/received_eventsjm`  Userjo`  uparents]}(j)`  (a89cc82b501b5c7397c5cd281123667798f10d8ejA`  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/a89cc82b501b5c7397c5cd281123667798f10d8ejM`  Xhttps://github.com/cBioPortal/cbioportal/commit/a89cc82b501b5c7397c5cd281123667798f10d8euastats}(totalK		additionsK	deletionsKufiles](}(j)`  (8bb01a1f141caded8408dfdcc63583e7ac5b0b6afilename&src/main/resources/logback.xml.EXAMPLEstatusmodifiedj`  Kj`  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/fede26d6cfe2a09f4493ede7c9a97e3ef19a1b06/src%2Fmain%2Fresources%2Flogback.xml.EXAMPLEraw_urlhttps://github.com/cBioPortal/cbioportal/raw/fede26d6cfe2a09f4493ede7c9a97e3ef19a1b06/src%2Fmain%2Fresources%2Flogback.xml.EXAMPLEcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Flogback.xml.EXAMPLE?ref=fede26d6cfe2a09f4493ede7c9a97e3ef19a1b06patchXc  @@ -24,6 +24,11 @@
             <appender-ref ref="STDOUT" />
             <appender-ref ref="FILE" />
         </logger>
+        
+        <logger name="org.cbioportal.persistence.mybatiscolumnstore" level="debug">
+            <appender-ref ref="STDOUT" />
+            <appender-ref ref="FILE" />
+        </logger>
     -->
 
     <root level="info">u}(j)`  (ee91e19ae5d5673b8aad18798a02795aa52ce511j`  ,src/main/resources/portal.properties.EXAMPLEj`  modifiedj`  Kj`  Kj`  Kj`  https://github.com/cBioPortal/cbioportal/blob/fede26d6cfe2a09f4493ede7c9a97e3ef19a1b06/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj`  https://github.com/cBioPortal/cbioportal/raw/fede26d6cfe2a09f4493ede7c9a97e3ef19a1b06/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj`  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=fede26d6cfe2a09f4493ede7c9a97e3ef19a1b06j`  X  @@ -16,8 +16,10 @@ db.connection_string=jdbc:mysql://localhost:3306/
 #
 # db.tomcat_resource_name=jdbc/cbioportal
 
-# Note: clickhouse uses the same username and password as MySQL database
+# clickhouse configuration
 # db.clickhouse.connection_string=jdbc:ch://clickhouse:8123/cbioportal?user=cbio&zeroDateTimeBehavior=convertToNull&useSSL=false
+# db.clickhouse.user=cbio_user
+# db.clickhouse.password=somepassword
 
 # 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):
 db.suppress_schema_version_mismatch_errors=falseueu(0425e7ba3d3957eda2ac70de37881e4c7bf20177}(sha(0425e7ba3d3957eda2ac70de37881e4c7bf20177node_idEC_kwDOAe-hB9oAKDA0MjVlN2JhM2QzOTU3ZWRhMmFjNzBkZTM3ODgxZTRjN2JmMjAxNzccommit}(author}(name	Bryan Laiemaillaib1@mskcc.orgdate2023-07-19T20:48:03Zu	committer}(j`  Gaofei Zhaoj`  ,15748980+dippindots@users.noreply.github.comj`  2023-08-01T04:30:30Zumessage)update one-sided fisher test to two-sidedtree}(j`  (c2a3bd3f6860db4a0e01ff9ff004e8ced28e353durlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c2a3bd3f6860db4a0e01ff9ff004e8ced28e353duj`  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/0425e7ba3d3957eda2ac70de37881e4c7bf20177
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj`  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/0425e7ba3d3957eda2ac70de37881e4c7bf20177html_urlXhttps://github.com/cBioPortal/cbioportal/commit/0425e7ba3d3957eda2ac70de37881e4c7bf20177comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/0425e7ba3d3957eda2ac70de37881e4c7bf20177/commentsj`  Nj`  }(login
dippindotsidJtO j`  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j`  'https://api.github.com/users/dippindotsj`  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuparents]}(j`  (0ed47592726452a87ac27cce7fef0cdce7719adaj`  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/0ed47592726452a87ac27cce7fef0cdce7719adaj`  Xhttps://github.com/cBioPortal/cbioportal/commit/0ed47592726452a87ac27cce7fef0cdce7719adauastats}(totalKM	additionsK>	deletionsKufiles](}(j`  (16073e48ff0caa8feab78e54ecfb5919ca20eb91filenameIcore/src/main/java/org/mskcc/cbio/portal/servlet/CalcFisherExactTest.javastatusmodifiedj`  Kj`  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/0425e7ba3d3957eda2ac70de37881e4c7bf20177/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/0425e7ba3d3957eda2ac70de37881e4c7bf20177/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.java?ref=0425e7ba3d3957eda2ac70de37881e4c7bf20177patchX'  @@ -44,13 +44,13 @@
 import org.mskcc.cbio.portal.stats.FisherExact;
 
 /**
- * Calculate the cumulative (one-tail) p-value out of fisher exact test
+ * Calculate the cumulative (two-tail) p-value out of fisher exact test
  * 
  * @param a a, b, c, d are the four cells in a 2x2 matrix
  * @param b
  * @param c
  * @param d
- * @return one-tailed P-value (right or left, whichever is smallest)
+ * @return two-tailed P-value (right or left, whichever is smallest)
  * 
  */
 public class CalcFisherExactTest extends HttpServlet  {
@@ -86,7 +86,7 @@ protected void doPost(HttpServletRequest httpServletRequest,
                 int c = Integer.parseInt(dataSet.split(" ")[2]);
                 int d = Integer.parseInt(dataSet.split(" ")[3]);    
                 FisherExact fisher = new FisherExact(a + b + c + d);
-                double pValue = fisher.getCumlativeP(a, b, c, d);
+                double pValue = fisher.getTwoTailedP(a, b, c, d);
                 result = result.concat(String.valueOf(pValue) + " ");                
             }
         }u}(j`  (92f8f83955924145d906564446465c5750ab3d2fj`  =core/src/main/java/org/mskcc/cbio/portal/stats/OddsRatio.javaj`  modifiedj`  Kj`  Kj a  Kja  https://github.com/cBioPortal/cbioportal/blob/0425e7ba3d3957eda2ac70de37881e4c7bf20177/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.javaja  https://github.com/cBioPortal/cbioportal/raw/0425e7ba3d3957eda2ac70de37881e4c7bf20177/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.java?ref=0425e7ba3d3957eda2ac70de37881e4c7bf20177ja  X  @@ -87,7 +87,7 @@ public OddsRatio(ProfileDataSummary pDataSummary, String geneA, String geneB) {
 
         oddsRatio = ((double) (a * d)) / ((double) (b * c));
         FisherExact fisher = new FisherExact(a + b + c + d);
-        pValue = fisher.getCumlativeP(a, b, c, d);
+        pValue = fisher.getTwoTailedP(a, b, c, d);
         lowerConfidenceInterval = Math.exp(Math.log(oddsRatio) - 1.96 * (Math.sqrt(1 / (double) a
                 + 1 / (double) b + 1 / (double) c + 1 / (double) d)));
         upperConfidenceInterval = Math.exp(Math.log(oddsRatio) + 1.96 * (Math.sqrt(1 / (double) a
@@ -103,7 +103,7 @@ public double getOddsRatio() {
         return oddsRatio;
     }
 
-    public double getCumulativeP() {
+    public double getTwoTailedP() {
         return pValue;
     }
 u}(j`  (c1c4adac53791a81208af5b00182bdaa40e6f0fej`  Jcore/src/main/java/org/mskcc/cbio/portal/util/EnrichmentsAnalysisUtil.javaj`  modifiedj`  Kj`  Kj a  Kja  https://github.com/cBioPortal/cbioportal/blob/0425e7ba3d3957eda2ac70de37881e4c7bf20177/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FEnrichmentsAnalysisUtil.javaja  https://github.com/cBioPortal/cbioportal/raw/0425e7ba3d3957eda2ac70de37881e4c7bf20177/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FEnrichmentsAnalysisUtil.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FEnrichmentsAnalysisUtil.java?ref=0425e7ba3d3957eda2ac70de37881e4c7bf20177ja  X  @@ -652,7 +652,7 @@ private double runFisherExactTest(HashMap<Integer, String> singleGeneCaseValueMa
             }
         }
         FisherExact fisher = new FisherExact(a + b + c + d);
-        return fisher.getCumlativeP(a, b, c, d);
+        return fisher.getTwoTailedP(a, b, c, d);
     }
 
     private String getCytoband(int geneticEntityId, String geneticProfileStableId) {u}(j`  (06377765dfed89750dc17672a9cb7f4cfefca759j`  Ccore/src/test/java/org/mskcc/cbio/portal/stats/TestFisherExact.javaj`  modifiedj`  Kj`  Kj a  Kja  https://github.com/cBioPortal/cbioportal/blob/0425e7ba3d3957eda2ac70de37881e4c7bf20177/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestFisherExact.javaja  https://github.com/cBioPortal/cbioportal/raw/0425e7ba3d3957eda2ac70de37881e4c7bf20177/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestFisherExact.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestFisherExact.java?ref=0425e7ba3d3957eda2ac70de37881e4c7bf20177ja  XO  @@ -39,7 +39,7 @@ public class TestFisherExact extends TestCase {
 
     public void testFisherExact() {
         FisherExact fisher = new FisherExact(43 + 2 + 17 + 7);
-        double p = fisher.getCumlativeP(43, 2, 17, 7);
+        double p = fisher.getTwoTailedP(43, 2, 17, 7);
         assertEquals(0.006653, p, 0.00001);
     }
 }u}(j`  (108fdb5785e60048a79f3c23d5bfb4f01dc550e2j`  Acore/src/test/java/org/mskcc/cbio/portal/stats/TestOddsRatio.javaj`  modifiedj`  Kj`  Kj a  Kja  https://github.com/cBioPortal/cbioportal/blob/0425e7ba3d3957eda2ac70de37881e4c7bf20177/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.javaja  https://github.com/cBioPortal/cbioportal/raw/0425e7ba3d3957eda2ac70de37881e4c7bf20177/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.java?ref=0425e7ba3d3957eda2ac70de37881e4c7bf20177ja  X  @@ -70,9 +70,9 @@ public void testFisherExact() throws IOException {
 
         OddsRatio oddsRatio = new OddsRatio(pDataSummary, "BRCA1", "BRCA2");
         double oddsRatioValue = oddsRatio.getOddsRatio();
-        double p = oddsRatio.getCumulativeP();
+        double p = oddsRatio.getTwoTailedP();
         assertEquals(0.16666, oddsRatioValue, 0.0001);
-        assertEquals(0.0849, p, 0.0001);
+        assertEquals(0.1698, p, 0.0001);
         //System.out.println (oddsRatio.getRCommand());
     }
 }u}(j`  (ea7d3d653e00ae80f179717fa6f02d7409dfba19j`  docs/user-guide/faq.mdj`  modifiedj`  Kj`  Kj a  Kja  qhttps://github.com/cBioPortal/cbioportal/blob/0425e7ba3d3957eda2ac70de37881e4c7bf20177/docs%2Fuser-guide%2Ffaq.mdja  phttps://github.com/cBioPortal/cbioportal/raw/0425e7ba3d3957eda2ac70de37881e4c7bf20177/docs%2Fuser-guide%2Ffaq.mdja  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fuser-guide%2Ffaq.md?ref=0425e7ba3d3957eda2ac70de37881e4c7bf20177ja  X  @@ -146,7 +146,7 @@ Group Comparison is a suite of analysis features which allows a user to compare
 - Other tabs
     - 2 groups
         - Continuous data: one-sided t-test
-        - Categorical data: one-sided Fisher's exact test
+        - Categorical data: two-sided Fisher's exact test
     - 3 or more groups
         - Continuous data: one-way ANOVA
         - Categorical data: Chi-squared testu}(j`  (3ea53acf77ec5c9fdaefb19fc9864e431e4b655ej`  upersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/AlterationMyBatisRepositoryTest.javaj`  modifiedj`  Kj`  Kj a  Kja  https://github.com/cBioPortal/cbioportal/blob/0425e7ba3d3957eda2ac70de37881e4c7bf20177/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.javaja  https://github.com/cBioPortal/cbioportal/raw/0425e7ba3d3957eda2ac70de37881e4c7bf20177/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.java?ref=0425e7ba3d3957eda2ac70de37881e4c7bf20177ja  X  @@ -1034,7 +1034,7 @@ public void getPatientStructuralVariantCountIncludeCustomDriverAnnotationsInclud
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        alterationFilter.setSelectedTiers(Select.byValues(List.of("Class 2")));
+        alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Class 2")));
         alterationFilter.setIncludeUnknownTier(true);
         List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,
@@ -1049,7 +1049,7 @@ public void getPatientStructuralVariantCountIncludeCustomDriverAnnotationsExclud
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        alterationFilter.setSelectedTiers(Select.byValues(List.of("Class 2")));
+        alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Class 2")));
         alterationFilter.setIncludeUnknownTier(false);
         List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,u}(j`  (8113cc63f7380d8cff4cb9026990fc7050114c95j`  Oservice/src/main/java/org/cbioportal/service/util/AlterationEnrichmentUtil.javaj`  modifiedj`  Kj`  Kj a  Kja  https://github.com/cBioPortal/cbioportal/blob/0425e7ba3d3957eda2ac70de37881e4c7bf20177/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javaja  https://github.com/cBioPortal/cbioportal/raw/0425e7ba3d3957eda2ac70de37881e4c7bf20177/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.java?ref=0425e7ba3d3957eda2ac70de37881e4c7bf20177ja  X  @@ -132,7 +132,7 @@ public List<AlterationEnrichment> createAlterationEnrichments(Map<String, Pair<L
                         int alteredOnlyInQueryGenesCount = counts.get(0).getProfiledCount()
                             - counts.get(0).getAlteredCount();
 
-                        pValue = fisherExactTestCalculator.getCumulativePValue(alteredInNoneCount,
+                        pValue = fisherExactTestCalculator.getTwoTailedPValue(alteredInNoneCount,
                             counts.get(1).getAlteredCount(), alteredOnlyInQueryGenesCount,
                             counts.get(0).getAlteredCount());
                     } else {u}(j`  (ed94cad2b5bfc09610d8c17eae97a74684a109ddj`  Pservice/src/main/java/org/cbioportal/service/util/FisherExactTestCalculator.javaj`  modifiedj`  K/j`  K j a  K/ja  https://github.com/cBioPortal/cbioportal/blob/0425e7ba3d3957eda2ac70de37881e4c7bf20177/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javaja  https://github.com/cBioPortal/cbioportal/raw/0425e7ba3d3957eda2ac70de37881e4c7bf20177/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.java?ref=0425e7ba3d3957eda2ac70de37881e4c7bf20177ja  X(  @@ -40,4 +40,51 @@ public double getCumulativePValue(int a, int b, int c, int d) {
         }
         return p;
     }
+
+    public double getTwoTailedPValue(int a, int b, int c, int d) {
+        
+        int min, i;
+        int n = a + b + c + d;
+        double p = 0;
+        double[] f = new double[n + 1];
+        f[0] = 0.0;
+
+        for (int j = 1; j <= n; j++) {
+            f[j] = f[j - 1] + Math.log(j);
+        }
+
+        double baseP = getPValue(a, b, c, d, f);
+//         in order for a table under consideration to have its p-value included
+//         in the final result, it must have a p-value less than the baseP, i.e.
+//         Fisher's exact test computes the probability, given the observed marginal
+//         frequencies, of obtaining exactly the frequencies observed and any configuration more extreme.
+//         By "more extreme," we mean any configuration (given observed marginals) with a smaller probability of
+//         occurrence in the same direction (one-tailed) or in both directions (two-tailed).
+        
+        int initialA = a, initialB = b, initialC = c, initialD = d;
+        p += baseP;
+        
+        min = (c < b) ? c : b;
+        for (i = 0; i < min; i++) {
+            double tempP = getPValue(++a, --b, --c, ++d, f);
+            if (tempP <= baseP) {
+                p += tempP;
+            }
+        }
+
+        // reset the values to their original so we can repeat this process for the other side
+        a = initialA;
+        b = initialB;
+        c = initialC;
+        d = initialD;
+        
+        min = (a < d) ? a : d;
+        for (i = 0; i < min; i++) {
+            double pTemp = getPValue(--a, ++b, ++c, --d, f);
+            if (pTemp <= baseP) {
+                p += pTemp;
+            }
+        }
+        return p;
+    }
 }u^     }(j`  (7020d01ef0eaf51b229e44889e165bd1a5b7955bj`  Sservice/src/test/java/org/cbioportal/service/util/AlterationEnrichmentUtilTest.javaj`  modifiedj`  Kj`  Kj a  Kja  https://github.com/cBioPortal/cbioportal/blob/0425e7ba3d3957eda2ac70de37881e4c7bf20177/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.javaja  https://github.com/cBioPortal/cbioportal/raw/0425e7ba3d3957eda2ac70de37881e4c7bf20177/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.java?ref=0425e7ba3d3957eda2ac70de37881e4c7bf20177ja  X  @@ -101,8 +101,8 @@ public void createAlterationEnrichments() throws Exception {
 
         // START: for 2 groups
 
-        Mockito.when(fisherExactTestCalculator.getCumulativePValue(1, 1, 2, 0)).thenReturn(1.0);
-        Mockito.when(fisherExactTestCalculator.getCumulativePValue(2, 0, 0, 2)).thenReturn(0.3);
+        Mockito.when(fisherExactTestCalculator.getTwoTailedPValue(1, 1, 2, 0)).thenReturn(1.0);
+        Mockito.when(fisherExactTestCalculator.getTwoTailedPValue(2, 0, 0, 2)).thenReturn(0.3);
 
         List<AlterationEnrichment> result = alterationEnrichmentUtil.createAlterationEnrichments(
                 mutationCountsbyEntrezGeneIdAndGroup);ueu(901406f5182fcf4926da3388ec49692516b37aad}(sha(901406f5182fcf4926da3388ec49692516b37aadnode_idEC_kwDOAe-hB9oAKDkwMTQwNmY1MTgyZmNmNDkyNmRhMzM4OGVjNDk2OTI1MTZiMzdhYWQcommit}(author}(name
Jiahang Liemail.55948986+Djokovic0311@users.noreply.github.comdate2023-08-18T17:05:35Zu	committer}(j[a  GitHubj]a  noreply@github.comj_a  2023-08-18T17:05:35ZumessageX  (GSoC) Generic Assay Categorical/Binary data implementation Backend (#10303)

* update backend

* finish tests

* modify controller file structure

* modify import

* update backend

* finish tests

* modify controller file structure

* refactor some variables

* modify enrichment compare and validate issue

* refactor the controllers and services

* refactor test

* Update GenericAssayEnrichmentServiceImpl.java

* fixed simplification issues

* add inline comments

* modify import

* solve core test issue

* test check

* modify expressionenrichment

* modify imports

* update backend

* finish tests

* modify controller file structure

* modify import

* update backend

* finish tests

* modify controller file structure

* refactor some variables

* modify enrichment compare and validate issue

* refactor the controllers and services

* refactor test

* Update GenericAssayEnrichmentServiceImpl.java

* fixed simplification issues

* add inline comments

* modify import

* solve core test issue

* test check

* modify expressionenrichment

* modify imports

* update imports

* Update GenericAssayEnrichment.javatree}(jSa  (8a4ce655b3ed433ab8c0f34451fdf3be178bfb6curlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/8a4ce655b3ed433ab8c0f34451fdf3be178bfb6cujka  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/901406f5182fcf4926da3388ec49692516b37aad
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk36TfCRBK7hj4Ov3rIwAAwicIADKgMoRdpb06i2OWAQo/EPwy
PY7sMeNuZVhYh6OjA3L+tgP6YxrRi7GhP0zGVKpOOorsPGGIapfb2j1jn1JopELk
aNa8RjN+sv5oAMkwBnLbM4u2ipobAejP7n0cxX07ryTHKxYzo7ZZ2325egCWee1+
lBNsfXEXkOsWPdhqt3LNNMRy+qSSgRvV1+W1Ma9dRU+USzjbmjsEYs2HXs50AY3i
UwCuJL9y2hMCzlF6TdV/VIYfQGHAFvF3iZ4bVvslQhv8aWcLIv9jKO5BonZrLEkS
GGz2lGzD9utgmlyncgc+tDeU2IyJ0RQDp9tunzi5XpW58YKRiqVtqjaHmbXDt1c=
=y4wy
-----END PGP SIGNATURE-----
payloadX  tree 8a4ce655b3ed433ab8c0f34451fdf3be178bfb6c
parent fe2c82e9ef6870cb26c6ac0ad21cff4124464984
author Jiahang Li <55948986+Djokovic0311@users.noreply.github.com> 1692378335 -0400
committer GitHub <noreply@github.com> 1692378335 -0400

(GSoC) Generic Assay Categorical/Binary data implementation Backend (#10303)

* update backend

* finish tests

* modify controller file structure

* modify import

* update backend

* finish tests

* modify controller file structure

* refactor some variables

* modify enrichment compare and validate issue

* refactor the controllers and services

* refactor test

* Update GenericAssayEnrichmentServiceImpl.java

* fixed simplification issues

* add inline comments

* modify import

* solve core test issue

* test check

* modify expressionenrichment

* modify imports

* update backend

* finish tests

* modify controller file structure

* modify import

* update backend

* finish tests

* modify controller file structure

* refactor some variables

* modify enrichment compare and validate issue

* refactor the controllers and services

* refactor test

* Update GenericAssayEnrichmentServiceImpl.java

* fixed simplification issues

* add inline comments

* modify import

* solve core test issue

* test check

* modify expressionenrichment

* modify imports

* update imports

* Update GenericAssayEnrichment.javauujka  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/901406f5182fcf4926da3388ec49692516b37aadhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/901406f5182fcf4926da3388ec49692516b37aadcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/901406f5182fcf4926da3388ec49692516b37aad/commentsjYa  }(loginDjokovic0311idJUjUa  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5jka  )https://api.github.com/users/Djokovic0311jya  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminujaa  }(j~a  web-flowja  J/jUa  MDQ6VXNlcjE5ODY0NDQ3ja  4https://avatars.githubusercontent.com/u/19864447?v=4ja  h5jka  %https://api.github.com/users/web-flowjya  https://github.com/web-flowja  /https://api.github.com/users/web-flow/followersja  <https://api.github.com/users/web-flow/following{/other_user}ja  5https://api.github.com/users/web-flow/gists{/gist_id}ja  <https://api.github.com/users/web-flow/starred{/owner}{/repo}ja  3https://api.github.com/users/web-flow/subscriptionsja  *https://api.github.com/users/web-flow/orgsja  +https://api.github.com/users/web-flow/reposja  6https://api.github.com/users/web-flow/events{/privacy}ja  5https://api.github.com/users/web-flow/received_eventsja  Userja  uparents]}(jSa  (fe2c82e9ef6870cb26c6ac0ad21cff4124464984jka  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/fe2c82e9ef6870cb26c6ac0ad21cff4124464984jya  Xhttps://github.com/cBioPortal/cbioportal/commit/fe2c82e9ef6870cb26c6ac0ad21cff4124464984uastats}(totalMY	additionsMH	deletionsMufiles](}(jSa  (f7ccbc7c3b5e22da61912049dcaf06665eee80ddfilenameJmodel/src/main/java/org/cbioportal/model/GenericAssayBinaryEnrichment.javastatusaddedja  Kja  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/901406f5182fcf4926da3388ec49692516b37aad/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayBinaryEnrichment.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/901406f5182fcf4926da3388ec49692516b37aad/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayBinaryEnrichment.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayBinaryEnrichment.java?ref=901406f5182fcf4926da3388ec49692516b37aadpatchX  @@ -0,0 +1,19 @@
+package org.cbioportal.model;
+
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+import java.util.List;
+
+public class GenericAssayBinaryEnrichment extends GenericAssayEnrichment {
+    @NotNull
+    private List<GenericAssayCountSummary> counts;
+
+    public List<GenericAssayCountSummary> getCounts() {
+        return counts;
+    }
+
+    public void setCounts(List<GenericAssayCountSummary> counts) {
+        this.counts = counts;
+    }
+    
+}u}(jSa  (2fdb661cf381055a175da7803be81909fca313c5ja  Omodel/src/main/java/org/cbioportal/model/GenericAssayCategoricalEnrichment.javaja  addedja  Kja  K ja  Kja  https://github.com/cBioPortal/cbioportal/blob/901406f5182fcf4926da3388ec49692516b37aad/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayCategoricalEnrichment.javaja  https://github.com/cBioPortal/cbioportal/raw/901406f5182fcf4926da3388ec49692516b37aad/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayCategoricalEnrichment.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayCategoricalEnrichment.java?ref=901406f5182fcf4926da3388ec49692516b37aadja  X  @@ -0,0 +1,18 @@
+package org.cbioportal.model;
+
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+
+public class GenericAssayCategoricalEnrichment extends GenericAssayEnrichment {
+    @NotNull
+    private BigDecimal qValue;
+
+    public BigDecimal getqValue() {
+        return qValue;
+    }
+
+    public void setqValue(BigDecimal qValue) {
+        this.qValue = qValue;
+    }
+
+}u}(jSa  (2f24ed760ba89ec5e129f8802876c54ac90efceaja  Fmodel/src/main/java/org/cbioportal/model/GenericAssayCountSummary.javaja  addedja  K&ja  K ja  K&ja  https://github.com/cBioPortal/cbioportal/blob/901406f5182fcf4926da3388ec49692516b37aad/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayCountSummary.javaja  https://github.com/cBioPortal/cbioportal/raw/901406f5182fcf4926da3388ec49692516b37aad/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayCountSummary.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayCountSummary.java?ref=901406f5182fcf4926da3388ec49692516b37aadja  X  @@ -0,0 +1,38 @@
+package org.cbioportal.model;
+
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+public class GenericAssayCountSummary implements Serializable {
+
+    @NotNull
+    private String name;
+    @NotNull
+    private Integer count;
+    @NotNull
+    private Integer totalCount;
+
+    public Integer getCount() {
+        return count;
+    }
+
+    public void setCount(Integer count) {
+        this.count = count;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Integer getTotalCount() {
+        return totalCount;
+    }
+
+    public void setTotalCount(Integer totalCount) {
+        this.totalCount = totalCount;
+    }
+}u}(jSa  (02491c2221b72744e6336cfd786377839e09b53eja  Dmodel/src/main/java/org/cbioportal/model/GenericAssayEnrichment.javaja  modifiedja  Kja  Kja  Kja  https://github.com/cBioPortal/cbioportal/blob/901406f5182fcf4926da3388ec49692516b37aad/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayEnrichment.javaja  https://github.com/cBioPortal/cbioportal/raw/901406f5182fcf4926da3388ec49692516b37aad/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayEnrichment.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayEnrichment.java?ref=901406f5182fcf4926da3388ec49692516b37aadja  X  @@ -1,6 +1,7 @@
 package org.cbioportal.model;
 
 import java.io.Serializable;
+import java.math.BigDecimal;
 import java.util.HashMap;
 
 import javax.validation.constraints.NotNull;
@@ -11,6 +12,8 @@ public class GenericAssayEnrichment extends ExpressionEnrichment implements Seri
 	private String stableId;
 	@NotNull
 	private String name;
+    @NotNull
+    private BigDecimal qValue;
 	@NotNull
 	private HashMap<String, String> genericEntityMetaProperties;
 
@@ -37,5 +40,16 @@ public HashMap<String, String> getGenericEntityMetaProperties() {
 	public void setGenericEntityMetaProperties(HashMap<String, String> genericEntityMetaProperties) {
 		this.genericEntityMetaProperties = genericEntityMetaProperties;
 	}
-
+    
+    public BigDecimal getqValue() {
+        return qValue;
+    }
+
+    public void setqValue(BigDecimal qValue) {
+        this.qValue = qValue;
+    }
+    
+    public static int compare(GenericAssayEnrichment c1, GenericAssayEnrichment c2) {
+        return c1.getpValue().compareTo(c2.getpValue());
+    }
 }u}(jSa  (d3c2a444bd8ba08264b678a96fce3344bd45fcc7ja  Mservice/src/main/java/org/cbioportal/service/ExpressionEnrichmentService.javaja  modifiedja  K
ja  Kja  Kja  https://github.com/cBioPortal/cbioportal/blob/901406f5182fcf4926da3388ec49692516b37aad/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.javaja  https://github.com/cBioPortal/cbioportal/raw/901406f5182fcf4926da3388ec49692516b37aad/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.java?ref=901406f5182fcf4926da3388ec49692516b37aadja  X  @@ -7,6 +7,8 @@
 import org.cbioportal.model.GenericAssayEnrichment;
 import org.cbioportal.model.GenomicEnrichment;
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
+import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 
 public interface ExpressionEnrichmentService {
@@ -15,8 +17,18 @@ List<GenomicEnrichment> getGenomicEnrichments(String molecularProfileId,
             Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
             throws MolecularProfileNotFoundException;
 
-    List<GenericAssayEnrichment> getGenericAssayEnrichments(String molecularProfileId,
+    List<GenericAssayEnrichment> getGenericAssayNumericalEnrichments(String molecularProfileId,
             Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
             throws MolecularProfileNotFoundException;
+    List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
+        String molecularProfileId,
+        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
+        EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException;
+
+    List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
+                                                                                  Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
+                                                                                  EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException;
 
 }u}(jSa  (45eb9ae478ec5e52251ea8e073fc58bc5fbc2172ja  Vservice/src/main/java/org/cbioportal/service/impl/ExpressionEnrichmentServiceImpl.javaja  modifiedja  Kja  K:ja  Kja  https://github.com/cBioPortal/cbioportal/blob/901406f5182fcf4926da3388ec49692516b37aad/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.javaja  https://github.com/cBioPortal/cbioportal/raw/901406f5182fcf4926da3388ec49692516b37aad/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.java?ref=901406f5182fcf4926da3388ec49692516b37aadja  XL  @@ -1,20 +1,23 @@
 package org.cbioportal.service.impl;
+import java.math.BigDecimal;
 import java.util.*;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 
 import org.apache.commons.lang3.BooleanUtils;
+import org.cbioportal.model.MolecularProfile.MolecularAlterationType;
+import org.cbioportal.model.meta.GenericAssayMeta;
 import org.cbioportal.model.EnrichmentType;
-import org.cbioportal.model.Gene;
-import org.cbioportal.model.GeneMolecularAlteration;
-import org.cbioportal.model.GenericAssayEnrichment;
+import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
 import org.cbioportal.model.GenericAssayMolecularAlteration;
-import org.cbioportal.model.GenomicEnrichment;
-import org.cbioportal.model.MolecularProfile;
-import org.cbioportal.model.MolecularProfile.MolecularAlterationType;
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
+import org.cbioportal.model.MolecularProfile;
 import org.cbioportal.model.Sample;
-import org.cbioportal.model.meta.GenericAssayMeta;
+import org.cbioportal.model.GenericAssayEnrichment;
+import org.cbioportal.model.GenomicEnrichment;
+import org.cbioportal.model.Gene;
+import org.cbioportal.model.GeneMolecularAlteration;
 import org.cbioportal.persistence.MolecularDataRepository;
 import org.cbioportal.service.ExpressionEnrichmentService;
 import org.cbioportal.service.GeneService;
@@ -23,6 +26,7 @@
 import org.cbioportal.service.SampleService;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.util.ExpressionEnrichmentUtil;
+import org.cbioportal.service.util.FisherExactTestCalculator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -42,68 +46,56 @@ public class ExpressionEnrichmentServiceImpl implements ExpressionEnrichmentServ
     private GenericAssayService genericAssayService;
     @Autowired
     private SampleService sampleService;
-
+    @Autowired
+    private FisherExactTestCalculator fisherExactTestCalculator = new FisherExactTestCalculator();
     @Override
     // transaction needs to be setup here in order to return Iterable from
     // molecularDataService in fetchCoExpressions
     @Transactional(readOnly = true)
     public List<GenomicEnrichment> getGenomicEnrichments(String molecularProfileId,
-            Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
-            throws MolecularProfileNotFoundException {
-
+                                                         Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException {
         MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
-
         List<MolecularAlterationType> validGenomicMolecularAlterationTypes = Arrays.asList(
-                MolecularAlterationType.MICRO_RNA_EXPRESSION, MolecularAlterationType.MRNA_EXPRESSION,
-                MolecularAlterationType.MRNA_EXPRESSION_NORMALS, MolecularAlterationType.RNA_EXPRESSION,
-                MolecularAlterationType.METHYLATION, MolecularAlterationType.METHYLATION_BINARY,
-                MolecularAlterationType.PHOSPHORYLATION, MolecularAlterationType.PROTEIN_LEVEL,
-                MolecularAlterationType.PROTEIN_ARRAY_PROTEIN_LEVEL,
-                MolecularAlterationType.PROTEIN_ARRAY_PHOSPHORYLATION);
-
+            MolecularAlterationType.MICRO_RNA_EXPRESSION, MolecularAlterationType.MRNA_EXPRESSION,
+            MolecularAlterationType.MRNA_EXPRESSION_NORMALS, MolecularAlterationType.RNA_EXPRESSION,
+            MolecularAlterationType.METHYLATION, MolecularAlterationType.METHYLATION_BINARY,
+            MolecularAlterationType.PHOSPHORYLATION, MolecularAlterationType.PROTEIN_LEVEL,
+            MolecularAlterationType.PROTEIN_ARRAY_PROTEIN_LEVEL,
+            MolecularAlterationType.PROTEIN_ARRAY_PHOSPHORYLATION);
         validateMolecularProfile(molecularProfile, validGenomicMolecularAlterationTypes);
-
         Iterable<GeneMolecularAlteration> maItr = molecularDataRepository
-                .getGeneMolecularAlterationsIterableFast(molecularProfile.getStableId());
-
+            .getGeneMolecularAlterationsIterableFast(molecularProfile.getStableId());
         List<GenomicEnrichment> expressionEnrichments = expressionEnrichmentUtil.getEnrichments(molecularProfile,
-                molecularProfileCaseSets, enrichmentType, maItr);
-
+            molecularProfileCaseSets, enrichmentType, maItr);
         List<Integer> entrezGeneIds = expressionEnrichments.stream().map(GenomicEnrichment::getEntrezGeneId)
-                .collect(Collectors.toList());
-
+            .collect(Collectors.toList());
         Map<Integer, List<Gene>> geneMapByEntrezId = geneService
-                .fetchGenes(entrezGeneIds.stream().map(Object::toString).collect(Collectors.toList()), "ENTREZ_GENE_ID",
-                        "SUMMARY")
-                .stream().collect(Collectors.groupingBy(Gene::getEntrezGeneId));
-
+            .fetchGenes(entrezGeneIds.stream().map(Object::toString).collect(Collectors.toList()), "ENTREZ_GENE_ID",
+                "SUMMARY")
+            .stream().collect(Collectors.groupingBy(Gene::getEntrezGeneId));
         return expressionEnrichments.stream()
-                // filter Enrichments having no gene reference object(this
-                // happens when multiple
-                // entrez ids map to same hugo gene symbol)
-                .filter(expressionEnrichment -> geneMapByEntrezId.containsKey(expressionEnrichment.getEntrezGeneId()))
-                .map(expressionEnrichment -> {
-                    Gene gene = geneMapByEntrezId.get(expressionEnrichment.getEntrezGeneId()).get(0);
-                    expressionEnrichment.setHugoGeneSymbol(gene.getHugoGeneSymbol());
-                    return expressionEnrichment;
-                }).collect(Collectors.toList());
+            // filter Enrichments having no gene reference object(this
+            // happens when multiple
+            // entrez ids map to same hugo gene symbol)
+            .filter(expressionEnrichment -> geneMapByEntrezId.containsKey(expressionEnrichment.getEntrezGeneId()))
+            .map(expressionEnrichment -> {
+                Gene gene = geneMapByEntrezId.get(expressionEnrichment.getEntrezGeneId()).get(0);
+                expressionEnrichment.setHugoGeneSymbol(gene.getHugoGeneSymbol());
+                return expressionEnrichment;
+            }).collect(Collectors.toList());
     }
-
     @Override
     // transaction needs to be setup here in order to return Iterable from
     // molecularDataRepository in getGenericAssayMolecularAlterationsIterable
     @Transactional(readOnly = true)
-    public List<GenericAssayEnrichment> getGenericAssayEnrichments(String molecularProfileId,
-            Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
-            throws MolecularProfileNotFoundException {
-
+    public List<GenericAssayEnrichment> getGenericAssayNumericalEnrichments(String molecularProfileId,
+                                                                   Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException {
         MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
-
         validateMolecularProfile(molecularProfile, Arrays.asList(MolecularAlterationType.GENERIC_ASSAY));
-
         Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
-                .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
-
+            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
         Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets;
         if (BooleanUtils.isTrue(molecularProfile.getPatientLevel())) {
             // Build sampleIdToPatientIdMap to quick find if a sample has shared patientId with other samples
@@ -125,31 +117,159 @@ public List<GenericAssayEnrichment> getGenericAssayEnrichments(String molecularP
                 filteredMolecularProfileCaseSets.put(pair.getKey(), identifierListUniqueByPatientId);
             }
         } else {
-                filteredMolecularProfileCaseSets = molecularProfileCaseSets;
+            filteredMolecularProfileCaseSets = molecularProfileCaseSets;
         }
         List<GenericAssayEnrichment> genericAssayEnrichments = expressionEnrichmentUtil.getEnrichments(molecularProfile,
-                filteredMolecularProfileCaseSets, enrichmentType, maItr);
+            filteredMolecularProfileCaseSets, enrichmentType, maItr);
         List<String> getGenericAssayStableIds = genericAssayEnrichments.stream()
-                .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
+            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
         Map<String, GenericAssayMeta> genericAssayMetaByStableId = genericAssayService
-                .getGenericAssayMetaByStableIdsAndMolecularIds(getGenericAssayStableIds,
-                        getGenericAssayStableIds.stream().map(stableId -> molecularProfileId)
-                                .collect(Collectors.toList()),
-                        "SUMMARY")
-                .stream().collect(Collectors.toMap(GenericAssayMeta::getStableId, Function.identity()));
+            .getGenericAssayMetaByStableIdsAndMolecularIds(getGenericAssayStableIds,
+                getGenericAssayStableIds.stream().map(stableId -> molecularProfileId)
+                    .collect(Collectors.toList()),
+                "SUMMARY")
+            .stream().collect(Collectors.toMap(GenericAssayMeta::getStableId, Function.identity()));
         return genericAssayEnrichments.stream().map(enrichmentDatum -> {
             enrichmentDatum.setGenericEntityMetaProperties(
-                    genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
+                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
             return enrichmentDatum;
         }).collect(Collectors.toList());
     }
 
+    @Override
+    @Transactional(readOnly = true)
+    public List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
+        String molecularProfileId,
+        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException {
+
+        // Validate and fetch molecular profile
+        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, "BINARY");
+
+        // Get the molecular alterations for the provided profile
+        Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
+            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
+
+        // Filter the case sets based on molecular profile
+        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
+
+        // Obtain binary enrichments from the utility
+        List<GenericAssayBinaryEnrichment> genericAssayBinaryEnrichments = expressionEnrichmentUtil.getGenericAssayBinaryEnrichments(molecularProfile,
+            filteredMolecularProfileCaseSets, enrichmentType, maItr);
+
+        // Calculate q-values for enrichments
+        calcQValues(genericAssayBinaryEnrichments);
+
+        // Extract stable IDs from binary enrichments
+        List<String> getGenericAssayStableIds = genericAssayBinaryEnrichments.stream()
+            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
+
+        // Fetch metadata of generic assays by their stable IDs
+        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
+
+        // Assign meta properties to each enrichment
+        return genericAssayBinaryEnrichments.stream().map(enrichmentDatum -> {
+            enrichmentDatum.setGenericEntityMetaProperties(
+                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
+            return enrichmentDatum;
+        }).collect(Collectors.toList());
+    }
+
+    @Override
+    @Transactional(readOnly = true)
+    public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
+                                                                                         Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException {
+
+        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, "CATEGORICAL");
+
+        Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
+            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
+
+        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
+
+        List<GenericAssayCategoricalEnrichment> genericAssayCategoricalEnrichments = expressionEnrichmentUtil.getGenericAssayCategoricalEnrichments(molecularProfile,
+            filteredMolecularProfileCaseSets, enrichmentType, maItr);
+
+        calcQValues(genericAssayCategoricalEnrichments);
+
+        List<String> getGenericAssayStableIds = genericAssayCategoricalEnrichments.stream()
+            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
+        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
+
+        return genericAssayCategoricalEnrichments.stream().map(enrichmentDatum -> {
+            enrichmentDatum.setGenericEntityMetaProperties(
+                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
+            return enrichmentDatum;
+        }).collect(Collectors.toList());
+    }
+
+    private MolecularProfile getAndValidateMolecularProfile(String molecularProfileId, String dataType) throws MolecularProfileNotFoundException {
+        MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
+        validateMolecularProfile(molecularProfile, Arrays.asList(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY), dataType);
+        return molecularProfile;
+    }
 
     private void validateMolecularProfile(MolecularProfile molecularProfile,
-            List<MolecularAlterationType> validMolecularAlterationTypes) throws MolecularProfileNotFoundException {
+                                          List<MolecularProfile.MolecularAlterationType> validMolecularAlterationTypes,
+                                          String dataType) throws MolecularProfileNotFoundException {
         if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
+            // Check alteration type
             throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
         }
+        // Check datatype for binary or categorical
+        if(molecularProfile.getMolecularAlterationType().equals(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY) &&
+            !molecularProfile.getDatatype().equals(dataType))
+            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+    }
+
+    private Map<String, List<MolecularProfileCaseIdentifier>> filterMolecularProfileCaseSets(MolecularProfile molecularProfile, Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets) {
+        if (BooleanUtils.isTrue(molecularProfile.getPatientLevel())) {
+            // If patient level, filter duplicates by patient id
+            // For now we only support sample level for samples
+            List<String> sampleIds = molecularProfileCaseSets.values().stream().flatMap(Collection::stream).map(MolecularProfileCaseIdentifier::getCaseId).collect(Collectors.toList());
+            List<String> studyIds = Collections.nCopies(sampleIds.size(), molecularProfile.getCancerStudyIdentifier());
+            List<Sample> samples = sampleService.fetchSamples(studyIds, sampleIds, "ID");
+            Map<String, Integer> sampleIdToPatientIdMap = samples.stream().collect(Collectors.toMap(Sample::getStableId, Sample::getPatientId));
+
+            Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = new HashMap<>();
+            for (Map.Entry<String, List<MolecularProfileCaseIdentifier>> pair : molecularProfileCaseSets.entrySet()) {
+                Set<Integer> patientSet = new HashSet<Integer>();
+                List<MolecularProfileCaseIdentifier> identifierListUniqueByPatientId = new ArrayList<>();
+                for (MolecularProfileCaseIdentifier caseIdentifier : pair.getValue()) {
+                    if (!patientSet.contains(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()))) {
+                        identifierListUniqueByPatientId.add(caseIdentifier);
+                        patientSet.add(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()));
+                    }
+                }
+                filteredMolecularProfileCaseSets.put(pair.getKey(), identifierListUniqueByPatientId);
+            }
+            return filteredMolecularProfileCaseSets;
+        } else {
+            return molecularProfileCaseSets;
+        }
+    }
+
+    private Map<String, GenericAssayMeta> getGenericAssayMetaByStableId(List<String> stableIds, String molecularProfileId) {
+        return genericAssayService.getGenericAssayMetaByStableIdsAndMolecularIds(stableIds, stableIds.stream().map(sid -> molecularProfileId)
+                .collect(Collectors.toList()), "SUMMARY").stream()
+            .collect(Collectors.toMap(GenericAssayMeta::getStableId, Function.identity()));
     }
 
+    private <T extends GenericAssayEnrichment> void calcQValues(List<T> enrichments) {
+        // Sort enrichments by pValue
+        Collections.sort(enrichments, GenericAssayEnrichment::compare);
+        BigDecimal[] pValues = enrichments.stream().map(T::getpValue).toArray(BigDecimal[]::new);
+        BigDecimal[] qValues = fisherExactTestCalculator.calcqValue(pValues);
+        // Assign q-values to enrichments
+        for (int i = 0; i < enrichments.size(); i++) {
+            enrichments.get(i).setqValue(qValues[i]);
+        }
+    }
+    private void validateMolecularProfile(MolecularProfile molecularProfile,
+                                          List<MolecularAlterationType> validMolecularAlterationTypes) throws MolecularProfileNotFoundException {
+        if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
+            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+        }
+    }
 }u}(jSa  (79c4ace75a7d37995df135bdbf467389d08608adja  Oservice/src/main/java/org/cbioportal/service/util/ExpressionEnrichmentUtil.javaja  modifiedja  Mzja  Kja  MDja  https://github.com/cBioPortal/cbioportal/blob/901406f5182fcf4926da3388ec49692516b37aad/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FExpressionEnrichmentUtil.javaja  https://github.com/cBioPortal/cbioportal/raw/901406f5182fcf4926da3388ec49692516b37aad/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FExpressionEnrichmentUtil.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FExpressionEnrichmentUtil.java?ref=901406f5182fcf4926da3388ec49692516b37aadja  X*p  @@ -3,29 +3,36 @@
 import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.List;
+import java.util.HashMap;
 import java.util.Map;
+import java.util.Set;
+import java.util.List;
 import java.util.Map.Entry;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
 
-import org.apache.commons.lang3.math.NumberUtils;
-import org.apache.commons.math3.stat.StatUtils;
-import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
-import org.apache.commons.math3.stat.inference.OneWayAnova;
-import org.apache.commons.math3.stat.inference.TestUtils;
 import org.cbioportal.model.EnrichmentType;
 import org.cbioportal.model.ExpressionEnrichment;
 import org.cbioportal.model.GenericAssayEnrichment;
+import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
 import org.cbioportal.model.GenericAssayMolecularAlteration;
 import org.cbioportal.model.GenomicEnrichment;
 import org.cbioportal.model.GroupStatistics;
+import org.cbioportal.model.GenericAssayCountSummary;
 import org.cbioportal.model.MolecularAlteration;
 import org.cbioportal.model.MolecularProfile;
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
 import org.cbioportal.model.MolecularProfileSamples;
 import org.cbioportal.model.Sample;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.math.NumberUtils;
+import org.apache.commons.math3.stat.StatUtils;
+import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
+import org.apache.commons.math3.stat.inference.ChiSquareTest;
+import org.apache.commons.math3.stat.inference.OneWayAnova;
+import org.apache.commons.math3.stat.inference.TestUtils;
 import org.cbioportal.persistence.MolecularDataRepository;
 import org.cbioportal.service.SampleService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -34,199 +41,368 @@
 @Component
 public class ExpressionEnrichmentUtil {
 
-	@Autowired
-	private SampleService sampleService;
-	@Autowired
-	private MolecularDataRepository molecularDataRepository;
-
-	private static final double LOG2 = Math.log(2);
-	private static final String RNA_SEQ = "rna_seq";
-
-	public <T extends MolecularAlteration, S extends ExpressionEnrichment> List<S> getEnrichments(
-			MolecularProfile molecularProfile,
-			Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType,
-			Iterable<T> maItr) {
-		List<S> expressionEnrichments = new ArrayList<>();
-
-		Map<String, List<Integer>> groupIndicesMap = getGroupIndicesMap(molecularProfileCaseSets, enrichmentType,
-				molecularProfile);
-		for (MolecularAlteration ma : maItr) {
-
-			List<GroupStatistics> groupsStatistics = new ArrayList<GroupStatistics>();
-			// used for p-value calculation
-			List<double[]> groupedValues = new ArrayList<double[]>();
-
-			for (Entry<String, List<Integer>> group : groupIndicesMap.entrySet()) {
-
-				// get expression values to all the indices in the group
-				List<String> molecularDataValues = group.getValue().stream()
-						.map(sampleIndex -> ma.getSplitValues()[sampleIndex])
-						.filter(a -> NumberUtils.isNumber(a))
-						.collect(Collectors.toList());
-
-				// ignore group if there are less than 2 values
-				if (molecularDataValues.size() < 2) {
-					continue;
-				}
-
-				double[] values = getAlterationValues(molecularDataValues, molecularProfile.getStableId());
-
-				GroupStatistics groupStatistics = new GroupStatistics();
-				double alteredMean = StatUtils.mean(values);
-				double alteredStandardDeviation = calculateStandardDeviation(values);
-
-				// ignore if mean or standard deviation are not numbers
-				if (Double.isNaN(alteredMean) || Double.isNaN(alteredStandardDeviation)) {
-					continue;
-				}
-
-				groupedValues.add(values);
-				groupStatistics.setName(group.getKey());
-				groupStatistics.setMeanExpression(BigDecimal.valueOf(alteredMean));
-				groupStatistics.setStandardDeviation(BigDecimal.valueOf(alteredStandardDeviation));
-				groupsStatistics.add(groupStatistics);
-			}
-
-			// calculate p-value and add enrichment if atleast 2 groups have data
-			if (groupsStatistics.size() > 1) {
-				double pValue = calculatePValue(groupedValues);
-				if (Double.isNaN(pValue)) {
-					continue;
-				}
-				S expressionEnrichment = null;
-				if (ma instanceof GenericAssayMolecularAlteration) {
-					GenericAssayEnrichment genericAssayEnrichment = new GenericAssayEnrichment();
-					genericAssayEnrichment.setStableId(ma.getStableId());
-					expressionEnrichment = (S) genericAssayEnrichment;
-				} else {
-					GenomicEnrichment genomicEnrichment = new GenomicEnrichment();
-					genomicEnrichment.setEntrezGeneId(Integer.valueOf(ma.getStableId()));
-					expressionEnrichment = (S) genomicEnrichment;
-				}
-				expressionEnrichment.setpValue(BigDecimal.valueOf(pValue));
-				expressionEnrichment.setGroupsStatistics(groupsStatistics);
-				expressionEnrichments.add(expressionEnrichment);
-			}
-		}
-		return expressionEnrichments;
-	}
-
-	private double[] getAlterationValues(List<String> molecularDataValues, String molecularProfileId) {
-
-		if (molecularProfileId.contains(RNA_SEQ)) {
-			return molecularDataValues.stream().mapToDouble(d -> {
-				double datum = Double.parseDouble(d);
-				// reset to 0 if there are any negative values and then do log1p
-				return Math.log1p(datum < 0 ? 0 : datum) / LOG2;
-			}).toArray();
-		} else {
-			return molecularDataValues.stream().mapToDouble(g -> Double.parseDouble(g)).toArray();
-		}
-	}
-
-	private double calculatePValue(List<double[]> alteredValues) {
-
-		if (alteredValues.size() == 2) {
-			return TestUtils.tTest(alteredValues.get(0), alteredValues.get(1));
-		} else {
-			// calculate Anova statisitcs if there are more than 2 groups
-			OneWayAnova oneWayAnova = new OneWayAnova();
-			return oneWayAnova.anovaPValue(alteredValues);
-		}
-	}
-
-	private double calculateStandardDeviation(double[] values) {
-
-		DescriptiveStatistics descriptiveStatistics = new DescriptiveStatistics();
-		for (double value : values) {
-			descriptiveStatistics.addValue(value);
-		}
-		return descriptiveStatistics.getStandardDeviation();
-	}
-
-	/**
-	 * 
-	 * This method maps valid samples in molecularProfileCaseSets to indices in
-	 * genetic_alteration.VALUES column. Recall this column of the
-	 * genetic_alteration table is a comma separated list of scalar values. Each
-	 * value in this list is associated with a sample at the same position found in
-	 * the genetic_profile_samples.ORDERED_SAMPLE_LIST column.
-	 * 
-	 * @param molecularProfileCaseSets
-	 * @param enrichmentType
-	 * @param molecularProfile
-	 * @return
-	 */
-	private Map<String, List<Integer>> getGroupIndicesMap(
-			Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType,
-			MolecularProfile molecularProfile) {
-
-		MolecularProfileSamples commaSeparatedSampleIdsOfMolecularProfile = molecularDataRepository
-				.getCommaSeparatedSampleIdsOfMolecularProfile(molecularProfile.getStableId());
-
-		List<Integer> internalSampleIds = Arrays.stream(commaSeparatedSampleIdsOfMolecularProfile.getSplitSampleIds())
-				.mapToInt(Integer::parseInt).boxed().collect(Collectors.toList());
-
-		Map<Integer, Integer> internalSampleIdToIndexMap = IntStream.range(0, internalSampleIds.size()).boxed()
-				.collect(Collectors.toMap(internalSampleIds::get, Function.identity()));
-
-		Map<String, List<Integer>> selectedCaseIdToInternalIdsMap = getCaseIdToInternalIdsMap(molecularProfileCaseSets,
-				enrichmentType, molecularProfile);
-
-		// this block map caseIds(sampleIds or patientids) to sampleIndices which
-		// represents the position fount in the
-		// genetic_profile_samples.ORDERED_SAMPLE_LIST column
-		Map<String, List<Integer>> groupIndicesMap = molecularProfileCaseSets.entrySet().stream()
-				.collect(Collectors.toMap(entity -> entity.getKey(), entity -> {
-					List<Integer> sampleIndices = new ArrayList<>();
-					entity.getValue().forEach(molecularProfileCaseIdentifier -> {
-						// consider only valid samples
-						if (selectedCaseIdToInternalIdsMap.containsKey(molecularProfileCaseIdentifier.getCaseId())) {
-							List<Integer> sampleInternalIds = selectedCaseIdToInternalIdsMap
-									.get(molecularProfileCaseIdentifier.getCaseId());
-
-							// only consider samples which are profiled for the give molecular profile id
-							sampleInternalIds.forEach(sampleInternalId -> {
-								if (internalSampleIdToIndexMap.containsKey(sampleInternalId)) {
-									sampleIndices.add(internalSampleIdToIndexMap.get(sampleInternalId));
-								}
-							});
-						}
-					});
-					return sampleIndices;
-				}));
-		return groupIndicesMap;
-	}
-
-	private Map<String, List<Integer>> getCaseIdToInternalIdsMap(
-			Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType,
-			MolecularProfile molecularProfile) {
-
-		if (enrichmentType.equals(EnrichmentType.PATIENT)) {
-			List<String> patientIds = molecularProfileCaseSets.values().stream()
-					.flatMap(molecularProfileCaseSet -> molecularProfileCaseSet.stream()
-							.map(MolecularProfileCaseIdentifier::getCaseId))
-					.collect(Collectors.toList());
-
-			List<Sample> samples = sampleService
-					.getAllSamplesOfPatientsInStudy(molecularProfile.getCancerStudyIdentifier(), patientIds, "SUMMARY");
-
-			return samples.stream().collect(Collectors.groupingBy(Sample::getPatientStableId,
-					Collectors.mapping(Sample::getInternalId, Collectors.toList())));
-		} else {
-			List<String> sampleIds = new ArrayList<>();
-			List<String> studyIds = new ArrayList<>();
-
-			molecularProfileCaseSets.values().forEach(molecularProfileCaseIdentifiers -> {
-				molecularProfileCaseIdentifiers.forEach(molecularProfileCaseIdentifier -> {
-					sampleIds.add(molecularProfileCaseIdentifier.getCaseId());
-					studyIds.add(molecularProfile.getCancerStudyIdentifier());
-				});
-			});
-			List<Sample> samples = sampleService.fetchSamples(studyIds, sampleIds, "ID");
-
-			return samples.stream()
-					.collect(Collectors.toMap(Sample::getStableId, x -> Arrays.asList(x.getInternalId())));
-		}
-	}
-}
+    @Autowired
+    private SampleService sampleService;
+    @Autowired
+    private MolecularDataRepository molecularDataRepository;
+
+    private static final double LOG2 = Math.log(2);
+    private static final String RNA_SEQ = "rna_seq";
+    private static final String POS = "true";
+    private static final String NEG = "false";
+    private static final String ALTERED = "1";
+    private static final String UNALTERED = "0";
+    public <T extends MolecularAlteration, S extends ExpressionEnrichment> List<S> getEnrichments(
+        MolecularProfile molecularProfile,
+        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType,
+        Iterable<T> maItr) {
+        List<S> expressionEnrichments = new ArrayList<>();
+
+        Map<String, List<Integer>> groupIndicesMap = getGroupIndicesMap(molecularProfileCaseSets, enrichmentType,
+            molecularProfile);
+        for (MolecularAlteration ma : maItr) {
+            List<GroupStatistics> groupsStatistics = new ArrayList<GroupStatistics>();
+            // used for p-value calculation
+            List<double[]> groupedValues = new ArrayList<double[]>();
+
+            for (Entry<String, List<Integer>> group : groupIndicesMap.entrySet()) {
+
+                // get expression values to all the indices in the group
+                List<String> molecularDataValues = group.getValue().stream()
+                    .map(sampleIndex -> ma.getSplitValues()[sampleIndex])
+                    .filter(a -> NumberUtils.isNumber(a))
+                    .collect(Collectors.toList());
+
+                // ignore group if there are less than 2 values
+                if (molecularDataValues.size() < 2) {
+                    continue;
+                }
+
+                double[] values = getAlterationValues(molecularDataValues, molecularProfile.getStableId());
+
+                GroupStatistics groupStatistics = new GroupStatistics();
+                double alteredMean = StatUtils.mean(values);
+                double alteredStandardDeviation = calculateStandardDeviation(values);
+
+                // ignore if mean or standard deviation are not numbers
+                if (Double.isNaN(alteredMean) || Double.isNaN(alteredStandardDeviation)) {
+                    continue;
+                }
+
+                groupedValues.add(values);
+                groupStatistics.setName(group.getKey());
+                groupStatistics.setMeanExpression(BigDecimal.valueOf(alteredMean));
+                groupStatistics.setStandardDeviation(BigDecimal.valueOf(alteredStandardDeviation));
+                groupsStatistics.add(groupStatistics);
+            }
+
+            // calculate p-value and add enrichment if atleast 2 groups have data
+            if (groupsStatistics.size() > 1) {
+                double pValue = calculatePValue(groupedValues);
+                if (Double.isNaN(pValue)) {
+                    continue;
+                }
+                S expressionEnrichment = null;
+                if (ma instanceof GenericAssayMolecularAlteration) {
+                    GenericAssayEnrichment genericAssayEnrichment = new GenericAssayEnrichment();
+                    genericAssayEnrichment.setStableId(ma.getStableId());
+                    expressionEnrichment = (S) genericAssayEnrichment;
+                } else {
+                    GenomicEnrichment genomicEnrichment = new GenomicEnrichment();
+                    genomicEnrichment.setEntrezGeneId(Integer.valueOf(ma.getStableId()));
+                    expressionEnrichment = (S) genomicEnrichment;
+                }
+                expressionEnrichment.setpValue(BigDecimal.valueOf(pValue));
+                expressionEnrichment.setGroupsStatistics(groupsStatistics);
+                expressionEnrichments.add(expressionEnrichment);
+            }
+        }
+        return expressionEnrichments;
+    }
+
+    public <T extends MolecularAlteration, S extends ExpressionEnrichment> List<S> getGenericAssayCategoricalEnrichments(
+        MolecularProfile molecularProfile,
+        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType,
+        Iterable<T> maItr) {
+
+        List<S> expressionEnrichments = new ArrayList<>();
+        Map<String, Map<String, Integer>> groupCategoryStatistics = new HashMap<>();
+        Map<String, List<Integer>> groupIndicesMap = getGroupIndicesMap(molecularProfileCaseSets, enrichmentType,
+            molecularProfile);
+
+        for (MolecularAlteration ma : maItr) {
+            List<GroupStatistics> groupsStatistics = new ArrayList<GroupStatistics>();
+            for (Entry<String, List<Integer>> group : groupIndicesMap.entrySet()) {
+                // Get the corresponding split values for the group
+                List<String> groupValues = group.getValue().stream()
+                    .map(sampleIndex -> ma.getSplitValues()[sampleIndex])
+                    .collect(Collectors.toList());
+                // Group and count the split values
+                Map<String, Integer> groupedSplitValues = groupValues.stream()
+                    .collect(Collectors.toMap(Function.identity(), v -> 1, Integer::sum));
+
+                // ignore group if there are less than 2 values
+                if (groupValues.size() < 2) {
+                    continue;
+                }
+
+                GroupStatistics groupStatistics = new GroupStatistics();
+                groupStatistics.setName(group.getKey());
+                groupsStatistics.add(groupStatistics);
+                groupCategoryStatistics.put(group.getKey(), groupedSplitValues);
+            }
+
+            // calculate p-value and add enrichment if atleast 2 groups have data
+
+            if (groupsStatistics.size() > 1) {
+                long[][] array = getCategoricalValues(groupCategoryStatistics);
+                double pValue;
+                if(array[0].length <= 1) {
+                    pValue = 1;
+                } else {
+                    ChiSquareTest chiSquareTest = new ChiSquareTest();
+                    pValue = chiSquareTest.chiSquareTest(array);
+                }
+
+                // set p-value to 1 when the cases in all groups are altered
+                if (Double.isNaN(pValue)) {
+                    pValue = 1;
+                }
+
+                S expressionEnrichment = null;
+                GenericAssayCategoricalEnrichment genericAssayCategoricalEnrichment = new GenericAssayCategoricalEnrichment();
+                genericAssayCategoricalEnrichment.setStableId(ma.getStableId());
+                expressionEnrichment = (S) genericAssayCategoricalEnrichment;
+
+                expressionEnrichment.setpValue(BigDecimal.valueOf(pValue));
+                expressionEnrichment.setGroupsStatistics(groupsStatistics);
+                expressionEnrichments.add(expressionEnrichment);
+            }
+        }
+        return expressionEnrichments;
+    }
+
+    public <T extends MolecularAlteration, S extends ExpressionEnrichment> List<S> getGenericAssayBinaryEnrichments(
+        MolecularProfile molecularProfile,
+        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType,
+        Iterable<T> maItr) {
+        List<S> expressionEnrichments = new ArrayList<>();
+
+        Map<String, List<Integer>> groupIndicesMap = getGroupIndicesMap(molecularProfileCaseSets, enrichmentType,
+            molecularProfile);
+
+        for (MolecularAlteration ma : maItr) {
+            List<GenericAssayCountSummary> genericAssayCountSummaries = new ArrayList<>();
+            List<GroupStatistics> groupsStatistics = new ArrayList<GroupStatistics>();
+            // used for p-value calculation
+            List<double[]> groupedValues = new ArrayList<double[]>();
+
+            for (Entry<String, List<Integer>> group : groupIndicesMap.entrySet()) {
+                GenericAssayCountSummary genericAssayCountSummary = new GenericAssayCountSummary();
+                genericAssayCountSummary.setName(group.getKey());
+
+                // get expression values to all the indices in the group, filter NA and map binary values
+                List<String> molecularDataValues = group.getValue().stream()
+                    .map(sampleIndex -> ma.getSplitValues()[sampleIndex])
+                    .filter(StringUtils::isNotEmpty)
+                    .map(a -> a.equals(POS) ? ALTERED : UNALTERED)
+                    .collect(Collectors.toList());
+
+                // ignore group if there are less than 2 values
+                if (molecularDataValues.size() < 2) {
+                    continue;
+                }
+                genericAssayCountSummary.setTotalCount(molecularDataValues.size());
+
+                double[] values = getAlterationValues(molecularDataValues, molecularProfile.getStableId());
+                genericAssayCountSummary.setCount((int) Arrays.stream(values)
+                    .filter(num -> num == 1)
+                    .count());
+                GroupStatistics groupStatistics = new GroupStatistics();
+                double alteredMean = StatUtils.mean(values);
+                double alteredStandardDeviation = calculateStandardDeviation(values);
+
+                // ignore if mean or standard deviation are not numbers
+                if (Double.isNaN(alteredMean) || Double.isNaN(alteredStandardDeviation)) {
+                    continue;
+                }
+
+                groupedValues.add(values);
+                groupStatistics.setName(group.getKey());
+                groupStatistics.setMeanExpression(BigDecimal.valueOf(alteredMean));
+                groupStatistics.setStandardDeviation(BigDecimal.valueOf(alteredStandardDeviation));
+                groupsStatistics.add(groupStatistics);
+                genericAssayCountSummaries.add(genericAssayCountSummary);
+            }
+
+            // calculate p-value and add enrichment if atleast 2 groups have data
+            if (groupsStatistics.size() > 1) {
+
+                double pValue = calculatePValue(groupedValues);
+                if (Double.isNaN(pValue)) {
+                    continue;
+                }
+                S expressionEnrichment = null;
+                GenericAssayBinaryEnrichment genericAssayBinaryEnrichment = new GenericAssayBinaryEnrichment();
+                genericAssayBinaryEnrichment.setStableId(ma.getStableId());
+                genericAssayBinaryEnrichment.setCounts(genericAssayCountSummaries);
+                expressionEnrichment = (S) genericAssayBinaryEnrichment;
+
+                expressionEnrichment.setpValue(BigDecimal.valueOf(pValue));
+                expressionEnrichment.setGroupsStatistics(groupsStatistics);
+                expressionEnrichments.add(expressionEnrichment);
+            }
+        }
+        return expressionEnrichments;
+    }
+
+    private double[] getAlterationValues(List<String> molecularDataValues, String molecularProfileId) {
+
+        if (molecularProfileId.contains(RNA_SEQ)) {
+            return molecularDataValues.stream().mapToDouble(d -> {
+                double datum = Double.parseDouble(d);
+                // reset to 0 if there are any negative values and then do log1p
+                return Math.log1p(datum < 0 ? 0 : datum) / LOG2;
+            }).toArray();
+        } else {
+            return molecularDataValues.stream().mapToDouble(g -> Double.parseDouble(g)).toArray();
+        }
+    }
+
+    private long[][] getCategoricalValues(Map<String, Map<String, Integer>> groupCategoryStatistics) {
+        // Determine the number of rows and columns
+        int numRows = groupCategoryStatistics.size();
+        Set<String> allCategories = groupCategoryStatistics.values().stream()
+            .flatMap(innerMap -> innerMap.keySet().stream())
+            .collect(Collectors.toSet());
+        int numCols = allCategories.size();
+
+        // Create the 2-dimensional long array
+        long[][] array = new long[numRows][numCols];
+
+        // Iterate over the outer map (group -> categories)
+        List<String> groupKeys = new ArrayList<>(groupCategoryStatistics.keySet());
+        for (int row = 0; row < numRows; row++) {
+            String groupKey = groupKeys.get(row);
+            Map<String, Integer> innerMap = groupCategoryStatistics.get(groupKey);
+
+            // Iterate over all categories
+            List<String> categoryKeys = new ArrayList<>(allCategories);
+            for (int col = 0; col < numCols; col++) {
+                String categoryKey = categoryKeys.get(col);
+
+                // Get the count from the inner map, or set as zero if the category doesn't exist
+                int count = innerMap.getOrDefault(categoryKey, 0);
+                array[row][col] = count;
+            }
+        }
+        return array;
+    }
+
+    private double calculatePValue(List<double[]> alteredValues) {
+
+        if (alteredValues.size() == 2) {
+            return TestUtils.tTest(alteredValues.get(0), alteredValues.get(1));
+        } else {
+            // calculate Anova statisitcs if there are more than 2 groups
+            OneWayAnova oneWayAnova = new OneWayAnova();
+            return oneWayAnova.anovaPValue(alteredValues);
+        }
+    }
+
+    private double calculateStandardDeviation(double[] values) {
+
+        DescriptiveStatistics descriptiveStatistics = new DescriptiveStatistics();
+        for (double value : values) {
+            descriptiveStatistics.addValue(value);
+        }
+        return descriptiveStatistics.getStandardDeviation();
+    }
+
+    /**
+     *
+     * This method maps valid samples in molecularProfileCaseSets to indices in
+     * genetic_alteration.VALUES column. Recall this column of the
+     * genetic_alteration table is a comma separated list of scalar values. Each
+     * value in this list is associated with a sample at the same position found in
+     * the genetic_profile_samples.ORDERED_SAMPLE_LIST column.
+     *
+     * @param molecularProfileCaseSets
+     * @param enrichmentType
+     * @param molecularProfile
+     * @return
+     */
+    private Map<String, List<Integer>> getGroupIndicesMap(
+        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType,
+        MolecularProfile molecularProfile) {
+
+        MolecularProfileSamples commaSeparatedSampleIdsOfMolecularProfile = molecularDataRepository
+            .getCommaSeparatedSampleIdsOfMolecularProfile(molecularProfile.getStableId());
+
+        List<Integer> internalSampleIds = Arrays.stream(commaSeparatedSampleIdsOfMolecularProfile.getSplitSampleIds())
+            .mapToInt(Integer::parseInt).boxed().collect(Collectors.toList());
+
+        Map<Integer, Integer> internalSampleIdToIndexMap = IntStream.range(0, internalSampleIds.size()).boxed()
+            .collect(Collectors.toMap(internalSampleIds::get, Function.identity()));
+
+        Map<String, List<Integer>> selectedCaseIdToInternalIdsMap = getCaseIdToInternalIdsMap(molecularProfileCaseSets,
+            enrichmentType, molecularProfile);
+
+        // this block map caseIds(sampleIds or patientids) to sampleIndices which
+        // represents the position fount in the
+        // genetic_profile_samples.ORDERED_SAMPLE_LIST column
+        Map<String, List<Integer>> groupIndicesMap = molecularProfileCaseSets.entrySet().stream()
+            .collect(Collectors.toMap(entity -> entity.getKey(), entity -> {
+                List<Integer> sampleIndices = new ArrayList<>();
+                entity.getValue().forEach(molecularProfileCaseIdentifier -> {
+                    // consider only valid samples
+                    if (selectedCaseIdToInternalIdsMap.containsKey(molecularProfileCaseIdentifier.getCaseId())) {
+                        List<Integer> sampleInternalIds = selectedCaseIdToInternalIdsMap
+                            .get(molecularProfileCaseIdentifier.getCaseId());
+
+                        // only consider samples which are profiled for the give molecular profile id
+                        sampleInternalIds.forEach(sampleInternalId -> {
+                            if (internalSampleIdToIndexMap.containsKey(sampleInternalId)) {
+                                sampleIndices.add(internalSampleIdToIndexMap.get(sampleInternalId));
+                            }
+                        });
+                    }
+                });
+                return sampleIndices;
+            }));
+        return groupIndicesMap;
+    }
+
+    private Map<String, List<Integer>> getCaseIdToInternalIdsMap(
+        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType,
+        MolecularProfile molecularProfile) {
+
+        if (enrichmentType.equals(EnrichmentType.PATIENT)) {
+            List<String> patientIds = molecularProfileCaseSets.values().stream()
+                .flatMap(molecularProfileCaseSet -> molecularProfileCaseSet.stream()
+                    .map(MolecularProfileCaseIdentifier::getCaseId))
+                .collect(Collectors.toList());
+
+            List<Sample> samples = sampleService
+                .getAllSamplesOfPatientsInStudy(molecularProfile.getCancerStudyIdentifier(), patientIds, "SUMMARY");
+
+            return samples.stream().collect(Collectors.groupingBy(Sample::getPatientStableId,
+                Collectors.mapping(Sample::getInternalId, Collectors.toList())));
+        } else {
+            List<String> sampleIds = new ArrayList<>();
+            List<String> studyIds = new ArrayList<>();
+
+            molecularProfileCaseSets.values().forEach(molecularProfileCaseIdentifiers -> {
+                molecularProfileCaseIdentifiers.forEach(molecularProfileCaseIdentifier -> {
+                    sampleIds.add(molecularProfileCaseIdentifier.getCaseId());
+                    studyIds.add(molecularProfile.getCancerStudyIdentifier());
+                });
+            });
+            List<Sample> samples = sampleService.fetchSamples(studyIds, sampleIds, "ID");
+
+            return samples.stream()
+                .collect(Collectors.toMap(Sample::getStableId, x -> Arrays.asList(x.getInternalId())));
+        }
+    }
+
+}
\ No newline at end of fileuA	     }(jSa  (150fb3701781a7e23cd5884953a72f98c0c6b57aja  Pservice/src/main/java/org/cbioportal/service/util/FisherExactTestCalculator.javaja  modifiedja  K'ja  Kja  K,ja  https://github.com/cBioPortal/cbioportal/blob/901406f5182fcf4926da3388ec49692516b37aad/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javaja  https://github.com/cBioPortal/cbioportal/raw/901406f5182fcf4926da3388ec49692516b37aad/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.java?ref=901406f5182fcf4926da3388ec49692516b37aadja  X%  @@ -2,6 +2,8 @@
 
 import org.springframework.stereotype.Component;
 
+import java.math.BigDecimal;
+
 @Component
 public class FisherExactTestCalculator {
 
@@ -40,9 +42,9 @@ public double getCumulativePValue(int a, int b, int c, int d) {
         }
         return p;
     }
-
+    
     public double getTwoTailedPValue(int a, int b, int c, int d) {
-        
+
         int min, i;
         int n = a + b + c + d;
         double p = 0;
@@ -60,10 +62,10 @@ public double getTwoTailedPValue(int a, int b, int c, int d) {
 //         frequencies, of obtaining exactly the frequencies observed and any configuration more extreme.
 //         By "more extreme," we mean any configuration (given observed marginals) with a smaller probability of
 //         occurrence in the same direction (one-tailed) or in both directions (two-tailed).
-        
+
         int initialA = a, initialB = b, initialC = c, initialD = d;
         p += baseP;
-        
+
         min = (c < b) ? c : b;
         for (i = 0; i < min; i++) {
             double tempP = getPValue(++a, --b, --c, ++d, f);
@@ -77,7 +79,7 @@ public double getTwoTailedPValue(int a, int b, int c, int d) {
         b = initialB;
         c = initialC;
         d = initialD;
-        
+
         min = (a < d) ? a : d;
         for (i = 0; i < min; i++) {
             double pTemp = getPValue(--a, ++b, ++c, --d, f);
@@ -87,4 +89,36 @@ public double getTwoTailedPValue(int a, int b, int c, int d) {
         }
         return p;
     }
+    public BigDecimal[] calcqValue(BigDecimal[] pValuesInIncreasingOrder) {
+        BigDecimal cachedElement = BigDecimal.valueOf(0.0);
+        int dataLength = pValuesInIncreasingOrder.length;
+        BigDecimal[]  reversedQValues = new BigDecimal[dataLength];
+
+        reverseValues(dataLength, pValuesInIncreasingOrder);
+
+        for (int i = 0; i < dataLength; i++) {
+            if (i > 0) {
+                BigDecimal calculatedValue = cachedElement.min(
+                    (pValuesInIncreasingOrder[i].multiply(new BigDecimal(dataLength))).divide(new BigDecimal(dataLength - i), BigDecimal.ROUND_HALF_UP)
+                );
+                cachedElement = calculatedValue;
+                reversedQValues[i] = calculatedValue;
+            } else {
+                cachedElement = pValuesInIncreasingOrder[i];
+                reversedQValues[i] = pValuesInIncreasingOrder[i];
+            }
+        }
+
+        reverseValues(dataLength, reversedQValues);
+
+        return reversedQValues;
+    }
+
+    private void reverseValues(int dataLength, BigDecimal[]  reversedQValues) {
+        for (int i = 0; i < dataLength / 2; i++) {
+            BigDecimal temp = reversedQValues[i];
+            reversedQValues[i] = reversedQValues[dataLength - i - 1];
+            reversedQValues[dataLength - i - 1] = temp;
+        }
+    }
 }u}(jSa  (a777176e26ad028ead7bdd29894c4d5c16aaed87ja  Zservice/src/test/java/org/cbioportal/service/impl/ExpressionEnrichmentServiceImplTest.javaja  modifiedja  Kja  Kja  Kja  https://github.com/cBioPortal/cbioportal/blob/901406f5182fcf4926da3388ec49692516b37aad/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImplTest.javaja  https://github.com/cBioPortal/cbioportal/raw/901406f5182fcf4926da3388ec49692516b37aad/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImplTest.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImplTest.java?ref=901406f5182fcf4926da3388ec49692516b37aadja  XL  @@ -207,7 +207,7 @@ public void getGenomicEnrichments() throws Exception {
     }
 
     @Test
-    public void getGenericAssayEnrichments() throws Exception {
+    public void getGenericAssayNumericalEnrichments() throws Exception {
         geneMolecularProfile.setMolecularAlterationType(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY);
 
         List<GenericAssayMolecularAlteration> molecularDataList = new ArrayList<GenericAssayMolecularAlteration>();
@@ -229,7 +229,7 @@ public void getGenericAssayEnrichments() throws Exception {
                 .thenReturn(Arrays.asList(new GenericAssayMeta(HUGO_GENE_SYMBOL_1),
                         new GenericAssayMeta(HUGO_GENE_SYMBOL_2)));
 
-        List<GenericAssayEnrichment> result = enrichmentServiceImpl.getGenericAssayEnrichments(MOLECULAR_PROFILE_ID,
+        List<GenericAssayEnrichment> result = enrichmentServiceImpl.getGenericAssayNumericalEnrichments(MOLECULAR_PROFILE_ID,
                 molecularProfileCaseSets, EnrichmentType.SAMPLE);
 
         Assert.assertEquals(2, result.size());
@@ -301,7 +301,7 @@ public void getGenericAssayPatientLevelEnrichments() throws Exception {
 
         Mockito.when(sampleService.fetchSamples(Arrays.asList(STUDY_ID, STUDY_ID, STUDY_ID, STUDY_ID, STUDY_ID), Arrays.asList(SAMPLE_ID3, SAMPLE_ID4, SAMPLE_ID5, SAMPLE_ID1, SAMPLE_ID2), "ID")).thenReturn(samples);
 
-        List<GenericAssayEnrichment> result = enrichmentServiceImpl.getGenericAssayEnrichments(MOLECULAR_PROFILE_ID, molecularProfilePatientLevelCaseSets, EnrichmentType.SAMPLE);
+        List<GenericAssayEnrichment> result = enrichmentServiceImpl.getGenericAssayNumericalEnrichments(MOLECULAR_PROFILE_ID, molecularProfilePatientLevelCaseSets, EnrichmentType.SAMPLE);
 
         Assert.assertEquals(2, result.size());
         GenericAssayEnrichment genericAssayEnrichment = result.get(0);u}(jSa  (017a5ab005ff8e170b4aa7ce9ab2ec1652d4dba4ja  \service/src/test/java/org/cbioportal/service/impl/GenericAssayEnrichmentServiceImplTest.javaja  addedja  Mja  K ja  Mja  https://github.com/cBioPortal/cbioportal/blob/901406f5182fcf4926da3388ec49692516b37aad/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.javaja  https://github.com/cBioPortal/cbioportal/raw/901406f5182fcf4926da3388ec49692516b37aad/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.java?ref=901406f5182fcf4926da3388ec49692516b37aadja  X:  @@ -0,0 +1,272 @@
+package org.cbioportal.service.impl;
+
+import org.cbioportal.model.meta.GenericAssayMeta;
+import org.cbioportal.model.EnrichmentType;
+import org.cbioportal.model.MolecularProfileCaseIdentifier;
+import org.cbioportal.model.MolecularProfile;
+import org.cbioportal.model.MolecularProfileSamples;
+import org.cbioportal.model.CancerStudy;
+import org.cbioportal.model.ReferenceGenome;
+import org.cbioportal.model.Sample;
+import org.cbioportal.model.GenericAssayMolecularAlteration;
+import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
+import org.cbioportal.model.GroupStatistics;
+
+import org.cbioportal.persistence.MolecularDataRepository;
+import org.cbioportal.service.GenericAssayService;
+import org.cbioportal.service.MolecularProfileService;
+import org.cbioportal.service.SampleService;
+import org.cbioportal.service.exception.MolecularProfileNotFoundException;
+import org.cbioportal.service.util.ExpressionEnrichmentUtil;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.Spy;
+import org.mockito.junit.MockitoJUnitRunner;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+
+@RunWith(MockitoJUnitRunner.class)
+public class GenericAssayEnrichmentServiceImplTest extends BaseServiceImplTest{
+    @InjectMocks
+    private ExpressionEnrichmentServiceImpl expressionEnrichmentServiceImpl;
+    @Mock
+    private SampleService sampleService;
+    @Mock
+    private MolecularProfileService molecularProfileService;
+    @Mock
+    private MolecularDataRepository molecularDataRepository;
+
+    @Mock
+    private GenericAssayService genericAssayService;
+
+    @Spy
+    @InjectMocks
+    private ExpressionEnrichmentUtil expressionEnrichmentUtil;
+
+    CancerStudy cancerStudy = new CancerStudy();
+    MolecularProfile geneMolecularProfile = new MolecularProfile();
+    MolecularProfileSamples molecularProfileSamples = new MolecularProfileSamples();
+    List<Sample> samples = new ArrayList<>();
+    Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets = new HashMap<>();
+    Map<String, List<MolecularProfileCaseIdentifier>> molecularProfilePatientLevelCaseSets = new HashMap<>();
+    // patient level only data
+    public static final String SAMPLE_ID5 = "sample_id5";
+
+
+    @Before
+    public void setup() throws MolecularProfileNotFoundException {
+        cancerStudy.setReferenceGenome(ReferenceGenome.HOMO_SAPIENS_DEFAULT_GENOME_NAME);
+        cancerStudy.setCancerStudyIdentifier(STUDY_ID);
+
+        geneMolecularProfile.setCancerStudyIdentifier(STUDY_ID);
+        geneMolecularProfile.setStableId(MOLECULAR_PROFILE_ID);
+
+        geneMolecularProfile.setCancerStudy(cancerStudy);
+
+        molecularProfileSamples.setMolecularProfileId(MOLECULAR_PROFILE_ID);
+        molecularProfileSamples.setCommaSeparatedSampleIds("1,2,3,4");
+
+        Sample sample1 = new Sample();
+        sample1.setStableId(SAMPLE_ID1);
+        sample1.setInternalId(1);
+        sample1.setCancerStudyIdentifier(STUDY_ID);
+        sample1.setPatientId(1);
+        samples.add(sample1);
+        Sample sample2 = new Sample();
+        sample2.setStableId(SAMPLE_ID2);
+        sample2.setInternalId(2);
+        sample2.setCancerStudyIdentifier(STUDY_ID);
+        sample2.setPatientId(2);
+        samples.add(sample2);
+        Sample sample3 = new Sample();
+        sample3.setStableId(SAMPLE_ID3);
+        sample3.setInternalId(3);
+        sample3.setCancerStudyIdentifier(STUDY_ID);
+        sample3.setPatientId(3);
+        samples.add(sample3);
+        Sample sample4 = new Sample();
+        sample4.setStableId(SAMPLE_ID4);
+        sample4.setInternalId(4);
+        sample4.setCancerStudyIdentifier(STUDY_ID);
+        sample4.setPatientId(4);
+        samples.add(sample4);
+
+        List<MolecularProfileCaseIdentifier> alteredSampleIdentifieres = new ArrayList<>();
+        List<MolecularProfileCaseIdentifier> unalteredSampleIdentifieres = new ArrayList<>();
+        List<MolecularProfileCaseIdentifier> unalteredPatientLevelSampleIdentifieres = new ArrayList<>();
+
+        MolecularProfileCaseIdentifier caseIdentifier1 = new MolecularProfileCaseIdentifier();
+        caseIdentifier1.setMolecularProfileId(MOLECULAR_PROFILE_ID);
+        caseIdentifier1.setCaseId(SAMPLE_ID1);
+        alteredSampleIdentifieres.add(caseIdentifier1);
+
+        MolecularProfileCaseIdentifier caseIdentifier2 = new MolecularProfileCaseIdentifier();
+        caseIdentifier2.setMolecularProfileId(MOLECULAR_PROFILE_ID);
+        caseIdentifier2.setCaseId(SAMPLE_ID2);
+        alteredSampleIdentifieres.add(caseIdentifier2);
+
+        MolecularProfileCaseIdentifier caseIdentifier3 = new MolecularProfileCaseIdentifier();
+        caseIdentifier3.setMolecularProfileId(MOLECULAR_PROFILE_ID);
+        caseIdentifier3.setCaseId(SAMPLE_ID3);
+        unalteredSampleIdentifieres.add(caseIdentifier3);
+        unalteredPatientLevelSampleIdentifieres.add(caseIdentifier3);
+
+        MolecularProfileCaseIdentifier caseIdentifier4 = new MolecularProfileCaseIdentifier();
+        caseIdentifier4.setMolecularProfileId(MOLECULAR_PROFILE_ID);
+        caseIdentifier4.setCaseId(SAMPLE_ID4);
+        unalteredSampleIdentifieres.add(caseIdentifier4);
+        unalteredPatientLevelSampleIdentifieres.add(caseIdentifier4);
+
+        // patient level only data
+        MolecularProfileCaseIdentifier caseIdentifier5 = new MolecularProfileCaseIdentifier();
+        caseIdentifier5.setMolecularProfileId(MOLECULAR_PROFILE_ID);
+        caseIdentifier5.setCaseId(SAMPLE_ID5);
+        unalteredPatientLevelSampleIdentifieres.add(caseIdentifier5);
+
+        molecularProfileCaseSets.put("altered samples", alteredSampleIdentifieres);
+        molecularProfileCaseSets.put("unaltered samples", unalteredSampleIdentifieres);
+        molecularProfilePatientLevelCaseSets.put("altered samples", alteredSampleIdentifieres);
+        molecularProfilePatientLevelCaseSets.put("unaltered samples", unalteredPatientLevelSampleIdentifieres);
+
+        Mockito.when(molecularProfileService.getMolecularProfile(MOLECULAR_PROFILE_ID))
+            .thenReturn(geneMolecularProfile);
+
+        Mockito.when(molecularDataRepository.getCommaSeparatedSampleIdsOfMolecularProfile(MOLECULAR_PROFILE_ID))
+            .thenReturn(molecularProfileSamples);
+
+        Mockito.when(sampleService.fetchSamples(Arrays.asList(STUDY_ID, STUDY_ID, STUDY_ID, STUDY_ID),
+            Arrays.asList(SAMPLE_ID3, SAMPLE_ID4, SAMPLE_ID1, SAMPLE_ID2), "ID")).thenReturn(samples);
+    }
+    
+    @Test
+    public void getGenericAssayBinaryEnrichments() throws Exception {
+        geneMolecularProfile.setMolecularAlterationType(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY);
+        geneMolecularProfile.setDatatype("BINARY");
+        List<GenericAssayMolecularAlteration> molecularDataList = new ArrayList<GenericAssayMolecularAlteration>();
+        GenericAssayMolecularAlteration genericAssayMolecularAlteration1 = new GenericAssayMolecularAlteration();
+        genericAssayMolecularAlteration1.setGenericAssayStableId(HUGO_GENE_SYMBOL_1);
+
+        // here are 2 groups
+        genericAssayMolecularAlteration1.setValues("true,true,true,false");
+        molecularDataList.add(genericAssayMolecularAlteration1);
+
+        GenericAssayMolecularAlteration genericAssayMolecularAlteration2 = new GenericAssayMolecularAlteration();
+        genericAssayMolecularAlteration2.setGenericAssayStableId(HUGO_GENE_SYMBOL_2);
+        genericAssayMolecularAlteration2.setValues("true,false,false,true");
+        molecularDataList.add(genericAssayMolecularAlteration2);
+        Mockito.when(molecularDataRepository.getGenericAssayMolecularAlterationsIterable(MOLECULAR_PROFILE_ID, null,
+            "SUMMARY")).thenReturn(molecularDataList);
+
+        Mockito.when(genericAssayService.getGenericAssayMetaByStableIdsAndMolecularIds(
+                Arrays.asList(HUGO_GENE_SYMBOL_1, HUGO_GENE_SYMBOL_2),
+                Arrays.asList(MOLECULAR_PROFILE_ID, MOLECULAR_PROFILE_ID), "SUMMARY"))
+            .thenReturn(Arrays.asList(new GenericAssayMeta(HUGO_GENE_SYMBOL_1),
+                new GenericAssayMeta(HUGO_GENE_SYMBOL_2)));
+
+        List<GenericAssayBinaryEnrichment> result = expressionEnrichmentServiceImpl.getGenericAssayBinaryEnrichments(MOLECULAR_PROFILE_ID,
+            molecularProfileCaseSets, EnrichmentType.SAMPLE);
+
+        Assert.assertEquals(2, result.size());
+        GenericAssayBinaryEnrichment genericAssayBinaryEnrichment = result.get(0);
+        Assert.assertEquals(HUGO_GENE_SYMBOL_1, genericAssayBinaryEnrichment.getStableId());
+        Assert.assertEquals(2, genericAssayBinaryEnrichment.getGroupsStatistics().size());
+
+        GroupStatistics unalteredGroupStats = genericAssayBinaryEnrichment.getGroupsStatistics().get(0);
+        Assert.assertEquals("unaltered samples", unalteredGroupStats.getName());
+        Assert.assertEquals(new BigDecimal("0.5"), unalteredGroupStats.getMeanExpression());
+        Assert.assertEquals(new BigDecimal("0.7071067811865476"), unalteredGroupStats.getStandardDeviation());
+
+        GroupStatistics alteredGroupStats = genericAssayBinaryEnrichment.getGroupsStatistics().get(1);
+        Assert.assertEquals("altered samples", alteredGroupStats.getName());
+        Assert.assertEquals(new BigDecimal("1.0"), alteredGroupStats.getMeanExpression());
+        Assert.assertEquals(new BigDecimal("0.0"), alteredGroupStats.getStandardDeviation());
+
+        Assert.assertEquals(new BigDecimal("0.49999999999999983"), genericAssayBinaryEnrichment.getpValue());
+        Assert.assertEquals(new BigDecimal("0.99999999999999966"), genericAssayBinaryEnrichment.getqValue());
+
+        genericAssayBinaryEnrichment = result.get(1);
+        Assert.assertEquals(HUGO_GENE_SYMBOL_2, genericAssayBinaryEnrichment.getStableId());
+        Assert.assertEquals(2, genericAssayBinaryEnrichment.getGroupsStatistics().size());
+
+        unalteredGroupStats = genericAssayBinaryEnrichment.getGroupsStatistics().get(0);
+        Assert.assertEquals("unaltered samples", unalteredGroupStats.getName());
+        Assert.assertEquals(new BigDecimal("0.5"), unalteredGroupStats.getMeanExpression());
+        Assert.assertEquals(new BigDecimal("0.7071067811865476"), unalteredGroupStats.getStandardDeviation());
+
+        alteredGroupStats = genericAssayBinaryEnrichment.getGroupsStatistics().get(1);
+        Assert.assertEquals("altered samples", alteredGroupStats.getName());
+        Assert.assertEquals(new BigDecimal("0.5"), alteredGroupStats.getMeanExpression());
+        Assert.assertEquals(new BigDecimal("0.7071067811865476"), alteredGroupStats.getStandardDeviation());
+
+        Assert.assertEquals(new BigDecimal("1.0"), genericAssayBinaryEnrichment.getpValue());
+        Assert.assertEquals(new BigDecimal("1.0"), genericAssayBinaryEnrichment.getqValue());
+    }
+
+
+    @Test
+    public void getGenericAssayCategoricalEnrichments() throws MolecularProfileNotFoundException {
+        geneMolecularProfile.setMolecularAlterationType(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY);
+        geneMolecularProfile.setDatatype("CATEGORICAL");
+        List<GenericAssayMolecularAlteration> molecularDataList = new ArrayList<GenericAssayMolecularAlteration>();
+        GenericAssayMolecularAlteration genericAssayMolecularAlteration1 = new GenericAssayMolecularAlteration();
+        genericAssayMolecularAlteration1.setGenericAssayStableId(HUGO_GENE_SYMBOL_1);
+        genericAssayMolecularAlteration1.setValues("category1,category1,category2,category2");
+        molecularDataList.add(genericAssayMolecularAlteration1);
+
+        GenericAssayMolecularAlteration genericAssayMolecularAlteration2 = new GenericAssayMolecularAlteration();
+        genericAssayMolecularAlteration2.setGenericAssayStableId(HUGO_GENE_SYMBOL_2);
+        genericAssayMolecularAlteration2.setValues("category2,category2,category1,category1");
+        molecularDataList.add(genericAssayMolecularAlteration2);
+        Mockito.when(molecularDataRepository.getGenericAssayMolecularAlterationsIterable(MOLECULAR_PROFILE_ID, null,
+            "SUMMARY")).thenReturn(molecularDataList);
+
+        Mockito.when(genericAssayService.getGenericAssayMetaByStableIdsAndMolecularIds(
+                Arrays.asList(HUGO_GENE_SYMBOL_1, HUGO_GENE_SYMBOL_2),
+                Arrays.asList(MOLECULAR_PROFILE_ID, MOLECULAR_PROFILE_ID), "SUMMARY"))
+            .thenReturn(Arrays.asList(new GenericAssayMeta(HUGO_GENE_SYMBOL_1),
+                new GenericAssayMeta(HUGO_GENE_SYMBOL_2)));
+
+        List<GenericAssayCategoricalEnrichment> result = expressionEnrichmentServiceImpl.getGenericAssayCategoricalEnrichments(MOLECULAR_PROFILE_ID,
+            molecularProfileCaseSets, EnrichmentType.SAMPLE);
+
+        Assert.assertEquals(2, result.size());
+        GenericAssayCategoricalEnrichment genericAssayCategoricalEnrichment = result.get(0);
+        Assert.assertEquals(HUGO_GENE_SYMBOL_1, genericAssayCategoricalEnrichment.getStableId());
+        Assert.assertEquals(2, genericAssayCategoricalEnrichment.getGroupsStatistics().size());
+
+        GroupStatistics unalteredGroupStats = genericAssayCategoricalEnrichment.getGroupsStatistics().get(0);
+        Assert.assertEquals("unaltered samples", unalteredGroupStats.getName());
+
+        GroupStatistics alteredGroupStats = genericAssayCategoricalEnrichment.getGroupsStatistics().get(1);
+        Assert.assertEquals("altered samples", alteredGroupStats.getName());
+
+        Assert.assertEquals(new BigDecimal("0.04550026389635764"), genericAssayCategoricalEnrichment.getpValue());
+        Assert.assertEquals(new BigDecimal("0.04550026389635764"), genericAssayCategoricalEnrichment.getqValue());
+
+        genericAssayCategoricalEnrichment = result.get(1);
+        Assert.assertEquals(HUGO_GENE_SYMBOL_2, genericAssayCategoricalEnrichment.getStableId());
+        Assert.assertEquals(2, genericAssayCategoricalEnrichment.getGroupsStatistics().size());
+
+        unalteredGroupStats = genericAssayCategoricalEnrichment.getGroupsStatistics().get(0);
+        Assert.assertEquals("unaltered samples", unalteredGroupStats.getName());
+
+        alteredGroupStats = genericAssayCategoricalEnrichment.getGroupsStatistics().get(1);
+        Assert.assertEquals("altered samples", alteredGroupStats.getName());
+
+        Assert.assertEquals(new BigDecimal("0.04550026389635764"), genericAssayCategoricalEnrichment.getpValue());
+        Assert.assertEquals(new BigDecimal("0.04550026389635764"), genericAssayCategoricalEnrichment.getqValue());
+    }
+
+}u}(jSa  (4072480eb1360b62043c2de3243ab71fc7d731e2ja  Hweb/src/main/java/org/cbioportal/web/ExpressionEnrichmentController.javaja  modifiedja  Kja  Kja  Kja  https://github.com/cBioPortal/cbioportal/blob/901406f5182fcf4926da3388ec49692516b37aad/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentController.javaja  https://github.com/cBioPortal/cbioportal/raw/901406f5182fcf4926da3388ec49692516b37aad/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentController.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentController.java?ref=901406f5182fcf4926da3388ec49692516b37aadja  X  @@ -95,7 +95,7 @@ private <S extends ExpressionEnrichment> List<S> fetchExpressionEnrichments(Enri
         }
 
         if (isRequestForGenericAssayEnrichments) {
-            return (List<S>) expressionEnrichmentService.getGenericAssayEnrichments(
+            return (List<S>) expressionEnrichmentService.getGenericAssayNumericalEnrichments(
                     molecularProfileIds.iterator().next(), groupCaseIdentifierSet, enrichmentType);
         }
         u}(jSa  (294c580582eec4d4b8de8b24d183acbed9b1118fja  Jweb/src/main/java/org/cbioportal/web/GenericAssayEnrichmentController.javaja  addedja  Ktja  K ja  Ktja  https://github.com/cBioPortal/cbioportal/blob/901406f5182fcf4926da3388ec49692516b37aad/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.javaja  https://github.com/cBioPortal/cbioportal/raw/901406f5182fcf4926da3388ec49692516b37aad/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.java?ref=901406f5182fcf4926da3388ec49692516b37aadja  X  @@ -0,0 +1,116 @@
+package org.cbioportal.web;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.cbioportal.model.EnrichmentType;
+import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
+import org.cbioportal.model.MolecularProfileCaseIdentifier;
+import org.cbioportal.service.ExpressionEnrichmentService;
+import org.cbioportal.service.exception.MolecularProfileNotFoundException;
+import org.cbioportal.web.config.annotation.InternalApi;
+import org.cbioportal.web.parameter.MolecularProfileCasesGroupFilter;
+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.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RequestAttribute;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.validation.Valid;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+@InternalApi
+@RestController
+@Validated
+@Api(tags = "Generic Assay Enrichment Data", description = " ")
+public class GenericAssayEnrichmentController {
+    @Autowired
+    private ExpressionEnrichmentService expressionEnrichmentService;
+
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @RequestMapping(value = "/generic-assay-categorical-enrichments/fetch",
+        method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE,
+        produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch generic assay categorical data enrichments in a molecular profile")
+    public ResponseEntity<List<GenericAssayCategoricalEnrichment>> fetchGenericAssayCategoricalDataEnrichmentInMultipleMolecularProfiles(
+        @ApiIgnore
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiParam("Type of the enrichment e.g. SAMPLE or PATIENT")
+        @RequestParam(defaultValue = "SAMPLE") EnrichmentType enrichmentType,
+        @ApiParam(required = true, value = "List of groups containing sample and molecular profile identifiers")
+        @Valid @RequestBody(required = false) List<MolecularProfileCasesGroupFilter> groups,
+        @ApiIgnore
+        @Valid @RequestAttribute(required = false, value = "interceptedMolecularProfileCasesGroupFilters") List<MolecularProfileCasesGroupFilter> interceptedMolecularProfileCasesGroupFilters)
+        throws MolecularProfileNotFoundException, UnsupportedOperationException {
+
+        return new ResponseEntity<>(fetchExpressionEnrichments(enrichmentType, interceptedMolecularProfileCasesGroupFilters),
+            HttpStatus.OK);
+    }
+
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @RequestMapping(value = "/generic-assay-binary-enrichments/fetch",
+        method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE,
+        produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch generic assay binary data enrichments in a molecular profile")
+    public ResponseEntity<List<GenericAssayBinaryEnrichment>> fetchGenericAssayBinaryDataEnrichmentInMultipleMolecularProfiles(
+        @ApiIgnore
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiParam("Type of the enrichment e.g. SAMPLE or PATIENT")
+        @RequestParam(defaultValue = "SAMPLE") EnrichmentType enrichmentType,
+        @ApiParam(required = true, value = "List of groups containing sample and molecular profile identifiers")
+        @Valid @RequestBody(required = false) List<MolecularProfileCasesGroupFilter> groups,
+        @ApiIgnore
+        @Valid @RequestAttribute(required = false, value = "interceptedMolecularProfileCasesGroupFilters") List<MolecularProfileCasesGroupFilter> interceptedMolecularProfileCasesGroupFilters)
+        throws MolecularProfileNotFoundException, UnsupportedOperationException {
+
+        Map<String, List<MolecularProfileCaseIdentifier>> groupCaseIdentifierSet = interceptedMolecularProfileCasesGroupFilters
+            .stream().collect(Collectors.toMap(MolecularProfileCasesGroupFilter::getName,
+                MolecularProfileCasesGroupFilter::getMolecularProfileCaseIdentifiers));
+
+        Set<String> molecularProfileIds = groupCaseIdentifierSet.values().stream()
+            .flatMap(molecularProfileCaseSet -> molecularProfileCaseSet.stream()
+                .map(MolecularProfileCaseIdentifier::getMolecularProfileId))
+            .collect(Collectors.toSet());
+
+        if (molecularProfileIds.size() > 1) {
+            throw new UnsupportedOperationException("Multi-study enrichments is not yet implemented");
+        }
+
+        return new ResponseEntity<>(
+            expressionEnrichmentService.getGenericAssayBinaryEnrichments(
+                molecularProfileIds.iterator().next(), groupCaseIdentifierSet, enrichmentType),
+            HttpStatus.OK);
+    }
+
+    private List<GenericAssayCategoricalEnrichment> fetchExpressionEnrichments(EnrichmentType enrichmentType,
+                                                                               List<MolecularProfileCasesGroupFilter> interceptedMolecularProfileCasesGroupFilters
+    ) throws MolecularProfileNotFoundException {
+        Map<String, List<MolecularProfileCaseIdentifier>> groupCaseIdentifierSet = interceptedMolecularProfileCasesGroupFilters
+            .stream().collect(Collectors.toMap(MolecularProfileCasesGroupFilter::getName,
+                MolecularProfileCasesGroupFilter::getMolecularProfileCaseIdentifiers));
+
+        Set<String> molecularProfileIds = groupCaseIdentifierSet.values().stream()
+            .flatMap(molecularProfileCaseSet -> molecularProfileCaseSet.stream()
+                .map(MolecularProfileCaseIdentifier::getMolecularProfileId))
+            .collect(Collectors.toSet());
+
+        if (molecularProfileIds.size() > 1) {
+            throw new UnsupportedOperationException("Multi-study expression enrichments is not yet implemented");
+        }
+        return expressionEnrichmentService.getGenericAssayCategoricalEnrichments(
+            molecularProfileIds.iterator().next(), groupCaseIdentifierSet, enrichmentType);
+    }
+}u}(jSa  (91720ee1f819695a41680c798e7c320a580a0fcaja  Vweb/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.javaja  modifiedja  Kja  Kja  Kja  https://github.com/cBioPortal/cbioportal/blob/901406f5182fcf4926da3388ec49692516b37aad/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaja  https://github.com/cBioPortal/cbioportal/raw/901406f5182fcf4926da3388ec49692516b37aad/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.java?ref=901406f5182fcf4926da3388ec49692516b37aadja  X  @@ -102,6 +102,8 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
     public static final String TREATMENTS_PATIENT_PATH = "/treatments/patient";
     public static final String TREATMENTS_SAMPLE_PATH = "/treatments/sample";
     public static final String GENERIC_ASSAY_ENRICHMENT_FETCH_PATH = "/generic-assay-enrichments/fetch";
+    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";
 
     @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
@@ -151,7 +153,9 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
         } else if (requestPathInfo.equals(MUTATION_ENRICHMENT_FETCH_PATH) ||
         		requestPathInfo.equals(COPY_NUMBER_ENRICHMENT_FETCH_PATH) ||
         		requestPathInfo.equals(EXPRESSION_ENRICHMENT_FETCH_PATH) ||
-        		requestPathInfo.equals(GENERIC_ASSAY_ENRICHMENT_FETCH_PATH)) {
+        		requestPathInfo.equals(GENERIC_ASSAY_ENRICHMENT_FETCH_PATH) ||
+                requestPathInfo.equals(GENERIC_ASSAY_CATEGORICAL_ENRICHMENT_FETCH_PATH) ||
+                requestPathInfo.equals(GENERIC_ASSAY_BINARY_ENRICHMENT_FETCH_PATH)) {
             return extractAttributesFromMolecularProfileCasesGroups(request);
         } else if (requestPathInfo.equals(ALTERATION_ENRICHMENT_FETCH_PATH)) {
             return extractAttributesFromMolecularProfileCasesGroupsAndAlterationTypes(request);u}(jSa  (0abe4a9e3ca0f467b635dfea91bbfcd5fe91a7d0ja  Lweb/src/test/java/org/cbioportal/web/ExpressionEnrichmentControllerTest.javaja  modifiedja  Kja  Kja  Kja  https://github.com/cBioPortal/cbioportal/blob/901406f5182fcf4926da3388ec49692516b37aad/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentControllerTest.javaja  https://github.com/cBioPortal/cbioportal/raw/901406f5182fcf4926da3388ec49692516b37aad/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentControllerTest.javaja  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FExpressionEnrichmentControllerTest.java?ref=901406f5182fcf4926da3388ec49692516b37aadja  Xt  @@ -186,7 +186,7 @@ public void fetchGenericAssayEnrichments() throws Exception {
         genericAssayEnrichment2.setpValue(TEST_P_VALUE_2);
         genericAssayEnrichments.add(genericAssayEnrichment2);
 
-        Mockito.when(expressionEnrichmentService.getGenericAssayEnrichments(Mockito.anyString(), Mockito.anyMap(),
+        Mockito.when(expressionEnrichmentService.getGenericAssayNumericalEnrichments(Mockito.anyString(), Mockito.anyMap(),
                 Mockito.any(EnrichmentType.class))).thenReturn(genericAssayEnrichments);
 
         mockMvc.perform(MockMvcRequestBuilders.post("/generic-assay-enrichments/fetch")ueu(49adca078e192f8bfde71270b47f6d4db3894e4d}(sha(49adca078e192f8bfde71270b47f6d4db3894e4dnode_idEC_kwDOAe-hB9oAKDQ5YWRjYTA3OGUxOTJmOGJmZGU3MTI3MGI0N2Y2ZDRkYjM4OTRlNGQcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-06-28T17:00:02Zu	committer}(j:b  GitHubj<b  noreply@github.comj>b  2023-06-28T17:00:02ZumessageLMerge pull request #10243 from cBioPortal/frontend-v5.3.13

Frontend v5.3.13tree}(j2b  (95a11a46970dceecfdec51eb4462965784e6c8d2urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/95a11a46970dceecfdec51eb4462965784e6c8d2ujJb  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/49adca078e192f8bfde71270b47f6d4db3894e4d
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJknGcSCRBK7hj4Ov3rIwAA2oUIAKaQbbDeq+fbY6Y9xA6YWOuY
+bz/dyyotbYM8nT+x62rEN05x1lxPqNCu0uMUyLp7H/a/hRcuA16l2bhgoWoEh/R
wZql7lD1gobdO62dSN2ASyVIT1ZqIbqLTNuorf3oHPbH4b5l22WckD5JHszxSz8S
0cNzsBJ3Unl699JeD3uroBfzztKngN2c7IB1IL5gIbPJdrJNXundFH7QiZX5UTAx
dQMQBeXdhqs9Tsp56rr8T713pnrLdv4vaLxmjancGdA20i40DZHpdbtI5xCUYpGR
aL+mo+rSAMkNjmREEIzd4Eg8DtC8Gz4JcbkRxolgIsViro1mk91OdstChZltal4=
=SDi2
-----END PGP SIGNATURE-----
payloadXe  tree 95a11a46970dceecfdec51eb4462965784e6c8d2
parent 670337a1e3c1655561947d10beac9aa551318e6a
parent 5b51b70049aa3aaaa555eebba577505bb92d3993
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1687971602 -0400
committer GitHub <noreply@github.com> 1687971602 -0400

Merge pull request #10243 from cBioPortal/frontend-v5.3.13

Frontend v5.3.13uujJb  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/49adca078e192f8bfde71270b47f6d4db3894e4dhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/49adca078e192f8bfde71270b47f6d4db3894e4dcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/49adca078e192f8bfde71270b47f6d4db3894e4d/commentsj8b  }(login
dippindotsidJtO j4b  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5jJb  'https://api.github.com/users/dippindotsjXb  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj@b  }(j]b  web-flowj_b  J/j4b  MDQ6VXNlcjE5ODY0NDQ3jab  4https://avatars.githubusercontent.com/u/19864447?v=4jcb  h5jJb  %https://api.github.com/users/web-flowjXb  https://github.com/web-flowjfb  /https://api.github.com/users/web-flow/followersjhb  <https://api.github.com/users/web-flow/following{/other_user}jjb  5https://api.github.com/users/web-flow/gists{/gist_id}jlb  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jnb  3https://api.github.com/users/web-flow/subscriptionsjpb  *https://api.github.com/users/web-flow/orgsjrb  +https://api.github.com/users/web-flow/reposjtb  6https://api.github.com/users/web-flow/events{/privacy}jvb  5https://api.github.com/users/web-flow/received_eventsjxb  Userjzb  uparents](}(j2b  (670337a1e3c1655561947d10beac9aa551318e6ajJb  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/670337a1e3c1655561947d10beac9aa551318e6ajXb  Xhttps://github.com/cBioPortal/cbioportal/commit/670337a1e3c1655561947d10beac9aa551318e6au}(j2b  (5b51b70049aa3aaaa555eebba577505bb92d3993jJb  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/5b51b70049aa3aaaa555eebba577505bb92d3993jXb  Xhttps://github.com/cBioPortal/cbioportal/commit/5b51b70049aa3aaaa555eebba577505bb92d3993uestats}(totalK	additionsK	deletionsKufiles]}(j2b  (56c2b78fed7d102a4b1ef778466b813e0963bbfefilenamepom.xmlstatusmodifiedjb  Kjb  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/49adca078e192f8bfde71270b47f6d4db3894e4d/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/49adca078e192f8bfde71270b47f6d4db3894e4d/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=49adca078e192f8bfde71270b47f6d4db3894e4dpatchXY  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.12</frontend.version>
+    <frontend.version>v5.3.13</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(d3715167893445fd181524f9c78c916f4215774b}(sha(d3715167893445fd181524f9c78c916f4215774bnode_idEC_kwDOAe-hB9oAKGQzNzE1MTY3ODkzNDQ1ZmQxODE1MjRmOWM3OGM5MTZmNDIxNTc3NGIcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-13T22:04:37Zu	committer}(jb  Djokovic0311jb  .55948986+Djokovic0311@users.noreply.github.comjb  2023-08-13T22:04:37Zumessagemodify expressionenrichmenttree}(jb  (5f85ab5cd378516b604a84e19cd1e79619bc4d7eurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/5f85ab5cd378516b604a84e19cd1e79619bc4d7eujb  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/d3715167893445fd181524f9c78c916f4215774b
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujb  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d3715167893445fd181524f9c78c916f4215774bhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/d3715167893445fd181524f9c78c916f4215774bcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/d3715167893445fd181524f9c78c916f4215774b/commentsjb  }(loginDjokovic0311idJUjb  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5jb  )https://api.github.com/users/Djokovic0311jb  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminujb  }(jb  Djokovic0311jb  JUjb  MDQ6VXNlcjU1OTQ4OTg2jb  4https://avatars.githubusercontent.com/u/55948986?v=4jb  h5jb  )https://api.github.com/users/Djokovic0311jb  https://github.com/Djokovic0311jb  3https://api.github.com/users/Djokovic0311/followersjb  @https://api.github.com/users/Djokovic0311/following{/other_user}jb  9https://api.github.com/users/Djokovic0311/gists{/gist_id}jb  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}jb  7https://api.github.com/users/Djokovic0311/subscriptionsjb  .https://api.github.com/users/Djokovic0311/orgsjb  /https://api.github.com/users/Djokovic0311/reposjb  :https://api.github.com/users/Djokovic0311/events{/privacy}jb  9https://api.github.com/users/Djokovic0311/received_eventsjb  Userjb  uparents]}(jb  (38911ab8bf7129a3da88bbc221a0727e8edf3458jb  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/38911ab8bf7129a3da88bbc221a0727e8edf3458jb  Xhttps://github.com/cBioPortal/cbioportal/commit/38911ab8bf7129a3da88bbc221a0727e8edf3458uastats}(totalK	additionsK	deletionsKufiles](}(jb  (d3c2a444bd8ba08264b678a96fce3344bd45fcc7filenameMservice/src/main/java/org/cbioportal/service/ExpressionEnrichmentService.javastatusmodifiedj
c  Kjc  KchangesK	blob_urlhttps://github.com/cBioPortal/cbioportal/blob/d3715167893445fd181524f9c78c916f4215774b/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/d3715167893445fd181524f9c78c916f4215774b/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.java?ref=d3715167893445fd181524f9c78c916f4215774bpatchX  @@ -3,19 +3,18 @@
 import java.util.List;
 import java.util.Map;
 
-import org.cbioportal.model.GenericAssayBinaryEnrichment;
-import org.cbioportal.model.GenericAssayCategoricalEnrichment;
+import org.cbioportal.model.EnrichmentType;
 import org.cbioportal.model.GenericAssayEnrichment;
 import org.cbioportal.model.GenomicEnrichment;
-import org.cbioportal.model.EnrichmentType;
-
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
+import org.cbioportal.model.GenericAssayBinaryEnrichment;
+import org.cbioportal.model.GenericAssayCategoricalEnrichment;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 
 public interface ExpressionEnrichmentService {
 
     List<GenomicEnrichment> getGenomicEnrichments(String molecularProfileId,
-                                                  Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+            Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
             throws MolecularProfileNotFoundException;
 
     List<GenericAssayEnrichment> getGenericAssayNumericalEnrichments(String molecularProfileId,u}(jb  (45eb9ae478ec5e52251ea8e073fc58bc5fbc2172jc  Vservice/src/main/java/org/cbioportal/service/impl/ExpressionEnrichmentServiceImpl.javajc  modifiedj
c  Kjc  Kjc  Kjc  https://github.com/cBioPortal/cbioportal/blob/d3715167893445fd181524f9c78c916f4215774b/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.javajc  https://github.com/cBioPortal/cbioportal/raw/d3715167893445fd181524f9c78c916f4215774b/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.javajc  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.java?ref=d3715167893445fd181524f9c78c916f4215774bjc  X  @@ -89,7 +89,7 @@ public List<GenomicEnrichment> getGenomicEnrichments(String molecularProfileId,
     // transaction needs to be setup here in order to return Iterable from
     // molecularDataRepository in getGenericAssayMolecularAlterationsIterable
     @Transactional(readOnly = true)
-    public List<GenericAssayEnrichment> getGenericAssayEnrichments(String molecularProfileId,
+    public List<GenericAssayEnrichment> getGenericAssayNumericalEnrichments(String molecularProfileId,
                                                                    Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
         throws MolecularProfileNotFoundException {
         MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
@@ -203,7 +203,7 @@ public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichm
             return enrichmentDatum;
         }).collect(Collectors.toList());
     }
-    
+
     private MolecularProfile getAndValidateMolecularProfile(String molecularProfileId, String dataType) throws MolecularProfileNotFoundException {
         MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
         validateMolecularProfile(molecularProfile, Arrays.asList(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY), dataType);
@@ -266,5 +266,10 @@ private <T extends GenericAssayEnrichment> void calcQValues(List<T> enrichments)
             enrichments.get(i).setqValue(qValues[i]);
         }
     }
-
+    private void validateMolecularProfile(MolecularProfile molecularProfile,
+                                          List<MolecularAlterationType> validMolecularAlterationTypes) throws MolecularProfileNotFoundException {
+        if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
+            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+        }
+    }
 }ueu(1ed61f4492cfc3ce49df355105cae20821305c23}(sha(1ed61f4492cfc3ce49df355105cae20821305c23node_idEC_kwDOAe-hB9oAKDFlZDYxZjQ0OTJjZmMzY2U0OWRmMzU1MTA1Y2FlMjA4MjEzMDVjMjMcommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-06-09T13:51:06Zu	committer}(j2c  
Bas Leenknegtj4c  basleenknegt@thehyve.nlj6c  2023-07-05T12:17:41Zumessage'Add unit tests for resolveEntrezGeneIdstree}(j*c  (f793a1517353f8caf726ce9357a5ec3f4b605820urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/f793a1517353f8caf726ce9357a5ec3f4b605820ujBc  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/1ed61f4492cfc3ce49df355105cae20821305c23
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujBc  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1ed61f4492cfc3ce49df355105cae20821305c23html_urlXhttps://github.com/cBioPortal/cbioportal/commit/1ed61f4492cfc3ce49df355105cae20821305c23comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/1ed61f4492cfc3ce49df355105cae20821305c23/commentsj0c  }(login
pvannieropidJa j,c  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5jBc  'https://api.github.com/users/pvannieropjNc  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminuj8c  }(jSc  BasLeejUc  J~2 j,c  MDQ6VXNlcjMzMjMwMDY=jWc  3https://avatars.githubusercontent.com/u/3323006?v=4jYc  h5jBc  #https://api.github.com/users/BasLeejNc  https://github.com/BasLeej\c  -https://api.github.com/users/BasLee/followersj^c  :https://api.github.com/users/BasLee/following{/other_user}j`c  3https://api.github.com/users/BasLee/gists{/gist_id}jbc  :https://api.github.com/users/BasLee/starred{/owner}{/repo}jdc  1https://api.github.com/users/BasLee/subscriptionsjfc  (https://api.github.com/users/BasLee/orgsjhc  )https://api.github.com/users/BasLee/reposjjc  4https://api.github.com/users/BasLee/events{/privacy}jlc  3https://api.github.com/users/BasLee/received_eventsjnc  Userjpc  uparents]}(j*c  (105661f497e54cd96518d1b5909bcdbc451e1033jBc  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/105661f497e54cd96518d1b5909bcdbc451e1033jNc  Xhttps://github.com/cBioPortal/cbioportal/commit/105661f497e54cd96518d1b5909bcdbc451e1033uastats}(totalK		additionsK	deletionsKufiles](}(j*c  (ced8b24d084912d7c9906626f3d68145a5dfc82dfilenameBweb/src/main/java/org/cbioportal/web/util/StudyViewFilterUtil.javastatusmodifiedjc  Kjc  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/1ed61f4492cfc3ce49df355105cae20821305c23/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/1ed61f4492cfc3ce49df355105cae20821305c23/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.java?ref=1ed61f4492cfc3ce49df355105cae20821305c23patchX  @@ -292,9 +292,7 @@ private Map<String, Integer> getStringIntegerMap(List<String> hugoGeneSymbols) {
         return symbolToEntrezGeneId;
     }
 
-    // TODO Pim test this logic.
-    // TODO Pim write test.
-    public List<StructVarFilterQuery> addEntrezGeneIds(List<StructVarFilterQuery> structVarQueries) {
+    public List<StructVarFilterQuery> resolveEntrezGeneIds(List<StructVarFilterQuery> structVarQueries) {
 
         List<String> hugoGeneSymbols = structVarQueries
             .stream()u}(j*c  (a03bfba5958b1100088129e30d5b83801824bcfdjc  Yweb/src/main/java/org/cbioportal/web/util/appliers/StructuralVariantSubFilterApplier.javajc  modifiedjc  Kjc  Kjc  Kjc  https://github.com/cBioPortal/cbioportal/blob/1ed61f4492cfc3ce49df355105cae20821305c23/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.javajc  https://github.com/cBioPortal/cbioportal/raw/1ed61f4492cfc3ce49df355105cae20821305c23/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.javajc  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.java?ref=1ed61f4492cfc3ce49df355105cae20821305c23jc  X  @@ -75,7 +75,7 @@ public List<SampleIdentifier> filter(List<SampleIdentifier> toFilter, StudyViewF
                         .map(SampleIdentifier::getSampleId)
                         .collect(Collectors.toList());
 
-                final List<StructVarFilterQuery> entrezIdEnhancedSvQueries = studyViewFilterUtil.addEntrezGeneIds(structVarQueries);
+                final List<StructVarFilterQuery> entrezIdEnhancedSvQueries = studyViewFilterUtil.resolveEntrezGeneIds(structVarQueries);
                 remainingSampleIdentifiers = structuralVariantService
                     .fetchStructuralVariantsByStructVarQueries(molecularProfileIds, sampleIds, entrezIdEnhancedSvQueries)
                     .stream()u}(j*c  (fc15795cf0df8da7ed65d5dea4e6572ef42a8852jc  ]web/src/test/java/org/cbioportal/web/util/appliers/StructuralVariantSubFilterApplierTest.javajc  modifiedjc  Kjc  Kjc  Kjc  https://github.com/cBioPortal/cbioportal/blob/1ed61f4492cfc3ce49df355105cae20821305c23/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.javajc  https://github.com/cBioPortal/cbioportal/raw/1ed61f4492cfc3ce49df355105cae20821305c23/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.javajc  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.java?ref=1ed61f4492cfc3ce49df355105cae20821305c23jc  X  @@ -21,7 +21,6 @@
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 
 import static org.mockito.ArgumentMatchers.anyList;
 import static org.mockito.ArgumentMatchers.eq;
@@ -86,7 +85,7 @@ public void setUp() throws Exception {
             createStructVar("5", ST_1_ID)
         );
         // Subsequently, return results for svA and svB queries.
-        when(studyViewFilterUtil.addEntrezGeneIds(anyList()))
+        when(studyViewFilterUtil.resolveEntrezGeneIds(anyList()))
             .thenReturn(svA, svB);
         when(structuralVariantService.fetchStructuralVariantsByStructVarQueries(anyList(), anyList(), anyList())
         ).thenReturn(structuralVariantsQuerySvA, structuralVariantsQuerySvB);ueu(8ab95bb77b9f498d8803985ca4bbd30f89c82db5}(sha(8ab95bb77b9f498d8803985ca4bbd30f89c82db5node_idEC_kwDOAe-hB9oAKDhhYjk1YmI3N2I5ZjQ5OGQ4ODAzOTg1Y2E0YmJkMzBmODljODJkYjUcommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-07-27T10:11:59Zu	committer}(jc  Gaofei Zhaojc  ,15748980+dippindots@users.noreply.github.comjc  2023-08-02T19:38:27ZumessageRemove backwards compatibilitytree}(jc  (2c89fc8c636a403ee4abb81eb7c21b20688c5f6eurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/2c89fc8c636a403ee4abb81eb7c21b20688c5f6eujc  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/8ab95bb77b9f498d8803985ca4bbd30f89c82db5
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujc  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8ab95bb77b9f498d8803985ca4bbd30f89c82db5html_urlXhttps://github.com/cBioPortal/cbioportal/commit/8ab95bb77b9f498d8803985ca4bbd30f89c82db5comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/8ab95bb77b9f498d8803985ca4bbd30f89c82db5/commentsjc  }(login
pvannieropidJa jc  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5jc  'https://api.github.com/users/pvannieropjc  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminujc  }(jc  
dippindotsjc  JtO jc  MDQ6VXNlcjE1NzQ4OTgwjc  4https://avatars.githubusercontent.com/u/15748980?v=4jc  h5jc  'https://api.github.com/users/dippindotsjc  https://github.com/dippindotsjc  1https://api.github.com/users/dippindots/followersjc  >https://api.github.com/users/dippindots/following{/other_user}jc  7https://api.github.com/users/dippindots/gists{/gist_id}jc  >https://api.github.com/users/dippindots/starred{/owner}{/repo}jc  5https://api.github.com/users/dippindots/subscriptionsjc  ,https://api.github.com/users/dippindots/orgsjc  -https://api.github.com/users/dippindots/reposjc  8https://api.github.com/users/dippindots/events{/privacy}jc  7https://api.github.com/users/dippindots/received_eventsjc  Userjc  uparents]}(jc  (27b330d5172dd185efa0f0c8e5252a0d30a2c820jc  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/27b330d5172dd185efa0f0c8e5252a0d30a2c820jc  Xhttps://github.com/cBioPortal/cbioportal/commit/27b330d5172dd185efa0f0c8e5252a0d30a2c820uastats}(totalKU	additionsK	deletionsK7ufiles](}(jc  (de76214c49dee774358e92a73b327aabc2a34ae5filename@core/src/main/java/org/mskcc/cbio/portal/dao/JdbcDataSource.javastatusmodifiedjd  Kjd  KchangesK%blob_urlhttps://github.com/cBioPortal/cbioportal/blob/8ab95bb77b9f498d8803985ca4bbd30f89c82db5/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fdao%2FJdbcDataSource.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/8ab95bb77b9f498d8803985ca4bbd30f89c82db5/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fdao%2FJdbcDataSource.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fdao%2FJdbcDataSource.java?ref=8ab95bb77b9f498d8803985ca4bbd30f89c82db5patchX  @@ -18,38 +18,23 @@ public JdbcDataSource () {
         String password = dbProperties.getDbPassword();
         String mysqlDriverClassName = dbProperties.getDbDriverClassName();
         String database = dbProperties.getDbName();
-        String useSSL = (!StringUtils.isBlank(dbProperties.getDbUseSSL())) ? dbProperties.getDbUseSSL() : "false";
         String enablePooling = (!StringUtils.isBlank(dbProperties.getDbEnablePooling())) ? dbProperties.getDbEnablePooling(): "false";
         String connectionURL = dbProperties.getConnectionURL();
         
-        Assert.hasText(userName, errorMessage("username", "db.user"));
-        Assert.hasText(password, errorMessage("password", "db.password"));
-        Assert.hasText(mysqlDriverClassName, errorMessage("driver class name", "db.driver"));
-        
         Assert.isTrue(
-            !((defined(host) || defined(database) || defined(dbProperties.getDbUseSSL())) && defined(connectionURL)),
-            "The portal.properties file defines both db.connection_string and (one of) db.host, " +
-             "db.portal_db_name and db.use_ssl. Please configure with either db.connection_string (preferred), " + 
-             "or db.host, db.portal_db_name and db.use_ssl."
+            defined(host) || defined(database) || defined(dbProperties.getDbUseSSL()),
+            "\n----------------------------------------------------------------------------------------------------------------" +
+                "-- Connection error:\n" +
+                "-- You try to connect to the database using the deprecated 'db.host', 'db.portal_db_name' and 'db.use_ssl' properties.\n" +
+                "-- Please remove these properties and use the 'db.connection_string' property instead. See https://docs.cbioportal.org/deployment/customization/portal.properties-reference/\n" +
+                "-- for assistance on building a valid connection string.\n" +
+                "----------------------------------------------------------------------------------------------------------------\n"
         );
         
-        // For backward compatibility, build connection URL from individual properties.
-        if (connectionURL == null) {
-            Assert.hasText(host, errorMessage("host", "db.host") + 
-                " Or preferably, set the 'db.connection_string' and remove 'db.host', 'db.portal_db_name' and 'db.use_ssl' (best practice).");
-            Assert.hasText(database, errorMessage("database name", "db.portal_db_name") + 
-                " Or preferably, set the 'db.connection_string' and remove 'db.host', 'db.portal_db_name' and 'db.use_ssl (best practice).");
-            System.out.println("\n----------------------------------------------------------------------------------------------------------------");
-            System.out.println("-- Deprecation warning:");
-            System.out.println("-- You are connecting to the database using the deprecated 'db.host', 'db.portal_db_name' and 'db.use_ssl' properties.");
-            System.out.println("-- Please use the 'db.connection_string' instead (see https://docs.cbioportal.org/deployment/customization/portal.properties-reference/).");
-            System.out.println("----------------------------------------------------------------------------------------------------------------\n");
-            connectionURL = String.format(
-                "jdbc:mysql://%s/%s?zeroDateTimeBehavior=convertToNull&useSSL=%s",
-                host, database, useSSL
-            );
-        }
-        
+        Assert.hasText(userName, errorMessage("username", "db.user"));
+        Assert.hasText(password, errorMessage("password", "db.password"));
+        Assert.hasText(mysqlDriverClassName, errorMessage("driver class name", "db.driver"));
+
         this.setUrl(connectionURL);
 
         //  Set up poolable data sourceu}(jc  (71428f1dcb28720d84fce1f5c1bb2a99d22a228ejd  3core/src/main/scripts/importer/cbioportal_common.pyjd  modifiedjd  Kjd  Kjd  K&jd  https://github.com/cBioPortal/cbioportal/blob/8ab95bb77b9f498d8803985ca4bbd30f89c82db5/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2Fcbioportal_common.pyjd  https://github.com/cBioPortal/cbioportal/raw/8ab95bb77b9f498d8803985ca4bbd30f89c82db5/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2Fcbioportal_common.pyjd  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fscripts%2Fimporter%2Fcbioportal_common.py?ref=8ab95bb77b9f498d8803985ca4bbd30f89c82db5j d  Xi  @@ -45,7 +45,7 @@
 PORTAL_PROPERTY_DATABASE_NAME = 'db.portal_db_name'
 PORTAL_PROPERTY_DATABASE_URL = 'db.connection_string'
 PORTAL_PROPERTY_DATABASE_USESSL = 'db.use_ssl'
-REQUIRED_DATABASE_PROPERTIES = [PORTAL_PROPERTY_DATABASE_USER, PORTAL_PROPERTY_DATABASE_PW]
+REQUIRED_DATABASE_PROPERTIES = [PORTAL_PROPERTY_DATABASE_USER, PORTAL_PROPERTY_DATABASE_PW, PORTAL_PROPERTY_DATABASE_URL]
 
 # provides a key for data types to metafile specification dict.
 class MetaFileTypes(object):
@@ -1039,33 +1039,19 @@ def get_database_properties(properties_filename: str) -> Optional[PortalProperti
             file=ERROR_FILE)
         return None
 
-    if (properties.get(PORTAL_PROPERTY_DATABASE_HOST) is not None or properties.get(PORTAL_PROPERTY_DATABASE_NAME) is not None)\
-            and properties.get(PORTAL_PROPERTY_DATABASE_URL) is not None:
-        print(
-            "The portal.properties file defines both db.connection_string and (one of) db.host, db.portal_db_name and "
-            "db.use_ssl. Please configure with either db.connection_string (preferred), or "
-            "db.host, db.portal_db_name and db.use_ssl.", file=ERROR_FILE)
+    if properties.get(PORTAL_PROPERTY_DATABASE_HOST) is not None \
+        or properties.get(PORTAL_PROPERTY_DATABASE_NAME) is not None \
+        or properties.get(PORTAL_PROPERTY_DATABASE_USESSL) is not None:
+        print("""
+            ----------------------------------------------------------------------------------------------------------------
+            -- Connection error:
+            -- You try to connect to the database using the deprecated 'db.host', 'db.portal_db_name' and 'db.use_ssl' properties.
+            -- Please remove these properties and use the 'db.connection_string' property instead. See https://docs.cbioportal.org/deployment/customization/portal.properties-reference/
+            -- for assistance on building a valid connection string.
+            ------------------------------------------------------------f---------------------------------------------------
+        """, file=ERROR_FILE)
         return None
 
-    # For backward compatibility, build connection URL from individual properties
-    if properties.get(PORTAL_PROPERTY_DATABASE_URL) is None:
-        if properties.get(PORTAL_PROPERTY_DATABASE_HOST) is None or properties.get(PORTAL_PROPERTY_DATABASE_NAME) is None:
-            print("No connection information provided for database connection. Please set 'db.host' and "
-                "'db.portal_db_name' in portal.properties. Or better, use the 'db.connection_string' "
-                "(see https://docs.cbioportal.org/deployment/customization/portal.properties-reference/)",
-                file=ERROR_FILE)
-            return None
-        print("\n" + "-"*112)
-        print("-- Deprecation warning:")
-        print("-- You are connection to the database using the deprecated 'db.host', 'db.portal_db_name' and "
-            "'db.use_ssl' properties.")
-        print("-- Please use the 'db.connection_string' instead "
-            "(see https://docs.cbioportal.org/deployment/customization/portal.properties-reference/).")
-        print("-"*112 + "\n")
-        properties[PORTAL_PROPERTY_DATABASE_URL] = f"jdbc:mysql://{properties[PORTAL_PROPERTY_DATABASE_HOST]}" \
-            f"/{properties[PORTAL_PROPERTY_DATABASE_NAME]}" \
-            f"?zeroDateTimeBehavior=convertToNull&useSSL={properties[PORTAL_PROPERTY_DATABASE_USESSL]}"
-
     return PortalProperties(properties[PORTAL_PROPERTY_DATABASE_USER],
                             properties[PORTAL_PROPERTY_DATABASE_PW],
                             properties[PORTAL_PROPERTY_DATABASE_URL])u     }(jc  (9e1b9abf0987c1df427c549ec435d45931143b3djd  (docker/web-and-data/docker-entrypoint.shjd  modifiedjd  Kjd  Kjd  K
jd  https://github.com/cBioPortal/cbioportal/blob/8ab95bb77b9f498d8803985ca4bbd30f89c82db5/docker%2Fweb-and-data%2Fdocker-entrypoint.shjd  https://github.com/cBioPortal/cbioportal/raw/8ab95bb77b9f498d8803985ca4bbd30f89c82db5/docker%2Fweb-and-data%2Fdocker-entrypoint.shjd  https://api.github.com/repos/cBioPortal/cbioportal/contents/docker%2Fweb-and-data%2Fdocker-entrypoint.sh?ref=8ab95bb77b9f498d8803985ca4bbd30f89c82db5j d  X,  @@ -59,10 +59,14 @@ parse_connection_string() {
 check_db_connection() {
     eval $(parse_db_params_from_config_and_command_line $@)
     
-    if ([[ -n $db_host ]] || [[ -n $db_portal_db_name ]] || [[ -n $db_use_ssl ]]) && [[ -n $db_connection_string ]]
+    if [[ -n $db_host ]] || [[ -n $db_portal_db_name ]] || [[ -n $db_use_ssl ]]
     then
-        echo "The portal.properties file defines both db.connection_string and (one of) db.host, db.portal_db_name and "
-        echo "db.use_ssl. Please configure with either db.connection_string (preferred), or db.host, db.portal_db_name and db.use_ssl."
+        echo "----------------------------------------------------------------------------------------------------------------"
+        echo "-- Connection error:"
+        echo "-- You try to connect to the database using the deprecated 'db.host', 'db.portal_db_name' and 'db.use_ssl' properties."
+        echo "-- Please remove these properties and use the 'db.connection_string' property instead. See https://docs.cbioportal.org/deployment/customization/portal.properties-reference/"
+        echo "-- for assistance on building a valid connection string."
+        echo "------------------------------------------------------------f---------------------------------------------------"
         exit 1
     fi
 ueu(7b2bbe2c40efdd42715c4f337cb3959deeb431b2}(sha(7b2bbe2c40efdd42715c4f337cb3959deeb431b2node_idEC_kwDOAe-hB9oAKDdiMmJiZTJjNDBlZmRkNDI3MTVjNGYzMzdjYjM5NTlkZWViNDMxYjIcommit}(author}(nameBasLeeemailbasleenknegt@thehyve.nldate2023-08-10T04:39:44Zu	committer}(j<d  GitHubj>d  noreply@github.comj@d  2023-08-10T04:39:44ZumessageAdd defaults for genomic evolution tab in patient view (#10309)

* Add defaults for mutation heatmap and line chart checkboxes

* Update text

---------

Co-authored-by: Gaofei Zhao <15748980+dippindots@users.noreply.github.com>tree}(j4d  (1b06911fb77f2e7e3c8dbd86553759c0de37c7b1urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/1b06911fb77f2e7e3c8dbd86553759c0de37c7b1ujLd  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/7b2bbe2c40efdd42715c4f337cb3959deeb431b2
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk1GoQCRBK7hj4Ov3rIwAA1nwIAIXeS+QQzZlKjrposdtSv0DD
ipZpLTwZVJhVbwmlM4yGJdIw0QOISo8cKUUJKYsxCDn5UeAELldmutz3Q+RQkflf
nGTQrTaosZz27ZFzGlk2XRXj4J881jXF69wEL72dIWobuFirxzHNUN7NJgWGC1DB
/igKjdgnpChor1uxxqP3mTnkFfNX3Oj083oHOO/Q19JqkNHMPNCCxnpCF96d0XAM
jfpbJnoI1ltVbOrF0wqP0m/tM5zqmrIzNqDs4J0/JRStnONfKgwoq9kl3aYfZInv
KZ4TW/SWEEzoAxeIm5rr91lV6O2rHtQAWA1Zg3P5Te6DNbrXcCk1SjpRtHH+F04=
=CeJV
-----END PGP SIGNATURE-----
payloadX  tree 1b06911fb77f2e7e3c8dbd86553759c0de37c7b1
parent 4956dcb7a699b27aac638a89ae41641f592ec2b1
author BasLee <basleenknegt@thehyve.nl> 1691642384 +0200
committer GitHub <noreply@github.com> 1691642384 -0400

Add defaults for genomic evolution tab in patient view (#10309)

* Add defaults for mutation heatmap and line chart checkboxes

* Update text

---------

Co-authored-by: Gaofei Zhao <15748980+dippindots@users.noreply.github.com>uujLd  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7b2bbe2c40efdd42715c4f337cb3959deeb431b2html_urlXhttps://github.com/cBioPortal/cbioportal/commit/7b2bbe2c40efdd42715c4f337cb3959deeb431b2comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/7b2bbe2c40efdd42715c4f337cb3959deeb431b2/commentsj:d  }(loginBasLeeidJ~2 j6d  MDQ6VXNlcjMzMjMwMDY=
avatar_url3https://avatars.githubusercontent.com/u/3323006?v=4gravatar_idh5jLd  #https://api.github.com/users/BasLeejZd  https://github.com/BasLee
followers_url-https://api.github.com/users/BasLee/followers
following_url:https://api.github.com/users/BasLee/following{/other_user}	gists_url3https://api.github.com/users/BasLee/gists{/gist_id}starred_url:https://api.github.com/users/BasLee/starred{/owner}{/repo}subscriptions_url1https://api.github.com/users/BasLee/subscriptionsorganizations_url(https://api.github.com/users/BasLee/orgs	repos_url)https://api.github.com/users/BasLee/repos
events_url4https://api.github.com/users/BasLee/events{/privacy}received_events_url3https://api.github.com/users/BasLee/received_eventstypeUser
site_adminujBd  }(j_d  web-flowjad  J/j6d  MDQ6VXNlcjE5ODY0NDQ3jcd  4https://avatars.githubusercontent.com/u/19864447?v=4jed  h5jLd  %https://api.github.com/users/web-flowjZd  https://github.com/web-flowjhd  /https://api.github.com/users/web-flow/followersjjd  <https://api.github.com/users/web-flow/following{/other_user}jld  5https://api.github.com/users/web-flow/gists{/gist_id}jnd  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jpd  3https://api.github.com/users/web-flow/subscriptionsjrd  *https://api.github.com/users/web-flow/orgsjtd  +https://api.github.com/users/web-flow/reposjvd  6https://api.github.com/users/web-flow/events{/privacy}jxd  5https://api.github.com/users/web-flow/received_eventsjzd  Userj|d  uparents]}(j4d  (4956dcb7a699b27aac638a89ae41641f592ec2b1jLd  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4956dcb7a699b27aac638a89ae41641f592ec2b1jZd  Xhttps://github.com/cBioPortal/cbioportal/commit/4956dcb7a699b27aac638a89ae41641f592ec2b1uastats}(totalK	additionsK	deletionsKufiles](}(j4d  (5eca5c5988b006a97d11dcb98c8c0462d401182bfilename<docs/deployment/customization/portal.properties-Reference.mdstatusmodifiedjd  Kjd  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/7b2bbe2c40efdd42715c4f337cb3959deeb431b2/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdraw_urlhttps://github.com/cBioPortal/cbioportal/raw/7b2bbe2c40efdd42715c4f337cb3959deeb431b2/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.md?ref=7b2bbe2c40efdd42715c4f337cb3959deeb431b2patchXH  @@ -153,6 +153,13 @@ Different samples of a patient may have been analyzed with different gene panels
 skin.patientview.filter_genes_profiled_all_samples=
 ```
 
+### Control default settings of the VAF line chart in the genomic evolution tab of patient view
+If you want to enable log scale and sequential mode by default, set this property to `true`:
+```
+vaf.log_scale.default=true|false
+vaf.sequential_mode.default=true|false
+```
+
 ### Control unauthorized studies to be displayed on the home page
 
 By default, on an authenticated portal the home page will only show studies for which the current user is authorized. By setting the _skin.home\_page.show\_unauthorized\_studies_ property to _true_ the home page will also show unauthorized studies. The unauthorized studies will appear greyed out and cannot be selected for downstream analysis in Results View or Study View.
@@ -436,6 +443,11 @@ oncoprint.oncokb.default=true|false
 oncoprint.hotspots.default=true|false
 ```
 
+If you want to enable oncoprint heatmap clustering by default, set this property to `true`:
+```
+oncoprint.clustered.default=true|false
+```
+
 **Automatic hiding of variants of unknown significance (VUS)**
 
 By default, the selection box to hide VUS mutations is unchecked. If you want to automatically hide VUS, set this property to `true`. Default is `false`.u}(j4d  (5dc3ba8c9feb1ec0fa5ec3a06b512338a51fc459jd  )portal/src/main/webapp/config_service.jspjd  modifiedjd  Kjd  Kjd  Kjd  https://github.com/cBioPortal/cbioportal/blob/7b2bbe2c40efdd42715c4f337cb3959deeb431b2/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspjd  https://github.com/cBioPortal/cbioportal/raw/7b2bbe2c40efdd42715c4f337cb3959deeb431b2/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspjd  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=7b2bbe2c40efdd42715c4f337cb3959deeb431b2jd  X  @@ -38,6 +38,7 @@
             "oncoprint.custom_driver_annotation.binary.default",
             "oncoprint.oncokb.default",
             "oncoprint.hotspots.default",
+            "oncoprint.clustered.default",
             "genomenexus.url",
             "genomenexus.url.grch38",
             "google_analytics_profile_id",
@@ -147,7 +148,9 @@
             "skin.patient_view.structural_variant_table.columns.show_on_init",
             "comparison.categorical_na_values",
             "study_download_url",
-            "skin.home_page.show_reference_genome"
+            "skin.home_page.show_reference_genome",
+            "vaf.sequential_mode.default",
+            "vaf.log_scale.default"
         };
 
 u}(j4d  (2d9502892525f321e80ea0c7c530b6d2e3e5f699jd  ,src/main/resources/portal.properties.EXAMPLEjd  modifiedjd  Kjd  Kjd  Kjd  https://github.com/cBioPortal/cbioportal/blob/7b2bbe2c40efdd42715c4f337cb3959deeb431b2/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEjd  https://github.com/cBioPortal/cbioportal/raw/7b2bbe2c40efdd42715c4f337cb3959deeb431b2/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEjd  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=7b2bbe2c40efdd42715c4f337cb3959deeb431b2jd  Xf  @@ -316,6 +316,7 @@ oncoprint.oncokb.default=true
 oncoprint.hotspots.default=true
 # oncoprint.hide_vus.default=true
 # oncoprint.clinical_tracks.config_json=classpath:/oncoprint-default-tracks.json
+# oncoprint.clustered.default=true
 
 # Custom gene sets
 # querypage.setsofgenes.location=file:/<path>
@@ -435,4 +436,7 @@ persistence.cache_type=no-cache
 # Allows download links within DataSets Tab (See Portal.Properties documentation for more info)
 # study_download_url=
 
-# download_group=
\ No newline at end of file
+# download_group=
+
+# vaf.sequential_mode.default=false
+# vaf.log_scale.default=falseueu(7e7717f35dba6d42c3072e9140c99cded89846a8}(sha(7e7717f35dba6d42c3072e9140c99cded89846a8node_idEC_kwDOAe-hB9oAKDdlNzcxN2YzNWRiYTZkNDJjMzA3MmU5MTQwYzk5Y2RlZDg5ODQ2YTgcommit}(author}(name
Onur Sumeremails.onur.sumer@gmail.comdate2023-06-22T19:00:24Zu	committer}(jd  
Onur Sumerjd  s.onur.sumer@gmail.comjd  2023-06-22T19:00:24Zumessagefix contributor last nametree}(jd  (7678778472434f8a26638f72e15eb91365903e7furlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/7678778472434f8a26638f72e15eb91365903e7fujd  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/7e7717f35dba6d42c3072e9140c99cded89846a8
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujd  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7e7717f35dba6d42c3072e9140c99cded89846a8html_urlXhttps://github.com/cBioPortal/cbioportal/commit/7e7717f35dba6d42c3072e9140c99cded89846a8comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/7e7717f35dba6d42c3072e9140c99cded89846a8/commentsjd  }(login	onursumeridJ6 jd  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5jd  &https://api.github.com/users/onursumerjd  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminujd  }(jd  	onursumerjd  J6 jd  MDQ6VXNlcjM2MDQxOTg=jd  3https://avatars.githubusercontent.com/u/3604198?v=4jd  h5jd  &https://api.github.com/users/onursumerjd  https://github.com/onursumerjd  0https://api.github.com/users/onursumer/followersjd  =https://api.github.com/users/onursumer/following{/other_user}jd  6https://api.github.com/users/onursumer/gists{/gist_id}jd  =https://api.github.com/users/onursumer/starred{/owner}{/repo}jd  4https://api.github.com/users/onursumer/subscriptionsjd  +https://api.github.com/users/onursumer/orgsjd  ,https://api.github.com/users/onursumer/reposjd  7https://api.github.com/users/onursumer/events{/privacy}jd  6https://api.github.com/users/onursumer/received_eventsjd  Userje  uparents]}(jd  (8bf1312544943ac06a3e7b932ead81a41aa232d0jd  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8bf1312544943ac06a3e7b932ead81a41aa232d0jd  Xhttps://github.com/cBioPortal/cbioportal/commit/8bf1312544943ac06a3e7b932ead81a41aa232d0uastats}(totalK	additionsK	deletionsKufiles]}(jd  (da0e1d8da27a90f8f79a0aa2719702af91f4ff4ffilenamedocs/About-Us.mdstatusmodifiedje  Kje  KchangesKblob_urlihttps://github.com/cBioPortal/cbioportal/blob/7e7717f35dba6d42c3072e9140c99cded89846a8/docs%2FAbout-Us.mdraw_urlhhttps://github.com/cBioPortal/cbioportal/raw/7e7717f35dba6d42c3072e9140c99cded89846a8/docs%2FAbout-Us.mdcontents_url{https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FAbout-Us.md?ref=7e7717f35dba6d42c3072e9140c99cded89846a8patch@@ -61,7 +61,7 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 
 ## Bilkent University
 * Ugur Dogrusoz
-* Yusuf Ziya Sengul
+* Yusuf Ziya Ozgul
 
 ## Alumni
 * Adam Abeshouseuau(0fdc3f41fe2f5a988b390095296b40f117276e9e}(sha(0fdc3f41fe2f5a988b390095296b40f117276e9enode_idEC_kwDOAe-hB9oAKDBmZGMzZjQxZmUyZjVhOTg4YjM5MDA5NTI5NmI0MGYxMTcyNzZlOWUcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-14T20:43:57Zu	committer}(j8e  Gaofei Zhaoj:e  ,15748980+dippindots@users.noreply.github.comj<e  2023-08-14T20:43:57Zumessageupdate name listtree}(j0e  (1432a91f915e60b9a7c53c369c5734178ed7e28durlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/1432a91f915e60b9a7c53c369c5734178ed7e28dujHe  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/0fdc3f41fe2f5a988b390095296b40f117276e9e
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujHe  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/0fdc3f41fe2f5a988b390095296b40f117276e9ehtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/0fdc3f41fe2f5a988b390095296b40f117276e9ecomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/0fdc3f41fe2f5a988b390095296b40f117276e9e/commentsj6e  }(login
dippindotsidJtO j2e  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5jHe  'https://api.github.com/users/dippindotsjTe  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj>e  }(jYe  
dippindotsj[e  JtO j2e  MDQ6VXNlcjE1NzQ4OTgwj]e  4https://avatars.githubusercontent.com/u/15748980?v=4j_e  h5jHe  'https://api.github.com/users/dippindotsjTe  https://github.com/dippindotsjbe  1https://api.github.com/users/dippindots/followersjde  >https://api.github.com/users/dippindots/following{/other_user}jfe  7https://api.github.com/users/dippindots/gists{/gist_id}jhe  >https://api.github.com/users/dippindots/starred{/owner}{/repo}jje  5https://api.github.com/users/dippindots/subscriptionsjle  ,https://api.github.com/users/dippindots/orgsjne  -https://api.github.com/users/dippindots/reposjpe  8https://api.github.com/users/dippindots/events{/privacy}jre  7https://api.github.com/users/dippindots/received_eventsjte  Userjve  uparents]}(j0e  (ae160c6a3a72faee2afcebed8895392f3281b3d2jHe  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ae160c6a3a72faee2afcebed8895392f3281b3d2jTe  Xhttps://github.com/cBioPortal/cbioportal/commit/ae160c6a3a72faee2afcebed8895392f3281b3d2uastats}(totalK	additionsK 	deletionsKufiles]}(j0e  (543e29132d3d4bb3a08c91ce218f89cd09cbedacfilenamedocs/About-Us.mdstatusmodifiedje  K je  KchangesKblob_urlihttps://github.com/cBioPortal/cbioportal/blob/0fdc3f41fe2f5a988b390095296b40f117276e9e/docs%2FAbout-Us.mdraw_urlhhttps://github.com/cBioPortal/cbioportal/raw/0fdc3f41fe2f5a988b390095296b40f117276e9e/docs%2FAbout-Us.mdcontents_url{https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FAbout-Us.md?ref=0fdc3f41fe2f5a988b390095296b40f117276e9epatchX  @@ -109,9 +109,6 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 * Diana Baiceanu
 * Paul van Dijk
 * Kees van Bochove
-* Yichao Sun
-* Adam Abeshouse
-* Divya Madala
 
 ## Funding for the cBioPortal for Cancer Genomics is or has been provided by:
 uau(48f4d695b1be25eb5a67ee733b4b559afe7c49ac}(sha(48f4d695b1be25eb5a67ee733b4b559afe7c49acnode_idEC_kwDOAe-hB9oAKDQ4ZjRkNjk1YjFiZTI1ZWI1YTY3ZWU3MzNiNGI1NTlhZmU3YzQ5YWMcommit}(author}(nameKarthikemailkalletlakarthik@gmail.comdate2023-07-11T14:28:57Zu	committer}(je  Karthikje  kalletlakarthik@gmail.comje  2023-07-12T13:36:50Zumessage,Improve study view treatment api performancetree}(je  (6482573b44fdf1c277faecd5646ae2da8e857631urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/6482573b44fdf1c277faecd5646ae2da8e857631uje  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/48f4d695b1be25eb5a67ee733b4b559afe7c49ac
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuje  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/48f4d695b1be25eb5a67ee733b4b559afe7c49achtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/48f4d695b1be25eb5a67ee733b4b559afe7c49accomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/48f4d695b1be25eb5a67ee733b4b559afe7c49ac/commentsje  }(login	kalletlakidJƴ je  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5je  &https://api.github.com/users/kalletlakje  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminuje  }(je  	kalletlakje  Jƴ je  MDQ6VXNlcjEyOTU2ODcwje  4https://avatars.githubusercontent.com/u/12956870?v=4je  h5je  &https://api.github.com/users/kalletlakje  https://github.com/kalletlakje  0https://api.github.com/users/kalletlak/followersje  =https://api.github.com/users/kalletlak/following{/other_user}je  6https://api.github.com/users/kalletlak/gists{/gist_id}je  =https://api.github.com/users/kalletlak/starred{/owner}{/repo}je  4https://api.github.com/users/kalletlak/subscriptionsje  +https://api.github.com/users/kalletlak/orgsje  ,https://api.github.com/users/kalletlak/reposje  7https://api.github.com/users/kalletlak/events{/privacy}je  6https://api.github.com/users/kalletlak/received_eventsje  Userje  uparents]}(je  (719e5d25e373bc40109581cb99e64925eca8b7e5je  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/719e5d25e373bc40109581cb99e64925eca8b7e5je  Xhttps://github.com/cBioPortal/cbioportal/commit/719e5d25e373bc40109581cb99e64925eca8b7e5uastats}(totalK	additionsK3	deletionsKufiles](}(je  (78c0d25ea145313cff22c9e578cdf84f8c3be307filename+db-scripts/src/main/resources/migration.sqlstatusmodifiedjf  Kjf  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/48f4d695b1be25eb5a67ee733b4b559afe7c49ac/db-scripts%2Fsrc%2Fmain%2Fresources%2Fmigration.sqlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/48f4d695b1be25eb5a67ee733b4b559afe7c49ac/db-scripts%2Fsrc%2Fmain%2Fresources%2Fmigration.sqlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/db-scripts%2Fsrc%2Fmain%2Fresources%2Fmigration.sql?ref=48f4d695b1be25eb5a67ee733b4b559afe7c49acpatchX  @@ -1026,4 +1026,5 @@ UPDATE `info` SET `DB_SCHEMA_VERSION`="2.13.0";
 ALTER TABLE `clinical_event_data` MODIFY COLUMN `VALUE` varchar(3000) NOT NULL;
 CREATE INDEX idx_clinical_event_key ON clinical_event_data (`KEY`);
 CREATE INDEX idx_clinical_event_value ON clinical_event_data (`VALUE`);
+CREATE INDEX idx_sample_stable_id ON sample (`STABLE_ID`);
 UPDATE `info` SET `DB_SCHEMA_VERSION`="2.13.1";
\ No newline at end of fileu}(je  (bc2e0705b16aced08aedf3ca718aa898c0f66540jf  ]persistence/persistence-api/src/main/java/org/cbioportal/persistence/TreatmentRepository.javaj
f  modifiedjf  Kjf  Kjf  K
jf  https://github.com/cBioPortal/cbioportal/blob/48f4d695b1be25eb5a67ee733b4b559afe7c49ac/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FTreatmentRepository.javajf  https://github.com/cBioPortal/cbioportal/raw/48f4d695b1be25eb5a67ee733b4b559afe7c49ac/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FTreatmentRepository.javajf  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FTreatmentRepository.java?ref=48f4d695b1be25eb5a67ee733b4b559afe7c49acjf  X  @@ -14,20 +14,18 @@ public interface TreatmentRepository {
     public Map<String, List<Treatment>> getTreatmentsByPatientId(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    public Map<String, List<ClinicalEventSample>> getSamplesByPatientId(List<String> sampleIds, List<String> studyIds);
+    public List<Treatment> getTreatments(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    public Map<String, List<ClinicalEventSample>> getShallowSamplesByPatientId(List<String> sampleIds, List<String> studyIds);
+    public Map<String, List<ClinicalEventSample>> getSamplesByPatientId(List<String> sampleIds, List<String> studyIds);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    public Set<String> getAllUniqueTreatments(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key);
+    public Map<String, List<ClinicalEventSample>> getShallowSamplesByPatientId(List<String> sampleIds, List<String> studyIds);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    public Boolean hasTreatmentData(List<String> studies, String key);
+    public Boolean hasTreatmentData(List<String> studies, ClinicalEventKeyCode key);
 
     @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
     public Boolean hasSampleTimelineData(List<String> studies);
 
-    @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
-    public Boolean studyIdHasTreatments(String studyId, ClinicalEventKeyCode key);
 }u}(je  (44e4f8560796675a7d390a369d10fb581e91e38ajf  epersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/TreatmentMapper.javaj
f  modifiedjf  K jf  Kjf  Kjf  https://github.com/cBioPortal/cbioportal/blob/48f4d695b1be25eb5a67ee733b4b559afe7c49ac/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.javajf  https://github.com/cBioPortal/cbioportal/raw/48f4d695b1be25eb5a67ee733b4b559afe7c49ac/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.javajf  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.java?ref=48f4d695b1be25eb5a67ee733b4b559afe7c49acjf  X  @@ -13,11 +13,7 @@ public interface TreatmentMapper {
     
     List<ClinicalEventSample> getAllShallowSamples(List<String> sampleIds, List<String> studyIds);
 
-    Set<String> getAllUniqueTreatments(List<String> sampleIds, List<String> studyIds, String key);
-
     Boolean hasTreatmentData(List<String> sampleIds, List<String> studyIds, String key);
 
     Boolean hasSampleTimelineData(List<String> sampleIds, List<String> studyIds);
-
-    Boolean studyIdHasTreatments(String studyId, String key);
 }u}(je  (d44bdfc808a4d8e643815463b763592a624dd61bjf  ppersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/TreatmentMyBatisRepository.javaj
f  modifiedjf  K
jf  Kjf  K"jf  https://github.com/cBioPortal/cbioportal/blob/48f4d695b1be25eb5a67ee733b4b559afe7c49ac/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepository.javajf  https://github.com/cBioPortal/cbioportal/raw/48f4d695b1be25eb5a67ee733b4b559afe7c49ac/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepository.javajf  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepository.java?ref=48f4d695b1be25eb5a67ee733b4b559afe7c49acjf  X	  @@ -18,12 +18,17 @@ public class TreatmentMyBatisRepository implements TreatmentRepository {
     
     @Override
     public Map<String, List<Treatment>> getTreatmentsByPatientId(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key) {
+        return getTreatments(sampleIds, studyIds, key)
+            .stream()
+            .collect(groupingBy(Treatment::getPatientId));
+    }
+
+    @Override
+    public List<Treatment> getTreatments(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key) {
         return treatmentMapper.getAllTreatments(sampleIds, studyIds, key.getKey())
             .stream()
             .flatMap(treatment -> splitIfDelimited(treatment, key))
-            .collect(groupingBy(Treatment::getPatientId));
-        
-        
+            .collect(Collectors.toList());
     }
 
     private Stream<Treatment> splitIfDelimited(Treatment unsplitTreatment, ClinicalEventKeyCode key) {
@@ -61,31 +66,12 @@ public Map<String, List<ClinicalEventSample>> getShallowSamplesByPatientId(List<
     }
 
     @Override
-    public Set<String> getAllUniqueTreatments(List<String> sampleIds, List<String> studyIds, ClinicalEventKeyCode key) {
-        return treatmentMapper.getAllUniqueTreatments(sampleIds, studyIds, key.getKey())
-            .stream()
-            .flatMap(treatment -> {
-                if (key.isDelimited()) {
-                    return Arrays.stream(treatment.split(key.getDelimiter()));
-                } else {
-                    return Stream.of(treatment);
-                }
-            })
-            .collect(Collectors.toSet());
-    }
-
-    @Override
-    public Boolean hasTreatmentData(List<String> studies, String key) {
-        return treatmentMapper.hasTreatmentData(null, studies, key);
+    public Boolean hasTreatmentData(List<String> studies, ClinicalEventKeyCode key) {
+        return treatmentMapper.hasTreatmentData(null, studies, key.getKey());
     }
 
     @Override
     public Boolean hasSampleTimelineData(List<String> studies) {
         return treatmentMapper.hasSampleTimelineData(null, studies);
     }
-
-    @Override
-    public Boolean studyIdHasTreatments(String studyId, ClinicalEventKeyCode key) {
-        return treatmentMapper.studyIdHasTreatments(studyId, key.getKey());
-    }
 }u}(je  (de633ab7f55b0f7c85a4ddf6d633ec17c43e9158jf  ipersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatis/TreatmentMapper.xmlj
f  modifiedjf  Kjf  Kjf  Kjf  https://github.com/cBioPortal/cbioportal/blob/48f4d695b1be25eb5a67ee733b4b559afe7c49ac/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.xmljf  https://github.com/cBioPortal/cbioportal/raw/48f4d695b1be25eb5a67ee733b4b559afe7c49ac/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.xmljf  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMapper.xml?ref=48f4d695b1be25eb5a67ee733b4b559afe7c49acjf  Xg	  @@ -16,6 +16,7 @@
             INNER JOIN sample ON patient.INTERNAL_ID = sample.PATIENT_ID
             INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
         <include refid="where"/>
+        AND clinical_event.EVENT_TYPE = 'TREATMENT'
         AND clinical_event_data.KEY = #{key}
     </select>
 
@@ -48,19 +49,6 @@
         <include refid="where"/>
     </select>
 
-    <select id="getAllUniqueTreatments" resultType="java.lang.String">
-        SELECT 
-            DISTINCT clinical_event_data.VALUE
-        FROM
-            clinical_event
-            INNER JOIN clinical_event_data ON clinical_event.CLINICAL_EVENT_ID = clinical_event_data.CLINICAL_EVENT_ID
-            INNER JOIN patient ON clinical_event.PATIENT_ID = patient.INTERNAL_ID
-            INNER JOIN sample ON patient.INTERNAL_ID = sample.PATIENT_ID
-            INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
-        <include refid="where"/>
-            AND clinical_event_data.KEY = #{key}
-    </select>
-
     <select id="hasTreatmentData" resultType="java.lang.Boolean">
         SELECT EXISTS(SELECT
             *
@@ -71,6 +59,7 @@
             INNER JOIN sample ON patient.INTERNAL_ID = sample.PATIENT_ID
             INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
         <include refid="where"/>
+            AND clinical_event.EVENT_TYPE = 'TREATMENT'
             AND clinical_event_data.KEY = #{key} LIMIT 1
         )
     </select>
@@ -88,20 +77,6 @@
             AND clinical_event_data.KEY = 'SAMPLE_ID'
             AND (clinical_event.EVENT_TYPE LIKE 'Sample Acquisition' OR clinical_event.EVENT_TYPE LIKE 'SPECIMEN') LIMIT 1)
     </select>
-    
-    
-    <select id="studyIdHasTreatments" resultType="java.lang.Boolean">
-        SELECT EXISTS(SELECT
-            *
-        FROM
-            clinical_event
-            INNER JOIN clinical_event_data ON clinical_event.CLINICAL_EVENT_ID = clinical_event_data.CLINICAL_EVENT_ID
-            INNER JOIN patient ON clinical_event.PATIENT_ID = patient.INTERNAL_ID
-            INNER JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
-        WHERE
-            clinical_event_data.KEY = #{key}
-            AND cancer_study.CANCER_STUDY_IDENTIFIER = #{studyId} LIMIT 1)
-    </select>
 
     <sql id="where">
         <where>u}(je  (ec5b95fa12a86f3b5b047e2008c285f114d57698jf  tpersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/TreatmentMyBatisRepositoryTest.javaj
f  modifiedjf  Kjf  Kjf  Kjf  https://github.com/cBioPortal/cbioportal/blob/48f4d695b1be25eb5a67ee733b4b559afe7c49ac/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepositoryTest.javajf  https://github.com/cBioPortal/cbioportal/raw/48f4d695b1be25eb5a67ee733b4b559afe7c49ac/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepositoryTest.javajf  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FTreatmentMyBatisRepositoryTest.java?ref=48f4d695b1be25eb5a67ee733b4b559afe7c49acjf  X  @@ -133,22 +133,9 @@ public void getShallowSamplesByPatientId() {
         Assert.assertEquals(actual, expected);
     }
 
-    @Test
-    public void getAllUniqueTreatments() {
-        HashSet<String> expected = new HashSet<>(Collections.singletonList("Madeupanib"));
-        
-        Set<String> actual = treatmentRepository.getAllUniqueTreatments(
-            Collections.singletonList("TCGA-A1-A0SD-01"),
-            Collections.singletonList("study_tcga_pub"),
-            ClinicalEventKeyCode.Agent
-        );
-        
-        Assert.assertEquals(actual, expected);
-    }
-
     @Test
     public void hasTreatmentData() {
-        Boolean actual = treatmentRepository.hasTreatmentData(Collections.singletonList("study_tcga_pub"), ClinicalEventKeyCode.Agent.getKey());
+        Boolean actual = treatmentRepository.hasTreatmentData(Collections.singletonList("study_tcga_pub"), ClinicalEventKeyCode.Agent);
         
         Assert.assertEquals(actual, true);
     }u}(je  (ab7e2ed778f2c26df380b25d83c4f2e2916c0d23jf  Kservice/src/main/java/org/cbioportal/service/impl/TreatmentServiceImpl.javaj
f  modifiedjf  Kjf  K+jf  K=jf  https://github.com/cBioPortal/cbioportal/blob/48f4d695b1be25eb5a67ee733b4b559afe7c49ac/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImpl.javajf  https://github.com/cBioPortal/cbioportal/raw/48f4d695b1be25eb5a67ee733b4b559afe7c49ac/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImpl.javajf  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImpl.java?ref=48f4d695b1be25eb5a67ee733b4b559afe7c49acjf  X  @@ -25,7 +25,7 @@ private Pair<List<String>, List<String>> filterIds(List<String> sampleIds, List<
         }
         Set<String> studiesWithTreatments = studyIds.stream()
             .distinct()
-            .filter(studyId -> treatmentRepository.studyIdHasTreatments(studyId, key))
+            .filter(studyId -> treatmentRepository.hasTreatmentData(Collections.singletonList(studyId), key))
             .collect(Collectors.toSet());
         
         ArrayList<String> filteredSampleIds = new ArrayList<>();
@@ -158,62 +158,37 @@ public List<PatientTreatmentRow> getAllPatientTreatmentRows(
         sampleIds = filteredIds.getLeft();
         studyIds = filteredIds.getRight();
 
-        Map<String, List<Treatment>> treatmentsByPatient =
-            treatmentRepository.getTreatmentsByPatientId(sampleIds, studyIds, key);
         Map<String, List<ClinicalEventSample>> samplesByPatient = treatmentRepository
-            .getShallowSamplesByPatientId(sampleIds, studyIds)
-            .entrySet()
-            .stream()
-            .filter(e -> treatmentsByPatient.containsKey(e.getKey()))
-            .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
-        Set<String> treatments = treatmentRepository.getAllUniqueTreatments(sampleIds, studyIds, key);
-
-        return treatments.stream()
-            .map(t -> createPatientTreatmentRowForTreatment(t, treatmentsByPatient, samplesByPatient))
-            .collect(Collectors.toList());
-    }
-
-    private PatientTreatmentRow createPatientTreatmentRowForTreatment(
-        String treatment,
-        Map<String, List<Treatment>> treatmentsByPatient,
-        Map<String, List<ClinicalEventSample>> samplesByPatient
-    ) {
-        // find all the patients that have received this treatment
-        List<Map.Entry<String, List<Treatment>>> matchingPatients = matchingPatients(treatment, treatmentsByPatient);
+            .getShallowSamplesByPatientId(sampleIds, studyIds);
 
-        // from those patients, extract the unique samples
-        Set<ClinicalEventSample> samples = matchingPatients
+        Map<String, List<Treatment>> treatmentSet = treatmentRepository.getTreatments(sampleIds, studyIds, key)
             .stream()
-            .map(Map.Entry::getKey)
-            .flatMap(patient -> samplesByPatient.getOrDefault(patient, new ArrayList<>()).stream())
-            .collect(Collectors.toSet());
-
-
-        return new PatientTreatmentRow(treatment, matchingPatients.size(), samples);
-    }
+            .collect(groupingBy(Treatment::getTreatment));
 
-    private List<Map.Entry<String, List<Treatment>>> matchingPatients(
-        String treatment,
-        Map<String, List<Treatment>> treatmentsByPatient
-    ) {
-        return treatmentsByPatient.entrySet().stream()
-            .filter(p -> p.getValue().stream().anyMatch(t -> t.getTreatment().equals(treatment)))
+        return treatmentSet.entrySet()
+            .stream()
+            .map(entry -> {
+                String treatment = entry.getKey();
+                Set<String> patientIds = entry.getValue().stream().map(Treatment::getPatientId).collect(toSet());
+                Set<ClinicalEventSample> clinicalEventSamples = patientIds
+                    .stream()
+                    .flatMap(patientId -> samplesByPatient.getOrDefault(patientId, new ArrayList<>()).stream())
+                    .collect(toSet());
+                return new PatientTreatmentRow(treatment, patientIds.size(), clinicalEventSamples);
+            })
             .collect(toList());
     }
 
     @Override
     public Boolean containsTreatmentData(List<String> studies, ClinicalEventKeyCode key) {
-        return treatmentRepository.hasTreatmentData(studies, key.getKey());
+        return treatmentRepository.hasTreatmentData(studies, key);
     }
 
     @Override
     public Boolean containsSampleTreatmentData(List<String> studyIds, ClinicalEventKeyCode key) {
         studyIds = studyIds.stream()
-            .filter(studyId -> treatmentRepository.studyIdHasTreatments(studyId, key))
+            .filter(studyId -> treatmentRepository.hasTreatmentData(Collections.singletonList(studyId), key))
             .collect(Collectors.toList());
-        if(studyIds.size() > 0 && treatmentRepository.hasSampleTimelineData(studyIds)) {
-            return treatmentRepository.hasTreatmentData(studyIds, key.getKey());
-        }
-        return false;
+        return studyIds.size() > 0 && treatmentRepository.hasSampleTimelineData(studyIds);
     }
 }u}(je  (8a86e465d3ffc60b71b738730098e6c85ace3286jf  Oservice/src/test/java/org/cbioportal/service/impl/TreatmentServiceImplTest.javaj
f  modifiedjf  Kjf  Kjf  K&jf  https://github.com/cBioPortal/cbioportal/blob/48f4d695b1be25eb5a67ee733b4b559afe7c49ac/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImplTest.javajf  https://github.com/cBioPortal/cbioportal/raw/48f4d695b1be25eb5a67ee733b4b559afe7c49ac/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImplTest.javajf  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FTreatmentServiceImplTest.java?ref=48f4d695b1be25eb5a67ee733b4b559afe7c49acjf  X=  @@ -26,14 +26,11 @@ public class TreatmentServiceImplTest {
     private TreatmentRepository treatmentRepository;
     
     @Test
-    public void getAllSampleTreatmentsSingleRow() {
-        mockTreatmentsByPatient(
-            makeTreatment("madeupanib", "P0", 0, 10)
-        );
+    public void getAllPatientTreatmentRows() {
         mockSamplesByPatient(
             makeSample("S0", "P0", 5)
         );
-        mockAllTreatments("madeupanib");
+        mockTreatments(makeTreatment("madeupanib", "P0", 0, 10));
 
         PatientTreatmentRow rowA = makePatientRow("madeupanib", 1, Collections.singletonList("S0"), Collections.singletonList("P0"));
         List<PatientTreatmentRow> expected = Collections.singletonList(rowA);
@@ -43,15 +40,14 @@ public void getAllSampleTreatmentsSingleRow() {
     }
 
     @Test
-    public void getAllSampleTreatmentsOneSampleTwoTreatmentsOnePatient() {
-        mockTreatmentsByPatient(
+    public void getAllPatientTreatmentRowsOneSampleTwoTreatmentsOnePatient() {
+        mockTreatments(
             makeTreatment("madeupanib", "P0", 0, 10),
             makeTreatment("fakedrugazol", "P0", 0, 10)
         );
         mockSamplesByPatient(
             makeSample("S0", "P0", 5)
         );
-        mockAllTreatments("madeupanib", "fakedrugazol");
 
 
         PatientTreatmentRow rowA = makePatientRow("fakedrugazol", 1, Collections.singletonList("S0"), Collections.singletonList("P0"));
@@ -63,15 +59,14 @@ public void getAllSampleTreatmentsOneSampleTwoTreatmentsOnePatient() {
     }
 
     @Test
-    public void getAllSampleTreatmentsTwoSamplesOnePatientOneTreatment() {
-        mockTreatmentsByPatient(
+    public void getAllPatientTreatmentRowsTwoSamplesOnePatientOneTreatment() {
+        mockTreatments(
             makeTreatment("fakedrugazol", "P0", 0, 10)
         );
         mockSamplesByPatient(
             makeSample("S0", "P0", 5),
             makeSample("S1", "P0", 10)
         );
-        mockAllTreatments("fakedrugazol");
 
         // even though there are two samples, you expect a count of 1,
         // because this is from the patient level, and both samples are for the same patient
@@ -83,16 +78,15 @@ public void getAllSampleTreatmentsTwoSamplesOnePatientOneTreatment() {
     }
 
     @Test
-    public void getAllSampleTreatmentsTwoSamplesTwoPatientsTwoTreatments() {
-        mockTreatmentsByPatient(
+    public void getAllPatientTreatmentRowsTwoSamplesTwoPatientsTwoTreatments() {
+        mockTreatments(
             makeTreatment("fakedrugazol", "P0", 0, 10),
             makeTreatment("fakedrugazol", "P1", 0, 10)
         );
         mockSamplesByPatient(
             makeSample("S0", "P0", 5),
             makeSample("S1", "P1", 10)
         );
-        mockAllTreatments("fakedrugazol");
 
         // now there are two patients, so you expect a count of two
         PatientTreatmentRow rowA = makePatientRow("fakedrugazol", 2, Arrays.asList("S0", "S1"), Arrays.asList("P0", "P1"));
@@ -103,16 +97,15 @@ public void getAllSampleTreatmentsTwoSamplesTwoPatientsTwoTreatments() {
     }
 
     @Test
-    public void getAllSampleTreatmentsTwoSamplesTwoPatientsTwoDifferentTreatments() {
-        mockTreatmentsByPatient(
+    public void getAllPatientTreatmentRowsTwoSamplesTwoPatientsTwoDifferentTreatments() {
+        mockTreatments(
             makeTreatment("fakedrugazol", "P0", 0, 10),
             makeTreatment("madeupanib", "P1", 0, 10)
         );
         mockSamplesByPatient(
             makeSample("S0", "P0", 5),
             makeSample("S1", "P1", 10)
         );
-        mockAllTreatments("fakedrugazol", "madeupanib");
 
         PatientTreatmentRow rowA = makePatientRow("fakedrugazol", 1, Collections.singletonList("S0"), Collections.singletonList("P0"));
         PatientTreatmentRow rowB = makePatientRow("madeupanib", 1, Collections.singletonList("S1"), Collections.singletonList("P1"));
@@ -252,6 +245,11 @@ private void mockTreatmentsByPatient(Treatment... treatments) {
             .thenReturn(treatmentsByPatient);
     }
 
+    private void mockTreatments(Treatment... treatments) {
+        Mockito.when(treatmentRepository.getTreatments(Mockito.any(), Mockito.any(), Mockito.any()))
+            .thenReturn(Arrays.stream(treatments).collect(Collectors.toList()));
+    }
+
     private void mockSamplesByPatient(ClinicalEventSample... samples) {
         Map<String, List<ClinicalEventSample>> samplesByPatient = Arrays.stream(samples)
             .collect(Collectors.groupingBy(ClinicalEventSample::getPatientId));
@@ -261,12 +259,6 @@ private void mockSamplesByPatient(ClinicalEventSample... samples) {
             .thenReturn(samplesByPatient);
     }
 
-    private void mockAllTreatments(String... treatments) {
-        Set<String> allTreatments = new HashSet<>(Arrays.asList(treatments));
-        Mockito.when(treatmentRepository.getAllUniqueTreatments(Mockito.any(), Mockito.any(), Mockito.any()))
-            .thenReturn(allTreatments);
-    }
-
     private Treatment makeTreatment(String treatment, String patientId, Integer start, Integer stop) {
         Treatment t = new Treatment();
         t.setTreatment(treatment);ueu(d26f2b7b9af984e37a4ffabd3d6bf1b5eb108bfd}(sha(d26f2b7b9af984e37a4ffabd3d6bf1b5eb108bfdnode_idEC_kwDOAe-hB9oAKGQyNmYyYjdiOWFmOTg0ZTM3YTRmZmFiZDNkNmJmMWI1ZWIxMDhiZmQcommit}(author}(name
Onur Sumeremails.onur.sumer@gmail.comdate2023-06-08T20:54:38Zu	committer}(jZf  
Onur Sumerj\f  s.onur.sumer@gmail.comj^f  2023-06-08T20:55:04Zumessageremove compiler plugintree}(jRf  (a23765af28ff9d16ddfb41b41db4e19c71b6c0d6urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/a23765af28ff9d16ddfb41b41db4e19c71b6c0d6ujjf  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/d26f2b7b9af984e37a4ffabd3d6bf1b5eb108bfd
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujjf  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d26f2b7b9af984e37a4ffabd3d6bf1b5eb108bfdhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/d26f2b7b9af984e37a4ffabd3d6bf1b5eb108bfdcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/d26f2b7b9af984e37a4ffabd3d6bf1b5eb108bfd/commentsjXf  }(login	onursumeridJ6 jTf  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5jjf  &https://api.github.com/users/onursumerjvf  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminuj`f  }(j{f  	onursumerj}f  J6 jTf  MDQ6VXNlcjM2MDQxOTg=jf  3https://avatars.githubusercontent.com/u/3604198?v=4jf  h5jjf  &https://api.github.com/users/onursumerjvf  https://github.com/onursumerjf  0https://api.github.com/users/onursumer/followersjf  =https://api.github.com/users/onursumer/following{/other_user}jf  6https://api.github.com/users/onursumer/gists{/gist_id}jf  =https://api.github.com/users/onursumer/starred{/owner}{/repo}jf  4https://api.github.com/users/onursumer/subscriptionsjf  +https://api.github.com/users/onursumer/orgsjf  ,https://api.github.com/users/onursumer/reposjf  7https://api.github.com/users/onursumer/events{/privacy}jf  6https://api.github.com/users/onursumer/received_eventsjf  Userjf  uparents]}(jRf  (6bb14d78b1f951c4f6d6db29c068a5e8d049855djjf  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/6bb14d78b1f951c4f6d6db29c068a5e8d049855djvf  Xhttps://github.com/cBioPortal/cbioportal/commit/6bb14d78b1f951c4f6d6db29c068a5e8d049855duastats}(totalK	additionsK 	deletionsKufiles]}(jRf  (f1e0b4661b82a1fce57ef66b81010d144909ab0cfilename'persistence/persistence-mybatis/pom.xmlstatusmodifiedjf  K jf  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/d26f2b7b9af984e37a4ffabd3d6bf1b5eb108bfd/persistence%2Fpersistence-mybatis%2Fpom.xmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/d26f2b7b9af984e37a4ffabd3d6bf1b5eb108bfd/persistence%2Fpersistence-mybatis%2Fpom.xmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fpom.xml?ref=d26f2b7b9af984e37a4ffabd3d6bf1b5eb108bfdpatchXq  @@ -7,18 +7,6 @@
              PROJECT_VERSION env variable (see version.sh) -->
         <version>0-unknown-version-SNAPSHOT</version>
     </parent>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>9</source>
-                    <target>9</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>persistence-mybatis</artifactId>uau(dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7}(sha(dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7node_idEC_kwDOAe-hB9oAKGRjN2IwZWExZGZlODFhMzlhMjJkMTM3M2E4ZGQ2ODgyZWY1ZWM4YTccommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-15T13:58:31Zu	committer}(jf  GitHubjf  noreply@github.comjf  2023-08-15T13:58:31Zumessage\Merge pull request #10329 from cBioPortal/label-check

Add label check test for pull requesttree}(jf  (824c4622444dc4b7ac8206b190a9068a13b5ae0burlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/824c4622444dc4b7ac8206b190a9068a13b5ae0bujf  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk24SHCRBK7hj4Ov3rIwAAsgcIADQ4yBR7EjR8diJldZ6YTZ2N
cwCI4ItbEicEowkokAkTDoCglyx1a++3JeJeA385Wupa4LtCbsGvh+OwCsR7CbeB
vBwmdEsR3WmXp0qyeebAsqX68UCNJlcwoAHArXV46kNX1tjXS6yedZbEtBPWyoch
Lp4p1xrQuDHQzlL0+9wsAJ18OHoX6qdoYtYzvDEEEG+kbzE0IhJGHYuGe5d0Xa77
RljmG4t7CXUKBYCc904LqlND3PyiTO1h5XiSfTmUEUJJzNeZl4/BuzdznnEb6vP5
+9xknwJCEAwLKGbbQ8WTFkrfH8PRgoh+/d1kgNFfvJXFqXLyskNkXfQH80j4LzU=
=pxRu
-----END PGP SIGNATURE-----
payloadXu  tree 824c4622444dc4b7ac8206b190a9068a13b5ae0b
parent 63d2c6a2dc80d078c83d983f7c7067b52d7bc316
parent ca96047008397cd89fb3946d58bcdf0a5127caf9
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1692107911 -0400
committer GitHub <noreply@github.com> 1692107911 -0400

Merge pull request #10329 from cBioPortal/label-check

Add label check test for pull requestuujf  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7html_urlXhttps://github.com/cBioPortal/cbioportal/commit/dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7/commentsjf  }(login
dippindotsidJtO jf  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5jf  'https://api.github.com/users/dippindotsjf  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminujf  }(jf  web-flowjf  J/jf  MDQ6VXNlcjE5ODY0NDQ3jf  4https://avatars.githubusercontent.com/u/19864447?v=4jf  h5jf  %https://api.github.com/users/web-flowjf  https://github.com/web-flowjf  /https://api.github.com/users/web-flow/followersjf  <https://api.github.com/users/web-flow/following{/other_user}jf  5https://api.github.com/users/web-flow/gists{/gist_id}jg  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jg  3https://api.github.com/users/web-flow/subscriptionsjg  *https://api.github.com/users/web-flow/orgsjg  +https://api.github.com/users/web-flow/reposj	g  6https://api.github.com/users/web-flow/events{/privacy}jg  5https://api.github.com/users/web-flow/received_eventsj
g  Userjg  uparents](}(jf  (63d2c6a2dc80d078c83d983f7c7067b52d7bc316jf  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/63d2c6a2dc80d078c83d983f7c7067b52d7bc316jf  Xhttps://github.com/cBioPortal/cbioportal/commit/63d2c6a2dc80d078c83d983f7c7067b52d7bc316u}(jf  (ca96047008397cd89fb3946d58bcdf0a5127caf9jf  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ca96047008397cd89fb3946d58bcdf0a5127caf9jf  Xhttps://github.com/cBioPortal/cbioportal/commit/ca96047008397cd89fb3946d58bcdf0a5127caf9uestats}(totalK2	additionsK2	deletionsK ufiles]}(jf  (ceb4c8b79341f873df9e2fb7bb25e0457b947f93filename!.github/workflows/label-check.ymlstatusaddedj-g  K2j.g  K changesK2blob_url|https://github.com/cBioPortal/cbioportal/blob/dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7/.github%2Fworkflows%2Flabel-check.ymlraw_url{https://github.com/cBioPortal/cbioportal/raw/dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7/.github%2Fworkflows%2Flabel-check.ymlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/.github%2Fworkflows%2Flabel-check.yml?ref=dc7b0ea1dfe81a39a22d1373a8dd6882ef5ec8a7patchX  @@ -0,0 +1,50 @@
+# This GitHub Actions workflow is designed to automatically check pull requests in the cBioPortal repository for valid labels before they can be merged.
+# The workflow ensures that pull requests have labels that are defined in the .github/release-drafter.yml file's "categories" section.
+# If a pull request lacks a valid label, the workflow will fail, preventing the merge until valid labels are applied.
+name: Label Check
+
+on:
+  pull_request:
+    types:
+      - opened
+      - synchronize
+
+jobs:
+  label-check:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check PR Labels
+        uses: actions/checkout@v2
+
+      - name: Install dependencies
+        run: |
+          wget https://github.com/mikefarah/yq/releases/download/v4.34.2/yq_linux_amd64 -O /usr/local/bin/yq
+          chmod +x /usr/local/bin/yq
+      - name: Get Labels from release-drafter.yml
+        id: get_labels
+        run: |
+          curl -s "https://raw.githubusercontent.com/cBioPortal/cbioportal/master/.github/release-drafter.yml" | \
+            yq -r '.categories[].labels[]' > labels.txt
+      - name: Check Labels
+        id: check_labels
+        run: |
+          PR_NUMBER=$(jq -r ".number" $GITHUB_EVENT_PATH)
+          PR_LABELS=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER" | \
+                       jq -r '.labels[].name')
+          mapfile -t AVAILABLE_LABELS < labels.txt
+          for LABEL in ${PR_LABELS[@]}; do
+            if [[ "$LABEL" == "skip-changelog" ]]; then
+              echo "PR contains a valid label: skip-changelog"
+              exit 0  # Valid label found, exit successfully
+            fi
+            for AVAILABLE_LABEL in "${AVAILABLE_LABELS[@]}"; do
+              if [[ "$AVAILABLE_LABEL" == "$LABEL" ]]; then
+                echo "PR contains a valid label: $LABEL"
+                exit 0  # Valid label found, exit successfully
+              fi
+            done
+          done
+          echo "No valid label found on PR."
+          echo "Available label options from release-drafter.yml:"
+          cat labels.txt
+          exit 1  # No valid label found, exit with an erroruau(ac870ab80ff695b2735b85ce787aff951721480c}(sha(ac870ab80ff695b2735b85ce787aff951721480cnode_idEC_kwDOAe-hB9oAKGFjODcwYWI4MGZmNjk1YjI3MzViODVjZTc4N2FmZjk1MTcyMTQ4MGMcommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-07-27T14:21:35Zu	committer}(jJg  Gaofei ZhaojLg  ,15748980+dippindots@users.noreply.github.comjNg  2023-08-02T19:38:27ZumessageUpdate migration docstree}(jBg  (c08105340ea44613dcf98ef6c867ef3669500636urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c08105340ea44613dcf98ef6c867ef3669500636ujZg  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/ac870ab80ff695b2735b85ce787aff951721480c
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujZg  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ac870ab80ff695b2735b85ce787aff951721480chtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/ac870ab80ff695b2735b85ce787aff951721480ccomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/ac870ab80ff695b2735b85ce787aff951721480c/commentsjHg  }(login
pvannieropidJa jDg  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5jZg  'https://api.github.com/users/pvannieropjfg  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminujPg  }(jkg  
dippindotsjmg  JtO jDg  MDQ6VXNlcjE1NzQ4OTgwjog  4https://avatars.githubusercontent.com/u/15748980?v=4jqg  h5jZg  'https://api.github.com/users/dippindotsjfg  https://github.com/dippindotsjtg  1https://api.github.com/users/dippindots/followersjvg  >https://api.github.com/users/dippindots/following{/other_user}jxg  7https://api.github.com/users/dippindots/gists{/gist_id}jzg  >https://api.github.com/users/dippindots/starred{/owner}{/repo}j|g  5https://api.github.com/users/dippindots/subscriptionsj~g  ,https://api.github.com/users/dippindots/orgsjg  -https://api.github.com/users/dippindots/reposjg  8https://api.github.com/users/dippindots/events{/privacy}jg  7https://api.github.com/users/dippindots/received_eventsjg  Userjg  uparents]}(jBg  (8ab95bb77b9f498d8803985ca4bbd30f89c82db5jZg  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8ab95bb77b9f498d8803985ca4bbd30f89c82db5jfg  Xhttps://github.com/cBioPortal/cbioportal/commit/8ab95bb77b9f498d8803985ca4bbd30f89c82db5uastats}(totalK)	additionsK 	deletionsK	ufiles](}(jBg  (b5177e87276e210fe706015283d83e8dc249f607filenamedocs/Migration-Guide.mdstatusmodifiedjg  Kjg  KchangesK'blob_urlphttps://github.com/cBioPortal/cbioportal/blob/ac870ab80ff695b2735b85ce787aff951721480c/docs%2FMigration-Guide.mdraw_urlohttps://github.com/cBioPortal/cbioportal/raw/ac870ab80ff695b2735b85ce787aff951721480c/docs%2FMigration-Guide.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FMigration-Guide.md?ref=ac870ab80ff695b2735b85ce787aff951721480cpatchX  @@ -1,22 +1,45 @@
 # Migration Guide
-This page describes various changes deployers will need to make as they deploy newer versions of the portal. 
+
+This page describes various changes deployers will need to make as they deploy newer versions of the portal. -
+
+## <v5.3.16 --> v5.3.17
+
+- Remove `db.host` and `db.portal_db_name` and `db.use_ssl` properties from the _portal.properties_ file or JVM
+  parameters. Update property `db.connection_string` to encode the hostname, port, database and other parameters
+  according to [Database Settings](portal.properties-Reference.md#Database-Settings) documentation and pass via
+  _portal.properties_ file or as JVM parameter.
 
 ## v4 -> v5
-- All fusion profiles are now required to be migrated to structural variant format. One can use this [migration tool](https://github.com/cBioPortal/datahub-study-curation-tools/tree/master/fusion-to-sv-converter) to migrate the fusion files.
-- All fusion files on [datahub](https://github.com/cBioPortal/datahub) were migrated to the structural variant format and their molecular profile ids were renamed from `{study_id}_fusion` to `{study_id}_structural_variants`. If you are using these datahub files one would need to re-import them.
-- Study view user setting will be outdated after migration, please follow `Clear Study View User settings` section in [Session Service Management](Session-Service-Management.md#Clear-Study-View-User-settings)
-- The new default set of transcripts for each gene has changed from `uniprot` to `mskcc`. See the [Mutation Data Annotation Section](./mutation-data-transcript-annotation.md) for more details. To keep the old set of default transcripts add the property `genomenexus.isoform_override_source=uniprot` to [the properties file](https://docs.cbioportal.org/deployment/customization/portal.properties-reference/#properties).
+
+- All fusion profiles are now required to be migrated to structural variant format. One can use
+  this [migration tool](https://github.com/cBioPortal/datahub-study-curation-tools/tree/master/fusion-to-sv-converter)
+  to migrate the fusion files.
+- All fusion files on [datahub](https://github.com/cBioPortal/datahub) were migrated to the structural variant format
+  and their molecular profile ids were renamed from `{study_id}_fusion` to `{study_id}_structural_variants`. If you are
+  using these datahub files one would need to re-import them.
+- Study view user setting will be outdated after migration, please follow `Clear Study View User settings` section
+  in [Session Service Management](Session-Service-Management.md#Clear-Study-View-User-settings)
+- The new default set of transcripts for each gene has changed from `uniprot` to `mskcc`. See
+  the [Mutation Data Annotation Section](./mutation-data-transcript-annotation.md) for more details. To keep the old set
+  of default transcripts add the property `genomenexus.isoform_override_source=uniprot`
+  to [the properties file](https://docs.cbioportal.org/deployment/customization/portal.properties-reference/#properties).
 
 See the [v5.0.0 release notes](https://github.com/cBioPortal/cbioportal/releases/tag/v5.0.0) for more details.
 
 ## v3 -> v4
+
 - Introduces `logback` package for logging. If you don't have any custom log4j.properties file, no changes are necessary
-- Cleans up several old databases ([PR](https://github.com/cBioPortal/cbioportal/pull/9360)). In theory the migration should be seamless, since the docker container detects an old database version and migrates it automatically.
+- Cleans up several old databases ([PR](https://github.com/cBioPortal/cbioportal/pull/9360)). In theory the migration
+  should be seamless, since the docker container detects an old database version and migrates it automatically.
 
 See the [v4.0.0 release notes](https://github.com/cBioPortal/cbioportal/releases/tag/v4.0.0) for more details.
 
 ## v2 -> v3
-- Session service is now required to be set up. You can't run it without session service. The recommended way to run cBioPortal is to use the Docker Compose instructions.
+
+- Session service is now required to be set up. You can't run it without session service. The recommended way to run
+  cBioPortal is to use the Docker Compose instructions.
 
 ## v1 -> v2
-- Changes cBioPortal to a Single Page App (SPA) written in React, Mobx and bootstrap that uses a REST API. It shouldn't change anything for a deployer.
+
+- Changes cBioPortal to a Single Page App (SPA) written in React, Mobx and bootstrap that uses a REST API. It shouldn't
+  change anything for a deployer.u      }(jBg  (0fbbe48a256a8b7a3f2bd947c7d6470ca0cb8856jg  <docs/deployment/customization/portal.properties-Reference.mdjg  modifiedjg  Kjg  Kjg  Kjg  https://github.com/cBioPortal/cbioportal/blob/ac870ab80ff695b2735b85ce787aff951721480c/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdjg  https://github.com/cBioPortal/cbioportal/raw/ac870ab80ff695b2735b85ce787aff951721480c/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdjg  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.md?ref=ac870ab80ff695b2735b85ce787aff951721480cjg  X  @@ -22,7 +22,7 @@ For example:
 jdbc:mysql://localhost:3306/cbiodb?zeroDateTimeBehavior=convertToNull&useSSL=false
 ```
 
-:warning: The fields `db.host` and `db.portal_db_name` are deprecated. It is recommended to configure the database connection using
+:warning: The fields `db.host` and `db.portal_db_name` and `db.use_ssl` are deprecated. It is recommended to configure the database connection using
 the `db.connection_string` instead.
 
 `db.tomcat_resource_name` is required in order to work with the tomcat database connection pool and should have the default value jdbc/cbioportal in order to work correctly with the your WAR file.ueu(8bca4a72dd6907c58c57320609a7b8492b4b35fc}(sha(8bca4a72dd6907c58c57320609a7b8492b4b35fcnode_idEC_kwDOAe-hB9oAKDhiY2E0YTcyZGQ2OTA3YzU4YzU3MzIwNjA5YTdiODQ5MmI0YjM1ZmMcommit}(author}(name
Onur Sumeremails.onur.sumer@gmail.comdate2023-06-08T21:28:41Zu	committer}(jg  
Onur Sumerjg  s.onur.sumer@gmail.comjg  2023-06-08T21:28:41Zumessage2add mybatiscolumnstore to test application contexttree}(jg  (1753dcd74600bc29ea99cff35d59b29aca831e02urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/1753dcd74600bc29ea99cff35d59b29aca831e02ujg  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/8bca4a72dd6907c58c57320609a7b8492b4b35fc
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujg  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8bca4a72dd6907c58c57320609a7b8492b4b35fchtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/8bca4a72dd6907c58c57320609a7b8492b4b35fccomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/8bca4a72dd6907c58c57320609a7b8492b4b35fc/commentsjg  }(login	onursumeridJ6 jg  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5jg  &https://api.github.com/users/onursumerjg  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminujg  }(jg  	onursumerjg  J6 jg  MDQ6VXNlcjM2MDQxOTg=jg  3https://avatars.githubusercontent.com/u/3604198?v=4jg  h5jg  &https://api.github.com/users/onursumerjg  https://github.com/onursumerjg  0https://api.github.com/users/onursumer/followersjg  =https://api.github.com/users/onursumer/following{/other_user}jg  6https://api.github.com/users/onursumer/gists{/gist_id}jg  =https://api.github.com/users/onursumer/starred{/owner}{/repo}jg  4https://api.github.com/users/onursumer/subscriptionsjg  +https://api.github.com/users/onursumer/orgsjg  ,https://api.github.com/users/onursumer/reposjg  7https://api.github.com/users/onursumer/events{/privacy}jh  6https://api.github.com/users/onursumer/received_eventsjh  Userjh  uparents]}(jg  (6bb14d78b1f951c4f6d6db29c068a5e8d049855djg  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/6bb14d78b1f951c4f6d6db29c068a5e8d049855djg  Xhttps://github.com/cBioPortal/cbioportal/commit/6bb14d78b1f951c4f6d6db29c068a5e8d049855duastats}(totalK	additionsK	deletionsKufiles]}(jg  (00830ee9241dd61eb827f69b1699d1aa63a5e581filename2core/src/test/resources/applicationContext-dao.xmlstatusmodifiedjh  Kj h  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/8bca4a72dd6907c58c57320609a7b8492b4b35fc/core%2Fsrc%2Ftest%2Fresources%2FapplicationContext-dao.xmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/8bca4a72dd6907c58c57320609a7b8492b4b35fc/core%2Fsrc%2Ftest%2Fresources%2FapplicationContext-dao.xmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fresources%2FapplicationContext-dao.xml?ref=8bca4a72dd6907c58c57320609a7b8492b4b35fcpatchX  @@ -80,7 +80,7 @@
     
     <!-- scan for mappers and let them be autowired -->
     <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
-        <property name="basePackage" value="org.mskcc.cbio.portal.persistence,org.cbioportal.persistence.mybatis" />
+        <property name="basePackage" value="org.mskcc.cbio.portal.persistence,org.cbioportal.persistence.mybatis,org.cbioportal.persistence.mybatiscolumnstore" />
     </bean>
 
     <!-- enable component scanning (beware that this does not enable mapper scanning!) -->uau(9836b22885675de6b753f141a08f14fcaeb85277}(sha(9836b22885675de6b753f141a08f14fcaeb85277node_idEC_kwDOAe-hB9oAKDk4MzZiMjI4ODU2NzVkZTZiNzUzZjE0MWEwOGYxNGZjYWViODUyNzccommit}(author}(namePrasanna Kumar Jagannathanemail+37613906+jagnathan@users.noreply.github.comdate2023-07-11T13:29:52Zu	committer}(j<h  Prasanna Kumar Jagannathanj>h  +37613906+jagnathan@users.noreply.github.comj@h  2023-07-11T13:29:52Zumessageauthentication object validity check

authentication object validity check - only if user authorization is enabled, authentication object is obtained from SecurityContextHoldertree}(j4h  (bb502bab12f30262a06d39990d58d08aba7059c7urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/bb502bab12f30262a06d39990d58d08aba7059c7ujLh  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/9836b22885675de6b753f141a08f14fcaeb85277
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujLh  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9836b22885675de6b753f141a08f14fcaeb85277html_urlXhttps://github.com/cBioPortal/cbioportal/commit/9836b22885675de6b753f141a08f14fcaeb85277comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/9836b22885675de6b753f141a08f14fcaeb85277/commentsj:h  }(login	jagnathanidJR=j6h  MDQ6VXNlcjM3NjEzOTA2
avatar_url4https://avatars.githubusercontent.com/u/37613906?v=4gravatar_idh5jLh  &https://api.github.com/users/jagnathanjXh  https://github.com/jagnathan
followers_url0https://api.github.com/users/jagnathan/followers
following_url=https://api.github.com/users/jagnathan/following{/other_user}	gists_url6https://api.github.com/users/jagnathan/gists{/gist_id}starred_url=https://api.github.com/users/jagnathan/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/jagnathan/subscriptionsorganizations_url+https://api.github.com/users/jagnathan/orgs	repos_url,https://api.github.com/users/jagnathan/repos
events_url7https://api.github.com/users/jagnathan/events{/privacy}received_events_url6https://api.github.com/users/jagnathan/received_eventstypeUser
site_adminujBh  }(j]h  	jagnathanj_h  JR=j6h  MDQ6VXNlcjM3NjEzOTA2jah  4https://avatars.githubusercontent.com/u/37613906?v=4jch  h5jLh  &https://api.github.com/users/jagnathanjXh  https://github.com/jagnathanjfh  0https://api.github.com/users/jagnathan/followersjhh  =https://api.github.com/users/jagnathan/following{/other_user}jjh  6https://api.github.com/users/jagnathan/gists{/gist_id}jlh  =https://api.github.com/users/jagnathan/starred{/owner}{/repo}jnh  4https://api.github.com/users/jagnathan/subscriptionsjph  +https://api.github.com/users/jagnathan/orgsjrh  ,https://api.github.com/users/jagnathan/reposjth  7https://api.github.com/users/jagnathan/events{/privacy}jvh  6https://api.github.com/users/jagnathan/received_eventsjxh  Userjzh  uparents]}(j4h  (7638a27317d615fd9836e5e4f9fd6c84ee431cfajLh  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7638a27317d615fd9836e5e4f9fd6c84ee431cfajXh  Xhttps://github.com/cBioPortal/cbioportal/commit/7638a27317d615fd9836e5e4f9fd6c84ee431cfauastats}(totalK	additionsK	deletionsKufiles]}(j4h  (fc940e98784af0f2ad499c03a45f817f3441cfccfilename9web/src/main/java/org/cbioportal/web/StudyController.javastatusmodifiedjh  Kjh  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/9836b22885675de6b753f141a08f14fcaeb85277/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/9836b22885675de6b753f141a08f14fcaeb85277/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.java?ref=9836b22885675de6b753f141a08f14fcaeb85277patchX  @@ -101,7 +101,8 @@ public ResponseEntity<List<CancerStudy>> getAllStudies(
         @ApiParam("Direction of the sort")
         @RequestParam(defaultValue = "ASC") Direction direction
     ) {
-        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+       
+        Authentication authentication = null;
         
         // Only use this feature on the public portal and make sure it is never used
         // on portals using auth, as in auth setting, different users will have different
@@ -116,6 +117,9 @@ public ResponseEntity<List<CancerStudy>> getAllStudies(
                 && direction == Direction.ASC) {
             return new ResponseEntity<>(defaultResponse, HttpStatus.OK);
         }
+        else
+            authentication = SecurityContextHolder.getContext().getAuthentication();
+
 
         if (projection == Projection.META) {
             HttpHeaders responseHeaders = new HttpHeaders();uau(566da57cbc90cb639dd5f63a42a376a397a00e28}(sha(566da57cbc90cb639dd5f63a42a376a397a00e28node_idEC_kwDOAe-hB9oAKDU2NmRhNTdjYmM5MGNiNjM5ZGQ1ZjYzYTQyYTM3NmEzOTdhMDBlMjgcommit}(author}(name
Ino de Bruijnemailino@ino.biodate2023-06-02T21:15:17Zu	committer}(jh  GitHubjh  noreply@github.comjh  2023-06-02T21:15:17Zumessagechange docker compose cmdstree}(jh  (f68fc6c3ab0d3e01c5dd80b1b33cab34f91a0862urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/f68fc6c3ab0d3e01c5dd80b1b33cab34f91a0862ujh  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/566da57cbc90cb639dd5f63a42a376a397a00e28
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkelvlCRBK7hj4Ov3rIwAAgKEIAInpbjBHGTH8E8HbiyV8mZ+Q
x3llEfisMayTx5QFloryFEbs+XHDLJliSGkfkBuQIlpwt8NULpfid7p+jQ4r6hJc
PGIuDmGbmUvEHnmCPhQpYsdGTj1RNWPyDGcgsZ3uvmtKfTfhlWsUmLTH8NzV+DOT
D9ELxV8lU5xEY9JGTk8sA70kGTKMuEPLpRsBypfQyU0pLJW6knw8V1deM1uInMcu
A6rO1EFCHZHmg6KuCpsbNlfzmHOpLcnio4z5yNPsRAqRFOtbbGl2ZNLobhaDcTcn
jK8aMIeWyNx5acdf33q5A2xywPbtlWllRdCuIzXDJ8J4VnSJ1nH0BshZtG4Us8Y=
=d9VE
-----END PGP SIGNATURE-----
payloadtree f68fc6c3ab0d3e01c5dd80b1b33cab34f91a0862
parent d72a44f36f336ce6047b2af99add25d36aa6db2b
author Ino de Bruijn <ino@ino.bio> 1685740517 -0400
committer GitHub <noreply@github.com> 1685740517 -0400

change docker compose cmdsuujh  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/566da57cbc90cb639dd5f63a42a376a397a00e28html_urlXhttps://github.com/cBioPortal/cbioportal/commit/566da57cbc90cb639dd5f63a42a376a397a00e28comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/566da57cbc90cb639dd5f63a42a376a397a00e28/commentsjh  }(logininodbidJZ jh  MDQ6VXNlcjEzMzQwMDQ=
avatar_url3https://avatars.githubusercontent.com/u/1334004?v=4gravatar_idh5jh  "https://api.github.com/users/inodbjh  https://github.com/inodb
followers_url,https://api.github.com/users/inodb/followers
following_url9https://api.github.com/users/inodb/following{/other_user}	gists_url2https://api.github.com/users/inodb/gists{/gist_id}starred_url9https://api.github.com/users/inodb/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/inodb/subscriptionsorganizations_url'https://api.github.com/users/inodb/orgs	repos_url(https://api.github.com/users/inodb/repos
events_url3https://api.github.com/users/inodb/events{/privacy}received_events_url2https://api.github.com/users/inodb/received_eventstypeUser
site_adminujh  }(jh  web-flowjh  J/jh  MDQ6VXNlcjE5ODY0NDQ3jh  4https://avatars.githubusercontent.com/u/19864447?v=4jh  h5jh  %https://api.github.com/users/web-flowjh  https://github.com/web-flowjh  /https://api.github.com/users/web-flow/followersjh  <https://api.github.com/users/web-flow/following{/other_user}jh  5https://api.github.com/users/web-flow/gists{/gist_id}jh  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jh  3https://api.github.com/users/web-flow/subscriptionsjh  *https://api.github.com/users/web-flow/orgsjh  +https://api.github.com/users/web-flow/reposjh  6https://api.github.com/users/web-flow/events{/privacy}jh  5https://api.github.com/users/web-flow/received_eventsjh  Userjh  uparents]}(jh  (d72a44f36f336ce6047b2af99add25d36aa6db2bjh  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d72a44f36f336ce6047b2af99add25d36aa6db2bjh  Xhttps://github.com/cBioPortal/cbioportal/commit/d72a44f36f336ce6047b2af99add25d36aa6db2buastats}(totalK	additionsK	deletionsKufiles]}(jh  (384b27423f43625763df0a7423dd9598241def33filename docs/deployment/docker/README.mdstatusmodifiedji  Kji  KchangesKblob_url}https://github.com/cBioPortal/cbioportal/blob/566da57cbc90cb639dd5f63a42a376a397a00e28/docs%2Fdeployment%2Fdocker%2FREADME.mdraw_url|https://github.com/cBioPortal/cbioportal/raw/566da57cbc90cb639dd5f63a42a376a397a00e28/docs%2Fdeployment%2Fdocker%2FREADME.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fdocker%2FREADME.md?ref=566da57cbc90cb639dd5f63a42a376a397a00e28patchX+  @@ -18,15 +18,15 @@ In this example we use [Docker Compose](https://docs.docker.com/compose/) to spi
 git clone https://github.com/cBioPortal/cbioportal-docker-compose.git
 cd cbioportal-docker-compose
 ./init.sh
-docker-compose up
+docker compose up
 ```
 
 You should now be able to see the cBioPortal website at http://localhost:8080
 
 Import studies with:
 
 ```
-docker-compose run cbioportal metaImport.py -u http://cbioportal:8080 -s study/lgg_ucsf_2014/ -o
+docker compose run cbioportal metaImport.py -u http://cbioportal:8080 -s study/lgg_ucsf_2014/ -o
 ```
 
 Clear persistent data volumes with:
@@ -54,7 +54,7 @@ Then download all necessary files (seed data, example config and example study f
 Then run:
 
 ```
-docker-compose up
+docker compose up
 ```
 
 This will start all four containers (services) defined [here](https://github.com/cBioPortal/cbioportal-docker-compose/blob/master/docker-compose.yml). That is:
@@ -76,7 +76,7 @@ Go to the next step to see how to import studies.
 If you prefer to run the services in detached mode (i.e. not logging everything to your terminal), you can run
 
 ```
-docker-compose up -d
+docker compose up -d
 ```
 
 In this mode, you'll have to check the logs of each container manually using e.g.:
@@ -95,12 +95,12 @@ docker ps -a
 To import studies you can run:
 
 ```
-docker-compose run cbioportal metaImport.py -u http://cbioportal:8080 -s study/lgg_ucsf_2014/ -o
+docker compose run cbioportal metaImport.py -u http://cbioportal:8080 -s study/lgg_ucsf_2014/ -o
 ```
 This will import the [lgg_ucsf_2014 study](https://www.cbioportal.org/patient?studyId=lgg_ucsf_2014) into your local database. It will take a few minutes to import. After importing, restart the cbioportal web container:
 
 ```
-docker-compose restart cbioportal
+docker compose restart cbioportal
 ```
 
 or uau(ff4c6ea2926a2628c3dbd2a55109a250f3f636be}(sha(ff4c6ea2926a2628c3dbd2a55109a250f3f636benode_idEC_kwDOAe-hB9oAKGZmNGM2ZWEyOTI2YTI2MjhjM2RiZDJhNTUxMDlhMjUwZjNmNjM2YmUcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-06-12T19:19:28Zu	committer}(j(i  GitHubj*i  noreply@github.comj,i  2023-06-12T19:19:28Zumessage[Merge pull request #10199 from cBioPortal/jjgao-patch-1

add statistical tests in GC in FAQtree}(j i  (30c9cea8511dab9b9515c11b4e5123fa11a65eb7urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/30c9cea8511dab9b9515c11b4e5123fa11a65eb7uj8i  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/ff4c6ea2926a2628c3dbd2a55109a250f3f636be
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkh2/ACRBK7hj4Ov3rIwAA1k0IAG9/GDBjjJ8r1TwUNSarXNpM
CZemiK7wfBiZWvlCwMCUr0/zPgL1HqsaIEeP1B0yK2JkG2b6gSuLA9IAIULYVGTg
ImDlOP8zxKVlsZd0X+wvkr4e5grnewhJlgpQst32EBJ+uMG5GqmO4VyfiT8nxQwC
mgSE6uf9hB6ObnQAFPT+cnkE5IH7Qi2s2yLJqDXHF/0IL5vutJnTY+x86p8nyysb
nOzSkmgNLjjG7yGmfQ3vJwlQxUcMrdCAdcrIvmSqordcWyn52cQEJvYCZucmHMfm
RaYVjh1jCtIKsiSjW9q7O8GGvxcQIYgsyRhsJ0LttfyDmuuDYIjgM/Eopf/0fQQ=
=NYeh
-----END PGP SIGNATURE-----
payloadXt  tree 30c9cea8511dab9b9515c11b4e5123fa11a65eb7
parent b2f0fbff2cfba1a2ef114de6bb89620c5a611d3b
parent f004fad033d4d7d55a0d7ec49fc91b9f147ee63e
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1686597568 -0400
committer GitHub <noreply@github.com> 1686597568 -0400

Merge pull request #10199 from cBioPortal/jjgao-patch-1

add statistical tests in GC in FAQuuj8i  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ff4c6ea2926a2628c3dbd2a55109a250f3f636behtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/ff4c6ea2926a2628c3dbd2a55109a250f3f636becomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/ff4c6ea2926a2628c3dbd2a55109a250f3f636be/commentsj&i  }(login
dippindotsidJtO j"i  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j8i  'https://api.github.com/users/dippindotsjFi  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj.i  }(jKi  web-flowjMi  J/j"i  MDQ6VXNlcjE5ODY0NDQ3jOi  4https://avatars.githubusercontent.com/u/19864447?v=4jQi  h5j8i  %https://api.github.com/users/web-flowjFi  https://github.com/web-flowjTi  /https://api.github.com/users/web-flow/followersjVi  <https://api.github.com/users/web-flow/following{/other_user}jXi  5https://api.github.com/users/web-flow/gists{/gist_id}jZi  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j\i  3https://api.github.com/users/web-flow/subscriptionsj^i  *https://api.github.com/users/web-flow/orgsj`i  +https://api.github.com/users/web-flow/reposjbi  6https://api.github.com/users/web-flow/events{/privacy}jdi  5https://api.github.com/users/web-flow/received_eventsjfi  Userjhi  uparents](}(j i  (b2f0fbff2cfba1a2ef114de6bb89620c5a611d3bj8i  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b2f0fbff2cfba1a2ef114de6bb89620c5a611d3bjFi  Xhttps://github.com/cBioPortal/cbioportal/commit/b2f0fbff2cfba1a2ef114de6bb89620c5a611d3bu}(j i  (f004fad033d4d7d55a0d7ec49fc91b9f147ee63ej8i  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/f004fad033d4d7d55a0d7ec49fc91b9f147ee63ejFi  Xhttps://github.com/cBioPortal/cbioportal/commit/f004fad033d4d7d55a0d7ec49fc91b9f147ee63euestats}(totalK	additionsK
	deletionsKufiles]}(j i  (1e554373167d152b400793ba1284cee3723885e7filenamedocs/user-guide/faq.mdstatusmodifiedji  K
ji  KchangesKblob_urlqhttps://github.com/cBioPortal/cbioportal/blob/ff4c6ea2926a2628c3dbd2a55109a250f3f636be/docs%2Fuser-guide%2Ffaq.mdraw_urlphttps://github.com/cBioPortal/cbioportal/raw/ff4c6ea2926a2628c3dbd2a55109a250f3f636be/docs%2Fuser-guide%2Ffaq.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fuser-guide%2Ffaq.md?ref=ff4c6ea2926a2628c3dbd2a55109a250f3f636bepatchX  @@ -20,6 +20,7 @@
     * [What is a Virtual Study?](/user-guide/faq.md#what-is-a-virtual-study)
     * [Is it necessary to log in to use virtual studies? If I do log in, what additional functionality do I gain?](/user-guide/faq.md#is-it-necessary-to-log-in-to-use-virtual-studies-if-i-do-log-in-what-additional-functionality-do-i-gain)
     * [What is Group Comparison?](/user-guide/faq.md#what-is-group-comparison)
+    * [What are the statistical significance tests in Group Comparison?](/user-guide/faq.md#what-are-the-statistical-significance-tests-in-group-comparison)
 * [Data Questions](/user-guide/faq.md#data-questions)
     * [General Data](/user-guide/faq.md#general-data)
         * [Does the portal contain cancer study X?](/user-guide/faq.md#does-the-portal-contain-cancer-study-x)
@@ -137,7 +138,18 @@ No. A user that has not logged in can create virtual studies and run queries in
 If you log in, you gain the ability to save your virtual study to the list of existing studies on the homepage. This makes a virtual study functionally the same as any other study: you can access your virtual studies in the query builder and you can combine an existing virtual study with any other study to create a new virtual study.
 #### What is Group Comparison?
 Group Comparison is a suite of analysis features which allows a user to compare clinical or genomic features of user-defined groups of samples. These groups can be defined based on any clinical or genomic features. For an overview, see [our tutorial on group comparison](https://www.cbioportal.org/tutorials).
-
+#### What are the statistical significance tests in Group Comparison?
+- Survival tab: Log-rank test
+- Clinical tab:
+    - Continuous data: Chi-squared test
+    - Categorical data: Kruskal Wallis test
+- Other tabs
+    - 2 groups
+        - Continuous data: one-sided t-test
+        - Categorical data: one-sided Fisher's exact test
+    - 3 or more groups
+        - Continuous data: one-way ANOVA
+        - Categorical data: Chi-squared test
 
 ## Data Questions
 ### General Datauau(63d2c6a2dc80d078c83d983f7c7067b52d7bc316}(sha(63d2c6a2dc80d078c83d983f7c7067b52d7bc316node_idEC_kwDOAe-hB9oAKDYzZDJjNmEyZGM4MGQwNzhjODNkOTgzZjdjNzA2N2I1MmQ3YmMzMTYcommit}(author}(nameritikakundraemailkundrar@mskcc.orgdate2023-08-14T20:46:11Zu	committer}(ji  GitHubji  noreply@github.comji  2023-08-14T20:46:11Zumessage/Update About-Us.md (#10196)

Update About-Us.mdtree}(ji  (1432a91f915e60b9a7c53c369c5734178ed7e28durlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/1432a91f915e60b9a7c53c369c5734178ed7e28duji  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/63d2c6a2dc80d078c83d983f7c7067b52d7bc316
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk2pKTCRBK7hj4Ov3rIwAABpwIADdEAq9mZuQCTcTHTWhiHGWW
YMrup4FAj7BKfidrPAH7A9Z3jJcz/yiVDD4RvHwVPOsMr1k5uoyHagz8jKK0yNMP
wZmCDty0RwHK2rJKU7xAklnPGH821DTJotb1u7LliltoljmsYaTV92WOkdwaslUN
zCjVeUTpFdM02KAecC09E3QWgvUfiPzMum4a6ArFAPlfVmWFYZeovK9Asus2kD0x
gKGeK3dzKhf15OyDTi9x/f8/NHtuJLZ/UjzV9JJBwU1XJ43YikT/UC1xpucVvvXo
yIbQhxnDuTq4/oFI0qD44sd2gzG+AqMqKCTqgzH12McqYdFm9Mbago8mN7rfigo=
=Yx4+
-----END PGP SIGNATURE-----
payloadtree 1432a91f915e60b9a7c53c369c5734178ed7e28d
parent 7f523c88026c238576852145307d59d23a5395a1
author ritikakundra <kundrar@mskcc.org> 1692045971 -0400
committer GitHub <noreply@github.com> 1692045971 -0400

Update About-Us.md (#10196)

Update About-Us.mduuji  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/63d2c6a2dc80d078c83d983f7c7067b52d7bc316html_urlXhttps://github.com/cBioPortal/cbioportal/commit/63d2c6a2dc80d078c83d983f7c7067b52d7bc316comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/63d2c6a2dc80d078c83d983f7c7067b52d7bc316/commentsji  }(loginritikakundraidJ9 ji  MDQ6VXNlcjEyMDA3ODYy
avatar_url4https://avatars.githubusercontent.com/u/12007862?v=4gravatar_idh5ji  )https://api.github.com/users/ritikakundraji  https://github.com/ritikakundra
followers_url3https://api.github.com/users/ritikakundra/followers
following_url@https://api.github.com/users/ritikakundra/following{/other_user}	gists_url9https://api.github.com/users/ritikakundra/gists{/gist_id}starred_url@https://api.github.com/users/ritikakundra/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/ritikakundra/subscriptionsorganizations_url.https://api.github.com/users/ritikakundra/orgs	repos_url/https://api.github.com/users/ritikakundra/repos
events_url:https://api.github.com/users/ritikakundra/events{/privacy}received_events_url9https://api.github.com/users/ritikakundra/received_eventstypeUser
site_adminuji  }(ji  web-flowji  J/ji  MDQ6VXNlcjE5ODY0NDQ3ji  4https://avatars.githubusercontent.com/u/19864447?v=4ji  h5ji  %https://api.github.com/users/web-flowji  https://github.com/web-flowji  /https://api.github.com/users/web-flow/followersji  <https://api.github.com/users/web-flow/following{/other_user}ji  5https://api.github.com/users/web-flow/gists{/gist_id}ji  <https://api.github.com/users/web-flow/starred{/owner}{/repo}ji  3https://api.github.com/users/web-flow/subscriptionsji  *https://api.github.com/users/web-flow/orgsji  +https://api.github.com/users/web-flow/reposji  6https://api.github.com/users/web-flow/events{/privacy}ji  5https://api.github.com/users/web-flow/received_eventsji  Userji  uparents]}(ji  (7f523c88026c238576852145307d59d23a5395a1ji  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7f523c88026c238576852145307d59d23a5395a1ji  Xhttps://github.com/cBioPortal/cbioportal/commit/7f523c88026c238576852145307d59d23a5395a1uastats}(totalK	additionsK	deletionsK ufiles]}(ji  (543e29132d3d4bb3a08c91ce218f89cd09cbedacfilenamedocs/About-Us.mdstatusmodifiedji  Kji  K changesKblob_urlihttps://github.com/cBioPortal/cbioportal/blob/63d2c6a2dc80d078c83d983f7c7067b52d7bc316/docs%2FAbout-Us.mdraw_urlhhttps://github.com/cBioPortal/cbioportal/raw/63d2c6a2dc80d078c83d983f7c7067b52d7bc316/docs%2FAbout-Us.mdcontents_url{https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FAbout-Us.md?ref=63d2c6a2dc80d078c83d983f7c7067b52d7bc316patch@@ -17,6 +17,7 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 * Bryan Lai
 * Calla Chennault
 * Anusha Satravada
+* Rima AlHamad
 * Nikolaus Schultz
 
 ## Dana-Farber Cancer Instituteuau(9848c5b4815ee5fef4c21448335b1fb3e81950ab}(sha(9848c5b4815ee5fef4c21448335b1fb3e81950abnode_idEC_kwDOAe-hB9oAKDk4NDhjNWI0ODE1ZWU1ZmVmNGMyMTQ0ODMzNWIxZmIzZTgxOTUwYWIcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-10T15:09:41Zu	committer}(jj  Gaofei Zhaojj  ,15748980+dippindots@users.noreply.github.comjj  2023-08-10T15:09:41Zumessage#move to ExpressionEnrichmentServicetree}(jj  (2539be87fd999e0aab158691e75cd7bc33b9c0a5urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/2539be87fd999e0aab158691e75cd7bc33b9c0a5uj*j  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/9848c5b4815ee5fef4c21448335b1fb3e81950ab
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj*j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9848c5b4815ee5fef4c21448335b1fb3e81950abhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/9848c5b4815ee5fef4c21448335b1fb3e81950abcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/9848c5b4815ee5fef4c21448335b1fb3e81950ab/commentsjj  }(login
dippindotsidJtO jj  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j*j  'https://api.github.com/users/dippindotsj6j  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj j  }(j;j  
dippindotsj=j  JtO jj  MDQ6VXNlcjE1NzQ4OTgwj?j  4https://avatars.githubusercontent.com/u/15748980?v=4jAj  h5j*j  'https://api.github.com/users/dippindotsj6j  https://github.com/dippindotsjDj  1https://api.github.com/users/dippindots/followersjFj  >https://api.github.com/users/dippindots/following{/other_user}jHj  7https://api.github.com/users/dippindots/gists{/gist_id}jJj  >https://api.github.com/users/dippindots/starred{/owner}{/repo}jLj  5https://api.github.com/users/dippindots/subscriptionsjNj  ,https://api.github.com/users/dippindots/orgsjPj  -https://api.github.com/users/dippindots/reposjRj  8https://api.github.com/users/dippindots/events{/privacy}jTj  7https://api.github.com/users/dippindots/received_eventsjVj  UserjXj  uparents]}(jj  (6da008436d7e0acf01f823edbe37b446f9cd118bj*j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/6da008436d7e0acf01f823edbe37b446f9cd118bj6j  Xhttps://github.com/cBioPortal/cbioportal/commit/6da008436d7e0acf01f823edbe37b446f9cd118buastats}(totalMb	additionsK	deletionsKufiles](}(jj  (151c27d567ff207b958f370e745da432a6d6196ffilenameMservice/src/main/java/org/cbioportal/service/ExpressionEnrichmentService.javastatusmodifiedjrj  Kjsj  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/9848c5b4815ee5fef4c21448335b1fb3e81950ab/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/9848c5b4815ee5fef4c21448335b1fb3e81950ab/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FExpressionEnrichmentService.java?ref=9848c5b4815ee5fef4c21448335b1fb3e81950abpatchX  @@ -3,10 +3,7 @@
 import java.util.List;
 import java.util.Map;
 
-import org.cbioportal.model.EnrichmentType;
-import org.cbioportal.model.GenericAssayEnrichment;
-import org.cbioportal.model.GenomicEnrichment;
-import org.cbioportal.model.MolecularProfileCaseIdentifier;
+import org.cbioportal.model.*;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 
 public interface ExpressionEnrichmentService {
@@ -19,4 +16,15 @@ List<GenericAssayEnrichment> getGenericAssayEnrichments(String molecularProfileI
             Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
             throws MolecularProfileNotFoundException;
 
+    List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
+        String molecularProfileId,
+        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
+        EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException;
+
+    List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
+                                                                                  Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
+                                                                                  EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException;
+    
 }u}(jj  (80451d6e7e9f9aae6c5e4647c3259b046ed95cebjxj  Oservice/src/main/java/org/cbioportal/service/GenericAssayEnrichmentService.javajzj  removedjrj  K jsj  Kj|j  Kj}j  https://github.com/cBioPortal/cbioportal/blob/6da008436d7e0acf01f823edbe37b446f9cd118b/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayEnrichmentService.javajj  https://github.com/cBioPortal/cbioportal/raw/6da008436d7e0acf01f823edbe37b446f9cd118b/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayEnrichmentService.javajj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayEnrichmentService.java?ref=6da008436d7e0acf01f823edbe37b446f9cd118bjj  X  @@ -1,23 +0,0 @@
-package org.cbioportal.service;
-
-import org.cbioportal.model.EnrichmentType;
-import org.cbioportal.model.GenericAssayBinaryEnrichment;
-import org.cbioportal.model.GenericAssayCategoricalEnrichment;
-import org.cbioportal.model.MolecularProfileCaseIdentifier;
-import org.cbioportal.service.exception.MolecularProfileNotFoundException;
-
-import java.util.List;
-import java.util.Map;
-
-public interface GenericAssayEnrichmentService {
-    List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
-        String molecularProfileId,
-        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
-        EnrichmentType enrichmentType)
-        throws MolecularProfileNotFoundException;
-
-    List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
-                                                                                  Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets,
-                                                                                  EnrichmentType enrichmentType)
-        throws MolecularProfileNotFoundException;
-}u}(jj  (e7b441bbc537bbdc5247089e4e5950a0750b9f3bjxj  Vservice/src/main/java/org/cbioportal/service/impl/ExpressionEnrichmentServiceImpl.javajzj  modifiedjrj  Kjsj  K	j|j  Kj}j  https://github.com/cBioPortal/cbioportal/blob/9848c5b4815ee5fef4c21448335b1fb3e81950ab/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.javajj  https://github.com/cBioPortal/cbioportal/raw/9848c5b4815ee5fef4c21448335b1fb3e81950ab/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.javajj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FExpressionEnrichmentServiceImpl.java?ref=9848c5b4815ee5fef4c21448335b1fb3e81950abjj  X@&  @@ -1,19 +1,12 @@
 package org.cbioportal.service.impl;
+import java.math.BigDecimal;
 import java.util.*;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 
 import org.apache.commons.lang3.BooleanUtils;
-import org.cbioportal.model.EnrichmentType;
-import org.cbioportal.model.Gene;
-import org.cbioportal.model.GeneMolecularAlteration;
-import org.cbioportal.model.GenericAssayEnrichment;
-import org.cbioportal.model.GenericAssayMolecularAlteration;
-import org.cbioportal.model.GenomicEnrichment;
-import org.cbioportal.model.MolecularProfile;
+import org.cbioportal.model.*;
 import org.cbioportal.model.MolecularProfile.MolecularAlterationType;
-import org.cbioportal.model.MolecularProfileCaseIdentifier;
-import org.cbioportal.model.Sample;
 import org.cbioportal.model.meta.GenericAssayMeta;
 import org.cbioportal.persistence.MolecularDataRepository;
 import org.cbioportal.service.ExpressionEnrichmentService;
@@ -23,6 +16,7 @@
 import org.cbioportal.service.SampleService;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.util.ExpressionEnrichmentUtil;
+import org.cbioportal.service.util.FisherExactTestCalculator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -43,6 +37,8 @@ public class ExpressionEnrichmentServiceImpl implements ExpressionEnrichmentServ
     @Autowired
     private SampleService sampleService;
 
+    private FisherExactTestCalculator fisherExactTestCalculator = new FisherExactTestCalculator();
+
     @Override
     // transaction needs to be setup here in order to return Iterable from
     // molecularDataService in fetchCoExpressions
@@ -152,4 +148,131 @@ private void validateMolecularProfile(MolecularProfile molecularProfile,
         }
     }
 
+    @Override
+    @Transactional(readOnly = true)
+    public List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
+        String molecularProfileId,
+        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException {
+
+        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, true);
+        Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
+            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
+
+        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets;
+
+        filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
+
+        List<GenericAssayBinaryEnrichment> genericAssayBinaryEnrichments = expressionEnrichmentUtil.getGenericAssayBinaryEnrichments(molecularProfile,
+            filteredMolecularProfileCaseSets, enrichmentType, maItr);
+
+        calcQValues(genericAssayBinaryEnrichments);
+
+        List<String> getGenericAssayStableIds = genericAssayBinaryEnrichments.stream()
+            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
+
+        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
+
+        return genericAssayBinaryEnrichments.stream().map(enrichmentDatum -> {
+            enrichmentDatum.setGenericEntityMetaProperties(
+                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
+            return enrichmentDatum;
+        }).collect(Collectors.toList());
+
+    }
+
+    @Override
+    @Transactional(readOnly = true)
+    public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
+                                                                                         Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
+        throws MolecularProfileNotFoundException {
+
+        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, false);
+
+        Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
+            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
+
+        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets;
+        filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
+
+        List<GenericAssayCategoricalEnrichment> genericAssayCategoricalEnrichments = expressionEnrichmentUtil.getGenericAssayCategoricalEnrichments(molecularProfile,
+            filteredMolecularProfileCaseSets, enrichmentType, maItr);
+
+        calcQValues(genericAssayCategoricalEnrichments);
+
+        List<String> getGenericAssayStableIds = genericAssayCategoricalEnrichments.stream()
+            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
+        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
+
+        return genericAssayCategoricalEnrichments.stream().map(enrichmentDatum -> {
+            enrichmentDatum.setGenericEntityMetaProperties(
+                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
+            return enrichmentDatum;
+        }).collect(Collectors.toList());
+    }
+
+    private MolecularProfile getAndValidateMolecularProfile(String molecularProfileId, boolean isBinary) throws MolecularProfileNotFoundException {
+        MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
+        validateMolecularProfile(molecularProfile, Arrays.asList(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY), isBinary);
+        return molecularProfile;
+    }
+
+    private void validateMolecularProfile(MolecularProfile molecularProfile,
+                                          List<MolecularProfile.MolecularAlterationType> validMolecularAlterationTypes,
+                                          boolean isBinary) throws MolecularProfileNotFoundException {
+        if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
+            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+        }
+        if(isBinary) {
+            if(!molecularProfile.getDatatype().equals("BINARY")) {
+                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+            }
+        } else {
+            if(!molecularProfile.getDatatype().equals("CATEGORICAL")) {
+                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
+            }
+        }
+    }
+
+    private Map<String, List<MolecularProfileCaseIdentifier>> filterMolecularProfileCaseSets(MolecularProfile molecularProfile, Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets) {
+        if (BooleanUtils.isTrue(molecularProfile.getPatientLevel())) {
+            List<String> sampleIds = molecularProfileCaseSets.values().stream().flatMap(Collection::stream).map(MolecularProfileCaseIdentifier::getCaseId).collect(Collectors.toList());
+            List<String> studyIds = Collections.nCopies(sampleIds.size(), molecularProfile.getCancerStudyIdentifier());
+            List<Sample> samples = sampleService.fetchSamples(studyIds, sampleIds, "ID");
+            Map<String, Integer> sampleIdToPatientIdMap = samples.stream().collect(Collectors.toMap(Sample::getStableId, Sample::getPatientId));
+
+            Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = new HashMap<>();
+            for (Map.Entry<String, List<MolecularProfileCaseIdentifier>> pair : molecularProfileCaseSets.entrySet()) {
+                Set<Integer> patientSet = new HashSet<Integer>();
+                List<MolecularProfileCaseIdentifier> identifierListUniqueByPatientId = new ArrayList<>();
+                for (MolecularProfileCaseIdentifier caseIdentifier : pair.getValue()) {
+                    if (!patientSet.contains(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()))) {
+                        identifierListUniqueByPatientId.add(caseIdentifier);
+                        patientSet.add(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()));
+                    }
+                }
+                filteredMolecularProfileCaseSets.put(pair.getKey(), identifierListUniqueByPatientId);
+            }
+            return filteredMolecularProfileCaseSets;
+        } else {
+            return molecularProfileCaseSets;
+        }
+    }
+
+    private Map<String, GenericAssayMeta> getGenericAssayMetaByStableId(List<String> stableIds, String molecularProfileId) {
+        return genericAssayService.getGenericAssayMetaByStableIdsAndMolecularIds(stableIds, stableIds.stream().map(sid -> molecularProfileId)
+                .collect(Collectors.toList()), "SUMMARY").stream()
+            .collect(Collectors.toMap(GenericAssayMeta::getStableId, Function.identity()));
+    }
+
+    private <T extends GenericAssayEnrichment> void calcQValues(List<T> enrichments) {
+        Collections.sort(enrichments, GenericAssayEnrichment::compare);
+        BigDecimal[] pValues = enrichments.stream().map(T::getpValue).toArray(BigDecimal[]::new);
+        BigDecimal[] qValues = fisherExactTestCalculator.calcqValue(pValues);
+
+        for (int i = 0; i < enrichments.size(); i++) {
+            enrichments.get(i).setqValue(qValues[i]);
+        }
+    }
+
 }u}(jj  (5761bf931d3521f8a2adcc6654f2e704f1f2c160jxj  Xservice/src/main/java/org/cbioportal/service/impl/GenericAssayEnrichmentServiceImpl.javajzj  removedjrj  K jsj  Kj|j  Kj}j  https://github.com/cBioPortal/cbioportal/blob/6da008436d7e0acf01f823edbe37b446f9cd118b/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.javajj  https://github.com/cBioPortal/cbioportal/raw/6da008436d7e0acf01f823edbe37b446f9cd118b/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.javajj  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.java?ref=6da008436d7e0acf01f823edbe37b446f9cd118bjj  X$  @@ -1,170 +0,0 @@
-package org.cbioportal.service.impl;
-
-import org.apache.commons.lang3.BooleanUtils;
-import org.cbioportal.model.*;
-import org.cbioportal.model.meta.GenericAssayMeta;
-import org.cbioportal.persistence.MolecularDataRepository;
-import org.cbioportal.service.GenericAssayEnrichmentService;
-import org.cbioportal.service.GenericAssayService;
-import org.cbioportal.service.MolecularProfileService;
-import org.cbioportal.service.SampleService;
-import org.cbioportal.service.exception.MolecularProfileNotFoundException;
-import org.cbioportal.service.util.ExpressionEnrichmentUtil;
-import org.cbioportal.service.util.FisherExactTestCalculator;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.math.BigDecimal;
-import java.util.*;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-
-@Service
-public class GenericAssayEnrichmentServiceImpl implements GenericAssayEnrichmentService {
-
-    @Autowired
-    private MolecularDataRepository molecularDataRepository;
-
-    @Autowired
-    private SampleService sampleService;
-
-    @Autowired
-    private MolecularProfileService molecularProfileService;
-
-    @Autowired
-    private FisherExactTestCalculator fisherExactTestCalculator = new FisherExactTestCalculator();
-
-    @Autowired
-    private ExpressionEnrichmentUtil expressionEnrichmentUtil;
-    @Autowired
-    private GenericAssayService genericAssayService;
-
-    @Override
-    @Transactional(readOnly = true)
-    public List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
-        String molecularProfileId,
-        Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
-        throws MolecularProfileNotFoundException {
-
-        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, true);
-        Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
-            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
-
-        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets;
-
-        filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
-
-        List<GenericAssayBinaryEnrichment> genericAssayBinaryEnrichments = expressionEnrichmentUtil.getGenericAssayBinaryEnrichments(molecularProfile,
-            filteredMolecularProfileCaseSets, enrichmentType, maItr);
-
-        calcQValues(genericAssayBinaryEnrichments);
-
-        List<String> getGenericAssayStableIds = genericAssayBinaryEnrichments.stream()
-            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
-
-        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
-
-        return genericAssayBinaryEnrichments.stream().map(enrichmentDatum -> {
-            enrichmentDatum.setGenericEntityMetaProperties(
-                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
-            return enrichmentDatum;
-        }).collect(Collectors.toList());
-
-    }
-
-    @Override
-    @Transactional(readOnly = true)
-    public List<GenericAssayCategoricalEnrichment> getGenericAssayCategoricalEnrichments(String molecularProfileId,
-                                                                                         Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets, EnrichmentType enrichmentType)
-        throws MolecularProfileNotFoundException {
-
-        MolecularProfile molecularProfile = getAndValidateMolecularProfile(molecularProfileId, false);
-
-        Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
-            .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
-
-        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets;
-        filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
-
-        List<GenericAssayCategoricalEnrichment> genericAssayCategoricalEnrichments = expressionEnrichmentUtil.getGenericAssayCategoricalEnrichments(molecularProfile,
-            filteredMolecularProfileCaseSets, enrichmentType, maItr);
-
-        calcQValues(genericAssayCategoricalEnrichments);
-
-        List<String> getGenericAssayStableIds = genericAssayCategoricalEnrichments.stream()
-            .map(GenericAssayEnrichment::getStableId).collect(Collectors.toList());
-        Map<String, GenericAssayMeta> genericAssayMetaByStableId = getGenericAssayMetaByStableId(getGenericAssayStableIds, molecularProfileId);
-
-        return genericAssayCategoricalEnrichments.stream().map(enrichmentDatum -> {
-            enrichmentDatum.setGenericEntityMetaProperties(
-                genericAssayMetaByStableId.get(enrichmentDatum.getStableId()).getGenericEntityMetaProperties());
-            return enrichmentDatum;
-        }).collect(Collectors.toList());
-    }
-
-    private MolecularProfile getAndValidateMolecularProfile(String molecularProfileId, boolean isBinary) throws MolecularProfileNotFoundException {
-        MolecularProfile molecularProfile = molecularProfileService.getMolecularProfile(molecularProfileId);
-        validateMolecularProfile(molecularProfile, Arrays.asList(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY), isBinary);
-        return molecularProfile;
-    }
-
-    private void validateMolecularProfile(MolecularProfile molecularProfile,
-                                          List<MolecularProfile.MolecularAlterationType> validMolecularAlterationTypes, 
-                                          boolean isBinary) throws MolecularProfileNotFoundException {
-        if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
-            throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-        }
-        if(isBinary) {
-            if(!molecularProfile.getDatatype().equals("BINARY")) {
-                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-            }            
-        } else {
-            if(!molecularProfile.getDatatype().equals("CATEGORICAL")) {
-                throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
-            }            
-        }
-    }
-
-    private Map<String, List<MolecularProfileCaseIdentifier>> filterMolecularProfileCaseSets(MolecularProfile molecularProfile, Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets) {
-        if (BooleanUtils.isTrue(molecularProfile.getPatientLevel())) {
-            List<String> sampleIds = molecularProfileCaseSets.values().stream().flatMap(Collection::stream).map(MolecularProfileCaseIdentifier::getCaseId).collect(Collectors.toList());
-            List<String> studyIds = Collections.nCopies(sampleIds.size(), molecularProfile.getCancerStudyIdentifier());
-            List<Sample> samples = sampleService.fetchSamples(studyIds, sampleIds, "ID");
-            Map<String, Integer> sampleIdToPatientIdMap = samples.stream().collect(Collectors.toMap(Sample::getStableId, Sample::getPatientId));
-
-            Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = new HashMap<>();
-            for (Map.Entry<String, List<MolecularProfileCaseIdentifier>> pair : molecularProfileCaseSets.entrySet()) {
-                Set<Integer> patientSet = new HashSet<Integer>();
-                List<MolecularProfileCaseIdentifier> identifierListUniqueByPatientId = new ArrayList<>();
-                for (MolecularProfileCaseIdentifier caseIdentifier : pair.getValue()) {
-                    if (!patientSet.contains(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()))) {
-                        identifierListUniqueByPatientId.add(caseIdentifier);
-                        patientSet.add(sampleIdToPatientIdMap.get(caseIdentifier.getCaseId()));
-                    }
-                }
-                filteredMolecularProfileCaseSets.put(pair.getKey(), identifierListUniqueByPatientId);
-            }
-            return filteredMolecularProfileCaseSets;
-        } else {
-            return molecularProfileCaseSets;
-        }
-    }
-
-    private Map<String, GenericAssayMeta> getGenericAssayMetaByStableId(List<String> stableIds, String molecularProfileId) {
-        return genericAssayService.getGenericAssayMetaByStableIdsAndMolecularIds(stableIds, stableIds.stream().map(sid -> molecularProfileId)
-            .collect(Collectors.toList()), "SUMMARY").stream()
-            .collect(Collectors.toMap(GenericAssayMeta::getStableId, Function.identity()));
-    }
-
-    private <T extends GenericAssayEnrichment> void calcQValues(List<T> enrichments) {
-        Collections.sort(enrichments, GenericAssayEnrichment::compare);
-        BigDecimal[] pValues = enrichments.stream().map(T::getpValue).toArray(BigDecimal[]::new);
-        BigDecimal[] qValues = fisherExactTestCalculator.calcqValue(pValues);
-
-        for (int i = 0; i < enrichments.size(); i++) {
-            enrichments.get(i).setqValue(qValues[i]);
-        }
-    }
-}u}(jj  (9af732ad0b64c8eebaf863ca944ae2526dd4c15fjxj  Jweb/src/main/java/org/cbioportal/web/GenericAssayEnrichmentController.javajzj  modifiedjrj  Kjsj  Kj|j  Kj}j  https://github.com/cBioPortal/cbioportal/blob/9848c5b4815ee5fef4c21448335b1fb3e81950ab/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.javajj  https://github.com/cBioPortal/cbioportal/raw/9848c5b4815ee5fef4c21448335b1fb3e81950ab/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.javajj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FGenericAssayEnrichmentController.java?ref=9848c5b4815ee5fef4c21448335b1fb3e81950abjj  X  @@ -7,7 +7,7 @@
 import org.cbioportal.model.GenericAssayBinaryEnrichment;
 import org.cbioportal.model.GenericAssayCategoricalEnrichment;
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
-import org.cbioportal.service.GenericAssayEnrichmentService;
+import org.cbioportal.service.ExpressionEnrichmentService;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.web.config.annotation.InternalApi;
 import org.cbioportal.web.parameter.MolecularProfileCasesGroupFilter;
@@ -33,7 +33,7 @@
 @Api(tags = "Generic Assay Enrichment Data", description = " ")
 public class GenericAssayEnrichmentController {
     @Autowired
-    private GenericAssayEnrichmentService genericAssayEnrichmentService;
+    private ExpressionEnrichmentService genericAssayEnrichmentService;
 
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/generic-assay-categorical-enrichments/fetch",ueu(48d84a4cc44a0a11ce813932b1bcade95ffe039f}(sha(48d84a4cc44a0a11ce813932b1bcade95ffe039fnode_idEC_kwDOAe-hB9oAKDQ4ZDg0YTRjYzQ0YTBhMTFjZTgxMzkzMmIxYmNhZGU5NWZmZTAzOWYcommit}(author}(nameKarthikemailkalletlakarthik@gmail.comdate2023-07-03T04:15:09Zu	committer}(jj  Karthikjj  kalletlakarthik@gmail.comjj  2023-07-18T14:40:59Zumessage!Changes related to download grouptree}(jj  (9612865b3b275cf37880cef106d8c5d270ff0868urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/9612865b3b275cf37880cef106d8c5d270ff0868ujj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/48d84a4cc44a0a11ce813932b1bcade95ffe039f
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/48d84a4cc44a0a11ce813932b1bcade95ffe039fhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/48d84a4cc44a0a11ce813932b1bcade95ffe039fcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/48d84a4cc44a0a11ce813932b1bcade95ffe039f/commentsjj  }(login	kalletlakidJƴ jj  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5jj  &https://api.github.com/users/kalletlakjj  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminujj  }(jj  	kalletlakjj  Jƴ jj  MDQ6VXNlcjEyOTU2ODcwjj  4https://avatars.githubusercontent.com/u/12956870?v=4jj  h5jj  &https://api.github.com/users/kalletlakjj  https://github.com/kalletlakjj  0https://api.github.com/users/kalletlak/followersjj  =https://api.github.com/users/kalletlak/following{/other_user}jj  6https://api.github.com/users/kalletlak/gists{/gist_id}jj  =https://api.github.com/users/kalletlak/starred{/owner}{/repo}jj  4https://api.github.com/users/kalletlak/subscriptionsjj  +https://api.github.com/users/kalletlak/orgsjj  ,https://api.github.com/users/kalletlak/reposjj  7https://api.github.com/users/kalletlak/events{/privacy}jj  6https://api.github.com/users/kalletlak/received_eventsjj  Userjj  uparents]}(jj  (9e90a2ab3e943f9840acbd6e607ca3912a45f210jj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9e90a2ab3e943f9840acbd6e607ca3912a45f210jj  Xhttps://github.com/cBioPortal/cbioportal/commit/9e90a2ab3e943f9840acbd6e607ca3912a45f210uastats}(totalK,	additionsK	deletionsKufiles](}(jj  (f9df86ed8afd28abb0a6972640e3b73c1c6b931bfilenameCcore/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.javastatusmodifiedjk  Kjk  KchangesK&blob_urlhttps://github.com/cBioPortal/cbioportal/blob/48d84a4cc44a0a11ce813932b1bcade95ffe039f/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/48d84a4cc44a0a11ce813932b1bcade95ffe039f/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.java?ref=48d84a4cc44a0a11ce813932b1bcade95ffe039fpatchX  @@ -50,11 +50,13 @@
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.commons.lang.StringUtils;
 import org.cbioportal.security.spring.authentication.PortalUserDetails;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Component;
 import org.springframework.util.ResourceUtils;
@@ -362,6 +364,10 @@ public static String parseUrl(String url)
     @Value("${frontend.url.runtime:}") 
     public void setFrontendUrlRuntime(String property) { frontendUrlRuntime = property; }
 
+    private static String downloadGroup;
+    @Value("${download_group:}") // default is empty string
+    public void setDownloadGroup(String property) { downloadGroup = property; }
+
     private static Logger LOG = LoggerFactory.getLogger(GlobalProperties.class);
     private static ConfigPropertyResolver portalProperties = new ConfigPropertyResolver();
     private static Properties mavenProperties = initializeProperties(MAVEN_PROPERTIES_FILE_NAME);
@@ -1264,18 +1270,26 @@ public static String getOncoKbToken()  {
     }
 
     public static String getDownloadControl() {
-        String downloadControlOption = getProperty("skin.hide_download_controls");
-        /*
-            skin.hide_download_controls   return_value
-                    true                    hide
-                    false                   show
-                    data                    data
-                    null/empty              show
-         */
-        switch ((downloadControlOption != null) ? downloadControlOption.trim().toLowerCase() : "false") {
-            case "true" : return "hide";
-            case "data" : return "data";
-            default: return "show";
+        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+
+        if(authentication != null &&
+            StringUtils.isNotEmpty(downloadGroup) &&
+            authentication.getAuthorities().contains(new SimpleGrantedAuthority(downloadGroup))) {
+            return "show";
+        }else {
+            String downloadControlOption = getProperty("skin.hide_download_controls");
+            /*
+                skin.hide_download_controls   return_value
+                        true                    hide
+                        false                   show
+                        data                    data
+                        null/empty              show
+             */
+            switch ((downloadControlOption != null) ? downloadControlOption.trim().toLowerCase() : "false") {
+                case "true" : return "hide";
+                case "data" : return "data";
+                default: return "show";
+            }
         }
     }
 }u}(jj  (ab5bbf48c3e1265677a20e9b240c0521c4e4da03j
k  )portal/src/main/webapp/config_service.jspjk  modifiedjk  Kjk  KO      jk  Kjk  https://github.com/cBioPortal/cbioportal/blob/48d84a4cc44a0a11ce813932b1bcade95ffe039f/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspjk  https://github.com/cBioPortal/cbioportal/raw/48d84a4cc44a0a11ce813932b1bcade95ffe039f/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspjk  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=48d84a4cc44a0a11ce813932b1bcade95ffe039fjk  Xp  @@ -202,7 +202,7 @@
         obj.put("oncoKbTokenDefined", !StringUtils.isEmpty(GlobalProperties.getOncoKbToken()));
 
         obj.put("sessionServiceEnabled", !StringUtils.isEmpty(GlobalProperties.getSessionServiceUrl()));
-        
+
         obj.put("skin_hide_download_controls", GlobalProperties.getDownloadControl());
 
         out.println(obj.toJSONString());u}(jj  (efae1b8c7946f5f768afae5b44f7b2585dab18b9j
k  ,src/main/resources/portal.properties.EXAMPLEjk  modifiedjk  Kjk  Kjk  Kjk  https://github.com/cBioPortal/cbioportal/blob/48d84a4cc44a0a11ce813932b1bcade95ffe039f/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEjk  https://github.com/cBioPortal/cbioportal/raw/48d84a4cc44a0a11ce813932b1bcade95ffe039f/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEjk  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=48d84a4cc44a0a11ce813932b1bcade95ffe039fjk  X-  @@ -433,4 +433,6 @@ persistence.cache_type=no-cache
 
 # Set StudyDownloadLinkUrl
 # Allows download links within DataSets Tab (See Portal.Properties documentation for more info)
-# study_download_url=
\ No newline at end of file
+# study_download_url=
+
+# download_group=
\ No newline at end of fileueu(283adf3bd6b4bb59992ced7ae48f0a2331bb97f5}(sha(283adf3bd6b4bb59992ced7ae48f0a2331bb97f5node_idEC_kwDOAe-hB9oAKDI4M2FkZjNiZDZiNGJiNTk5OTJjZWQ3YWU0OGYwYTIzMzFiYjk3ZjUcommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-07-27T14:21:35Zu	committer}(j4k  Gaofei Zhaoj6k  ,15748980+dippindots@users.noreply.github.comj8k  2023-08-03T21:31:46ZumessageUpdate migration docstree}(j,k  (6637a5edde01a14175b6d31db3e0f4dbb5318cb5urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/6637a5edde01a14175b6d31db3e0f4dbb5318cb5ujDk  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/283adf3bd6b4bb59992ced7ae48f0a2331bb97f5
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujDk  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/283adf3bd6b4bb59992ced7ae48f0a2331bb97f5html_urlXhttps://github.com/cBioPortal/cbioportal/commit/283adf3bd6b4bb59992ced7ae48f0a2331bb97f5comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/283adf3bd6b4bb59992ced7ae48f0a2331bb97f5/commentsj2k  }(login
pvannieropidJa j.k  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5jDk  'https://api.github.com/users/pvannieropjPk  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminuj:k  }(jUk  
dippindotsjWk  JtO j.k  MDQ6VXNlcjE1NzQ4OTgwjYk  4https://avatars.githubusercontent.com/u/15748980?v=4j[k  h5jDk  'https://api.github.com/users/dippindotsjPk  https://github.com/dippindotsj^k  1https://api.github.com/users/dippindots/followersj`k  >https://api.github.com/users/dippindots/following{/other_user}jbk  7https://api.github.com/users/dippindots/gists{/gist_id}jdk  >https://api.github.com/users/dippindots/starred{/owner}{/repo}jfk  5https://api.github.com/users/dippindots/subscriptionsjhk  ,https://api.github.com/users/dippindots/orgsjjk  -https://api.github.com/users/dippindots/reposjlk  8https://api.github.com/users/dippindots/events{/privacy}jnk  7https://api.github.com/users/dippindots/received_eventsjpk  Userjrk  uparents]}(j,k  (1d6350cafe2c619b9faa6ee29d93788ce74839e2jDk  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1d6350cafe2c619b9faa6ee29d93788ce74839e2jPk  Xhttps://github.com/cBioPortal/cbioportal/commit/1d6350cafe2c619b9faa6ee29d93788ce74839e2uastats}(totalK)	additionsK 	deletionsK	ufiles](}(j,k  (b5177e87276e210fe706015283d83e8dc249f607filenamedocs/Migration-Guide.mdstatusmodifiedjk  Kjk  KchangesK'blob_urlphttps://github.com/cBioPortal/cbioportal/blob/283adf3bd6b4bb59992ced7ae48f0a2331bb97f5/docs%2FMigration-Guide.mdraw_urlohttps://github.com/cBioPortal/cbioportal/raw/283adf3bd6b4bb59992ced7ae48f0a2331bb97f5/docs%2FMigration-Guide.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FMigration-Guide.md?ref=283adf3bd6b4bb59992ced7ae48f0a2331bb97f5patchX  @@ -1,22 +1,45 @@
 # Migration Guide
-This page describes various changes deployers will need to make as they deploy newer versions of the portal. 
+
+This page describes various changes deployers will need to make as they deploy newer versions of the portal. -
+
+## <v5.3.16 --> v5.3.17
+
+- Remove `db.host` and `db.portal_db_name` and `db.use_ssl` properties from the _portal.properties_ file or JVM
+  parameters. Update property `db.connection_string` to encode the hostname, port, database and other parameters
+  according to [Database Settings](portal.properties-Reference.md#Database-Settings) documentation and pass via
+  _portal.properties_ file or as JVM parameter.
 
 ## v4 -> v5
-- All fusion profiles are now required to be migrated to structural variant format. One can use this [migration tool](https://github.com/cBioPortal/datahub-study-curation-tools/tree/master/fusion-to-sv-converter) to migrate the fusion files.
-- All fusion files on [datahub](https://github.com/cBioPortal/datahub) were migrated to the structural variant format and their molecular profile ids were renamed from `{study_id}_fusion` to `{study_id}_structural_variants`. If you are using these datahub files one would need to re-import them.
-- Study view user setting will be outdated after migration, please follow `Clear Study View User settings` section in [Session Service Management](Session-Service-Management.md#Clear-Study-View-User-settings)
-- The new default set of transcripts for each gene has changed from `uniprot` to `mskcc`. See the [Mutation Data Annotation Section](./mutation-data-transcript-annotation.md) for more details. To keep the old set of default transcripts add the property `genomenexus.isoform_override_source=uniprot` to [the properties file](https://docs.cbioportal.org/deployment/customization/portal.properties-reference/#properties).
+
+- All fusion profiles are now required to be migrated to structural variant format. One can use
+  this [migration tool](https://github.com/cBioPortal/datahub-study-curation-tools/tree/master/fusion-to-sv-converter)
+  to migrate the fusion files.
+- All fusion files on [datahub](https://github.com/cBioPortal/datahub) were migrated to the structural variant format
+  and their molecular profile ids were renamed from `{study_id}_fusion` to `{study_id}_structural_variants`. If you are
+  using these datahub files one would need to re-import them.
+- Study view user setting will be outdated after migration, please follow `Clear Study View User settings` section
+  in [Session Service Management](Session-Service-Management.md#Clear-Study-View-User-settings)
+- The new default set of transcripts for each gene has changed from `uniprot` to `mskcc`. See
+  the [Mutation Data Annotation Section](./mutation-data-transcript-annotation.md) for more details. To keep the old set
+  of default transcripts add the property `genomenexus.isoform_override_source=uniprot`
+  to [the properties file](https://docs.cbioportal.org/deployment/customization/portal.properties-reference/#properties).
 
 See the [v5.0.0 release notes](https://github.com/cBioPortal/cbioportal/releases/tag/v5.0.0) for more details.
 
 ## v3 -> v4
+
 - Introduces `logback` package for logging. If you don't have any custom log4j.properties file, no changes are necessary
-- Cleans up several old databases ([PR](https://github.com/cBioPortal/cbioportal/pull/9360)). In theory the migration should be seamless, since the docker container detects an old database version and migrates it automatically.
+- Cleans up several old databases ([PR](https://github.com/cBioPortal/cbioportal/pull/9360)). In theory the migration
+  should be seamless, since the docker container detects an old database version and migrates it automatically.
 
 See the [v4.0.0 release notes](https://github.com/cBioPortal/cbioportal/releases/tag/v4.0.0) for more details.
 
 ## v2 -> v3
-- Session service is now required to be set up. You can't run it without session service. The recommended way to run cBioPortal is to use the Docker Compose instructions.
+
+- Session service is now required to be set up. You can't run it without session service. The recommended way to run
+  cBioPortal is to use the Docker Compose instructions.
 
 ## v1 -> v2
-- Changes cBioPortal to a Single Page App (SPA) written in React, Mobx and bootstrap that uses a REST API. It shouldn't change anything for a deployer.
+
+- Changes cBioPortal to a Single Page App (SPA) written in React, Mobx and bootstrap that uses a REST API. It shouldn't
+  change anything for a deployer.u}(j,k  (0fbbe48a256a8b7a3f2bd947c7d6470ca0cb8856jk  <docs/deployment/customization/portal.properties-Reference.mdjk  modifiedjk  Kjk  Kjk  Kjk  https://github.com/cBioPortal/cbioportal/blob/283adf3bd6b4bb59992ced7ae48f0a2331bb97f5/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdjk  https://github.com/cBioPortal/cbioportal/raw/283adf3bd6b4bb59992ced7ae48f0a2331bb97f5/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdjk  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.md?ref=283adf3bd6b4bb59992ced7ae48f0a2331bb97f5jk  X  @@ -22,7 +22,7 @@ For example:
 jdbc:mysql://localhost:3306/cbiodb?zeroDateTimeBehavior=convertToNull&useSSL=false
 ```
 
-:warning: The fields `db.host` and `db.portal_db_name` are deprecated. It is recommended to configure the database connection using
+:warning: The fields `db.host` and `db.portal_db_name` and `db.use_ssl` are deprecated. It is recommended to configure the database connection using
 the `db.connection_string` instead.
 
 `db.tomcat_resource_name` is required in order to work with the tomcat database connection pool and should have the default value jdbc/cbioportal in order to work correctly with the your WAR file.ueu(c1e40beeb07aa2f535027688900af67f6a691665}(sha(c1e40beeb07aa2f535027688900af67f6a691665node_idEC_kwDOAe-hB9oAKGMxZTQwYmVlYjA3YWEyZjUzNTAyNzY4ODkwMGFmNjdmNmE2OTE2NjUcommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-05-23T13:36:40Zu	committer}(jk  🔧 Ino de Bruijn 🧬jk  ino@ino.biojk  2023-05-25T21:56:27Zumessage1Use precomputed base64 encoded unique identifierstree}(jk  (3dddb302fb7372a1a040f7dec83c449c1681a4e9urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/3dddb302fb7372a1a040f7dec83c449c1681a4e9ujk  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/c1e40beeb07aa2f535027688900af67f6a691665
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujk  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/c1e40beeb07aa2f535027688900af67f6a691665html_urlXhttps://github.com/cBioPortal/cbioportal/commit/c1e40beeb07aa2f535027688900af67f6a691665comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/c1e40beeb07aa2f535027688900af67f6a691665/commentsjk  }(login
pvannieropidJa jk  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5jk  'https://api.github.com/users/pvannieropjk  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminujk  }(jk  inodbjk  JZ jk  MDQ6VXNlcjEzMzQwMDQ=jk  3https://avatars.githubusercontent.com/u/1334004?v=4jk  h5jk  "https://api.github.com/users/inodbjk  https://github.com/inodbjk  ,https://api.github.com/users/inodb/followersjk  9https://api.github.com/users/inodb/following{/other_user}jk  2https://api.github.com/users/inodb/gists{/gist_id}jk  9https://api.github.com/users/inodb/starred{/owner}{/repo}jk  0https://api.github.com/users/inodb/subscriptionsjk  'https://api.github.com/users/inodb/orgsjk  (https://api.github.com/users/inodb/reposjk  3https://api.github.com/users/inodb/events{/privacy}jk  2https://api.github.com/users/inodb/received_eventsjk  Userjk  uparents]}(jk  (5848c47484111b9c8df98c233112125331c00efdjk  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/5848c47484111b9c8df98c233112125331c00efdjk  Xhttps://github.com/cBioPortal/cbioportal/commit/5848c47484111b9c8df98c233112125331c00efduastats}(totalK	additionsK	deletionsKufiles]}(jk  (98c6dd77facc909c06d5f312795458039514135dfilenametpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmlstatusmodifiedj	l  Kj
l  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/c1e40beeb07aa2f535027688900af67f6a691665/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/c1e40beeb07aa2f535027688900af67f6a691665/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=c1e40beeb07aa2f535027688900af67f6a691665patchX  @@ -9,8 +9,8 @@
             patient_stable_id as patientStableId,
             sample_stable_id as stableId,
             cancer_study_identifier as cancerStudyIdentifier,
-            base64Encode(sample_unique_id) as uniqueSampleKey,
-            base64Encode(patient_unique_id) as uniquePatientKey
+            sample_unique_id_base64 as uniqueSampley,
+            patient_unique_id_base64 as uniquePatientKey
         FROM sample
         WHERE sample_unique_id IN (
             <!-- Study View Filter-->uau(34d402d9467eeb430721488aa76aaadde02a0511}(sha(34d402d9467eeb430721488aa76aaadde02a0511node_idEC_kwDOAe-hB9oAKDM0ZDQwMmQ5NDY3ZWViNDMwNzIxNDg4YWE3NmFhYWRkZTAyYTA1MTEcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-11T14:46:11Zu	committer}(j&l  Djokovic0311j(l  .55948986+Djokovic0311@users.noreply.github.comj*l  2023-08-11T14:46:11Zumessagefixed simplification issuestree}(jl  (b7f82445c9caa2ba445d16adf300c53529902b16urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/b7f82445c9caa2ba445d16adf300c53529902b16uj6l  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/34d402d9467eeb430721488aa76aaadde02a0511
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj6l  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/34d402d9467eeb430721488aa76aaadde02a0511html_urlXhttps://github.com/cBioPortal/cbioportal/commit/34d402d9467eeb430721488aa76aaadde02a0511comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/34d402d9467eeb430721488aa76aaadde02a0511/commentsj$l  }(loginDjokovic0311idJUj l  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5j6l  )https://api.github.com/users/Djokovic0311jBl  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminuj,l  }(jGl  Djokovic0311jIl  JUj l  MDQ6VXNlcjU1OTQ4OTg2jKl  4https://avatars.githubusercontent.com/u/55948986?v=4jMl  h5j6l  )https://api.github.com/users/Djokovic0311jBl  https://github.com/Djokovic0311jPl  3https://api.github.com/users/Djokovic0311/followersjRl  @https://api.github.com/users/Djokovic0311/following{/other_user}jTl  9https://api.github.com/users/Djokovic0311/gists{/gist_id}jVl  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}jXl  7https://api.github.com/users/Djokovic0311/subscriptionsjZl  .https://api.github.com/users/Djokovic0311/orgsj\l  /https://api.github.com/users/Djokovic0311/reposj^l  :https://api.github.com/users/Djokovic0311/events{/privacy}j`l  9https://api.github.com/users/Djokovic0311/received_eventsjbl  Userjdl  uparents]}(jl  (4b5b0c9199c5a65fe563a7307ec6897e0f3809a5j6l  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4b5b0c9199c5a65fe563a7307ec6897e0f3809a5jBl  Xhttps://github.com/cBioPortal/cbioportal/commit/4b5b0c9199c5a65fe563a7307ec6897e0f3809a5uastats}(totalK	additionsK	deletionsKufiles](}(jl  (57e6df2a5dba2d46f9e850ee1bbbfa0612d10ca3filenameBmodel/src/main/java/org/cbioportal/model/ExpressionEnrichment.javastatusmodifiedj~l  Kjl  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/34d402d9467eeb430721488aa76aaadde02a0511/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FExpressionEnrichment.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/34d402d9467eeb430721488aa76aaadde02a0511/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FExpressionEnrichment.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FExpressionEnrichment.java?ref=34d402d9467eeb430721488aa76aaadde02a0511patchX  @@ -6,7 +6,7 @@
 
 import javax.validation.constraints.NotNull;
 
-public abstract class ExpressionEnrichment implements Serializable {
+public class ExpressionEnrichment implements Serializable {
 
 	@NotNull
 	private List<GroupStatistics> groupsStatistics;u}(jl  (2adfbbb33a49a1bc22f64860cec5197118f1a8c5jl  Xservice/src/main/java/org/cbioportal/service/impl/GenericAssayEnrichmentServiceImpl.javajl  modifiedj~l  Kjl  Kjl  Kjl  https://github.com/cBioPortal/cbioportal/blob/34d402d9467eeb430721488aa76aaadde02a0511/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.javajl  https://github.com/cBioPortal/cbioportal/raw/34d402d9467eeb430721488aa76aaadde02a0511/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.javajl  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.java?ref=34d402d9467eeb430721488aa76aaadde02a0511jl  X  @@ -52,9 +52,7 @@ public List<GenericAssayBinaryEnrichment> getGenericAssayBinaryEnrichments(
         Iterable<GenericAssayMolecularAlteration> maItr = molecularDataRepository
             .getGenericAssayMolecularAlterationsIterable(molecularProfile.getStableId(), null, "SUMMARY");
 
-        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets;
-
-        filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
+        Map<String, List<MolecularProfileCaseIdentifier>> filteredMolecularProfileCaseSets = filterMolecularProfileCaseSets(molecularProfile, molecularProfileCaseSets);
 
         List<GenericAssayBinaryEnrichment> genericAssayBinaryEnrichments = expressionEnrichmentUtil.getGenericAssayBinaryEnrichments(molecularProfile,
             filteredMolecularProfileCaseSets, enrichmentType, maItr);ueu(27b330d5172dd185efa0f0c8e5252a0d30a2c820}(sha(27b330d5172dd185efa0f0c8e5252a0d30a2c820node_idEC_kwDOAe-hB9oAKDI3YjMzMGQ1MTcyZGQxODVlZmEwZjBjOGU1MjUyYTBkMzBhMmM4MjAcommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-07-25T14:05:29Zu	committer}(jl  Gaofei Zhaojl  ,15748980+dippindots@users.noreply.github.comjl  2023-08-02T19:38:27ZumessageFix type

PR Review Olytree}(jl  (d9eb1c49a14817cbed1e437ad1b9c4d345344810urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/d9eb1c49a14817cbed1e437ad1b9c4d345344810ujl  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/27b330d5172dd185efa0f0c8e5252a0d30a2c820
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujl  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/27b330d5172dd185efa0f0c8e5252a0d30a2c820html_urlXhttps://github.com/cBioPortal/cbioportal/commit/27b330d5172dd185efa0f0c8e5252a0d30a2c820comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/27b330d5172dd185efa0f0c8e5252a0d30a2c820/commentsjl  }(login
pvannieropidJa jl  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5jl  'https://api.github.com/users/pvannieropjl  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminujl  }(jl  
dippindotsjl  JtO jl  MDQ6VXNlcjE1NzQ4OTgwjl  4https://avatars.githubusercontent.com/u/15748980?v=4jl  h5jl  'https://api.github.com/users/dippindotsjl  https://github.com/dippindotsjl  1https://api.github.com/users/dippindots/followersjl  >https://api.github.com/users/dippindots/following{/other_user}jl  7https://api.github.com/users/dippindots/gists{/gist_id}jl  >https://api.github.com/users/dippindots/starred{/owner}{/repo}jl  5https://api.github.com/users/dippindots/subscriptionsjl  ,https://api.github.com/users/dippindots/orgsjl  -https://api.github.com/users/dippindots/reposjl  8https://api.github.com/users/dippindots/events{/privacy}jl  7https://api.github.com/users/dippindots/received_eventsjl  Userjl  uparents]}(jl  (8fe97d5b95ebfcc9a6f3cbc17b87646fdd9a1fa0jl  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8fe97d5b95ebfcc9a6f3cbc17b87646fdd9a1fa0jl  Xhttps://github.com/cBioPortal/cbioportal/commit/8fe97d5b95ebfcc9a6f3cbc17b87646fdd9a1fa0uastats}(totalK	additionsK	deletionsKufiles]}(jl  (63ce5eea200baa4ab5b72ac5bf8ca544285ade8efilename@core/src/main/java/org/mskcc/cbio/portal/dao/JdbcDataSource.javastatusmodifiedjl  Kjl  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/27b330d5172dd185efa0f0c8e5252a0d30a2c820/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fdao%2FJdbcDataSource.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/27b330d5172dd185efa0f0c8e5252a0d30a2c820/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fdao%2FJdbcDataSource.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fdao%2FJdbcDataSource.java?ref=27b330d5172dd185efa0f0c8e5252a0d30a2c820patchX5  @@ -41,7 +41,7 @@ public JdbcDataSource () {
                 " Or preferably, set the 'db.connection_string' and remove 'db.host', 'db.portal_db_name' and 'db.use_ssl (best practice).");
             System.out.println("\n----------------------------------------------------------------------------------------------------------------");
             System.out.println("-- Deprecation warning:");
-            System.out.println("-- You are connection to the database using the deprecated 'db.host', 'db.portal_db_name' and 'db.use_ssl' properties.");
+            System.out.println("-- You are connecting to the database using the deprecated 'db.host', 'db.portal_db_name' and 'db.use_ssl' properties.");
             System.out.println("-- Please use the 'db.connection_string' instead (see https://docs.cbioportal.org/deployment/customization/portal.properties-reference/).");
             System.out.println("----------------------------------------------------------------------------------------------------------------\n");
             connectionURL = String.format(uau(1b9b31c0d6c9afd730a9b9b896db240dd159967a}(sha(1b9b31c0d6c9afd730a9b9b896db240dd159967anode_idEC_kwDOAe-hB9oAKDFiOWIzMWMwZDZjOWFmZDczMGE5YjliODk2ZGIyNDBkZDE1OTk2N2Ecommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-08T21:34:04Zu	committer}(jm  GitHubjm  noreply@github.comjm  2023-08-08T21:34:04ZumessageFrontend v5.3.17tree}(jm  (e574254585809127aed2e4cbda8842a10635afaeurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/e574254585809127aed2e4cbda8842a10635afaeuj(m  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/1b9b31c0d6c9afd730a9b9b896db240dd159967a
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk0rTMCRBK7hj4Ov3rIwAAs6UIAFbfHxaUR40E9yOT+zwMsHT4
GZUTIr+bnY5s1/Ph25RW0ewK6BQZEjVmje9hWgLQqmiCI/oJRjbJKM3dyBM5NoyD
KLfOxSdHXmYd51fMEApuefkbkygriYUHa6wWoTQgQ54KcxIXQAEjD3PGD2GobGoP
UJb2YMA/evujLpbmh8MXQJHxQ6SrBVvOGQcA3hy4X1DZQhfkxZ7ncF46acKuXCVB
biF8JAXx8DEBeHS14399u16nBMZ1j33C3zTLFPbvKPC8jW5DR/QoZyamf/Y/DV0b
+JRkOzOn60Mf6t+t062+8H091erRhAWgKR78wVuphmS9ZWmThLngGXlvjdOJ3bo=
=E2mG
-----END PGP SIGNATURE-----
payloadtree e574254585809127aed2e4cbda8842a10635afae
parent ca2bdff949965b3628bc5a96d379074d21546de6
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1691530444 -0400
committer GitHub <noreply@github.com> 1691530444 -0400

Frontend v5.3.17uuj(m  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1b9b31c0d6c9afd730a9b9b896db240dd159967ahtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/1b9b31c0d6c9afd730a9b9b896db240dd159967acomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/1b9b31c0d6c9afd730a9b9b896db240dd159967a/commentsjm  }(login
dippindotsidJtO jm  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j(m  'https://api.github.com/users/dippindotsj6m  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminujm  }(j;m  web-flowj=m  J/jm  MDQ6VXNlcjE5ODY0NDQ3j?m  4https://avatars.githubusercontent.com/u/19864447?v=4jAm  h5j(m  %https://api.github.com/users/web-flowj6m  https://github.com/web-flowjDm  /https://api.github.com/users/web-flow/followersjFm  <https://api.github.com/users/web-flow/following{/other_user}jHm  5https://api.github.com/users/web-flow/gists{/gist_id}jJm  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jLm  3https://api.github.com/users/web-flow/subscriptionsjNm  *https://api.github.com/users/web-flow/orgsjPm  +https://api.github.com/users/web-flow/reposjRm  6https://api.github.com/users/web-flow/events{/privacy}jTm  5https://api.github.com/users/web-flow/received_eventsjVm  UserjXm  uparents]}(jm  (ca2bdff949965b3628bc5a96d379074d21546de6j(m  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ca2bdff949965b3628bc5a96d379074d21546de6j6m  Xhttps://github.com/cBioPortal/cbioportal/commit/ca2bdff949965b3628bc5a96d379074d21546de6uastats}(totalK	additionsK	deletionsKufiles]}(jm  (d44663bed5eb628f7a438efc51b83ce32004cab7filenamepom.xmlstatusmodifiedjrm  Kjsm  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/1b9b31c0d6c9afd730a9b9b896db240dd159967a/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/1b9b31c0d6c9afd730a9b9b896db240dd159967a/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=1b9b31c0d6c9afd730a9b9b896db240dd159967apatchXY  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.16</frontend.version>
+    <frontend.version>v5.3.17</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(f19f4a0a356cb954f5d33c7bf3b57e2b3745f7ac}(sha(f19f4a0a356cb954f5d33c7bf3b57e2b3745f7acnode_idEC_kwDOAe-hB9oAKGYxOWY0YTBhMzU2Y2I5NTRmNWQzM2M3YmYzYjU3ZTJiMzc0NWY3YWMcommit}(author}(namehaynescdemailhaynescd@chop.edudate2023-06-28T16:05:23Zu	committer}(jm  haynescdjm  haynescd@chop.edujm  2023-06-28T16:05:23ZumessageBExtract column store endpoints into StudyViewControllerColumnStoretree}(jm  (59b2498058ab3f434ba4ccf1616674fe535eb6dfurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/59b2498058ab3f434ba4ccf1616674fe535eb6dfujm  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/f19f4a0a356cb954f5d33c7bf3b57e2b3745f7ac
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujm  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/f19f4a0a356cb954f5d33c7bf3b57e2b3745f7achtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/f19f4a0a356cb954f5d33c7bf3b57e2b3745f7accomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/f19f4a0a356cb954f5d33c7bf3b57e2b3745f7ac/commentsjm  }(loginhaynescdidJ jm  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5jm  %https://api.github.com/users/haynescdjm  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminujm  }(jm  haynescdjm  J jm  MDQ6VXNlcjMzNjA4OTIwjm  4https://avatars.githubusercontent.com/u/33608920?v=4jm  h5jm  %https://api.github.com/users/haynescdjm  https://github.com/haynescdjm  /https://api.github.com/users/haynescd/followersjm  <https://api.github.com/users/haynescd/following{/other_user}jm  5https://api.github.com/users/haynescd/gists{/gist_id}jm  <https://api.github.com/users/haynescd/starred{/owner}{/repo}jm  3https://api.github.com/users/haynescd/subscriptionsjm  *https://api.github.com/users/haynescd/orgsjm  +https://api.github.com/users/haynescd/reposjm  6https://api.github.com/users/haynescd/events{/privacy}jm  5https://api.github.com/users/haynescd/received_eventsjm  Userjm  uparents]}(jm  (6b5a0a2309f8814a1f8cf67205cbd7fad5248279jm  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/6b5a0a2309f8814a1f8cf67205cbd7fad5248279jm  Xhttps://github.com/cBioPortal/cbioportal/commit/6b5a0a2309f8814a1f8cf67205cbd7fad5248279uastats}(totalKr	additionsKK	deletionsK'ufiles](}(jm  (6f3fa9070e5039c88d1eec4af562fa55f4e71ee3filename=web/src/main/java/org/cbioportal/web/StudyViewController.javastatusmodifiedjm  K jm  K&changesK&blob_urlhttps://github.com/cBioPortal/cbioportal/blob/f19f4a0a356cb954f5d33c7bf3b57e2b3745f7ac/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/f19f4a0a356cb954f5d33c7bf3b57e2b3745f7ac/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=f19f4a0a356cb954f5d33c7bf3b57e2b3745f7acpatchX
  @@ -209,24 +209,6 @@ public ResponseEntity<List<AlterationCountByGene>> fetchMutatedGenes(
         return new ResponseEntity<>(alterationCountByGenes, HttpStatus.OK);
     }
     
-    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
-    @RequestMapping(value = "/column-store/mutated-genes/fetch", method = RequestMethod.POST,
-        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
-    @ApiOperation("Fetch mutated genes by study view filter")
-    public ResponseEntity<List<AlterationCountByGene>> fetchMutatedGenesFromColumnStore(
-        @ApiParam(required = true, value = "Study view filter")
-        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter,
-        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
-        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
-        @ApiIgnore // 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<>(
-            studyViewService.getMutatedGenesFromColumnstore(interceptedStudyViewFilter),
-            HttpStatus.OK
-        );
-    }
-
     @Cacheable(
         cacheResolver = "staticRepositoryCacheOneResolver",
         condition = "@cacheEnabledConfig.getEnabled() && #singleStudyUnfiltered"
@@ -349,26 +331,6 @@ public ResponseEntity<List<Sample>> fetchFilteredSamples(
         return new ResponseEntity<>(result, HttpStatus.OK);
     }
 
-    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
-    @RequestMapping(value = "/column-store/filtered-samples/fetch", method = RequestMethod.POST,
-        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
-    @ApiOperation("Fetch sample IDs by study view filter")
-    public ResponseEntity<List<Sample>> fetchFilteredSamplesFromColumnStore(
-        @ApiParam("Whether to negate the study view filters")
-        @RequestParam(defaultValue = "false") Boolean negateFilters,
-        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
-        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
-        @ApiIgnore // 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,
-        @ApiParam(required = true, value = "Study view filter")
-        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter) {
-
-        return new ResponseEntity<>(
-            studyViewService.getFilteredSamplesFromColumnstore(interceptedStudyViewFilter),
-            HttpStatus.OK
-        );
-    }
-
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/molecular-profile-sample-counts/fetch", method = RequestMethod.POST,
         consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)u}(jm  (d949aaa502212a851b526eb415ae452e9e799378jm  Tweb/src/main/java/org/cbioportal/web/columnstore/StudyViewControllerColumnStore.javajm  addedjm  KIjm  K jm  KIjm  https://github.com/cBioPortal/cbioportal/blob/f19f4a0a356cb954f5d33c7bf3b57e2b3745f7ac/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewControllerColumnStore.javajm  https://github.com/cBioPortal/cbioportal/raw/f19f4a0a356cb954f5d33c7bf3b57e2b3745f7ac/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewControllerColumnStore.javajm  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewControllerColumnStore.java?ref=f19f4a0a356cb954f5d33c7bf3b57e2b3745f7acjm  X  @@ -0,0 +1,73 @@
+package org.cbioportal.web.columnstore;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.Sample;
+import org.cbioportal.service.StudyViewService;
+import org.cbioportal.web.config.annotation.InternalApi;
+import org.cbioportal.webparam.StudyViewFilter;
+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.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.validation.Valid;
+import java.util.Collection;
+import java.util.List;
+
+@InternalApi
+@RestController
+@Validated
+@Api(tags = "Study View Column Store")
+public class StudyViewControllerColumnStore {
+
+    @Autowired
+    private StudyViewService studyViewService;
+    
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @PostMapping(value = "/column-store/filtered-samples/fetch",
+        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch sample IDs by study view filter")
+    public ResponseEntity<List<Sample>> fetchFilteredSamples(
+        @ApiParam("Whether to negate the study view filters")
+        @RequestParam(defaultValue = "false") Boolean negateFilters,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiIgnore // 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,
+        @ApiParam(required = true, value = "Study view filter")
+        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter) {
+        return new ResponseEntity<>(
+            studyViewService.getFilteredSamplesFromColumnstore(interceptedStudyViewFilter),
+            HttpStatus.OK
+        );
+    }
+
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @PostMapping(value = "/column-store/mutated-genes/fetch",
+        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch mutated genes by study view filter")
+    public ResponseEntity<List<AlterationCountByGene>> fetchMutatedGenes(
+        @ApiParam(required = true, value = "Study view filter")
+        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiIgnore // 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<>(
+            studyViewService.getMutatedGenesFromColumnstore(interceptedStudyViewFilter),
+            HttpStatus.OK
+        );
+    }
+}u}(jm  (454709c1bffbf10f7f7730079ec79e50b533d470jm  Vweb/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.javajm  modifiedjm  Kjm  Kjm  Kjm  https://github.com/cBioPortal/cbioportal/blob/f19f4a0a356cb954f5d33c7bf3b57e2b3745f7ac/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javajm  https://github.com/cBioPortal/cbioportal/raw/f19f4a0a356cb954f5d33c7bf3b57e2b3745f7ac/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javajm  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.java?ref=f19f4a0a356cb954f5d33c7bf3b57e2b3745f7acjm  X  @@ -39,6 +39,7 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.commons.lang3.StringUtils;
 import org.cbioportal.model.AlterationFilter;
 import org.cbioportal.model.MolecularProfile;
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
@@ -127,7 +128,7 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
         if (!request.getMethod().equals("POST")) {
             return true; // no attribute extraction needed because all user supplied filter objects are in POST requests
         }
-        String requestPathInfo = request.getPathInfo();
+        String requestPathInfo = StringUtils.removeStart(request.getPathInfo(), "/column-store");
         if (requestPathInfo.equals(PATIENT_FETCH_PATH)) {
             return extractAttributesFromPatientFilter(request);
         } else if (requestPathInfo.equals(SAMPLE_FETCH_PATH)) {ueu(23178a84d247b34d14bcd8cb41f496a1fcb487f2}(sha(23178a84d247b34d14bcd8cb41f496a1fcb487f2node_idEC_kwDOAe-hB9oAKDIzMTc4YTg0ZDI0N2IzNGQxNGJjZDhjYjQxZjQ5NmExZmNiNDg3ZjIcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-06-07T09:43:53Zu	committer}(jn  GitHubjn  noreply@github.comjn  2023-06-07T09:43:53ZumessageLMerge pull request #10210 from cBioPortal/frontend-v5.3.10

Frontend v5.3.10tree}(jn  (6098e9ad22a65c27837a7c07fa64f0f49e95d0dburlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/6098e9ad22a65c27837a7c07fa64f0f49e95d0dbuj$n  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/23178a84d247b34d14bcd8cb41f496a1fcb487f2
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkgFFZCRBK7hj4Ov3rIwAA92wIALMlIgkEpG/yZUVM6NryFJgP
NPtRBgiNFNAQF8pJAO/1EGnlSOm/F1wlRyWm5Zeme7F9gENkhHyv97FRaSQ5EKnX
VYqJ3/JIy096yNF+4D6ZZ7BEzCqYYw7kwDVaHVw+InjyFcsYwJG92Hts7ZMMEaPZ
0jdtDCC5j83pZ8WaZwrnNg6rNdwd/0hQJhaHj7V1INu0+yeTsCA9ZtWDeKejzAos
ULdAk0ruWZ3KkIVuFPaGIWSTE+ixPxz+Rb1+Zfq5QT4r+Euk5JIxeS/0vE99or9F
MEDVnQ+6TiiwlFWDLYFbNpwOjiw8w2kPx2zTRk1UyGzmYlXgmhM2I2z+5yGrfp0=
=1UEW
-----END PGP SIGNATURE-----
payloadXe  tree 6098e9ad22a65c27837a7c07fa64f0f49e95d0db
parent 838557f30e13d1f580806d87b3c32a0c4200e59d
parent 383b6bb92bc0e81460fdd5629153315300d54638
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1686131033 -0600
committer GitHub <noreply@github.com> 1686131033 -0600

Merge pull request #10210 from cBioPortal/frontend-v5.3.10

Frontend v5.3.10uuj$n  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/23178a84d247b34d14bcd8cb41f496a1fcb487f2html_urlXhttps://github.com/cBioPortal/cbioportal/commit/23178a84d247b34d14bcd8cb41f496a1fcb487f2comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/23178a84d247b34d14bcd8cb41f496a1fcb487f2/commentsjn  }(login
dippindotsidJtO jn  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j$n  'https://api.github.com/users/dippindotsj2n  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminujn  }(j7n  web-flowj9n  J/jn  MDQ6VXNlcjE5ODY0NDQ3j;n  4https://avatars.githubusercontent.com/u/19864447?v=4j=n  h5j$n  %https://api.github.com/users/web-flowj2n  https://github.com/web-flowj@n  /https://api.github.com/users/web-flow/followersjBn  <https://api.github.com/users/web-flow/following{/other_user}jDn  5https://api.github.com/users/web-flow/gists{/gist_id}jFn  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jHn  3https://api.github.com/users/web-flow/subscriptionsjJn  *https://api.github.com/users/web-flow/orgsjLn  +https://api.github.com/users/web-flow/reposjNn  6https://api.github.com/users/web-flow/events{/privacy}jPn  5https://api.github.com/users/web-flow/received_eventsjRn  UserjTn  uparents](}(jn  (838557f30e13d1f580806d87b3c32a0c4200e59dj$n  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/838557f30e13d1f580806d87b3c32a0c4200e59dj2n  Xhttps://github.com/cBioPortal/cbioportal/commit/838557f30e13d1f580806d87b3c32a0c4200e59du}(jn  (383b6bb92bc0e81460fdd5629153315300d54638j$n  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/383b6bb92bc0e81460fdd5629153315300d54638j2n  Xhttps://github.com/cBioPortal/cbioportal/commit/383b6bb92bc0e81460fdd5629153315300d54638uestats}(totalK	additionsK	deletionsKufiles]}(jn  (36f630c130441b9c24308888efa56a49e469bfa9filenamepom.xmlstatusmodifiedjrn  Kjsn  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/23178a84d247b34d14bcd8cb41f496a1fcb487f2/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/23178a84d247b34d14bcd8cb41f496a1fcb487f2/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=23178a84d247b34d14bcd8cb41f496a1fcb487f2patchXX  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.9</frontend.version>
+    <frontend.version>v5.3.10</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(4b5b0c9199c5a65fe563a7307ec6897e0f3809a5}(sha(4b5b0c9199c5a65fe563a7307ec6897e0f3809a5node_idEC_kwDOAe-hB9oAKDRiNWIwYzkxOTljNWE2NWZlNTYzYTczMDdlYzY4OTdlMGYzODA5YTUcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-08T19:03:53Zu	committer}(jn  Djokovic0311jn  .55948986+Djokovic0311@users.noreply.github.comjn  2023-08-08T19:03:53Zumessage-Update GenericAssayEnrichmentServiceImpl.javatree}(jn  (7e365ebbf37ce6ee1099df045f1c3fad644b4748urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/7e365ebbf37ce6ee1099df045f1c3fad644b4748ujn  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/4b5b0c9199c5a65fe563a7307ec6897e0f3809a5
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujn  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4b5b0c9199c5a65fe563a7307ec6897e0f3809a5html_urlXhttps://github.com/cBioPortal/cbioportal/commit/4b5b0c9199c5a65fe563a7307ec6897e0f3809a5comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/4b5b0c9199c5a65fe563a7307ec6897e0f3809a5/commentsjn  }(loginDjokovic0311idJUjn  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5jn  )https://api.github.com/users/Djokovic0311jn  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminujn  }(jn  Djokovic0311jn  JUjn  MDQ6VXNlcjU1OTQ4OTg2jn  4https://avatars.githubusercontent.com/u/55948986?v=4jn  h5jn  )https://api.github.com/users/Djokovic0311jn  https://github.com/Djokovic0311jn  3https://api.github.com/users/Djokovic0311/followersjn  @https://api.github.com/users/Djokovic0311/following{/other_user}jn  9https://api.github.com/users/Djokovic0311/gists{/gist_id}jn  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}jn  7https://api.github.com/users/Djokovic0311/subscriptionsjn  .https://api.github.com/users/Djokovic0311/orgsjn  /https://api.github.com/users/Djokovic0311/reposjn  :https://api.github.com/users/Djokovic0311/events{/privacy}jn  9https://api.github.com/users/Djokovic0311/received_eventsjn  Userjn  uparents]}(jn  (e7d98136a131a8fc613301237674e0fa6fa06b26jn  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/e7d98136a131a8fc613301237674e0fa6fa06b26jn  Xhttps://github.com/cBioPortal/cbioportal/commit/e7d98136a131a8fc613301237674e0fa6fa06b26uastats}(totalK	additionsK	deletionsKufiles]}(jn  (5761bf931d3521f8a2adcc6654f2e704f1f2c160filenameXservice/src/main/java/org/cbioportal/service/impl/GenericAssayEnrichmentServiceImpl.javastatusmodifiedjn  Kjn  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/4b5b0c9199c5a65fe563a7307ec6897e0f3809a5/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/4b5b0c9199c5a65fe563a7307ec6897e0f3809a5/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImpl.java?ref=4b5b0c9199c5a65fe563a7307ec6897e0f3809a5patchX  @@ -111,7 +111,8 @@ private MolecularProfile getAndValidateMolecularProfile(String molecularProfileI
     }
 
     private void validateMolecularProfile(MolecularProfile molecularProfile,
-                                          List<MolecularProfile.MolecularAlterationType> validMolecularAlterationTypes, boolean isBinary) throws MolecularProfileNotFoundException {
+                                          List<MolecularProfile.MolecularAlterationType> validMolecularAlterationTypes, 
+                                          boolean isBinary) throws MolecularProfileNotFoundException {
         if (!validMolecularAlterationTypes.contains(molecularProfile.getMolecularAlterationType())) {
             throw new MolecularProfileNotFoundException(molecularProfile.getStableId());
         }uau(0bf78c91d2b9dab7f3c71f71ada3f0a159b9405f}(sha(0bf78c91d2b9dab7f3c71f71ada3f0a159b9405fnode_idEC_kwDOAe-hB9oAKDBiZjc4YzkxZDJiOWRhYjdmM2M3MWY3MWFkYTNmMGExNTliOTQwNWYcommit}(author}(name
Onur Sumeremails.onur.sumer@gmail.comdate2023-06-05T21:01:28Zu	committer}(jo  
Onur Sumerjo  s.onur.sumer@gmail.comjo  2023-06-05T21:01:28Zumessage=use base64 encoded columns for unique sample and patient keystree}(jn  (bb00774238c4bfc5a53655699ce6c7ff5bbb38a4urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/bb00774238c4bfc5a53655699ce6c7ff5bbb38a4ujo  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/0bf78c91d2b9dab7f3c71f71ada3f0a159b9405f
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujo  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/0bf78c91d2b9dab7f3c71f71ada3f0a159b9405fhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/0bf78c91d2b9dab7f3c71f71ada3f0a159b9405fcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/0bf78c91d2b9dab7f3c71f71ada3f0a159b9405f/commentsjo  }(login	onursumeridJ6 jn  MDQ6VXNlcjM2MDQxOTg=
avatar_url3https://avatars.githubusercontent.com/u/3604198?v=4gravatar_idh5jo  &https://api.github.com/users/onursumerj o  https://github.com/onursumer
followers_url0https://api.github.com/users/onursumer/followers
following_url=https://api.github.com/users/onursumer/following{/other_user}	gists_url6https://api.github.com/users/onursumer/gists{/gist_id}starred_url=https://api.github.com/users/onursumer/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/onursumer/subscriptionsorganizations_url+https://api.github.com/users/onursumer/orgs	repos_url,https://api.github.com/users/onursumer/repos
events_url7https://api.github.com/users/onursumer/events{/privacy}received_events_url6https://api.github.com/users/onursumer/received_eventstypeUser
site_adminuj
o  }(j%o  	onursumerj'o  J6 jn  MDQ6VXNlcjM2MDQxOTg=j)o  3https://avatars.githubusercontent.com/u/3604198?v=4j+o  h5jo  &https://api.github.com/users/onursumerj o  https://github.com/onursumerj.o  0https://api.github.com/users/onursumer/followersj0o  =https://api.github.com/users/onursumer/following{/other_user}j2o  6https://api.github.com/users/onursumer/gists{/gist_id}j4o  =https://api.github.com/users/onursumer/starred{/owner}{/repo}j6o  4https://api.github.com/users/onursumer/subscriptionsj8o  +https://api.github.com/users/onursumer/orgsj:o  ,https://api.github.com/users/onursumer/reposj<o  7https://api.github.com/users/onursumer/events{/privacy}j>o  6https://api.github.com/users/onursumer/received_eventsj@o  UserjBo  uparents]}(jn  (fede26d6cfe2a09f4493ede7c9a97e3ef19a1b06jo  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/fede26d6cfe2a09f4493ede7c9a97e3ef19a1b06j o  Xhttps://github.com/cBioPortal/cbioportal/commit/fede26d6cfe2a09f4493ede7c9a97e3ef19a1b06uastats}(totalK	additionsK	deletionsKufiles]}(jn  (b2c588c89d6f43cda25c65dec4396916c7d77378filenametpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmlstatusmodifiedj\o  Kj]o  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/0bf78c91d2b9dab7f3c71f71ada3f0a159b9405f/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/0bf78c91d2b9dab7f3c71f71ada3f0a159b9405f/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=0bf78c91d2b9dab7f3c71f71ada3f0a159b9405fpatchX  @@ -9,8 +9,8 @@
             patient_stable_id as patientStableId,
             sample_stable_id as stableId,
             cancer_study_identifier as cancerStudyIdentifier,
-            base64Encode(sample_unique_id) as uniqueSampleKey,
-            base64Encode(patient_unique_id) as uniquePatientKey
+            sample_unique_id_base64 as uniqueSampleKey,
+            patient_unique_id_base64 as uniquePatientKey
         FROM sample
         WHERE sample_unique_id IN (
             <!-- Study View Filter-->uau(a89cc82b501b5c7397c5cd281123667798f10d8e}(sha(a89cc82b501b5c7397c5cd281123667798f10d8enode_idEC_kwDOAe-hB9oAKGE4OWNjODJiNTAxYjVjNzM5N2M1Y2QyODExMjM2Njc3OThmMTBkOGUcommit}(author}(name🔧 Ino de Bruijn 🧬emailino@ino.biodate2023-05-25T22:32:54Zu	committer}(jyo  🔧 Ino de Bruijn 🧬j{o  ino@ino.bioj}o  2023-05-25T22:32:54ZumessageyRevert "Use precomputed base64 encoded unique identifiers"

This reverts commit c1e40beeb07aa2f535027688900af67f6a691665.tree}(jqo  (d4b6caa4f1ea9d748d108baa1a7e17b7ef4d3e2aurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/d4b6caa4f1ea9d748d108baa1a7e17b7ef4d3e2aujo  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/a89cc82b501b5c7397c5cd281123667798f10d8e
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujo  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/a89cc82b501b5c7397c5cd281123667798f10d8ehtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/a89cc82b501b5c7397c5cd281123667798f10d8ecomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/a89cc82b501b5c7397c5cd281123667798f10d8e/commentsjwo  }(logininodbidJZ jso  MDQ6VXNlcjEzMzQwMDQ=
avatar_url3https://avatars.githubusercontent.com/u/1334004?v=4gravatar_idh5jo  "https://api.github.com/users/inodbjo  https://github.com/inodb
followers_url,https://api.github.com/users/inodb/followers
following_url9https://api.github.com/users/inodb/following{/other_user}	gists_url2https://api.github.com/users/inodb/gists{/gist_id}starred_url9https://api.github.com/users/inodb/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/inodb/subscriptionsorganizations_url'https://api.github.com/users/inodb/orgs	repos_url(https://api.github.com/users/inodb/repos
events_url3https://api.github.com/users/inodb/events{/privacy}received_events_url2https://api.github.com/users/inodb/received_eventstypeUser
site_adminujo  }(jo  inodbjo  JZ jso  MDQ6VXNlcjEzMzQwMDQ=jo  3https://avatars.githubusercontent.com/u/1334004?v=4jo  h5jo  "https://api.github.com/users/inodbjo  https://github.com/inodbjo  ,https://api.github.com/users/inodb/followersjo  9https://api.github.com/users/inodb/following{/other_user}jo  2https://api.github.com/users/inodb/gists{/gist_id}jo  9https://api.github.com/users/inodb/starred{/owner}{/repo}jo  0https://api.github.com/users/inodb/subscriptionsjo  'https://api.github.com/users/inodb/orgsjo  (https://api.github.com/users/inodb/reposjo  3https://api.github.com/users/inodb/events{/privacy}jo  2https://api.github.com/users/inodb/received_eventsjo  Userjo  uparents]}(jqo  (c1e40beeb07aa2f535027688900af67f6a691665jo  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/c1e40beeb07aa2f535027688900af67f6a691665jo  Xhttps://github.com/cBioPortal/cbioportal/commit/c1e40beeb07aa2f535027688900af67f6a691665uastats}(totalK	additionsK	deletionsKufiles]}(jqo  (90ea4124c07ad7e6610c58461c931b302a541420filenametpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmlstatusmodifiedjo  Kjo  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/a89cc82b501b5c7397c5cd281123667798f10d8e/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/a89cc82b501b5c7397c5cd281123667798f10d8e/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=a89cc82b501b5c7397c5cd281123667798f10d8epatchX  @@ -9,8 +9,8 @@
             patient_stable_id as patientStableId,
             sample_stable_id as stableId,
             cancer_study_identifier as cancerStudyIdentifier,
-            sample_unique_id_base64 as uniqueSampley,
-            patient_unique_id_base64 as uniquePatientKey
+            base64Encode(sample_unique_id) as uniqueSampleKey,
+            base64Encode(patient_unique_id) as uniquePatientKey
         FROM sample
         WHERE sample_unique_id IN (
             <!-- Study View Filter-->uau(fb35a1aa024a44191ff3feef7e2afdf22a5178d2}(sha(fb35a1aa024a44191ff3feef7e2afdf22a5178d2node_idEC_kwDOAe-hB9oAKGZiMzVhMWFhMDI0YTQ0MTkxZmYzZmVlZjdlMmFmZGYyMmE1MTc4ZDIcommit}(author}(name	Player256email,123934783+Player255@users.noreply.github.comdate2023-04-20T15:50:07Zu	committer}(jo  Gaofei Zhaojo  ,15748980+dippindots@users.noreply.github.comjo  2023-08-10T20:09:56ZumessageIssue #10127tree}(jo  (b15261c2e8f322a3e60ab32c94c81441873c9404urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/b15261c2e8f322a3e60ab32c94c81441873c9404ujo  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/fb35a1aa024a44191ff3feef7e2afdf22a5178d22     
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujo  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/fb35a1aa024a44191ff3feef7e2afdf22a5178d2html_urlXhttps://github.com/cBioPortal/cbioportal/commit/fb35a1aa024a44191ff3feef7e2afdf22a5178d2comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/fb35a1aa024a44191ff3feef7e2afdf22a5178d2/commentsjo  }(login	Player255idJ?cjo  U_kgDOB2MYPw
avatar_url5https://avatars.githubusercontent.com/u/123934783?v=4gravatar_idh5jo  &https://api.github.com/users/Player255j
p  https://github.com/Player255
followers_url0https://api.github.com/users/Player255/followers
following_url=https://api.github.com/users/Player255/following{/other_user}	gists_url6https://api.github.com/users/Player255/gists{/gist_id}starred_url=https://api.github.com/users/Player255/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/Player255/subscriptionsorganizations_url+https://api.github.com/users/Player255/orgs	repos_url,https://api.github.com/users/Player255/repos
events_url7https://api.github.com/users/Player255/events{/privacy}received_events_url6https://api.github.com/users/Player255/received_eventstypeUser
site_adminujo  }(jp  
dippindotsjp  JtO jo  MDQ6VXNlcjE1NzQ4OTgwjp  4https://avatars.githubusercontent.com/u/15748980?v=4jp  h5jo  'https://api.github.com/users/dippindotsj
p  https://github.com/dippindotsjp  1https://api.github.com/users/dippindots/followersjp  >https://api.github.com/users/dippindots/following{/other_user}jp  7https://api.github.com/users/dippindots/gists{/gist_id}jp  >https://api.github.com/users/dippindots/starred{/owner}{/repo}j p  5https://api.github.com/users/dippindots/subscriptionsj"p  ,https://api.github.com/users/dippindots/orgsj$p  -https://api.github.com/users/dippindots/reposj&p  8https://api.github.com/users/dippindots/events{/privacy}j(p  7https://api.github.com/users/dippindots/received_eventsj*p  Userj,p  uparents]}(jo  (7b2bbe2c40efdd42715c4f337cb3959deeb431b2jo  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7b2bbe2c40efdd42715c4f337cb3959deeb431b2j
p  Xhttps://github.com/cBioPortal/cbioportal/commit/7b2bbe2c40efdd42715c4f337cb3959deeb431b2uastats}(totalK	additionsK	deletionsK ufiles]}(jo  (1d798e2d9a57c85f0caf57dbea3179376ff3005dfilenameDcore/src/main/java/org/mskcc/cbio/portal/scripts/MutationFilter.javastatusmodifiedjFp  KjGp  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/fb35a1aa024a44191ff3feef7e2afdf22a5178d2/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fscripts%2FMutationFilter.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/fb35a1aa024a44191ff3feef7e2afdf22a5178d2/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fscripts%2FMutationFilter.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fscripts%2FMutationFilter.java?ref=fb35a1aa024a44191ff3feef7e2afdf22a5178d2patchXV  @@ -133,6 +133,7 @@ public boolean acceptMutation(ExtendedMutation mutation, Set<String> filteredMut
               if( safeStringTest( mutation.getMutationType(), "5'Flank" ) ) {
                   mutation.setProteinChange("Promoter");
               }
+              this.accepts++;
               return true;
           }
       } else {uau(047cb2640b5cde4cd78944dac3eee9fe735d1ab9}(sha(047cb2640b5cde4cd78944dac3eee9fe735d1ab9node_idEC_kwDOAe-hB9oAKDA0N2NiMjY0MGI1Y2RlNGNkNzg5NDRkYWMzZWVlOWZlNzM1ZDFhYjkcommit}(author}(nameCharles Haynesemail*33608920+haynescd@users.noreply.github.comdate2023-06-28T16:29:41Zu	committer}(jcp  GitHubjep  noreply@github.comjgp  2023-06-28T16:29:41ZumessageExtract column store endpoints into StudyViewColumnStoreController (#10245)

* Extract column store endpoints into StudyViewControllerColumnStore

* renametree}(j[p  (c4c5fcd837e503db63c997d313477d24ddd9a1cfurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c4c5fcd837e503db63c997d313477d24ddd9a1cfujsp  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/047cb2640b5cde4cd78944dac3eee9fe735d1ab9
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJknF/1CRBK7hj4Ov3rIwAAEaMIACAw1j7N5AssTwo4QOMhhuHh
6nnkHFkTuCZLtjLRWuP0D0GSBGixjGmUWS6AOWodIwlMzWWzbn35nuWjHWttx9vY
MDYT0XznyWLGXzlYXIvPp2QcuXKHUgBJxOcsFuMsgCgxAozV+X0/vpUwnF2k/bFW
FK813SizoHSye0SZWL6/xTDW5GeRGt6y827BKEzG0jI+PLIfuXYGCIRnz+9ie4C8
65o0LAf6qHRKzy3LA9hI10iUxGc4lrCF6QHLhoTflA783KqXfN8PIcqNd355tkXP
Xzv5cUlxJ1M0k1s7iFa+nFZRQ6ACsKNGEsgL0eoywMihxpt8A+7N14Jmi/3ZaIY=
=Lf26
-----END PGP SIGNATURE-----
payloadX  tree c4c5fcd837e503db63c997d313477d24ddd9a1cf
parent 6b5a0a2309f8814a1f8cf67205cbd7fad5248279
author Charles Haynes <33608920+haynescd@users.noreply.github.com> 1687969781 -0400
committer GitHub <noreply@github.com> 1687969781 -0400

Extract column store endpoints into StudyViewColumnStoreController (#10245)

* Extract column store endpoints into StudyViewControllerColumnStore

* renameuujsp  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/047cb2640b5cde4cd78944dac3eee9fe735d1ab9html_urlXhttps://github.com/cBioPortal/cbioportal/commit/047cb2640b5cde4cd78944dac3eee9fe735d1ab9comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/047cb2640b5cde4cd78944dac3eee9fe735d1ab9/commentsjap  }(loginhaynescdidJ j]p  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5jsp  %https://api.github.com/users/haynescdjp  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminujip  }(jp  web-flowjp  J/j]p  MDQ6VXNlcjE5ODY0NDQ3jp  4https://avatars.githubusercontent.com/u/19864447?v=4jp  h5jsp  %https://api.github.com/users/web-flowjp  https://github.com/web-flowjp  /https://api.github.com/users/web-flow/followersjp  <https://api.github.com/users/web-flow/following{/other_user}jp  5https://api.github.com/users/web-flow/gists{/gist_id}jp  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jp  3https://api.github.com/users/web-flow/subscriptionsjp  *https://api.github.com/users/web-flow/orgsjp  +https://api.github.com/users/web-flow/reposjp  6https://api.github.com/users/web-flow/events{/privacy}jp  5https://api.github.com/users/web-flow/received_eventsjp  Userjp  uparents]}(j[p  (6b5a0a2309f8814a1f8cf67205cbd7fad5248279jsp  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/6b5a0a2309f8814a1f8cf67205cbd7fad5248279jp  Xhttps://github.com/cBioPortal/cbioportal/commit/6b5a0a2309f8814a1f8cf67205cbd7fad5248279uastats}(totalKr	additionsKK	deletionsK'ufiles](}(j[p  (6f3fa9070e5039c88d1eec4af562fa55f4e71ee3filename=web/src/main/java/org/cbioportal/web/StudyViewController.javastatusmodifiedjp  K jp  K&changesK&blob_urlhttps://github.com/cBioPortal/cbioportal/blob/047cb2640b5cde4cd78944dac3eee9fe735d1ab9/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/047cb2640b5cde4cd78944dac3eee9fe735d1ab9/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=047cb2640b5cde4cd78944dac3eee9fe735d1ab9patchX
  @@ -209,24 +209,6 @@ public ResponseEntity<List<AlterationCountByGene>> fetchMutatedGenes(
         return new ResponseEntity<>(alterationCountByGenes, HttpStatus.OK);
     }
     
-    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
-    @RequestMapping(value = "/column-store/mutated-genes/fetch", method = RequestMethod.POST,
-        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
-    @ApiOperation("Fetch mutated genes by study view filter")
-    public ResponseEntity<List<AlterationCountByGene>> fetchMutatedGenesFromColumnStore(
-        @ApiParam(required = true, value = "Study view filter")
-        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter,
-        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
-        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
-        @ApiIgnore // 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<>(
-            studyViewService.getMutatedGenesFromColumnstore(interceptedStudyViewFilter),
-            HttpStatus.OK
-        );
-    }
-
     @Cacheable(
         cacheResolver = "staticRepositoryCacheOneResolver",
         condition = "@cacheEnabledConfig.getEnabled() && #singleStudyUnfiltered"
@@ -349,26 +331,6 @@ public ResponseEntity<List<Sample>> fetchFilteredSamples(
         return new ResponseEntity<>(result, HttpStatus.OK);
     }
 
-    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
-    @RequestMapping(value = "/column-store/filtered-samples/fetch", method = RequestMethod.POST,
-        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
-    @ApiOperation("Fetch sample IDs by study view filter")
-    public ResponseEntity<List<Sample>> fetchFilteredSamplesFromColumnStore(
-        @ApiParam("Whether to negate the study view filters")
-        @RequestParam(defaultValue = "false") Boolean negateFilters,
-        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
-        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
-        @ApiIgnore // 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,
-        @ApiParam(required = true, value = "Study view filter")
-        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter) {
-
-        return new ResponseEntity<>(
-            studyViewService.getFilteredSamplesFromColumnstore(interceptedStudyViewFilter),
-            HttpStatus.OK
-        );
-    }
-
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/molecular-profile-sample-counts/fetch", method = RequestMethod.POST,
         consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)u}(j[p  (84e7fdf2ba86a01d77599fe4b6c9958126cc2cc6jp  Tweb/src/main/java/org/cbioportal/web/columnstore/StudyViewColumnStoreController.javajp  addedjp  KIjp  K jp  KIjp  https://github.com/cBioPortal/cbioportal/blob/047cb2640b5cde4cd78944dac3eee9fe735d1ab9/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.javajp  https://github.com/cBioPortal/cbioportal/raw/047cb2640b5cde4cd78944dac3eee9fe735d1ab9/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.javajp  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.java?ref=047cb2640b5cde4cd78944dac3eee9fe735d1ab9jp  X  @@ -0,0 +1,73 @@
+package org.cbioportal.web.columnstore;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.cbioportal.model.AlterationCountByGene;
+import org.cbioportal.model.Sample;
+import org.cbioportal.service.StudyViewService;
+import org.cbioportal.web.config.annotation.InternalApi;
+import org.cbioportal.webparam.StudyViewFilter;
+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.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.validation.Valid;
+import java.util.Collection;
+import java.util.List;
+
+@InternalApi
+@RestController
+@Validated
+@Api(tags = "Study View Column Store")
+public class StudyViewColumnStoreController {
+
+    @Autowired
+    private StudyViewService studyViewService;
+    
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @PostMapping(value = "/column-store/filtered-samples/fetch",
+        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch sample IDs by study view filter")
+    public ResponseEntity<List<Sample>> fetchFilteredSamples(
+        @ApiParam("Whether to negate the study view filters")
+        @RequestParam(defaultValue = "false") Boolean negateFilters,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiIgnore // 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,
+        @ApiParam(required = true, value = "Study view filter")
+        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter) {
+        return new ResponseEntity<>(
+            studyViewService.getFilteredSamplesFromColumnstore(interceptedStudyViewFilter),
+            HttpStatus.OK
+        );
+    }
+
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @PostMapping(value = "/column-store/mutated-genes/fetch",
+        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch mutated genes by study view filter")
+    public ResponseEntity<List<AlterationCountByGene>> fetchMutatedGenes(
+        @ApiParam(required = true, value = "Study view filter")
+        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiIgnore // 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<>(
+            studyViewService.getMutatedGenesFromColumnstore(interceptedStudyViewFilter),
+            HttpStatus.OK
+        );
+    }
+}u}(j[p  (454709c1bffbf10f7f7730079ec79e50b533d470jp  Vweb/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.javajp  modifiedjp  Kjp  Kjp  Kjp  https://github.com/cBioPortal/cbioportal/blob/047cb2640b5cde4cd78944dac3eee9fe735d1ab9/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javajp  https://github.com/cBioPortal/cbioportal/raw/047cb2640b5cde4cd78944dac3eee9fe735d1ab9/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javajp  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.java?ref=047cb2640b5cde4cd78944dac3eee9fe735d1ab9jp  X  @@ -39,6 +39,7 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.commons.lang3.StringUtils;
 import org.cbioportal.model.AlterationFilter;
 import org.cbioportal.model.MolecularProfile;
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
@@ -127,7 +128,7 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
         if (!request.getMethod().equals("POST")) {
             return true; // no attribute extraction needed because all user supplied filter objects are in POST requests
         }
-        String requestPathInfo = request.getPathInfo();
+        String requestPathInfo = StringUtils.removeStart(request.getPathInfo(), "/column-store");
         if (requestPathInfo.equals(PATIENT_FETCH_PATH)) {
             return extractAttributesFromPatientFilter(request);
         } else if (requestPathInfo.equals(SAMPLE_FETCH_PATH)) {ueu(b2f0fbff2cfba1a2ef114de6bb89620c5a611d3b}(sha(b2f0fbff2cfba1a2ef114de6bb89620c5a611d3bnode_idEC_kwDOAe-hB9oAKGIyZjBmYmZmMmNmYmExYTJlZjExNGRlNmJiODk2MjBjNWE2MTFkM2Icommit}(author}(namekarissawhitingemailkarissa.whiting@gmail.comdate2023-06-09T14:14:13Zu	committer}(jp  GitHubjp  noreply@github.comjp  2023-06-09T14:14:13ZumessageYUpdate web-API-and-Clients.md (#10209)

Add description of cbioportalR in web API sectiontree}(jp  (cbd8918a0a42379c6946a77c903301f4d3079a55urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/cbd8918a0a42379c6946a77c903301f4d3079a55ujp  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/b2f0fbff2cfba1a2ef114de6bb89620c5a611d3b
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkgzO1CRBK7hj4Ov3rIwAAkpQIAAlUrudARE5/E6VqAG9eIZdZ
DR0fRYzHM1iZxCYF/UMfRYp7boSydvB0EMSijOr7c7GuhPxV3acxbvh0f4KhXtSN
jLUKwD+/rfXXpRBieRRCQGakJRPuySRtD+iaZaheANeBeF4U8WNK8ZXEX8/WRsFg
dqLI+vNndT6g93mzO+Fe1CINdfN76Ch7u1Xr7KtnhDQhtaXG6IYRucUZr6jIdRfa
nDlSNFTxuXUeb3nT5by7NmXDrgGzCtTIOkn+A/O4x9cTS48/gEVB2lw3cu8FhoIv
oUYs3uzsDodtaLhXhhtv0PllpilB8s20tFNQ2pFZbSgdRw56kffRbtWQW3OGRJY=
=Iy76
-----END PGP SIGNATURE-----
payloadX2  tree cbd8918a0a42379c6946a77c903301f4d3079a55
parent 1768381e64f9e6e8a238e2aec7b775fdafcb2b31
author karissawhiting <karissa.whiting@gmail.com> 1686320053 -0400
committer GitHub <noreply@github.com> 1686320053 -0400

Update web-API-and-Clients.md (#10209)

Add description of cbioportalR in web API sectionuujp  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b2f0fbff2cfba1a2ef114de6bb89620c5a611d3bhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/b2f0fbff2cfba1a2ef114de6bb89620c5a611d3bcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/b2f0fbff2cfba1a2ef114de6bb89620c5a611d3b/commentsjp  }(loginkarissawhitingidJ% jp  MDQ6VXNlcjEwODg4Njgz
avatar_url4https://avatars.githubusercontent.com/u/10888683?v=4gravatar_idh5jp  +https://api.github.com/users/karissawhitingjq  !https://github.com/karissawhiting
followers_url5https://api.github.com/users/karissawhiting/followers
following_urlBhttps://api.github.com/users/karissawhiting/following{/other_user}	gists_url;https://api.github.com/users/karissawhiting/gists{/gist_id}starred_urlBhttps://api.github.com/users/karissawhiting/starred{/owner}{/repo}subscriptions_url9https://api.github.com/users/karissawhiting/subscriptionsorganizations_url0https://api.github.com/users/karissawhiting/orgs	repos_url1https://api.github.com/users/karissawhiting/repos
events_url<https://api.github.com/users/karissawhiting/events{/privacy}received_events_url;https://api.github.com/users/karissawhiting/received_eventstypeUser
site_adminujp  }(j
q  web-flowjq  J/jp  MDQ6VXNlcjE5ODY0NDQ3jq  4https://avatars.githubusercontent.com/u/19864447?v=4jq  h5jp  %https://api.github.com/users/web-flowjq  https://github.com/web-flowjq  /https://api.github.com/users/web-flow/followersjq  <https://api.github.com/users/web-flow/following{/other_user}jq  5https://api.github.com/users/web-flow/gists{/gist_id}jq  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jq  3https://api.github.com/users/web-flow/subscriptionsj q  *https://api.github.com/users/web-flow/orgsj"q  +https://api.github.com/users/web-flow/reposj$q  6https://api.github.com/users/web-flow/events{/privacy}j&q  5https://api.github.com/users/web-flow/received_eventsj(q  Userj*q  uparents]}(jp  (1768381e64f9e6e8a238e2aec7b775fdafcb2b31jp  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1768381e64f9e6e8a238e2aec7b775fdafcb2b31jq  Xhttps://github.com/cBioPortal/cbioportal/commit/1768381e64f9e6e8a238e2aec7b775fdafcb2b31uastats}(totalK	additionsK	deletionsKufiles]}(jp  (762f0da3649ff6bd3338410bc824a1a72457395afilenamedocs/web-API-and-Clients.mdstatusmodifiedjDq  KjEq  KchangesKblob_urlthttps://github.com/cBioPortal/cbioportal/blob/b2f0fbff2cfba1a2ef114de6bb89620c5a611d3b/docs%2Fweb-API-and-Clients.mdraw_urlshttps://github.com/cBioPortal/cbioportal/raw/b2f0fbff2cfba1a2ef114de6bb89620c5a611d3b/docs%2Fweb-API-and-Clients.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fweb-API-and-Clients.md?ref=b2f0fbff2cfba1a2ef114de6bb89620c5a611d3bpatchX
  @@ -8,9 +8,9 @@ Please see the full reference documentation for the API [here](https://www.cbiop
 
 The cBioPortal REST API is described using Swagger/OpenAPI, which allows one to generate a client in most programming languages. One can use the command line tool `curl` for dowloading data on the command line or use another language such as `Python` or `R` to make visualizations. We list some common examples below, but if your language is not listed, there is likely a client generator available elsewhere (see e.g. https://swagger.io/tools/swagger-codegen/). Do reach out if you'd like us to add a language.
 
-### R client
+### R clients
 
-There are multiple ways to access the API using R. The recommended way is to use `cBioPortalData`.
+There are multiple ways to access the API using R. Below are two recommended R packages to access cBioPortal data.
 
 #### cBioPortalData (recommended)
 
@@ -34,9 +34,22 @@ cBioPortal(
 )
 ```
 
+#### cbioportalR (recommended)
+
+cbioportalR offers easy-to-use functions that allow users to browse and pull data from public or institutional cBioPortal sites without knowledge of web service or Bioconductor infrastructures. The package is tidyverse-compatible. Key package features include:
+
+1. Comprehensive documentation aimed at helping clinical researchers understand the underlying structure of cBioPortal data
+2. [Tutorials]([https://www.karissawhiting.com/cbioportalR/articles/overview-of-workflow.html]) for quick API authentication and set up
+3. Functions to pull complete clinical and genomic data by study ID, molecular profile ID, sample list IDs or individual sample ID (e.g. `get_genetics_by_study()`, `get_genetics_by_sample()`)
+4. Functions to navigate and identify patient IDs, sample IDs or study IDs as needed, or infer necessary ID information for queries when not supplied by user.
+5. Helper functions to pull information on gene panels (`get_gene_panel()`), or lookup entrez ID (`get_entrez_id()`), Hugo Symbol (`get_hugo_symbol()`) or common gene aliases (`get_alias()`) of genes
+6. Capability to query multiple sample IDs from different studies concurrently
+
+For a detailed tutorial on `cbioportalR`, see the package website: https://www.karissawhiting.com/cbioportalR/articles/overview-of-workflow.html
+
 #### rapiclient
 
-Although we recommend to use [cBioPortalData](/#cbioportaldata-recommended) for most use cases, it is possible to connect to the API directly using [rapiclient](https://github.com/bergant/rapiclient):
+Although we recommend [cBioPortalData](/#cbioportaldata-recommended) or [cbioportalR](/#cbioportalR-recommended) for most use cases, it is possible to connect to the API directly using [rapiclient](https://github.com/bergant/rapiclient):
 
 ```
 library(rapiclient)uau(b7de8f38b71f30395e6adf63ff24d3be723a78bd}(sha(b7de8f38b71f30395e6adf63ff24d3be723a78bdnode_idEC_kwDOAe-hB9oAKGI3ZGU4ZjM4YjcxZjMwMzk1ZTZhZGY2M2ZmMjRkM2JlNzIzYTc4YmQcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-07-18T19:25:17Zu	committer}(jaq  GitHubjcq  noreply@github.comjeq  2023-07-18T19:25:17Zumessage_Update Pyyaml package

See https://github.com/yaml/pyyaml/issues/724 for details of this updatetree}(jYq  (e5578d8b179632e4466bc641dfeb782adbf9c7d0urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/e5578d8b179632e4466bc641dfeb782adbf9c7d0ujqq  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/b7de8f38b71f30395e6adf63ff24d3be723a78bd
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJktucdCRBK7hj4Ov3rIwAAOjUIAJqvF13ex8EIfz/kE3nSc2s0
cwpk2efK0EPGiQ/pO4JYRnapDEBw1Iaf/VIf6Ijnyzp6FkGjolHJg0ExuSlDcICg
lXMWkX+CPyMznVn3m252G5OQnPZx2WnzBBJcGQAc91du4v9oXDwu9ec9PErCQGKL
bczIVpLCb+s70Op266G3NKIRPBUeQRzJrsTP8jarFBC3tE5M/5D49mW05mu8Di6u
nISKUHuw9MhosJasXNeEkg0re0bStsRxUrpIbJTI66mZJvU31vB7vSTn5E4Z2dIv
QDvwJ427PXlycQddrVxPS/+Zh56k9w0Q+tPEo61fH6iug1IeYIGAJNdHaRrSZFI=
=zLez
-----END PGP SIGNATURE-----
payloadXH  tree e5578d8b179632e4466bc641dfeb782adbf9c7d0
parent 9e90a2ab3e943f9840acbd6e607ca3912a45f210
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1689708317 -0400
committer GitHub <noreply@github.com> 1689708317 -0400

Update Pyyaml package

See https://github.com/yaml/pyyaml/issues/724 for details of this updateuujqq  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b7de8f38b71f30395e6adf63ff24d3be723a78bdhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/b7de8f38b71f30395e6adf63ff24d3be723a78bdcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/b7de8f38b71f30395e6adf63ff24d3be723a78bd/commentsj_q  }(login
dippindotsidJtO j[q  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5jqq  'https://api.github.com/users/dippindotsjq  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminujgq  }(jq  web-flowjq  J/j[q  MDQ6VXNlcjE5ODY0NDQ3jq  4https://avatars.githubusercontent.com/u/19864447?v=4jq  h5jqq  %https://api.github.com/users/web-flowjq  https://github.com/web-flowjq  /https://api.github.com/users/web-flow/followersjq  <https://api.github.com/users/web-flow/following{/other_user}jq  5https://api.github.com/users/web-flow/gists{/gist_id}jq  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jq  3https://api.github.com/users/web-flow/subscriptionsjq  *https://api.github.com/users/web-flow/orgsjq  +https://api.github.com/users/web-flow/reposjq  6https://api.github.com/users/web-flow/events{/privacy}jq  5https://api.github.com/users/web-flow/received_eventsjq  Userjq  uparents]}(jYq  (9e90a2ab3e943f9840acbd6e607ca3912a45f210jqq  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9e90a2ab3e943f9840acbd6e607ca3912a45f210jq  Xhttps://github.com/cBioPortal/cbioportal/commit/9e90a2ab3e943f9840acbd6e607ca3912a45f210uastats}(totalK	additionsK	deletionsKufiles]}(jYq  (5cd1f3ba8b7e6f309b46c79edd07493f153db83afilenamerequirements.txtstatusmodifiedjq  Kjq  KchangesKblob_urlghttps://github.com/cBioPortal/cbioportal/blob/b7de8f38b71f30395e6adf63ff24d3be723a78bd/requirements.txtraw_urlfhttps://github.com/cBioPortal/cbioportal/raw/b7de8f38b71f30395e6adf63ff24d3be723a78bd/requirements.txtcontents_urlyhttps://api.github.com/repos/cBioPortal/cbioportal/contents/requirements.txt?ref=b7de8f38b71f30395e6adf63ff24d3be723a78bdpatch@@ -2,5 +2,5 @@ requests==2.20.0
 markupsafe==2.0.1
 Jinja2==2.11.3
 mysqlclient==2.1.0
-PyYAML==5.4
+PyYAML==6.0.1
 dsnparse==0.1.15uau(cb4567f75981d7e878cb59127b0565c9cedaab14}(sha(cb4567f75981d7e878cb59127b0565c9cedaab14node_idEC_kwDOAe-hB9oAKGNiNDU2N2Y3NTk4MWQ3ZTg3OGNiNTkxMjdiMDU2NWM5Y2VkYWFiMTQcommit}(author}(namekarissawhitingemailkarissa.whiting@gmail.comdate2023-06-02T20:05:40Zu	committer}(jq  GitHubjq  noreply@github.comjq  2023-06-02T20:05:40ZumessagePUpdate web-API-and-Clients.md

Add description of cbioportalR in web API sectiontree}(jq  (6fba9bde38a5f3d152d5ca36c7a0429a6f439631urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/6fba9bde38a5f3d152d5ca36c7a0429a6f439631ujq  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/cb4567f75981d7e878cb59127b0565c9cedaab14
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkekuUCRBK7hj4Ov3rIwAAUCcIAFcrxHBVdGFOQ5G50tQTNdem
WtESPAc6g5n/1NsTZ8ewl17Ff/WRmmumtfUeIgQXFLThnzrQAoLnkmA6njBrBVmP
uElmvTZEf8kjXEk5uNr4lM8gWIY2zTB4lXZw3XZRvZ0/23d3FOcSqlL9Tsf0Y6zp
RRAogNjeX6ztDZ0lsPRThovr3ClwSLAWOusZFsNIS/HV+OrHGdov06BnAUQ7eK+T
PMuFTmvlQH4mfVrQyuaQlHq2Gm53sV054Sh7m87Zu82Mwq1ngXdnKYYOQXvr9Q42
LT7sdiLJsMRTrVtnhQwAGBmi9sgYxXk75LO967H19TtqE2pQAYSdwbXHxy4/M10=
=eRkb
-----END PGP SIGNATURE-----
payloadX)  tree 6fba9bde38a5f3d152d5ca36c7a0429a6f439631
parent d72a44f36f336ce6047b2af99add25d36aa6db2b
author karissawhiting <karissa.whiting@gmail.com> 1685736340 -0400
committer GitHub <noreply@github.com> 1685736340 -0400

Update web-API-and-Clients.md

Add description of cbioportalR in web API sectionuujq  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/cb4567f75981d7e878cb59127b0565c9cedaab14html_urlXhttps://github.com/cBioPortal/cbioportal/commit/cb4567f75981d7e878cb59127b0565c9cedaab14comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/cb4567f75981d7e878cb59127b0565c9cedaab14/commentsjq  }(loginkarissawhitingidJ% jq  MDQ6VXNlcjEwODg4Njgz
avatar_url4https://avatars.githubusercontent.com/u/10888683?v=4gravatar_idh5jq  +https://api.github.com/users/karissawhitingjq  !https://github.com/karissawhiting
followers_url5https://api.github.com/users/karissawhiting/followers
following_urlBhttps://api.github.com/users/karissawhiting/following{/other_user}	gists_url;https://api.github.com/users/karissawhiting/gists{/gist_id}starred_urlBhttps://api.github.com/users/karissawhiting/starred{/owner}{/repo}subscriptions_url9https://api.github.com/users/karissawhiting/subscriptionsorganizations_url0https://api.github.com/users/karissawhiting/orgs	repos_url1https://api.github.com/users/karissawhiting/repos
events_url<https://api.github.com/users/karissawhiting/events{/privacy}received_events_url;https://api.github.com/users/karissawhiting/received_eventstypeUser
site_adminujq  }(jq  web-flowjq  J/jq  MDQ6VXNlcjE5ODY0NDQ3jq  4https://avatars.githubusercontent.com/u/19864447?v=4jr  h5jq  %https://api.github.com/users/web-flowjq  https://github.com/web-flowjr  /https://api.github.com/users/web-flow/followersjr  <https://api.github.com/users/web-flow/following{/other_user}jr  5https://api.github.com/users/web-flow/gists{/gist_id}j
r  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jr  3https://api.github.com/users/web-flow/subscriptionsjr  *https://api.github.com/users/web-flow/orgsjr  +https://api.github.com/users/web-flow/reposjr  6https://api.github.com/users/web-flow/events{/privacy}jr  5https://api.github.com/users/web-flow/received_eventsjr  Userjr  uparents]}(jq  (d72a44f36f336ce6047b2af99add25d36aa6db2bjq  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d72a44f36f336ce6047b2af99add25d36aa6db2bjq  Xhttps://github.com/cBioPortal/cbioportal/commit/d72a44f36f336ce6047b2af99add25d36aa6db2buastats}(totalK	additionsK	deletionsKufiles]}(jq  (762f0da3649ff6bd3338410bc824a1a72457395afilenamedocs/web-API-and-Clients.mdstatusmodifiedj2r  Kj3r  KchangesKblob_urlthttps://github.com/cBioPortal/cbioportal/blob/cb4567f75981d7e878cb59127b0565c9cedaab14/docs%2Fweb-API-and-Clients.mdraw_urlshttps://github.com/cBioPortal/cbioportal/raw/cb4567f75981d7e878cb59127b0565c9cedaab14/docs%2Fweb-API-and-Clients.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fweb-API-and-Clients.md?ref=cb4567f75981d7e878cb59127b0565c9cedaab14patchX
  @@ -8,9 +8,9 @@ Please see the full reference documentation for the API [here](https://www.cbiop
 
 The cBioPortal REST API is described using Swagger/OpenAPI, which allows one to generate a client in most programming languages. One can use the command line tool `curl` for dowloading data on the command line or use another language such as `Python` or `R` to make visualizations. We list some common examples below, but if your language is not listed, there is likely a client generator available elsewhere (see e.g. https://swagger.io/tools/swagger-codegen/). Do reach out if you'd like us to add a language.
 
-### R client
+### R clients
 
-There are multiple ways to access the API using R. The recommended way is to use `cBioPortalData`.
+There are multiple ways to access the API using R. Below are two recommended R packages to access cBioPortal data.
 
 #### cBioPortalData (recommended)
 
@@ -34,9 +34,22 @@ cBioPortal(
 )
 ```
 
+#### cbioportalR (recommended)
+
+cbioportalR offers easy-to-use functions that allow users to browse and pull data from public or institutional cBioPortal sites without knowledge of web service or Bioconductor infrastructures. The package is tidyverse-compatible. Key package features include:
+
+1. Comprehensive documentation aimed at helping clinical researchers understand the underlying structure of cBioPortal data
+2. [Tutorials]([https://www.karissawhiting.com/cbioportalR/articles/overview-of-workflow.html]) for quick API authentication and set up
+3. Functions to pull complete clinical and genomic data by study ID, molecular profile ID, sample list IDs or individual sample ID (e.g. `get_genetics_by_study()`, `get_genetics_by_sample()`)
+4. Functions to navigate and identify patient IDs, sample IDs or study IDs as needed, or infer necessary ID information for queries when not supplied by user.
+5. Helper functions to pull information on gene panels (`get_gene_panel()`), or lookup entrez ID (`get_entrez_id()`), Hugo Symbol (`get_hugo_symbol()`) or common gene aliases (`get_alias()`) of genes
+6. Capability to query multiple sample IDs from different studies concurrently
+
+For a detailed tutorial on `cbioportalR`, see the package website: https://www.karissawhiting.com/cbioportalR/articles/overview-of-workflow.html
+
 #### rapiclient
 
-Although we recommend to use [cBioPortalData](/#cbioportaldata-recommended) for most use cases, it is possible to connect to the API directly using [rapiclient](https://github.com/bergant/rapiclient):
+Although we recommend [cBioPortalData](/#cbioportaldata-recommended) or [cbioportalR](/#cbioportalR-recommended) for most use cases, it is possible to connect to the API directly using [rapiclient](https://github.com/bergant/rapiclient):
 
 ```
 library(rapiclient)uau(78dbe9eb8dd58dc5bf3f89c8edc36ea1c920c581}(sha(78dbe9eb8dd58dc5bf3f89c8edc36ea1c920c581node_idEC_kwDOAe-hB9oAKDc4ZGJlOWViOGRkNThkYzViZjNmODljOGVkYzM2ZWExYzkyMGM1ODEcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-07-18T19:42:56Zu	committer}(jOr  GitHubjQr  noreply@github.comjSr  2023-07-18T19:42:56ZumessageNMerge pull request #10283 from cBioPortal/update-pyyaml

Update Pyyaml packagetree}(jGr  (e5578d8b179632e4466bc641dfeb782adbf9c7d0urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/e5578d8b179632e4466bc641dfeb782adbf9c7d0uj_r  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/78dbe9eb8dd58dc5bf3f89c8edc36ea1c920c581
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJktutACRBK7hj4Ov3rIwAAwogIAFQrWKR4IGOk+38huIJEn+iG
l0RKfjQW4OAAoKvlPUATOifuwdgxDn7t/5XPWsRkmPWKbU0mgEeclL6J43Ko2fUA
J92ZYgdFF43j69xsKPMgfqwE2KYE42lTO9xrhqc9OQ2a7PQRUhRP9o2tpt+OWRBu
JOdUAoQ7vTH5SgWjAREsBrj3qbajQNJQPjEQAH580NQWkpjJrlILXNwsJZ4+9so8
9Uu6HU2IG/nrCTEk0rllfU15YtkYKen+IkKxwuDQ1CWmhgQPJEe1HLU4dhweSLTC
aePI9vLPhCA1qSo0aUWfwYWLzKMlE90KMZ63Lr3XYz+elI9tf1G9l5eZbjcZfAI=
=TEYK
-----END PGP SIGNATURE-----
payloadXg  tree e5578d8b179632e4466bc641dfeb782adbf9c7d0
parent 9e90a2ab3e943f9840acbd6e607ca3912a45f210
parent b7de8f38b71f30395e6adf63ff24d3be723a78bd
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1689709376 -0400
committer GitHub <noreply@github.com> 1689709376 -0400

Merge pull request #10283 from cBioPortal/update-pyyaml

Update Pyyaml packageuuj_r  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/78dbe9eb8dd58dc5bf3f89c8edc36ea1c920c581html_urlXhttps://github.com/cBioPortal/cbioportal/commit/78dbe9eb8dd58dc5bf3f89c8edc36ea1c920c581comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/78dbe9eb8dd58dc5bf3f89c8edc36ea1c920c581/commentsjMr  }(login
dippindotsidJtO jIr  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j_r  'https://api.github.com/users/dippindotsjmr  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminujUr  }(jrr  web-flowjtr  J/jIr  MDQ6VXNlcjE5ODY0NDQ3jvr  4https://avatars.githubusercontent.com/u/19864447?v=4jxr  h5j_r  %https://api.github.com/users/web-flowjmr  https://github.com/web-flowj{r  /https://api.github.com/users/web-flow/followersj}r  <https://api.github.com/users/web-flow/following{/other_user}jr  5https://api.github.com/users/web-flow/gists{/gist_id}jr  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jr  3https://api.github.com/users/web-flow/subscriptionsjr  *https://api.github.com/users/web-flow/orgsjr  +https://api.github.com/users/web-flow/reposjr  6https://api.github.com/users/web-flow/events{/privacy}jr  5https://api.github.com/users/web-flow/received_eventsjr  Userjr  uparents](}(jGr  (9e90a2ab3e943f9840acbd6e607ca3912a45f210j_r  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9e90a2ab3e943f9840acbd6e607ca3912a45f210jmr  Xhttps://github.com/cBioPortal/cbioportal/commit/9e90a2ab3e943f9840acbd6e607ca3912a45f210u}(jGr  (b7de8f38b71f30395e6adf63ff24d3be723a78bdj_r  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b7de8f38b71f30395e6adf63ff24d3be723a78bdjmr  Xhttps://github.com/cBioPortal/cbioportal/commit/b7de8f38b71f30395e6adf63ff24d3be723a78bduestats}(totalK	additionsK	deletionsKufiles]}(jGr  (5cd1f3ba8b7e6f309b46c79edd07493f153db83afilenamerequirements.txtstatusmodifiedjr  Kjr  KchangesKblob_urlghttps://github.com/cBioPortal/cbioportal/blob/78dbe9eb8dd58dc5bf3f89c8edc36ea1c920c581/requirements.txtraw_urlfhttps://github.com/cBioPortal/cbioportal/raw/78dbe9eb8dd58dc5bf3f89c8edc36ea1c920c581/requirements.txtcontents_urlyhttps://api.github.com/repos/cBioPortal/cbioportal/contents/requirements.txt?ref=78dbe9eb8dd58dc5bf3f89c8edc36ea1c920c581patch@@ -2,5 +2,5 @@ requests==2.20.0
 markupsafe==2.0.1
 Jinja2==2.11.3
 mysqlclient==2.1.0
-PyYAML==5.4
+PyYAML==6.0.1
 dsnparse==0.1.15uau(5f66fc71561db67918e3fc100131a6b64bbdd8f4}(sha(5f66fc71561db67918e3fc100131a6b64bbdd8f4node_idEC_kwDOAe-hB9oAKDVmNjZmYzcxNTYxZGI2NzkxOGUzZmMxMDAxMzFhNmI2NGJiZGQ4ZjQcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-08T02:16:51Zu	committer}(jr  Djokovic0311jr  .55948986+Djokovic0311@users.noreply.github.comjr  2023-08-08T02:16:51ZumessagekMerge branch 'GenericAssay-Jiahang' of https://github.com/Djokovic0311/cbioportal into GenericAssay-Jiahangtree}(jr  (def07071fa24e6e081062173d0517435cfb39894urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/def07071fa24e6e081062173d0517435cfb39894ujr  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/5f66fc71561db67918e3fc100131a6b64bbdd8f4
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujr  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/5f66fc71561db67918e3fc100131a6b64bbdd8f4html_urlXhttps://github.com/cBioPortal/cbioportal/commit/5f66fc71561db67918e3fc100131a6b64bbdd8f4comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/5f66fc71561db67918e3fc100131a6b64bbdd8f4/commentsjr  }(loginDjokovic0311idJUjr  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5jr  )https://api.github.com/users/Djokovic0311jr  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminujr  }(jr  Djokovic0311jr  JUjr  MDQ6VXNlcjU1OTQ4OTg2jr  4https://avatars.githubusercontent.com/u/55948986?v=4jr  h5jr  )https://api.github.com/users/Djokovic0311jr  https://github.com/Djokovic0311jr  3https://api.github.com/users/Djokovic0311/followersjr  @https://api.github.com/users/Djokovic0311/following{/other_user}jr  9https://api.github.com/users/Djokovic0311/gists{/gist_id}jr  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}jr  7https://api.github.com/users/Djokovic0311/subscriptionsjr  .https://api.github.com/users/Djokovic0311/orgsj s  /https://api.github.com/users/Djokovic0311/reposjs  :https://api.github.com/users/Djokovic0311/events{/privacy}js  9https://api.github.com/users/Djokovic0311/received_eventsjs  Userjs  uparents](}(jr  (7ce13e8a445ab9c0cdacf87df590acbdb115decbjr  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7ce13e8a445ab9c0cdacf87df590acbdb115decbjr  Xhttps://github.com/cBioPortal/cbioportal/commit/7ce13e8a445ab9c0cdacf87df590acbdb115decbu}(jr  (8f4fa2ce4e10348df6fa328b8051c32069838454jr  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8f4fa2ce4e10348df6fa328b8051c32069838454jr  Xhttps://github.com/cBioPortal/cbioportal/commit/8f4fa2ce4e10348df6fa328b8051c32069838454uestats}(totalK	additionsK	deletionsKufiles](}(jr  (53d67e29cfd646d509e86cc8112d60d3647e4fb4filenameTservice/src/main/java/org/cbioportal/service/GenericAssayCategoricalDataService.javastatusmodifiedj&s  Kj's  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/5f66fc71561db67918e3fc100131a6b64bbdd8f4/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayCategoricalDataService.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/5f66fc71561db67918e3fc100131a6b64bbdd8f4/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayCategoricalDataService.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FGenericAssayCategoricalDataService.java?ref=5f66fc71561db67918e3fc100131a6b64bbdd8f4patchX*  @@ -1,6 +1,7 @@
 package org.cbioportal.service;
 
 import org.cbioportal.model.EnrichmentType;
+
 import org.cbioportal.model.GenericAssayCategoricalEnrichment;
 import org.cbioportal.model.MolecularProfileCaseIdentifier;
 import org.cbioportal.service.exception.MolecularProfileNotFoundException;u}(jr  (63f6aeadea30875b4f411ca7ac81f11a46159b4fj,s  Xservice/src/main/java/org/cbioportal/service/impl/GenericAssayBinaryDataServiceImpl.javaj.s  modifiedj&s  Kj's  K j0s  Kj1s  https://github.com/cBioPortal/cbioportal/blob/5f66fc71561db67918e3fc100131a6b64bbdd8f4/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImpl.javaj3s  https://github.com/cBioPortal/cbioportal/raw/5f66fc71561db67918e3fc100131a6b64bbdd8f4/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImpl.javaj5s  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayBinaryDataServiceImpl.java?ref=5f66fc71561db67918e3fc100131a6b64bbdd8f4j7s  Xm  @@ -16,6 +16,7 @@
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
+
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -26,6 +27,7 @@
 import java.util.HashSet;
 import java.util.Set;
 import java.util.Map;
+
 import java.util.function.Function;
 import java.util.stream.Collectors;
 u}(jr  (150fb3701781a7e23cd5884953a72f98c0c6b57aj,s  Pservice/src/main/java/org/cbioportal/service/util/FisherExactTestCalculator.javaj.s  modifiedj&s  Kj's  Kj0s  Kj1s  https://github.com/cBioPortal/cbioportal/blob/5f66fc71561db67918e3fc100131a6b64bbdd8f4/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javaj3s  https://github.com/cBioPortal/cbioportal/raw/5f66fc71561db67918e3fc100131a6b64bbdd8f4/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javaj5s  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.java?ref=5f66fc71561db67918e3fc100131a6b64bbdd8f4j7s  XH  @@ -88,7 +88,7 @@ public double getTwoTailedPValue(int a, int b, int c, int d) {
             }
         }
         return p;
-    } 
+    }
     public BigDecimal[] calcqValue(BigDecimal[] pValuesInIncreasingOrder) {
         BigDecimal cachedElement = BigDecimal.valueOf(0.0);
         int dataLength = pValuesInIncreasingOrder.length;
@@ -120,6 +120,5 @@ private void reverseValues(int dataLength, BigDecimal[]  reversedQValues) {
             reversedQValues[i] = reversedQValues[dataLength - i - 1];
             reversedQValues[dataLength - i - 1] = temp;
         }
-
     }
 }ueu(e0e441dfea9270d60d6f13b0ac6fe08db2651687}(sha(e0e441dfea9270d60d6f13b0ac6fe08db2651687node_idEC_kwDOAe-hB9oAKGUwZTQ0MWRmZWE5MjcwZDYwZDZmMTNiMGFjNmZlMDhkYjI2NTE2ODccommit}(author}(namehaynescdemailhaynescd@chop.edudate2023-07-17T03:11:45Zu	committer}(jSs  haynescdjUs  haynescd@chop.edujWs  2023-07-17T03:11:45ZumessageFix test to add Clinical Datatree}(jKs  (d3690f098cf8861888d5a6d9fbae3a8d42b72024urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/d3690f098cf8861888d5a6d9fbae3a8d42b72024ujcs  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/e0e441dfea9270d60d6f13b0ac6fe08db2651687
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujcs  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/e0e441dfea9270d60d6f13b0ac6fe08db2651687html_urlXhttps://github.com/cBioPortal/cbioportal/commit/e0e441dfea9270d60d6f13b0ac6fe08db2651687comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/e0e441dfea9270d60d6f13b0ac6fe08db2651687/commentsjQs  }(loginhaynescdidJ jMs  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5jcs  %https://api.github.com/users/haynescdjos  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminujYs  }(jts  haynescdjvs  J jMs  MDQ6VXNlcjMzNjA4OTIwjxs  4https://avatars.githubusercontent.com/u/33608920?v=4jzs  h5jcs  %https://api.github.com/users/haynescdjos  https://github.com/haynescdj}s  /https://api.github.com/users/haynescd/followersjs  <https://api.github.com/users/haynescd/following{/other_user}js  5https://api.github.com/users/haynescd/gists{/gist_id}js  <https://api.github.com/users/haynescd/starred{/owner}{/repo}js  3https://api.github.com/users/haynescd/subscriptionsjs  *https://api.github.com/users/haynescd/orgsjs  +https://api.github.com/users/haynescd/reposjs  6https://api.github.com/users/haynescd/events{/privacy}js  5https://api.github.com/users/haynescd/received_eventsjs  Userjs  uparents]}(jKs  (69875808bee06e7c7a310712b580da6de58bcea7jcs  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/69875808bee06e7c7a310712b580da6de58bcea7jos  Xhttps://github.com/cBioPortal/cbioportal/commit/69875808bee06e7c7a310712b580da6de58bcea7uastats}(totalK	additionsK	deletionsK
ufiles]}(jKs  (877bd9d72495e805980c13860c8d110160fddda6filenamepersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepositoryTest.javastatusmodifiedjs  Kjs  K
changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/e0e441dfea9270d60d6f13b0ac6fe08db2651687/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/e0e441dfea9270d60d6f13b0ac6fe08db2651687/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.java?ref=e0e441dfea9270d60d6f13b0ac6fe08db2651687patchXd
  @@ -7,7 +7,12 @@
 import org.cbioportal.model.util.Select;
 import org.cbioportal.persistence.enums.ClinicalAttributeDataSource;
 import org.cbioportal.persistence.enums.ClinicalAttributeDataType;
-import org.cbioportal.webparam.*;
+import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
+import org.cbioportal.webparam.ClinicalDataFilter;
+import org.cbioportal.webparam.DataFilterValue;
+import org.cbioportal.webparam.GeneFilterQuery;
+import org.cbioportal.webparam.StudyViewFilter;
+import org.cbioportal.webparam.StudyViewGeneFilter;
 import org.junit.Assert;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -18,9 +23,11 @@
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 import java.math.BigDecimal;
-import java.util.*;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 
@@ -278,13 +285,13 @@ public void getMutatedGenesWithPatientClinicalDataFilterAndSampleClinicalDataFil
         filterValue.setEnd(BigDecimal.valueOf(0.033333333));
         clinicalDataFilter.setValues(List.of(filterValue));
 
-        CategorizedClinicalDataCountFilter clincalDataCountFilters = CategorizedClinicalDataCountFilter.getBuilder()
+        CategorizedClinicalDataCountFilter clinicalDataCountFilters = CategorizedClinicalDataCountFilter.getBuilder()
             .setPatientNumericalClinicalDataFilters(List.of(generateNumericalClinicalDataFilter("AGE", new String[]{"60-65"})))
             .setSampleNumericalClinicalDataFilters(List.of(clinicalDataFilter))
             .setSampleCategoricalClinicalDataFilters(List.of(generateCategoricalClinicalDataFilter("CANCER_TYPE", new String[]{"Bladder Cancer"})))
             .build();
 
-        List<AlterationCountByGene> mutatedGenes = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter, clincalDataCountFilters);
+        List<AlterationCountByGene> mutatedGenes = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter, clinicalDataCountFilters);
         Assert.assertEquals(16, mutatedGenes.size());
     }
     
@@ -293,13 +300,16 @@ public void getMutatedGenesWithPatientClinicalDataFilterAndSampleClinicalDataFil
     public void getClinicalDataCounts() {
         StudyViewFilter studyViewFilter = generateStudyViewFilter(
             new String[]{"msk_ch_2020"},null
-        ); 
-        
-        List<ClinicalDataCount> counts = studyViewMyBatisRepository.getClinicalDataCounts(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build(),
-            List.of("CANCER_TYPE"));
-        
-        Assert.assertEquals(counts.size(), 50);
+        );
+
+        CategorizedClinicalDataCountFilter clinicalDataCountFilters = CategorizedClinicalDataCountFilter.getBuilder()
+            .setPatientNumericalClinicalDataFilters(List.of(generateNumericalClinicalDataFilter("AGE", new String[]{"60-65"})))
+            .setSampleCategoricalClinicalDataFilters(List.of(generateCategoricalClinicalDataFilter("CANCER_TYPE", new String[]{"Bladder Cancer"})))
+            .build();
         
+        List<ClinicalDataCount> counts = studyViewMyBatisRepository.getClinicalDataCounts(studyViewFilter, clinicalDataCountFilters,
+            List.of("SEX"));
         
+        Assert.assertEquals(counts.size(), 2);
     }
 }
\ No newline at end of fileuau(9009870589785bc9736f4d71f1b91aff43c90db8}(sha(9009870589785bc9736f4d71f1b91aff43c90db8node_idEC_kwDOAe-hB9oAKDkwMDk4NzA1ODk3ODViYzk3MzZmNGQ3MWYxYjkxYWZmNDNjOTBkYjgcommit}(author}(name
Qi-Xuan Luemailqlu@carisls.comdate2023-07-31T11:48:57Zu	committer}(js  
Qi-Xuan Lujs  qlu@carisls.comjs  2023-07-31T11:48:57Zumessage0add filter logic for DISCRETE molecular profilestree}(js  (9276e76c23d2997a8fa45d9f351edf20562d69a6urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/9276e76c23d2997a8fa45d9f351edf20562d69a6ujs  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/9009870589785bc9736f4d71f1b91aff43c90db8
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujs  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9009870589785bc9736f4d71f1b91aff43c90db8html_urlXhttps://github.com/cBioPortal/cbioportal/commit/9009870589785bc9736f4d71f1b91aff43c90db8comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/9009870589785bc9736f4d71f1b91aff43c90db8/commentsjs  Njs  Nparents]}(js  (05079e10472a341680fc721d633e0c4058977664js  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/05079e10472a341680fc721d633e0c4058977664js  Xhttps://github.com/cBioPortal/cbioportal/commit/05079e10472a341680fc721d633e0c4058977664uastats}(totalK	additionsK	deletionsK`ufiles](}(js  (49b16f74efae80f2a0bc3a00e2f2d1538c96227efilenameIweb/src/main/java/org/cbioportal/web/parameter/CopyNumberCountFilter.javastatusremovedjs  K js  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/05079e10472a341680fc721d633e0c4058977664/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FCopyNumberCountFilter.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/05079e10472a341680fc721d633e0c4058977664/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FCopyNumberCountFilter.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FCopyNumberCountFilter.java?ref=05079e10472a341680fc721d633e0c4058977664patchX2  @@ -1,20 +0,0 @@
-package org.cbioportal.web.parameter;
-
-public class CopyNumberCountFilter {
-
-    private String molecularProfileId;
-
-    private Integer entrezGeneId;
-
-    public String getMolecularProfileId() {return  molecularProfileId; }
-    
-    public void setMolecularProfileId(String molecularProfileId) {this.molecularProfileId = molecularProfileId; }
-
-    public Integer getEntrezGeneId() {
-        return entrezGeneId;
-    }
-
-    public void setEntrezGeneId(Integer entrezGeneId) {
-        this.entrezGeneId = entrezGeneId;
-    }
-}u}(js  (e283fe88ed73c2bb95dc01e2b9a31ae5b66552e8js  Eweb/src/main/java/org/cbioportal/web/util/StudyViewFilterApplier.javajs  modifiedjs  Kjs  KLjs  Kjs  https://github.com/cBioPortal/cbioportal/blob/9009870589785bc9736f4d71f1b91aff43c90db8/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.javajs  https://github.com/cBioPortal/cbioportal/raw/9009870589785bc9736f4d71f1b91aff43c90db8/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.javaj t  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.java?ref=9009870589785bc9736f4d71f1b91aff43c90db8jt  X
D  @@ -6,6 +6,7 @@
 import java.util.stream.Stream;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.map.MultiKeyMap;
+import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
 import org.cbioportal.model.GeneFilter;
 import org.cbioportal.model.MolecularProfile.MolecularAlterationType;
@@ -166,8 +167,39 @@ public List<SampleIdentifier> apply(StudyViewFilter studyViewFilter, Boolean neg
             molecularProfiles = molecularProfileService.getMolecularProfilesInStudies(studyIds, "SUMMARY");
         }
 
-        sampleIdentifiers = intervalFilterExpressionData(sampleIdentifiers, molecularProfiles,
-                studyViewFilter.getGenomicDataFilters(), negateFilters);
+        List<GenomicDataFilter> genomicDataEqualityFilters = new ArrayList<>();
+        List<GenomicDataFilter> genomicDataIntervalFilters = new ArrayList<>();
+
+        List<GenomicDataFilter> genomicDataFilters = studyViewFilter.getGenomicDataFilters();
+
+        if (!CollectionUtils.isEmpty(genomicDataFilters)) {
+            Map<String, MolecularProfile> molecularProfileMapByType = molecularProfileUtil
+                .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles)
+                .entrySet()
+                .stream()
+                .collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().get(0)));
+
+            genomicDataFilters.forEach(genomicDataFilter -> {
+                String profileType = genomicDataFilter.getProfileType();
+                if (molecularProfileMapByType.containsKey(profileType)) {
+                    if (molecularProfileMapByType.get(profileType).getDatatype().equals("DISCRETE")) {
+                        genomicDataEqualityFilters.add(genomicDataFilter);
+                    } else {
+                        genomicDataIntervalFilters.add(genomicDataFilter);
+                    }
+                }
+            });
+        }
+        
+        if (!CollectionUtils.isEmpty(genomicDataEqualityFilters)) {
+            sampleIdentifiers = equalityFilterExpressionData(sampleIdentifiers, molecularProfiles,
+                genomicDataEqualityFilters, negateFilters);
+        }
+        
+        if (!CollectionUtils.isEmpty(genomicDataIntervalFilters)) {
+            sampleIdentifiers = intervalFilterExpressionData(sampleIdentifiers, molecularProfiles,
+                genomicDataIntervalFilters, negateFilters);
+        }
 
         sampleIdentifiers = intervalFilterExpressionData(sampleIdentifiers, molecularProfiles,
                 studyViewFilter.getGenericAssayDataFilters(), negateFilters);
@@ -851,95 +883,54 @@ public <S extends DataFilter> List<SampleIdentifier> intervalFilterExpressionDat
             Boolean negateFilters) {
 
         if (!CollectionUtils.isEmpty(dataFilters) && !CollectionUtils.isEmpty(sampleIdentifiers)) {
+            Pair<List<ClinicalData>, List<ClinicalDataFilter>> clinicalDataPair = 
+                extractClinicalDataAndAttributes(sampleIdentifiers, molecularProfiles, dataFilters);
+            List<ClinicalData> clinicalDatas = clinicalDataPair.getFirst();
+            List<ClinicalDataFilter> attributes = clinicalDataPair.getSecond();
+            
+            MultiKeyMap clinicalDataMap = new MultiKeyMap();
 
-            Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
-                    .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
-
-            List<String> studyIds = new ArrayList<>();
-            List<String> sampleIds = new ArrayList<>();
-            studyViewFilterUtil.extractStudyAndSampleIds(sampleIdentifiers, studyIds, sampleIds);
-            List<ClinicalData> clinicalDatas = new ArrayList<>();
-            List<ClinicalDataFilter> attributes = new ArrayList<>();
-            if (dataFilters.get(0) instanceof GenomicDataFilter) {
-                List<GenomicDataFilter> genomicDataIntervalFilters = (List<GenomicDataFilter>) dataFilters;
-                Set<String> hugoGeneSymbols = genomicDataIntervalFilters.stream()
-                        .map(GenomicDataFilter::getHugoGeneSymbol).collect(Collectors.toSet());
-                Map<String, Integer> geneNameIdMap = geneService
-                        .fetchGenes(new ArrayList<>(hugoGeneSymbols), GeneIdType.HUGO_GENE_SYMBOL.name(),
-                                Projection.SUMMARY.name())
-                        .stream().collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
-
-                clinicalDatas = genomicDataIntervalFilters.stream().flatMap(genomicDataFilter -> {
-
-                    Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
-                            .getOrDefault(genomicDataFilter.getProfileType(), new ArrayList<>())
-                            .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
-                                    MolecularProfile::getStableId));
-
-                    GenomicDataBinFilter genomicDataBinFilter = new GenomicDataBinFilter();
-                    genomicDataBinFilter.setHugoGeneSymbol(genomicDataFilter.getHugoGeneSymbol());
-                    genomicDataBinFilter.setProfileType(genomicDataFilter.getProfileType());
-                    return invokeDataFunc(sampleIds, studyIds,
-                            Arrays.asList(geneNameIdMap.get(genomicDataFilter.getHugoGeneSymbol()).toString()),
-                            studyIdToMolecularProfileIdMap, genomicDataBinFilter, fetchMolecularData);
-                }).collect(Collectors.toList());
-
-                attributes = genomicDataIntervalFilters.stream().map(genomicDataIntervalFilter -> {
-                    String attributeId = studyViewFilterUtil.getGenomicDataFilterUniqueKey(
-                            genomicDataIntervalFilter.getHugoGeneSymbol(), genomicDataIntervalFilter.getProfileType());
-                    ClinicalDataFilter clinicalDataIntervalFilter = new ClinicalDataFilter();
-                    clinicalDataIntervalFilter.setAttributeId(attributeId);
-                    clinicalDataIntervalFilter.setValues(genomicDataIntervalFilter.getValues());
-                    return clinicalDataIntervalFilter;
-                }).collect(Collectors.toList());
-            } else {
-                List<GenericAssayDataFilter> genericAssayDataFilters = (List<GenericAssayDataFilter>) dataFilters;
+            clinicalDatas.forEach(clinicalData -> {
+                clinicalDataMap.put(clinicalData.getStudyId(), clinicalData.getSampleId(), clinicalData.getAttrId(),
+                        clinicalData.getAttrValue());
+            });
 
-                clinicalDatas = genericAssayDataFilters.stream().flatMap(genericAssayDataFilter -> {
+            List<SampleIdentifier> newSampleIdentifiers = new ArrayList<>();
+            for (SampleIdentifier sampleIdentifier : sampleIdentifiers) {
+                int count =  clinicalDataIntervalFilterApplier.apply(attributes, clinicalDataMap,
+                        sampleIdentifier.getSampleId(), sampleIdentifier.getStudyId(), negateFilters);
 
-                    Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
-                            .getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>())
-                            .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
-                                    MolecularProfile::getStableId));
-                    GenericAssayDataBinFilter genericAssayDataBinFilter = new GenericAssayDataBinFilter();
-                    genericAssayDataBinFilter.setStableId(genericAssayDataFilter.getStableId());
-                    genericAssayDataBinFilter.setProfileType(genericAssayDataFilter.getProfileType());
+                if (count == attributes.size()) {
+                    newSampleIdentifiers.add(sampleIdentifier);
+                }
+            }
 
-                    // get original data stream from invokeDataFunc
-                    Stream<ClinicalData> dataStream = invokeDataFunc(sampleIds, studyIds, Arrays.asList(genericAssayDataBinFilter.getStableId()),
-                        studyIdToMolecularProfileIdMap, genericAssayDataBinFilter, fetchGenericAssayData);
-                    // For patient level generic assay profile, only keep the one sample per patient
-                    List<MolecularProfile> profiles = molecularProfileMap.getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>());
-                    if (profiles.size() > 0 && profiles.get(0).getPatientLevel() == true) {
-                        dataStream = dataStream.collect(Collectors.groupingBy(d -> d.getPatientId())).values().stream()
-                            .flatMap(d -> d.stream().limit(1));
-                    }
-                    // don't change anything for non patient level data
-                    return dataStream;
-                }).collect(Collectors.toList());
+            return newSampleIdentifiers;
+        }
 
-                attributes = genericAssayDataFilters.stream().map(genericAssayDataFilter -> {
-                    String attributeId = studyViewFilterUtil.getGenericAssayDataFilterUniqueKey(
-                            genericAssayDataFilter.getStableId(), genericAssayDataFilter.getProfileType());
-                    ClinicalDataFilter clinicalDataIntervalFilter = new ClinicalDataFilter();
-                    clinicalDataIntervalFilter.setAttributeId(attributeId);
-                    clinicalDataIntervalFilter.setValues(genericAssayDataFilter.getValues());
-                    return clinicalDataIntervalFilter;
-                }).collect(Collectors.toList());
+        return sampleIdentifiers;
+    }
 
-            }
+    public <S extends DataFilter> List<SampleIdentifier> equalityFilterExpressionData(
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
+        Boolean negateFilters) {
+        if (!CollectionUtils.isEmpty(dataFilters) && !CollectionUtils.isEmpty(sampleIdentifiers)) {
+            Pair<List<ClinicalData>, List<ClinicalDataFilter>> clinicalDataPair =
+                extractClinicalDataAndAttributes(sampleIdentifiers, molecularProfiles, dataFilters);
+            List<ClinicalData> clinicalDatas = clinicalDataPair.getFirst();
+            List<ClinicalDataFilter> attributes = clinicalDataPair.getSecond();
 
             MultiKeyMap clinicalDataMap = new MultiKeyMap();
 
             clinicalDatas.forEach(clinicalData -> {
                 clinicalDataMap.put(clinicalData.getStudyId(), clinicalData.getSampleId(), clinicalData.getAttrId(),
-                        clinicalData.getAttrValue());
+                    clinicalData.getAttrValue());
             });
 
             List<SampleIdentifier> newSampleIdentifiers = new ArrayList<>();
             for (SampleIdentifier sampleIdentifier : sampleIdentifiers) {
-                int count = clinicalDataIntervalFilterApplier.apply(attributes, clinicalDataMap,
-                        sampleIdentifier.getSampleId(), sampleIdentifier.getStudyId(), negateFilters);
+                int count =  clinicalDataEqualityFilterApplier.apply(attributes, clinicalDataMap,
+                    sampleIdentifier.getSampleId(), sampleIdentifier.getStudyId(), negateFilters);
 
                 if (count == attributes.size()) {
                     newSampleIdentifiers.add(sampleIdentifier);
@@ -951,4 +942,86 @@ public <S extends DataFilter> List<SampleIdentifier> intervalFilterExpressionDat
 
         return sampleIdentifiers;
     }
+    
+    private <S extends DataFilter> Pair<List<ClinicalData>, List<ClinicalDataFilter>> extractClinicalDataAndAttributes(
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters) {
+        Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
+            .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
+
+        List<String> studyIds = new ArrayList<>();
+        List<String> sampleIds = new ArrayList<>();
+        studyViewFilterUtil.extractStudyAndSampleIds(sampleIdentifiers, studyIds, sampleIds);
+        List<ClinicalData> clinicalDatas = new ArrayList<>();
+        List<ClinicalDataFilter> attributes = new ArrayList<>();
+        if (dataFilters.get(0) instanceof GenomicDataFilter) {
+            List<GenomicDataFilter> genomicDataIntervalFilters = (List<GenomicDataFilter>) dataFilters;
+            Set<String> hugoGeneSymbols = genomicDataIntervalFilters.stream()
+                .map(GenomicDataFilter::getHugoGeneSymbol).collect(Collectors.toSet());
+            Map<String, Integer> geneNameIdMap = geneService
+                .fetchGenes(new ArrayList<>(hugoGeneSymbols), GeneIdType.HUGO_GENE_SYMBOL.name(),
+                    Projection.SUMMARY.name())
+                .stream().collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
+
+            clinicalDatas = genomicDataIntervalFilters.stream().flatMap(genomicDataFilter -> {
+
+                Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
+                    .getOrDefault(genomicDataFilter.getProfileType(), new ArrayList<>())
+                    .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
+                        MolecularProfile::getStableId));
+
+                GenomicDataBinFilter genomicDataBinFilter = new GenomicDataBinFilter();
+                genomicDataBinFilter.setHugoGeneSymbol(genomicDataFilter.getHugoGeneSymbol());
+                genomicDataBinFilter.setProfileType(genomicDataFilter.getProfileType());
+                return invokeDataFunc(sampleIds, studyIds,
+                    Arrays.asList(geneNameIdMap.get(genomicDataFilter.getHugoGeneSymbol()).toString()),
+                    studyIdToMolecularProfileIdMap, genomicDataBinFilter, fetchMolecularData);
+            }).collect(Collectors.toList());
+
+            attributes = genomicDataIntervalFilters.stream().map(genomicDataIntervalFilter -> {
+                String attributeId = studyViewFilterUtil.getGenomicDataFilterUniqueKey(
+                    genomicDataIntervalFilter.getHugoGeneSymbol(), genomicDataIntervalFilter.getProfileType());
+                ClinicalDataFilter clinicalDataIntervalFilter = new ClinicalDataFilter();
+                clinicalDataIntervalFilter.setAttributeId(attributeId);
+                clinicalDataIntervalFilter.setValues(genomicDataIntervalFilter.getValues());
+                return clinicalDataIntervalFilter;
+            }).collect(Collectors.toList());
+        } else {
+            List<GenericAssayDataFilter> genericAssayDataFilters = (List<GenericAssayDataFilter>) dataFilters;
+
+            clinicalDatas = genericAssayDataFilters.stream().flatMap(genericAssayDataFilter -> {
+
+                Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
+                    .getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>())
+                    .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
+                        MolecularProfile::getStableId));
+                GenericAssayDataBinFilter genericAssayDataBinFilter = new GenericAssayDataBinFilter();
+                genericAssayDataBinFilter.setStableId(genericAssayDataFilter.getStableId());
+                genericAssayDataBinFilter.setProfileType(genericAssayDataFilter.getProfileType());
+
+                // get original data stream from invokeDataFunc
+                Stream<ClinicalData> dataStream = invokeDataFunc(sampleIds, studyIds, Arrays.asList(genericAssayDataBinFilter.getStableId()),
+                    studyIdToMolecularProfileIdMap, genericAssayDataBinFilter, fetchGenericAssayData);
+                // For patient level generic assay profile, only keep the one sample per patient
+                List<MolecularProfile> profiles = molecularProfileMap.getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>());
+                if (profiles.size() > 0 && profiles.get(0).getPatientLevel() == true) {
+                    dataStream = dataStream.collect(Collectors.groupingBy(d -> d.getPatientId())).values().stream()
+                        .flatMap(d -> d.stream().limit(1));
+                }
+                // don't change anything for non patient level data
+                return dataStream;
+            }).collect(Collectors.toList());
+
+            attributes = genericAssayDataFilters.stream().map(genericAssayDataFilter -> {
+                String attributeId = studyViewFilterUtil.getGenericAssayDataFilterUniqueKey(
+                    genericAssayDataFilter.getStableId(), genericAssayDataFilter.getProfileType());
+                ClinicalDataFilter clinicalDataIntervalFilter = new ClinicalDataFilter();
+                clinicalDataIntervalFilter.setAttributeId(attributeId);
+                clinicalDataIntervalFilter.setValues(genericAssayDataFilter.getValues());
+                return clinicalDataIntervalFilter;
+            }).collect(Collectors.toList());
+
+        }
+        
+        return new Pair<>(clinicalDatas, attributes);
+    }
 }ueu     (2bcdaea03059ab97d72d167dff0c83d1c0c3a616}(sha(2bcdaea03059ab97d72d167dff0c83d1c0c3a616node_idEC_kwDOAe-hB9oAKDJiY2RhZWEwMzA1OWFiOTdkNzJkMTY3ZGZmMGM4M2QxYzBjM2E2MTYcommit}(author}(name
Ino de Bruijnemailino@ino.biodate2023-08-03T16:24:06Zu	committer}(jt  GitHubjt  noreply@github.comjt  2023-08-03T16:24:06Zumessagesome minor tweaks to texttree}(jt  (2ed15eb83d9bb21e7f5125b0b5a3296ae3479b86urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/2ed15eb83d9bb21e7f5125b0b5a3296ae3479b86uj&t  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/2bcdaea03059ab97d72d167dff0c83d1c0c3a616
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJky9SmCRBK7hj4Ov3rIwAARloIAG8RupMotG7Zsy9+n42td2p5
k57zBnY+g3hyU/TMRRfSqa6mMXahdyuSvWt/RGgDaZnc35dBrZygpylz89f6YaQs
vTVUZ+enB0tIuaaEauJlV1vhe2lqD0uURYzkuqb0rWBiBqkyk6JIezqLT0P/PKaP
M/ceu6c28hzbFesVTDnCNMYMipSfiSIyuKx/got6mAOlMO7aDGPgEdFCSJa/WoUc
gHhjso61mBS7CXVoh5kNtdxDlQ15UIDxiME996kSNKMLu25VoyJ6Ddf8q/DwS/U8
FbgG8Cws36EM8/fufkMSnsII4iTa/9XmktFhYujAMm9ocRtjVzOChAtDtaq75dw=
=omrs
-----END PGP SIGNATURE-----
payloadtree 2ed15eb83d9bb21e7f5125b0b5a3296ae3479b86
parent b8074ea9846c1e10264d2e93d973692c97cb1a3b
author Ino de Bruijn <ino@ino.bio> 1691079846 -0400
committer GitHub <noreply@github.com> 1691079846 -0400

some minor tweaks to textuuj&t  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2bcdaea03059ab97d72d167dff0c83d1c0c3a616html_urlXhttps://github.com/cBioPortal/cbioportal/commit/2bcdaea03059ab97d72d167dff0c83d1c0c3a616comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/2bcdaea03059ab97d72d167dff0c83d1c0c3a616/commentsjt  }(logininodbidJZ jt  MDQ6VXNlcjEzMzQwMDQ=
avatar_url3https://avatars.githubusercontent.com/u/1334004?v=4gravatar_idh5j&t  "https://api.github.com/users/inodbj4t  https://github.com/inodb
followers_url,https://api.github.com/users/inodb/followers
following_url9https://api.github.com/users/inodb/following{/other_user}	gists_url2https://api.github.com/users/inodb/gists{/gist_id}starred_url9https://api.github.com/users/inodb/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/inodb/subscriptionsorganizations_url'https://api.github.com/users/inodb/orgs	repos_url(https://api.github.com/users/inodb/repos
events_url3https://api.github.com/users/inodb/events{/privacy}received_events_url2https://api.github.com/users/inodb/received_eventstypeUser
site_adminujt  }(j9t  web-flowj;t  J/jt  MDQ6VXNlcjE5ODY0NDQ3j=t  4https://avatars.githubusercontent.com/u/19864447?v=4j?t  h5j&t  %https://api.github.com/users/web-flowj4t  https://github.com/web-flowjBt  /https://api.github.com/users/web-flow/followersjDt  <https://api.github.com/users/web-flow/following{/other_user}jFt  5https://api.github.com/users/web-flow/gists{/gist_id}jHt  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jJt  3https://api.github.com/users/web-flow/subscriptionsjLt  *https://api.github.com/users/web-flow/orgsjNt  +https://api.github.com/users/web-flow/reposjPt  6https://api.github.com/users/web-flow/events{/privacy}jRt  5https://api.github.com/users/web-flow/received_eventsjTt  UserjVt  uparents]}(jt  (b8074ea9846c1e10264d2e93d973692c97cb1a3bj&t  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b8074ea9846c1e10264d2e93d973692c97cb1a3bj4t  Xhttps://github.com/cBioPortal/cbioportal/commit/b8074ea9846c1e10264d2e93d973692c97cb1a3buastats}(totalK	additionsK	deletionsKufiles]}(jt  (6bc3494e5fefd1176607d5a194a16f0ab486b875filenamedocs/News.mdstatusmodifiedjpt  Kjqt  KchangesKblob_urlehttps://github.com/cBioPortal/cbioportal/blob/2bcdaea03059ab97d72d167dff0c83d1c0c3a616/docs%2FNews.mdraw_urldhttps://github.com/cBioPortal/cbioportal/raw/2bcdaea03059ab97d72d167dff0c83d1c0c3a616/docs%2FNews.mdcontents_urlwhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FNews.md?ref=2bcdaea03059ab97d72d167dff0c83d1c0c3a616patchX  @@ -1,11 +1,11 @@
 ## Aug 1, 2023
-*   **Enhancement**: One-sided Fisher's exact tests were changed to two-sided Fisher's exact tests. The affected areas are as follows:
+*   **Enhancement**: One-sided Fisher's exact tests were changed to be two-sided. The affected pages are:
     *    Results View Page - Mutual Exclusivity Tab
     *    Results View Page - Comparison Tab - Genomic Alterations Tab
     *    Comparison Page - Genomic Alterations Tab
     *    Comparison Page - Mutations Tab
     
-    Please note that the Comparison page Mutations tab is a recent feature and was introduced with two-sided Fisher's exact test already implemented.
+    Please note that the Mutations tab on te Comparison page is a recent feature and was introduced with the two-sided Fisher's exact test already implemented.
 
     Several users pointed out that using a one-sided test was incorrect for these comparisons. Please see discussions [here](https://github.com/cBioPortal/cbioportal/issues/9943) for more information.
 uau(3b31741acdcab8ecf2357034b222c8efe78622a1}(sha(3b31741acdcab8ecf2357034b222c8efe78622a1node_idEC_kwDOAe-hB9oAKDNiMzE3NDFhY2RjYWI4ZWNmMjM1NzAzNGIyMjJjOGVmZTc4NjIyYTEcommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-06-13T09:58:33Zu	committer}(jt  
pvannieropjt  pim@thehyve.nljt  2023-06-14T08:54:25ZumessageUpdate result reporttree}(jt  (f5a182bf89663245ed740c344283e7b3c71848a3urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/f5a182bf89663245ed740c344283e7b3c71848a3ujt  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/3b31741acdcab8ecf2357034b222c8efe78622a1
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujt  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/3b31741acdcab8ecf2357034b222c8efe78622a1html_urlXhttps://github.com/cBioPortal/cbioportal/commit/3b31741acdcab8ecf2357034b222c8efe78622a1comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/3b31741acdcab8ecf2357034b222c8efe78622a1/commentsjt  }(login
pvannieropidJa jt  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5jt  'https://api.github.com/users/pvannieropjt  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminujt  }(jt  
pvannieropjt  Ja jt  MDQ6VXNlcjc0NTg4NQ==jt  2https://avatars.githubusercontent.com/u/745885?v=4jt  h5jt  'https://api.github.com/users/pvannieropjt  https://github.com/pvannieropjt  1https://api.github.com/users/pvannierop/followersjt  >https://api.github.com/users/pvannierop/following{/other_user}jt  7https://api.github.com/users/pvannierop/gists{/gist_id}jt  >https://api.github.com/users/pvannierop/starred{/owner}{/repo}jt  5https://api.github.com/users/pvannierop/subscriptionsjt  ,https://api.github.com/users/pvannierop/orgsjt  -https://api.github.com/users/pvannierop/reposjt  8https://api.github.com/users/pvannierop/events{/privacy}jt  7https://api.github.com/users/pvannierop/received_eventsjt  Userjt  uparents]}(jt  (d0fb6210aab800573e265132bed356b198c0db73jt  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d0fb6210aab800573e265132bed356b198c0db73jt  Xhttps://github.com/cBioPortal/cbioportal/commit/d0fb6210aab800573e265132bed356b198c0db73uastats}(totalK	additionsK	deletionsKufiles]}(jt  (99ddaf45a18079a934e6fac6e52bde4c5f9ee849filename=core/src/test/scripts/test_data/study_es_0/result_report.htmlstatusmodifiedjt  Kjt  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/3b31741acdcab8ecf2357034b222c8efe78622a1/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.htmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/3b31741acdcab8ecf2357034b222c8efe78622a1/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.htmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fresult_report.html?ref=3b31741acdcab8ecf2357034b222c8efe78622a1patchX
  @@ -171,6 +171,7 @@ <h4 class="panel-title">General</h4>
                 <td></td>
               </tr>
               <tr class="success">
+                <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
                 <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
                 <td>&ndash;</td>
                 <td>&ndash;</td>
@@ -1742,7 +1743,7 @@ <h4 class="panel-title">data_resource_study.txt</h4>
           <a role="button" data-toggle="collapse" aria-expanded="true"
              href="#collapse_ZGF0YV9zdHJ1Y3R1cmFsX3ZhcmlhbnRzLnR4dA",
              aria-controls="collapse_ZGF0YV9zdHJ1Y3R1cmFsX3ZhcmlhbnRzLnR4dA">
-            <span class="badge">3</span>
+            <span class="badge">5</span>
             <h4 class="panel-title">data_structural_variants.txt</h4>
           </a>
         </div>
@@ -1770,6 +1771,22 @@ <h4 class="panel-title">data_structural_variants.txt</h4>
                 <td>&ndash;</td>
                 <td></td>
               </tr>
+              <tr class="success">
+                <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
+                <td>48</td>
+                <td>&ndash;</td>
+                <td>No Entrez gene id or gene symbol provided for site 2. Assuming either the intragenic, deletion, duplication, translocation or inversion variant</td>
+                <td>&ndash;</td>
+                <td></td>
+              </tr>
+              <tr class="success">
+                <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
+                <td>49</td>
+                <td>&ndash;</td>
+                <td>No Entrez gene id or gene symbol provided for site 1. Assuming either the intragenic, deletion, duplication, translocation or inversion variant</td>
+                <td>&ndash;</td>
+                <td></td>
+              </tr>
               <tr class="success">
                 <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
                 <td>&ndash;</td>
@@ -1782,7 +1799,7 @@ <h4 class="panel-title">data_structural_variants.txt</h4>
                 <td><span class="glyphicon glyphicon-ok" aria-hidden="true"></span><span class="sr-only">Info</span></td>
                 <td>&ndash;</td>
                 <td>&ndash;</td>
-                <td>Read 47 lines. Lines with warning: 0. Lines with error: 0</td>
+                <td>Read 49 lines. Lines with warning: 0. Lines with error: 0</td>
                 <td>&ndash;</td>
                 <td></td>
               </tr>uau(6da008436d7e0acf01f823edbe37b446f9cd118b}(sha(6da008436d7e0acf01f823edbe37b446f9cd118bnode_idEC_kwDOAe-hB9oAKDZkYTAwODQzNmQ3ZTBhY2YwMWY4MjNlZGJlMzdiNDQ2ZjljZDExOGIcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-09T20:57:05Zu	committer}(ju  Gaofei Zhaoju  ,15748980+dippindots@users.noreply.github.comju  2023-08-09T20:57:05Zumessageremove testtree}(jt  (6600dca0ad26c999410360d0dedfe0b6e9339820urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/6600dca0ad26c999410360d0dedfe0b6e9339820uju  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/6da008436d7e0acf01f823edbe37b446f9cd118b
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuju  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/6da008436d7e0acf01f823edbe37b446f9cd118bhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/6da008436d7e0acf01f823edbe37b446f9cd118bcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/6da008436d7e0acf01f823edbe37b446f9cd118b/commentsj u  }(login
dippindotsidJtO jt  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5ju  'https://api.github.com/users/dippindotsju  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuju  }(j#u  
dippindotsj%u  JtO jt  MDQ6VXNlcjE1NzQ4OTgwj'u  4https://avatars.githubusercontent.com/u/15748980?v=4j)u  h5ju  'https://api.github.com/users/dippindotsju  https://github.com/dippindotsj,u  1https://api.github.com/users/dippindots/followersj.u  >https://api.github.com/users/dippindots/following{/other_user}j0u  7https://api.github.com/users/dippindots/gists{/gist_id}j2u  >https://api.github.com/users/dippindots/starred{/owner}{/repo}j4u  5https://api.github.com/users/dippindots/subscriptionsj6u  ,https://api.github.com/users/dippindots/orgsj8u  -https://api.github.com/users/dippindots/reposj:u  8https://api.github.com/users/dippindots/events{/privacy}j<u  7https://api.github.com/users/dippindots/received_eventsj>u  Userj@u  uparents]}(jt  (4b5b0c9199c5a65fe563a7307ec6897e0f3809a5ju  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4b5b0c9199c5a65fe563a7307ec6897e0f3809a5ju  Xhttps://github.com/cBioPortal/cbioportal/commit/4b5b0c9199c5a65fe563a7307ec6897e0f3809a5uastats}(totalM	additionsK 	deletionsMufiles]}(jt  (b92b629caee92553b8b5b25529e47d8147157256filename\service/src/test/java/org/cbioportal/service/impl/GenericAssayEnrichmentServiceImplTest.javastatusremovedjZu  K j[u  MchangesMblob_urlhttps://github.com/cBioPortal/cbioportal/blob/4b5b0c9199c5a65fe563a7307ec6897e0f3809a5/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/4b5b0c9199c5a65fe563a7307ec6897e0f3809a5/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FGenericAssayEnrichmentServiceImplTest.java?ref=4b5b0c9199c5a65fe563a7307ec6897e0f3809a5patchXu8  @@ -1,261 +0,0 @@
-package org.cbioportal.service.impl;
-
-import org.cbioportal.model.*;
-import org.cbioportal.model.meta.GenericAssayMeta;
-import org.cbioportal.persistence.MolecularDataRepository;
-import org.cbioportal.service.GenericAssayService;
-import org.cbioportal.service.MolecularProfileService;
-import org.cbioportal.service.SampleService;
-import org.cbioportal.service.exception.MolecularProfileNotFoundException;
-import org.cbioportal.service.util.ExpressionEnrichmentUtil;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.mockito.Spy;
-import org.mockito.junit.MockitoJUnitRunner;
-
-import java.math.BigDecimal;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-
-@RunWith(MockitoJUnitRunner.class)
-public class GenericAssayEnrichmentServiceImplTest extends BaseServiceImplTest{
-    @InjectMocks
-    private GenericAssayEnrichmentServiceImpl genericAssayEnrichmentServiceImpl;
-    @Mock
-    private SampleService sampleService;
-    @Mock
-    private MolecularProfileService molecularProfileService;
-    @Mock
-    private MolecularDataRepository molecularDataRepository;
-
-    @Mock
-    private GenericAssayService genericAssayService;
-
-    @Spy
-    @InjectMocks
-    private ExpressionEnrichmentUtil expressionEnrichmentUtil;
-
-    CancerStudy cancerStudy = new CancerStudy();
-    MolecularProfile geneMolecularProfile = new MolecularProfile();
-    MolecularProfileSamples molecularProfileSamples = new MolecularProfileSamples();
-    List<Sample> samples = new ArrayList<>();
-    Map<String, List<MolecularProfileCaseIdentifier>> molecularProfileCaseSets = new HashMap<>();
-    Map<String, List<MolecularProfileCaseIdentifier>> molecularProfilePatientLevelCaseSets = new HashMap<>();
-    // patient level only data
-    public static final String SAMPLE_ID5 = "sample_id5";
-
-
-    @Before
-    public void setup() throws MolecularProfileNotFoundException {
-        cancerStudy.setReferenceGenome(ReferenceGenome.HOMO_SAPIENS_DEFAULT_GENOME_NAME);
-        cancerStudy.setCancerStudyIdentifier(STUDY_ID);
-
-        geneMolecularProfile.setCancerStudyIdentifier(STUDY_ID);
-        geneMolecularProfile.setStableId(MOLECULAR_PROFILE_ID);
-
-        geneMolecularProfile.setCancerStudy(cancerStudy);
-
-        molecularProfileSamples.setMolecularProfileId(MOLECULAR_PROFILE_ID);
-        molecularProfileSamples.setCommaSeparatedSampleIds("1,2,3,4");
-
-        Sample sample1 = new Sample();
-        sample1.setStableId(SAMPLE_ID1);
-        sample1.setInternalId(1);
-        sample1.setCancerStudyIdentifier(STUDY_ID);
-        sample1.setPatientId(1);
-        samples.add(sample1);
-        Sample sample2 = new Sample();
-        sample2.setStableId(SAMPLE_ID2);
-        sample2.setInternalId(2);
-        sample2.setCancerStudyIdentifier(STUDY_ID);
-        sample2.setPatientId(2);
-        samples.add(sample2);
-        Sample sample3 = new Sample();
-        sample3.setStableId(SAMPLE_ID3);
-        sample3.setInternalId(3);
-        sample3.setCancerStudyIdentifier(STUDY_ID);
-        sample3.setPatientId(3);
-        samples.add(sample3);
-        Sample sample4 = new Sample();
-        sample4.setStableId(SAMPLE_ID4);
-        sample4.setInternalId(4);
-        sample4.setCancerStudyIdentifier(STUDY_ID);
-        sample4.setPatientId(4);
-        samples.add(sample4);
-
-        List<MolecularProfileCaseIdentifier> alteredSampleIdentifieres = new ArrayList<>();
-        List<MolecularProfileCaseIdentifier> unalteredSampleIdentifieres = new ArrayList<>();
-        List<MolecularProfileCaseIdentifier> unalteredPatientLevelSampleIdentifieres = new ArrayList<>();
-
-        MolecularProfileCaseIdentifier caseIdentifier1 = new MolecularProfileCaseIdentifier();
-        caseIdentifier1.setMolecularProfileId(MOLECULAR_PROFILE_ID);
-        caseIdentifier1.setCaseId(SAMPLE_ID1);
-        alteredSampleIdentifieres.add(caseIdentifier1);
-
-        MolecularProfileCaseIdentifier caseIdentifier2 = new MolecularProfileCaseIdentifier();
-        caseIdentifier2.setMolecularProfileId(MOLECULAR_PROFILE_ID);
-        caseIdentifier2.setCaseId(SAMPLE_ID2);
-        alteredSampleIdentifieres.add(caseIdentifier2);
-
-        MolecularProfileCaseIdentifier caseIdentifier3 = new MolecularProfileCaseIdentifier();
-        caseIdentifier3.setMolecularProfileId(MOLECULAR_PROFILE_ID);
-        caseIdentifier3.setCaseId(SAMPLE_ID3);
-        unalteredSampleIdentifieres.add(caseIdentifier3);
-        unalteredPatientLevelSampleIdentifieres.add(caseIdentifier3);
-
-        MolecularProfileCaseIdentifier caseIdentifier4 = new MolecularProfileCaseIdentifier();
-        caseIdentifier4.setMolecularProfileId(MOLECULAR_PROFILE_ID);
-        caseIdentifier4.setCaseId(SAMPLE_ID4);
-        unalteredSampleIdentifieres.add(caseIdentifier4);
-        unalteredPatientLevelSampleIdentifieres.add(caseIdentifier4);
-
-        // patient level only data
-        MolecularProfileCaseIdentifier caseIdentifier5 = new MolecularProfileCaseIdentifier();
-        caseIdentifier5.setMolecularProfileId(MOLECULAR_PROFILE_ID);
-        caseIdentifier5.setCaseId(SAMPLE_ID5);
-        unalteredPatientLevelSampleIdentifieres.add(caseIdentifier5);
-
-        molecularProfileCaseSets.put("altered samples", alteredSampleIdentifieres);
-        molecularProfileCaseSets.put("unaltered samples", unalteredSampleIdentifieres);
-        molecularProfilePatientLevelCaseSets.put("altered samples", alteredSampleIdentifieres);
-        molecularProfilePatientLevelCaseSets.put("unaltered samples", unalteredPatientLevelSampleIdentifieres);
-
-        Mockito.when(molecularProfileService.getMolecularProfile(MOLECULAR_PROFILE_ID))
-            .thenReturn(geneMolecularProfile);
-
-        Mockito.when(molecularDataRepository.getCommaSeparatedSampleIdsOfMolecularProfile(MOLECULAR_PROFILE_ID))
-            .thenReturn(molecularProfileSamples);
-
-        Mockito.when(sampleService.fetchSamples(Arrays.asList(STUDY_ID, STUDY_ID, STUDY_ID, STUDY_ID),
-            Arrays.asList(SAMPLE_ID3, SAMPLE_ID4, SAMPLE_ID1, SAMPLE_ID2), "ID")).thenReturn(samples);
-    }
-    
-    @Test
-    public void getGenericAssayBinaryEnrichments() throws Exception {
-        geneMolecularProfile.setMolecularAlterationType(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY);
-        geneMolecularProfile.setDatatype("BINARY");
-        List<GenericAssayMolecularAlteration> molecularDataList = new ArrayList<GenericAssayMolecularAlteration>();
-        GenericAssayMolecularAlteration genericAssayMolecularAlteration1 = new GenericAssayMolecularAlteration();
-        genericAssayMolecularAlteration1.setGenericAssayStableId(HUGO_GENE_SYMBOL_1);
-
-        // here are 2 groups
-        genericAssayMolecularAlteration1.setValues("true,true,true,false");
-        molecularDataList.add(genericAssayMolecularAlteration1);
-
-        GenericAssayMolecularAlteration genericAssayMolecularAlteration2 = new GenericAssayMolecularAlteration();
-        genericAssayMolecularAlteration2.setGenericAssayStableId(HUGO_GENE_SYMBOL_2);
-        genericAssayMolecularAlteration2.setValues("true,false,false,true");
-        molecularDataList.add(genericAssayMolecularAlteration2);
-        Mockito.when(molecularDataRepository.getGenericAssayMolecularAlterationsIterable(MOLECULAR_PROFILE_ID, null,
-            "SUMMARY")).thenReturn(molecularDataList);
-
-        Mockito.when(genericAssayService.getGenericAssayMetaByStableIdsAndMolecularIds(
-                Arrays.asList(HUGO_GENE_SYMBOL_1, HUGO_GENE_SYMBOL_2),
-                Arrays.asList(MOLECULAR_PROFILE_ID, MOLECULAR_PROFILE_ID), "SUMMARY"))
-            .thenReturn(Arrays.asList(new GenericAssayMeta(HUGO_GENE_SYMBOL_1),
-                new GenericAssayMeta(HUGO_GENE_SYMBOL_2)));
-
-        List<GenericAssayBinaryEnrichment> result = genericAssayEnrichmentServiceImpl.getGenericAssayBinaryEnrichments(MOLECULAR_PROFILE_ID,
-            molecularProfileCaseSets, EnrichmentType.SAMPLE);
-
-        Assert.assertEquals(2, result.size());
-        GenericAssayBinaryEnrichment genericAssayBinaryEnrichment = result.get(0);
-        Assert.assertEquals(HUGO_GENE_SYMBOL_1, genericAssayBinaryEnrichment.getStableId());
-        Assert.assertEquals(2, genericAssayBinaryEnrichment.getGroupsStatistics().size());
-
-        GroupStatistics unalteredGroupStats = genericAssayBinaryEnrichment.getGroupsStatistics().get(0);
-        Assert.assertEquals("unaltered samples", unalteredGroupStats.getName());
-        Assert.assertEquals(new BigDecimal("0.5"), unalteredGroupStats.getMeanExpression());
-        Assert.assertEquals(new BigDecimal("0.7071067811865476"), unalteredGroupStats.getStandardDeviation());
-
-        GroupStatistics alteredGroupStats = genericAssayBinaryEnrichment.getGroupsStatistics().get(1);
-        Assert.assertEquals("altered samples", alteredGroupStats.getName());
-        Assert.assertEquals(new BigDecimal("1.0"), alteredGroupStats.getMeanExpression());
-        Assert.assertEquals(new BigDecimal("0.0"), alteredGroupStats.getStandardDeviation());
-
-        Assert.assertEquals(new BigDecimal("0.49999999999999983"), genericAssayBinaryEnrichment.getpValue());
-        Assert.assertEquals(new BigDecimal("0.99999999999999966"), genericAssayBinaryEnrichment.getqValue());
-
-        genericAssayBinaryEnrichment = result.get(1);
-        Assert.assertEquals(HUGO_GENE_SYMBOL_2, genericAssayBinaryEnrichment.getStableId());
-        Assert.assertEquals(2, genericAssayBinaryEnrichment.getGroupsStatistics().size());
-
-        unalteredGroupStats = genericAssayBinaryEnrichment.getGroupsStatistics().get(0);
-        Assert.assertEquals("unaltered samples", unalteredGroupStats.getName());
-        Assert.assertEquals(new BigDecimal("0.5"), unalteredGroupStats.getMeanExpression());
-        Assert.assertEquals(new BigDecimal("0.7071067811865476"), unalteredGroupStats.getStandardDeviation());
-
-        alteredGroupStats = genericAssayBinaryEnrichment.getGroupsStatistics().get(1);
-        Assert.assertEquals("altered samples", alteredGroupStats.getName());
-        Assert.assertEquals(new BigDecimal("0.5"), alteredGroupStats.getMeanExpression());
-        Assert.assertEquals(new BigDecimal("0.7071067811865476"), alteredGroupStats.getStandardDeviation());
-
-        Assert.assertEquals(new BigDecimal("1.0"), genericAssayBinaryEnrichment.getpValue());
-        Assert.assertEquals(new BigDecimal("1.0"), genericAssayBinaryEnrichment.getqValue());
-    }
-
-
-    @Test
-    public void getGenericAssayCategoricalEnrichments() throws MolecularProfileNotFoundException {
-        geneMolecularProfile.setMolecularAlterationType(MolecularProfile.MolecularAlterationType.GENERIC_ASSAY);
-        geneMolecularProfile.setDatatype("CATEGORICAL");
-        List<GenericAssayMolecularAlteration> molecularDataList = new ArrayList<GenericAssayMolecularAlteration>();
-        GenericAssayMolecularAlteration genericAssayMolecularAlteration1 = new GenericAssayMolecularAlteration();
-        genericAssayMolecularAlteration1.setGenericAssayStableId(HUGO_GENE_SYMBOL_1);
-        genericAssayMolecularAlteration1.setValues("category1,category1,category2,category2");
-        molecularDataList.add(genericAssayMolecularAlteration1);
-
-        GenericAssayMolecularAlteration genericAssayMolecularAlteration2 = new GenericAssayMolecularAlteration();
-        genericAssayMolecularAlteration2.setGenericAssayStableId(HUGO_GENE_SYMBOL_2);
-        genericAssayMolecularAlteration2.setValues("category2,category2,category1,category1");
-        molecularDataList.add(genericAssayMolecularAlteration2);
-        Mockito.when(molecularDataRepository.getGenericAssayMolecularAlterationsIterable(MOLECULAR_PROFILE_ID, null,
-            "SUMMARY")).thenReturn(molecularDataList);
-
-        Mockito.when(genericAssayService.getGenericAssayMetaByStableIdsAndMolecularIds(
-                Arrays.asList(HUGO_GENE_SYMBOL_1, HUGO_GENE_SYMBOL_2),
-                Arrays.asList(MOLECULAR_PROFILE_ID, MOLECULAR_PROFILE_ID), "SUMMARY"))
-            .thenReturn(Arrays.asList(new GenericAssayMeta(HUGO_GENE_SYMBOL_1),
-                new GenericAssayMeta(HUGO_GENE_SYMBOL_2)));
-
-        List<GenericAssayCategoricalEnrichment> result = genericAssayEnrichmentServiceImpl.getGenericAssayCategoricalEnrichments(MOLECULAR_PROFILE_ID,
-            molecularProfileCaseSets, EnrichmentType.SAMPLE);
-
-        Assert.assertEquals(2, result.size());
-        GenericAssayCategoricalEnrichment genericAssayCategoricalEnrichment = result.get(0);
-        Assert.assertEquals(HUGO_GENE_SYMBOL_1, genericAssayCategoricalEnrichment.getStableId());
-        Assert.assertEquals(2, genericAssayCategoricalEnrichment.getGroupsStatistics().size());
-
-        GroupStatistics unalteredGroupStats = genericAssayCategoricalEnrichment.getGroupsStatistics().get(0);
-        Assert.assertEquals("unaltered samples", unalteredGroupStats.getName());
-
-        GroupStatistics alteredGroupStats = genericAssayCategoricalEnrichment.getGroupsStatistics().get(1);
-        Assert.assertEquals("altered samples", alteredGroupStats.getName());
-
-        Assert.assertEquals(new BigDecimal("0.04550026389635764"), genericAssayCategoricalEnrichment.getpValue());
-        Assert.assertEquals(new BigDecimal("0.04550026389635764"), genericAssayCategoricalEnrichment.getqValue());
-
-        genericAssayCategoricalEnrichment = result.get(1);
-        Assert.assertEquals(HUGO_GENE_SYMBOL_2, genericAssayCategoricalEnrichment.getStableId());
-        Assert.assertEquals(2, genericAssayCategoricalEnrichment.getGroupsStatistics().size());
-
-        unalteredGroupStats = genericAssayCategoricalEnrichment.getGroupsStatistics().get(0);
-        Assert.assertEquals("unaltered samples", unalteredGroupStats.getName());
-
-        alteredGroupStats = genericAssayCategoricalEnrichment.getGroupsStatistics().get(1);
-        Assert.assertEquals("altered samples", alteredGroupStats.getName());
-
-        Assert.assertEquals(new BigDecimal("0.04550026389635764"), genericAssayCategoricalEnrichment.getpValue());
-        Assert.assertEquals(new BigDecimal("0.04550026389635764"), genericAssayCategoricalEnrichment.getqValue());
-    }
-
-}uau(4956dcb7a699b27aac638a89ae41641f592ec2b1}(sha(4956dcb7a699b27aac638a89ae41641f592ec2b1node_idEC_kwDOAe-hB9oAKDQ5NTZkY2I3YTY5OWIyN2FhYzYzOGE4OWFlNDE2NDFmNTkyZWMyYjEcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-08T22:07:23Zu	committer}(jwu  GitHubjyu  noreply@github.comj{u  2023-08-08T22:07:23ZumessageLMerge pull request #10318 from cBioPortal/frontend-v5.3.17

Frontend v5.3.17tree}(jou  (89529758523bb1d51340322877bf94a155197faaurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/89529758523bb1d51340322877bf94a155197faauju  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/4956dcb7a699b27aac638a89ae41641f592ec2b1
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk0rycCRBK7hj4Ov3rIwAAbCIIAHe2Va3dTmTG0BX42oiB+Xgp
jesvlVjqfZnJq6y4Euy/gvaQwzIBDwxZoYCvJxqCynYBtpstWjYbkPpF8dLVoO/I
N52wRj6uVNT6gU35iNOEt3miUAM/kOPMUXKwb439JRlwvH57ydpGgedCHijYjoen
5osnwsLQrdpAfpDu/YfnpuT1zZhyWNDlfZbxEun643EcAFqlbUBYKqNvRCXjJk2d
6314z0+tzAhuU32wDB+4KtYaO3sW1sqXF3xQcd8OB4lM6zT1SOEzHG9KkCvTCOI/
if0kwN6luo/abxCwa5/GDNIMfLoRDOW/oYAwExRs6BObB1BClG1SRAvpc2GE0zY=
=PSs0
-----END PGP SIGNATURE-----
payloadXe  tree 89529758523bb1d51340322877bf94a155197faa
parent 1acb7a1a32c4f851ce36201d6484d6755586ce35
parent 1b9b31c0d6c9afd730a9b9b896db240dd159967a
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1691532443 -0400
committer GitHub <noreply@github.com> 1691532443 -0400

Merge pull request #10318 from cBioPortal/frontend-v5.3.17

Frontend v5.3.17uuju  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4956dcb7a699b27aac638a89ae41641f592ec2b1html_urlXhttps://github.com/cBioPortal/cbioportal/commit/4956dcb7a699b27aac638a89ae41641f592ec2b1comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/4956dcb7a699b27aac638a89ae41641f592ec2b1/commentsjuu  }(login
dippindotsidJtO jqu  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5ju  'https://api.github.com/users/dippindotsju  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj}u  }(ju  web-flowju  J/jqu  MDQ6VXNlcjE5ODY0NDQ3ju  4https://avatars.githubusercontent.com/u/19864447?v=4ju  h5ju  %https://api.github.com/users/web-flowju  https://github.com/web-flowju  /https://api.github.com/users/web-flow/followersju  <https://api.github.com/users/web-flow/following{/other_user}ju  5https://api.github.com/users/web-flow/gists{/gist_id}ju  <https://api.github.com/users/web-flow/starred{/owner}{/repo}ju  3https://api.github.com/users/web-flow/subscriptionsju  *https://api.github.com/users/web-flow/orgsju  +https://api.github.com/users/web-flow/reposju  6https://api.github.com/users/web-flow/events{/privacy}ju  5https://api.github.com/users/web-flow/received_eventsju  Userju  uparents](}(jou  (1acb7a1a32c4f851ce36201d6484d6755586ce35ju  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1acb7a1a32c4f851ce36201d6484d6755586ce35ju  Xhttps://github.com/cBioPortal/cbioportal/commit/1acb7a1a32c4f851ce36201d6484d6755586ce35u}(jou  (1b9b31c0d6c9afd730a9b9b896db240dd159967aju  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1b9b31c0d6c9afd730a9b9b896db240dd159967aju  Xhttps://github.com/cBioPortal/cbioportal/commit/1b9b31c0d6c9afd730a9b9b896db240dd159967auestats}(totalK	additionsK	deletionsKufiles]}(jou  (d44663bed5eb628f7a438efc51b83ce32004cab7filenamepom.xmlstatusmodifiedju  Kju  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/4956dcb7a699b27aac638a89ae41641f592ec2b1/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/4956dcb7a699b27aac638a89ae41641f592ec2b1/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=4956dcb7a699b27aac638a89ae41641f592ec2b1patchXY  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.16</frontend.version>
+    <frontend.version>v5.3.17</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(2d79405d9e241719c0bc171bbb094d7f6d07559d}(sha(2d79405d9e241719c0bc171bbb094d7f6d07559dnode_idEC_kwDOAe-hB9oAKDJkNzk0MDVkOWUyNDE3MTljMGJjMTcxYmJiMDk0ZDdmNmQwNzU1OWQcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-07-07T14:42:22Zu	committer}(ju  GitHubju  noreply@github.comju  2023-07-07T14:42:22ZumessageMerge pull request #10214 from pvannierop/studyview_sv_queryfilter

RFC68: Impl. structural variant filtering in Study View filtertree}(ju  (be348bd5d039ba2be2716f15718d81c810465025urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/be348bd5d039ba2be2716f15718d81c810465025ujv  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/2d79405d9e241719c0bc171bbb094d7f6d07559d
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkqCROCRBK7hj4Ov3rIwAAuZUIAFa9ahc2mmRfyvKBOirQ1HDz
0YI3yK6E0YTwtH9Ii37fQJvMpebce3sTann3dwo8UV9ZVZ0L60e210vfzhrjzQEf
/iy0wDy3JhuxbNleYvW2eLaH5Tms5PVv+6VH1FU+s9plUzq0WfyczryrP9GGn9Hh
MS90UmxiLN9y5i77/0mIAaD3+ggaDhdXxrTqj1D4f5+OQeteGpw17rV4SnNd+mfb
U+NOqi/793tC+BIGRznHCUqFFJ3oLKnfoBLzBwYMuioAsxdAnFHG/U1JB+ydH48G
q+7+ML6q+kcR+RjM21i4fWQVTD6G7d6panfCH7mMgnKn31ZdyKvVF/9N07tPOjM=
=UDnn
-----END PGP SIGNATURE-----
payloadX  tree be348bd5d039ba2be2716f15718d81c810465025
parent 49adca078e192f8bfde71270b47f6d4db3894e4d
parent 28e013495ef90de55fd7765fe624f6d3cdd6e125
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1688740942 -0400
committer GitHub <noreply@github.com> 1688740942 -0400

Merge pull request #10214 from pvannierop/studyview_sv_queryfilter

RFC68: Impl. structural variant filtering in Study View filteruujv  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2d79405d9e241719c0bc171bbb094d7f6d07559dhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/2d79405d9e241719c0bc171bbb094d7f6d07559dcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/2d79405d9e241719c0bc171bbb094d7f6d07559d/commentsju  }(login
dippindotsidJtO ju  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5jv  'https://api.github.com/users/dippindotsjv  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuju  }(jv  web-flowjv  J/ju  MDQ6VXNlcjE5ODY0NDQ3jv  4https://avatars.githubusercontent.com/u/19864447?v=4jv  h5jv  %https://api.github.com/users/web-flowjv  https://github.com/web-flowjv  /https://api.github.com/users/web-flow/followersj v  <https://api.github.com/users/web-flow/following{/other_user}j"v  5https://api.github.com/users/web-flow/gists{/gist_id}j$v  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j&v  3https://api.github.com/users/web-flow/subscriptionsj(v  *https://api.github.com/users/web-flow/orgsj*v  +https://api.github.com/users/web-flow/reposj,v  6https://api.github.com/users/web-flow/events{/privacy}j.v  5https://api.github.com/users/web-flow/received_eventsj0v  Userj2v  uparents](}(ju  (49adca078e192f8bfde71270b47f6d4db3894e4djv  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/49adca078e192f8bfde71270b47f6d4db3894e4djv  Xhttps://github.com/cBioPortal/cbioportal/commit/49adca078e192f8bfde71270b47f6d4db3894e4du}(ju  (28e013495ef90de55fd7765fe624f6d3cdd6e125jv  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/28e013495ef90de55fd7765fe624f6d3cdd6e125jv  Xhttps://github.com/cBioPortal/cbioportal/commit/28e013495ef90de55fd7765fe624f6d3cdd6e125uestats}(totalM	additionsM	deletionsKAufiles](}(ju  (0b857f2367a25249e10cd617d73894bf7a53d800filenameJmodel/src/main/java/org/cbioportal/model/StructuralVariantFilterQuery.javastatusaddedjPv  K0jQv  K changesK0blob_urlhttps://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantFilterQuery.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantFilterQuery.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantFilterQuery.java?ref=2d79405d9e241719c0bc171bbb094d7f6d07559dpatchX
  @@ -0,0 +1,48 @@
+package org.cbioportal.model;
+
+import org.cbioportal.model.util.Select;
+import org.springframework.lang.Nullable;
+
+import java.io.Serializable;
+
+public class StructuralVariantFilterQuery extends BaseAlterationFilter implements Serializable {
+    
+    private StructuralVariantGeneSubQuery gene1Query;
+    private StructuralVariantGeneSubQuery gene2Query;
+    
+    public StructuralVariantFilterQuery() {}
+
+    public StructuralVariantFilterQuery(String gene1HugoSymbol,
+                                        @Nullable Integer gene1EntrezId,
+                                        String gene2HugoSymbol,
+                                        @Nullable Integer gene2EntrezId,
+                                        boolean includeDriver,
+                                        boolean includeVUS,
+                                        boolean includeUnknownOncogenicity,
+                                        Select<String> tiersSelect,
+                                        boolean includeUnknownTier,
+                                        boolean includeGermline,
+                                        boolean includeSomatic,
+                                        boolean includeUnknownStatus) {
+        super(includeDriver, includeVUS, includeUnknownOncogenicity, includeGermline, includeSomatic, includeUnknownStatus, tiersSelect, includeUnknownTier);
+        this.gene1Query = new StructuralVariantGeneSubQuery(gene1HugoSymbol, gene1EntrezId);
+        this.gene2Query = new StructuralVariantGeneSubQuery(gene2HugoSymbol, gene2EntrezId);
+    }
+
+    public StructuralVariantGeneSubQuery getGene1Query() {
+        return gene1Query;
+    }
+
+    public void setGene1Query(StructuralVariantGeneSubQuery gene1Query) {
+        this.gene1Query = gene1Query;
+    }
+
+    public StructuralVariantGeneSubQuery getGene2Query() {
+        return gene2Query;
+    }
+
+    public void setGene2Query(StructuralVariantGeneSubQuery gene2Query) {
+        this.gene2Query = gene2Query;
+    }
+    
+}u}(ju  (e393e0c2d584440dc0fe2432fd2506071f60efcejVv  Kmodel/src/main/java/org/cbioportal/model/StructuralVariantGeneSubQuery.javajXv  modifiedjPv  KjQv  K jZv  Kj[v  https://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantGeneSubQuery.javaj]v  https://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantGeneSubQuery.javaj_v  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStructuralVariantGeneSubQuery.java?ref=2d79405d9e241719c0bc171bbb094d7f6d07559djav  X  @@ -49,6 +49,10 @@ public StructuralVariantGeneSubQuery(StructuralVariantSpecialValue specialValue)
 
     public StructuralVariantGeneSubQuery(String hugoSymbol, Integer entrezId) {
         this.entrezId = entrezId;
+        this.hugoSymbol = hugoSymbol;
+        if (hugoSymbol == null && entrezId == null) {
+            this.specialValue = StructuralVariantSpecialValue.NO_GENE;
+        }
     }
 
     @Nullableu}(ju  (84584fb7a595ab211c423ef9830a999429241f7cjVv  Nmodel/src/main/java/org/cbioportal/model/StudyViewStructuralVariantFilter.javajXv  addedjPv  K?jQv  K jZv  K?j[v  https://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStudyViewStructuralVariantFilter.javaj]v  https://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStudyViewStructuralVariantFilter.javaj_v  https://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FStudyViewStructuralVariantFilter.java?ref=2d79405d9e241719c0bc171bbb094d7f6d07559djav  X	  @@ -0,0 +1,63 @@
+package org.cbioportal.model;
+
+import javax.validation.constraints.AssertTrue;
+import java.io.Serializable;
+import java.util.List;
+import java.util.Set;
+
+public class StudyViewStructuralVariantFilter implements Serializable {
+
+    private Set<String> molecularProfileIds;
+    private List<List<StructuralVariantFilterQuery>> structVarQueries;
+
+    @AssertTrue(message = "'specialValue' field of gene1/gene2 StructVarGeneSubQueries cannot be both ANY_GENE or NO_GENE.")
+    private boolean isGeneQueriesSpecialValueCorrect() {
+        return structVarQueries.stream()
+            .flatMap(queryList -> queryList.stream())
+            .filter(structVarFilterQuery -> structVarFilterQuery.getGene1Query().getSpecialValue() != null
+                && structVarFilterQuery.getGene2Query().getSpecialValue() != null
+            )
+            .noneMatch(structVarFilterQuery -> 
+                structVarFilterQuery.getGene1Query().getSpecialValue() == 
+                structVarFilterQuery.getGene2Query().getSpecialValue()
+            );
+    }
+
+    @AssertTrue(message = "'geneId' field of gene1/gene2 StructVarGeneSubQueries cannot be both null.")
+    private boolean isGeneQueriesGeneIdCorrect() {
+        return structVarQueries.stream()
+            .flatMap(queryList -> queryList.stream())
+            .noneMatch(structVarFilterQuery -> 
+                structVarFilterQuery.getGene1Query().getHugoSymbol() == null &&
+                structVarFilterQuery.getGene2Query().getHugoSymbol() == null
+            );
+    }
+                
+    @AssertTrue(message = "'geneId' field of gene1/gene2 StructVarGeneSubQueries cannot be null when no specialValue set.")
+    private boolean isGeneQueriesHasGeneIdWhenSpecialValueNull() {
+        return structVarQueries.stream()
+            .flatMap(queryList -> queryList.stream())
+            .noneMatch(structVarFilterQuery ->
+                (structVarFilterQuery.getGene1Query().getHugoSymbol() == null &&
+                structVarFilterQuery.getGene1Query().getSpecialValue() == null)
+                || (structVarFilterQuery.getGene2Query().getHugoSymbol() == null &&
+                    structVarFilterQuery.getGene2Query().getSpecialValue() == null)
+            );
+    }
+
+    public Set<String> getMolecularProfileIds() {
+        return molecularProfileIds;
+    }
+
+    public void setMolecularProfileIds(Set<String> molecularProfileIds) {
+        this.molecularProfileIds = molecularProfileIds;
+    }
+
+    public List<List<StructuralVariantFilterQuery>> getStructVarQueries() {
+        return structVarQueries;
+    }
+
+    public void setStructVarQueries(List<List<StructuralVariantFilterQuery>> structVarQueries) {
+        this.structVarQueries = structVarQueries;
+    }
+}
\ No newline at end of fileu}(ju  (8818779e19301d18a688c354ba820e0d87ff7022jVv  epersistence/persistence-api/src/main/java/org/cbioportal/persistence/StructuralVariantRepository.javajXv  modifiedjPv  KjQv  K jZv  Kj[v  https://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStructuralVariantRepository.javaj]v  https://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStructuralVariantRepository.javaj_v  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2FStructuralVariantRepository.java?ref=2d79405d9e241719c0bc171bbb094d7f6d07559djav  X`  @@ -3,6 +3,7 @@
 import java.util.List;
 
 import org.cbioportal.model.GeneFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 import org.springframework.cache.annotation.Cacheable;
@@ -20,4 +21,9 @@ List<StructuralVariant> fetchStructuralVariants(List<String> molecularProfileIds
     List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String> molecularProfileIds,
                                                                  List<String> sampleIds,
                                                                  List<GeneFilterQuery> geneQueries);
+
+    @Cacheable(cacheResolver = "generalRepositoryCacheResolver", condition = "@cacheEnabledConfig.getEnabled()")
+    List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
+                                                             List<String> sampleIds,
+                                                             List<StructuralVariantFilterQuery> structVarQueries);
 }u}(ju  (2a24f753b0d705cad523959bd9c7d946721489c1jVv  mpersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/StructuralVariantMapper.javajXv  modifiedjPv  KjQv  K jZv  Kj[v  https://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.javaj]v  https://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.javaj_v  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.java?ref=2d79405d9e241719c0bc171bbb094d7f6d07559djav  X  @@ -26,6 +26,7 @@
 import java.util.List;
 
 import org.cbioportal.model.GeneFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 
@@ -39,4 +40,8 @@ List<StructuralVariant> fetchStructuralVariants(List<String> molecularProfileIds
     List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String> molecularProfileIds,
                                                                  List<String> sampleIds,
                                                                  List<GeneFilterQuery> geneQueries);
+
+    List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
+                                                                      List<String> sampleIds,
+                                                                      List<StructuralVariantFilterQuery> structVarQueries);
 }u}(ju  (f03d42130dab8f88ac125c31cc6da20f1255fd83jVv  xpersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/StructuralVariantMyBatisRepository.javajXv  modifiedjPv  KjQv  K jZv  Kj[v  https://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepository.javaj]v  https://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepository.javaj_v  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepository.java?ref=2d79405d9e241719c0bc171bbb094d7f6d07559djav  X  @@ -24,6 +24,7 @@
 package org.cbioportal.persistence.mybatis;
 
 import org.cbioportal.model.GeneFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 import org.cbioportal.persistence.StructuralVariantRepository;
@@ -73,6 +74,21 @@ public List<StructuralVariant> fetchStructuralVariants(List<String> molecularPro
     public List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String>  molecularProfileIds,
                                                                         List<String> sampleIds,
                                                                         List<GeneFilterQuery> geneQueries) {
+        if (geneQueries == null || geneQueries.isEmpty()
+            || molecularProfileIds == null || molecularProfileIds.isEmpty()) {
+            return new ArrayList<>();
+        }
         return structuralVariantMapper.fetchStructuralVariantsByGeneQueries(molecularProfileIds, sampleIds, geneQueries);
     }
+
+    @Override
+    public List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
+                                                                             List<String> sampleIds,
+                                                                             List<StructuralVariantFilterQuery> structVarQueries) {
+        if (structVarQueries == null || structVarQueries.isEmpty()
+            || molecularProfileIds == null || molecularProfileIds.isEmpty()) {
+            return new ArrayList<>();
+        }
+        return structuralVariantMapper.fetchStructuralVariantsByStructVarQueries(molecularProfileIds, sampleIds, structVarQueries);
+    }
 }u}(ju  (0fe8bbe89551d679b2fcefd12196b917508e7556jVv  qpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatis/StructuralVariantMapper.xmljXv  modifiedjPv  KjQv  K.jZv  Kj[v  https://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.xmlj]v  https://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.xmlj_v  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMapper.xml?ref=2d79405d9e241719c0bc171bbb094d7f6d07559djav  X/  @@ -82,13 +82,67 @@
 
     <sql id="whereWithGeneQueries">
         AND
-        <foreach item="geneFilterQuery" collection="geneQueries" open="(" separator=" OR " close=")">
-            (( structural_variant.SITE1_ENTREZ_GENE_ID = '${geneFilterQuery.getEntrezGeneId()}'
-            OR structural_variant.SITE2_ENTREZ_GENE_ID = '${geneFilterQuery.getEntrezGeneId()}')
-            <bind name="allDriverAnnotationsSelected" value="geneFilterQuery.getIncludeDriver() and geneFilterQuery.getIncludeVUS() and geneFilterQuery.getIncludeUnknownOncogenicity()" />
-            <bind name="noDriverAnnotationsSelected" value="not geneFilterQuery.getIncludeDriver() and not geneFilterQuery.getIncludeVUS() and not geneFilterQuery.getIncludeUnknownOncogenicity()" />
-            <choose>
-                <when test="not allDriverAnnotationsSelected and not noDriverAnnotationsSelected">
+        <foreach item="geneFilterQuery" collection="${queries}" open="(" separator=" OR " close=")">
+        (
+        <choose>
+            <when test="${singleGeneMode}">
+                (structural_variant.SITE1_ENTREZ_GENE_ID = ${geneFilterQuery.getEntrezGeneId()}
+                OR structural_variant.SITE2_ENTREZ_GENE_ID = ${geneFilterQuery.getEntrezGeneId()})
+            </when>
+            <otherwise>
+                <trim prefix="" prefixOverrides="AND">
+                     <choose>
+                        <when test="geneFilterQuery.getGene1Query().getSpecialValue() == @org.cbioportal.model.StructuralVariantSpecialValue@NO_GENE">
+                            AND structural_variant.SITE1_ENTREZ_GENE_ID IS NULL
+                        </when>
+                        <when test="geneFilterQuery.getGene1Query().getSpecialValue() == @org.cbioportal.model.StructuralVariantSpecialValue@ANY_GENE" />
+                        <otherwise>
+                            AND structural_variant.SITE1_ENTREZ_GENE_ID = ${geneFilterQuery.getGene1Query().getEntrezId()}
+                        </otherwise>
+                    </choose>
+                    <choose>
+                        <when test="geneFilterQuery.getGene2Query().getSpecialValue() == @org.cbioportal.model.StructuralVariantSpecialValue@NO_GENE">
+                            AND
+                            structural_variant.SITE2_ENTREZ_GENE_ID IS NULL
+                        </when>
+                        <when test="geneFilterQuery.getGene2Query().getSpecialValue() == @org.cbioportal.model.StructuralVariantSpecialValue@ANY_GENE" />
+                        <otherwise>
+                            AND
+                            structural_variant.SITE2_ENTREZ_GENE_ID = ${geneFilterQuery.getGene2Query().getEntrezId()}
+                        </otherwise>
+                    </choose>
+                </trim>       
+            </otherwise>
+        </choose>
+        <bind name="allStructVarStatusSelected" value="geneFilterQuery.getIncludeGermline() and geneFilterQuery.getIncludeSomatic() and geneFilterQuery.getIncludeUnknownStatus()" />
+        <bind name="noStructVarStatusSelected" value="not geneFilterQuery.getIncludeGermline() and not geneFilterQuery.getIncludeSomatic() and not geneFilterQuery.getIncludeUnknownStatus()" />
+        <choose>
+            <when test="not allStructVarStatusSelected and not noStructVarStatusSelected">
+                <trim prefix="AND (" prefixOverrides="OR">
+                    <if test="geneFilterQuery.getIncludeGermline()">
+                        OR LOWER(structural_variant.SV_STATUS) = 'germline'
+                    </if>
+                    <if test="geneFilterQuery.getIncludeSomatic()">
+                        OR LOWER(structural_variant.SV_STATUS) = 'somatic'
+                    </if>
+                    <if test="geneFilterQuery.getIncludeUnknownStatus()">
+                        OR LOWER(structural_variant.SV_STATUS) NOT IN ('somatic', 'germline')
+                    </if>
+                </trim>
+                )
+            </when>
+            <when test="noStructVarStatusSelected">
+                AND NULL
+            </when>
+            <otherwise>
+                <!--when allStructVarStatusSelected do not filter-->
+            </otherwise>
+        </choose>
+        <bind name="allDriverAnnotationsSelected" value="geneFilterQuery.getIncludeDriver() and geneFilterQuery.getIncludeVUS() and geneFilterQuery.getIncludeUnknownOncogenicity()" />
+        <bind name="noDriverAnnotationsSelected" value="not geneFilterQuery.getIncludeDriver() and not geneFilterQuery.getIncludeVUS() and not geneFilterQuery.getIncludeUnknownOncogenicity()" />
+        <choose>
+            <when test="not allDriverAnnotationsSelected and not noDriverAnnotationsSelected">
+                <trim prefix="" prefixOverrides="AND ( )">
                     <trim prefix="AND (" suffix=")" prefixOverrides="OR">
                         <if test="geneFilterQuery.getIncludeDriver()">
                             OR LOWER(alteration_driver_annotation.DRIVER_FILTER) = 'putative_driver'
@@ -101,44 +155,45 @@
                             OR LOWER(alteration_driver_annotation.DRIVER_FILTER) IN ('unknown', 'na', '')
                         </if>
                     </trim>
-                </when>
-                <when test="noDriverAnnotationsSelected">
-                    AND NULL
-                </when>
-                <otherwise>
-                    <!--when allDriverAnnotationsSelected do not filter-->
-                </otherwise>
-            </choose>
-            <bind name="allTierOptionsSelected" value="(geneFilterQuery.getSelectedTiers() != null and geneFilterQuery.getSelectedTiers().hasAll()) and geneFilterQuery.getIncludeUnknownTier()" />
-            <bind name="noTierOptionsSelected" value="(geneFilterQuery.getSelectedTiers() == null or geneFilterQuery.getSelectedTiers().hasNone()) and not geneFilterQuery.getIncludeUnknownTier()" />
-            <bind name="allExceptUnknownTierOptionsSelected" value="(geneFilterQuery.getSelectedTiers() != null and geneFilterQuery.getSelectedTiers().hasAll()) and not geneFilterQuery.getIncludeUnknownTier()" />
-            <choose>
-                <when test="allExceptUnknownTierOptionsSelected">
-                    AND NOT alteration_driver_annotation.DRIVER_TIERS_FILTER IS NULL
-                    AND NOT LOWER(alteration_driver_annotation.DRIVER_TIERS_FILTER) IN ('', 'na', 'unknown')
-                </when>
-                <when test="not allTierOptionsSelected and not noTierOptionsSelected">
-                    <trim prefix="AND (" suffix=")" prefixOverrides="OR">
-                        <if test="geneFilterQuery.getSelectedTiers() != null and geneFilterQuery.getSelectedTiers().hasValues()">
-                            OR alteration_driver_annotation.DRIVER_TIERS_FILTER IN
-                            <foreach item="item" collection="geneFilterQuery.getSelectedTiers()" open="(" separator="," close=")">
-                                #{item}
-                            </foreach>
-                        </if>
-                        <if test="geneFilterQuery.getIncludeUnknownTier()">
-                            OR alteration_driver_annotation.DRIVER_TIERS_FILTER IS NULL
-                            OR LOWER(alteration_driver_annotation.DRIVER_TIERS_FILTER) IN ('', 'na', 'unknown')
-                        </if>
-                    </trim>
-                </when>
-                <when test="noTierOptionsSelected">
-                    AND NULL
-                </when>
-                <otherwise>
-                    <!--when allTierOptionsSelected do not filter-->
-                </otherwise>
-            </choose>
-            )
+                </trim>
+            </when>
+            <when test="noDriverAnnotationsSelected">
+                AND NULL
+            </when>
+            <otherwise>
+                <!--when allDriverAnnotationsSelected do not filter-->
+            </otherwise>
+        </choose>
+        <bind name="allTierOptionsSelected" value="(geneFilterQuery.getSelectedTiers() != null and geneFilterQuery.getSelectedTiers().hasAll()) and geneFilterQuery.getIncludeUnknownTier()" />
+        <bind name="noTierOptionsSelected" value="(geneFilterQuery.getSelectedTiers() == null or geneFilterQuery.getSelectedTiers().hasNone()) and not geneFilterQuery.getIncludeUnknownTier()" />
+        <bind name="allExceptUnknownTierOptionsSelected" value="(geneFilterQuery.getSelectedTiers() != null and geneFilterQuery.getSelectedTiers().hasAll()) and not geneFilterQuery.getIncludeUnknownTier()" />
+        <choose>
+            <when test="allExceptUnknownTierOptionsSelected">
+                AND NOT alteration_driver_annotation.DRIVER_TIERS_FILTER IS NULL
+                AND NOT LOWER(alteration_driver_annotation.DRIVER_TIERS_FILTER) IN ('', 'na', 'unknown')
+            </when>
+            <when test="not allTierOptionsSelected and not noTierOptionsSelected">
+                <trim prefix="AND (" suffix=")" prefixOverrides="OR">
+                    <if test="geneFilterQuery.getSelectedTiers() != null and geneFilterQuery.getSelectedTiers().hasValues()">
+                        OR alteration_driver_annotation.DRIVER_TIERS_FILTER IN
+                        <foreach item="item" collection="geneFilterQuery.getSelectedTiers()" open="(" separator="," close=")">
+                            #{item}
+                        </foreach>
+                    </if>
+                    <if test="geneFilterQuery.getIncludeUnknownTier()">
+                        OR alteration_driver_annotation.DRIVER_TIERS_FILTER IS NULL
+                        OR LOWER(alteration_driver_annotation.DRIVER_TIERS_FILTER) IN ('', 'na', 'unknown')
+                    </if>
+                </trim>
+            </when>
+            <when test="noTierOptionsSelected">
+                AND NULL
+            </when>
+            <otherwise>
+                <!--when allTierOptionsSelected do not filter-->
+            </otherwise>
+        </choose>
+        )
         </foreach>
     </sql>
     
@@ -232,7 +287,36 @@
         and structural_variant.INTERNAL_ID = alteration_driver_annotation.ALTERATION_EVENT_ID
         <where>
             <include refid="whereInMultipleMolecularProfiles" />
-            <include refid="whereWithGeneQueries" />
+            <include refid="whereWithGeneQueries">
+                <property name="singleGeneMode" value="true" />
+                <property name="queries" value="geneQueries" />
+            </include>
+        </where>
+        ORDER BY gene1.HUGO_GENE_SYMBOL, gene2.HUGO_GENE_SYMBOL
+    </select>
+    
+    <select id="fetchStructuralVariantsByStructVarQueries" resultType="org.cbioportal.model.StructuralVariant">
+        SELECT
+        <include refid="select">
+            <property name="prefix" value=""/>
+        </include>
+        FROM structural_variant
+        JOIN genetic_profile ON structural_variant.GENETIC_PROFILE_ID = genetic_profile.GENETIC_PROFILE_ID
+        LEFT JOIN gene gene1 ON structural_variant.SITE1_ENTREZ_GENE_ID = gene1.ENTREZ_GENE_ID
+        LEFT JOIN gene gene2 ON structural_variant.SITE2_ENTREZ_GENE_ID = gene2.ENTREZ_GENE_ID
+        JOIN sample ON structural_variant.SAMPLE_ID = sample.INTERNAL_ID
+        JOIN patient ON sample.PATIENT_ID = patient.INTERNAL_ID
+        JOIN cancer_study ON patient.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID AND genetic_profile.CANCER_STUDY_ID = cancer_study.CANCER_STUDY_ID
+        LEFT JOIN alteration_driver_annotation ON
+        structural_variant.GENETIC_PROFILE_ID = alteration_driver_annotation.GENETIC_PROFILE_ID
+        AND structural_variant.SAMPLE_ID = alteration_driver_annotation.SAMPLE_ID
+        AND structural_variant.INTERNAL_ID = alteration_driver_annotation.ALTERATION_EVENT_ID
+        <where>
+            <include refid="whereInMultipleMolecularProfiles" />
+            <include refid="whereWithGeneQueries">
+                <property name="singleGeneMode" value="false" />
+                <property name="queries" value="structVarQueries" />
+            </include>
         </where>
         ORDER BY gene1.HUGO_GENE_SYMBOL, gene2.HUGO_GENE_SYMBOL
     </select>u      }(ju  (89a3fe0dbbfdf72c6fb2617258eb3872a46999a0jVv  }persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/DiscreteCopyNumberMyBatisRepositoryTest.javajXv  modifiedjPv  KjQv  KjZv  K
j[v  https://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FDiscreteCopyNumberMyBatisRepositoryTest.javaj]v  https://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FDiscreteCopyNumberMyBatisRepositoryTest.javaj_v  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FDiscreteCopyNumberMyBatisRepositoryTest.java?ref=2d79405d9e241719c0bc171bbb094d7f6d07559djav  X	  @@ -27,7 +27,7 @@
 @Configurable
 public class DiscreteCopyNumberMyBatisRepositoryTest {
 
-    //    mutation and cna events in testSql.sql
+    //    mutation, cna and struct var events in testSql.sql
     //        SAMPLE_ID, ENTREZ_GENE_ID, HUGO_GENE_SYMBOL, GENETIC_PROFILE_ID, TYPE, MUTATION_TYPE, DRIVER_FILTER, DRIVER_TIERS_FILTER, PATIENT_ID, MUTATION_TYPE
     //        1	    207	AKT1	2	CNA         -2	                Putative_Driver	    Tier 1  TCGA-A1-A0SB    germline
     //        2	    207	AKT1	2	CNA         2	                Putative_Passenger	Tier 2  TCGA-A1-A0SD    germline
@@ -40,6 +40,17 @@ public class DiscreteCopyNumberMyBatisRepositoryTest {
     //        7	    672	BRCA1	6	MUTATION    Nonsense_Mutation	Putative_Driver	    Tier 2  TCGA-A1-A0SI    germline
     //        12	672	BRCA1	6	MUTATION    Splice_Site	        Putative_Passenger	Tier 1  TCGA-A1-A0SO    germline
     //        13	672	BRCA1	6	MUTATION    Splice_Site	        Putative_Driver	    Tier 1  TCGA-A1-A0SP    germline
+    //        1     27436-238   EML4-ALK    7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    germline
+    //        2     27436-238   EML4-ALK    7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //        1     57670-673   KIAA..-BRAF 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //        2     57670-673   KIAA..-BRAF 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    germline
+    //        2     57670-673   KIAA..-BRAF 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //       15     57670-673   KIAA..-BRAF 13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //        1     8031-5979   NCOA4-RET   7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-5979   NCOA4-RET   13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //        1     7113-2078   TMPRSS2-ERG 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-NULL   NCOA4-      13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+
 
     @Autowired
     private DiscreteCopyNumberMyBatisRepository discreteCopyNumberMyBatisRepository;u}(ju  (6f13f7b9ff35d712fd1618a14be019e844f6526ajVv  spersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/MutationMyBatisRepositoryTest.javajXv  modifiedjPv  KjQv  KjZv  K
j[v  https://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FMutationMyBatisRepositoryTest.javaj]v  https://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FMutationMyBatisRepositoryTest.javaj_v  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FMutationMyBatisRepositoryTest.java?ref=2d79405d9e241719c0bc171bbb094d7f6d07559djav  Xl	  @@ -25,7 +25,7 @@
 @Configurable
 public class MutationMyBatisRepositoryTest {
 
-    //    mutation and cna events in testSql.sql
+    //    mutation, cna and struct var events in testSql.sql
     //        SAMPLE_ID, ENTREZ_GENE_ID, HUGO_GENE_SYMBOL, GENETIC_PROFILE_ID, TYPE, MUTATION_TYPE, DRIVER_FILTER, DRIVER_TIERS_FILTER, PATIENT_ID, MUTATION_TYPE
     //        1	    207	AKT1	2	CNA         -2	                Putative_Driver	    Tier 1  TCGA-A1-A0SB    germline
     //        2	    207	AKT1	2	CNA         2	                Putative_Passenger	Tier 2  TCGA-A1-A0SD    germline
@@ -38,6 +38,17 @@ public class MutationMyBatisRepositoryTest {
     //        7	    672	BRCA1	6	MUTATION    Nonsense_Mutation	Putative_Driver	    Tier 2  TCGA-A1-A0SI    germline
     //        12	672	BRCA1	6	MUTATION    Splice_Site	        Putative_Passenger	Tier 1  TCGA-A1-A0SO    germline
     //        13	672	BRCA1	6	MUTATION    Splice_Site	        Putative_Driver	    Tier 1  TCGA-A1-A0SP    germline
+    //        1     27436-238   EML4-ALK    7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    germline
+    //        2     27436-238   EML4-ALK    7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //        1     57670-673   KIAA..-BRAF 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //        2     57670-673   KIAA..-BRAF 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    germline
+    //        2     57670-673   KIAA..-BRAF 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //       15     57670-673   KIAA..-BRAF 13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //        1     8031-5979   NCOA4-RET   7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-5979   NCOA4-RET   13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //        1     7113-2078   TMPRSS2-ERG 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-NULL   NCOA4-      13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+
 
     @Autowired
     private MutationMyBatisRepository mutationMyBatisRepository;u}(ju  (72f882290e4f3c6fff0045368c39bc13bc7b0d4cjVv  |persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/StructuralVariantMyBatisRepositoryTest.javajXv  modifiedjPv  KjQv  KjZv  Kj[v  https://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepositoryTest.javaj]v  https://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepositoryTest.javaj_v  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FStructuralVariantMyBatisRepositoryTest.java?ref=2d79405d9e241719c0bc171bbb094d7f6d07559djav  X9  @@ -24,10 +24,11 @@
 package org.cbioportal.persistence.mybatis;
 
 import org.cbioportal.model.GeneFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
-import org.cbioportal.model.StructuralVariantSpecialValue;
 import org.cbioportal.model.StructuralVariantGeneSubQuery;
 import org.cbioportal.model.StructuralVariantQuery;
+import org.cbioportal.model.StructuralVariantSpecialValue;
 import org.cbioportal.model.util.Select;
 import org.junit.Assert;
 import org.junit.Before;
@@ -50,6 +51,20 @@
 @Configurable
 public class StructuralVariantMyBatisRepositoryTest {
 
+    //    struct var events in testSql.sql
+    //        SAMPLE_ID,        ENTREZ_GENE_ID, HUGO_GENE_SYMBOL, GENETIC_PROFILE_ID, GENETIC PRODFILE, TYPE, MUTATION_TYPE, DRIVER_FILTER, DRIVER_TIERS_FILTER, PATIENT_ID, MUTATION_TYPE
+    //        1     27436-238   EML4-ALK    7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    germline
+    //        2     27436-238   EML4-ALK    7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //        1     57670-673   KIAA..-BRAF 7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //        2     57670-673   KIAA..-BRAF 7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    germline
+    //        2     57670-673   KIAA..-BRAF 7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //       15     57670-673   KIAA..-BRAF 13  acc_tcga_sv         SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
+    //        1     8031-5979   NCOA4-RET   7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-5979   NCOA4-RET   13  acc_tcga_sv         SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //        1     7113-2078   TMPRSS2-ERG 7   study_tcga_pub_sv   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-NULL   NCOA4-      13  acc_tcga_sv        SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+
+
     @Autowired
     StructuralVariantMyBatisRepository structuralVariantMyBatisRepository;
 
@@ -82,6 +97,12 @@ public void init() {
             includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
         geneQueries =  Arrays.asList(geneFilterQuery1, geneFilterQuery2, geneFilterQuery3, geneFilterQuery4);
 
+        // Only search for the KIAA1549-BRAF and EML4-ALK fusions.
+        structVarFilterQuery1 = new StructuralVariantFilterQuery("KIAA1549", 57670, "BRAF", 673, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
+        structVarFilterQuery2 = new StructuralVariantFilterQuery("EML4", 27436, "ALK", 238, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
+        structVarQueries = Arrays.asList(structVarFilterQuery1, structVarFilterQuery2);
+        structVarFilterQueryNullGene1 = new StructuralVariantFilterQuery(null, null, "BRAF", 673, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
+        structVarFilterQueryNullGene2 = new StructuralVariantFilterQuery("NCOA4", 8031, null, null, includeDriver, includeVUS, includeUnknownOncogenicity, tiers, includeUnknownTier, includeGermline, includeSomatic, includeUnknownStatus);
     }
 
     List<String> molecularProfileIds = new ArrayList<>();
@@ -95,15 +116,20 @@ public void init() {
     boolean includeSomatic;
     boolean includeUnknownStatus;
     private List<GeneFilterQuery> geneQueries;
+    List<Integer> noEntrezIds = Collections.emptyList();
     private List<StructuralVariantQuery> noStructVars = Collections.emptyList();
+    private List<StructuralVariantFilterQuery> structVarQueries;
+    private StructuralVariantFilterQuery structVarFilterQuery1;
+    private StructuralVariantFilterQuery structVarFilterQuery2;
+    private StructuralVariantFilterQuery structVarFilterQueryNullGene1;
+    private StructuralVariantFilterQuery structVarFilterQueryNullGene2;
 
     @Test
     public void fetchStructuralVariantsNoSampleIdentifiers() {
 
         List<String> molecularProfileIds = new ArrayList<>();
         List<Integer> entrezGeneIds = new ArrayList<>();
         List<String> sampleIds = new ArrayList<>();
-        
         molecularProfileIds.add("study_tcga_pub_sv");
         entrezGeneIds.add(57670);
 
@@ -299,18 +325,16 @@ public void fetchStructuralVariantsMultiStudyWithSampleIdentifiers() throws Exce
     @Test
     public void fetchStructuralVariantsMultiStudyNoGeneIdentifiers() throws Exception {
 
-        List<Integer> noEntrezGeneIds = new ArrayList<>();
         List<String> molecularProfileIds = new ArrayList<>();
         List<String> sampleIds = new ArrayList<>();
-
         molecularProfileIds.add("study_tcga_pub_sv");
         sampleIds.add("TCGA-A1-A0SB-01");
         molecularProfileIds.add("acc_tcga_sv");
         sampleIds.add("TCGA-A1-B0SO-01");
 
         List<StructuralVariant> result =
             structuralVariantMyBatisRepository.fetchStructuralVariants(molecularProfileIds,
-                sampleIds, noEntrezGeneIds, noStructVars);
+                sampleIds, noEntrezIds, noStructVars);
 
         Assert.assertEquals(8,  result.size());
     }
@@ -369,7 +393,7 @@ public void fetchStructuralVariantsMultiStudyByGeneQueriesWithSampleIdentifiersE
     @Test
     public void fetchStructuralVariantsMultiStudyByGeneQueriesWithSampleIdentifiersSelectUnknownOncogenicity() throws Exception {
 
-        // There is one passenger event in 'study_tcga_pub_sv', the rest is unannotated
+        // There is one passenger event in 'study_tcga_pub_sv', the rest is unannotatedd
         geneQueries.stream().forEach(
             q -> {
                 q.setIncludeDriver(false);
@@ -397,7 +421,7 @@ public void fetchStructuralVariantsMultiStudyByGeneQueriesWithSampleIdentifiersS
     }
 
     @Test
-    public void fetchStructuralVariantsMultiStudyByGeneQueriesWithSampleIdentifiersSelectPassenger() throws Exception {
+    public void fetchStructuralVariantsMultiStudyByGeneQueriesWithSampleIdentifiersExcludeUnknownOncogenicity() throws Exception {
 
         // There is one passenger event in 'study_tcga_pub_sv', the rest is unannotated
 
@@ -490,8 +514,6 @@ public void fetchStructuralVariantsWithSingleStructuralVariantQueries() throws E
             new StructuralVariantGeneSubQuery(238)
         ));
         
-        List<Integer> noEntrezIds = Collections.emptyList();
-        
         List<StructuralVariant> result = 
                 structuralVariantMyBatisRepository.fetchStructuralVariants(
                     molecularProfileIds,
@@ -522,8 +544,6 @@ public void fetchStructuralVariantsWithStructuralVariantQueryAndGeneId() throws
             new StructuralVariantGeneSubQuery(238)
         ));
 
-        List<Integer> noEntrezIds = Collections.emptyList();
-
         List<StructuralVariant> result =
             structuralVariantMyBatisRepository.fetchStructuralVariants(
                 molecularProfileIds,
@@ -551,7 +571,6 @@ public void fetchStructuralVariantsWithMultipleStructuralVariantQueries() throws
             new StructuralVariantGeneSubQuery(57670),
             new StructuralVariantGeneSubQuery(673)
         ));
-        List<Integer> noEntrezIds = Collections.emptyList();
         
         List<StructuralVariant> result = 
                 structuralVariantMyBatisRepository.fetchStructuralVariants(molecularProfileIds,
@@ -594,8 +613,6 @@ public void fetchStructuralVariantsWithMultipleStructuralVariantIdentifierWildca
         );
         structVarQueries.add(svId2);
         
-        List<Integer> noEntrezIds = Collections.emptyList();
-
         List<StructuralVariant> result = 
                 structuralVariantMyBatisRepository.fetchStructuralVariants(molecularProfileIds,
                     sampleIds, noEntrezIds, structVarQueries
@@ -629,7 +646,6 @@ public void fetchStructuralVariantsWithMultipleStructuralVariantQueryNullQueryVa
             new StructuralVariantGeneSubQuery(StructuralVariantSpecialValue.NO_GENE)
         );
         structVarQueries.add(structVarWithNull);
-        List<Integer> noEntrezIds = Collections.emptyList();
 
         List<StructuralVariant> result = 
                 structuralVariantMyBatisRepository.fetchStructuralVariants(molecularProfileIds,
@@ -641,4 +657,125 @@ public void fetchStructuralVariantsWithMultipleStructuralVariantQueryNullQueryVa
         Assert.assertEquals("ENST00000340058_NULL",  result.get(0).getSite2EnsemblTranscriptId());
     }
 
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesAll() throws Exception {
+
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, structVarQueries);
+
+        Assert.assertEquals(6,  result.size());
+
+        List<String> resultTcgaPubVariants = result.stream()
+            .filter(s -> "study_tcga_pub_sv".equals(s.getMolecularProfileId()))
+            .map(StructuralVariant::getAnnotation)
+            .collect(Collectors.toList());
+        List<String> resultTcgaVariants = result.stream()
+            .filter(s -> "acc_tcga_sv".equals(s.getMolecularProfileId()))
+            .map(StructuralVariant::getAnnotation)
+            .collect(Collectors.toList());
+
+        Assert.assertArrayEquals(new String[] {"EML4-ALK.E6bA20.AB374362", "EML4-ALK.E6bA20.AB374362-2", "KIAA1549-BRAF.K16B10.COSF509", "KIAA1549-BRAF.K16B10.COSF509", "KIAA1549-BRAF.K16B10.COSF509"}, resultTcgaPubVariants.toArray());
+        Assert.assertArrayEquals(new String[] {"KIAA1549-BRAF.K16B10.COSF509"}, resultTcgaVariants.toArray());
+    }
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesNoGermline() throws Exception {
+
+        structVarFilterQuery1.setIncludeGermline(false);
+        structVarFilterQuery2.setIncludeGermline(false);
+        
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, structVarQueries);
+
+        Assert.assertEquals(4,  result.size());
+
+        List<String> resultTcgaPubVariants = result.stream()
+            .filter(s -> "study_tcga_pub_sv".equals(s.getMolecularProfileId()))
+            .map(StructuralVariant::getAnnotation)
+            .collect(Collectors.toList());
+        List<String> resultTcgaVariants = result.stream()
+            .filter(s -> "acc_tcga_sv".equals(s.getMolecularProfileId()))
+            .map(StructuralVariant::getAnnotation)
+            .collect(Collectors.toList());
+
+        Assert.assertArrayEquals(new String[] {"EML4-ALK.E6bA20.AB374362-2", "KIAA1549-BRAF.K16B10.COSF509", "KIAA1549-BRAF.K16B10.COSF509"}, resultTcgaPubVariants.toArray());
+        Assert.assertArrayEquals(new String[] {"KIAA1549-BRAF.K16B10.COSF509"}, resultTcgaVariants.toArray());
+    }
+
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesNoSomatic() throws Exception {
+
+        structVarFilterQuery1.setIncludeSomatic(false);
+        structVarFilterQuery2.setIncludeSomatic(false);
+        
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, structVarQueries);
+
+        Assert.assertEquals(2,  result.size());
+
+        List<String> resultTcgaPubVariants = result.stream()
+            .filter(s -> "study_tcga_pub_sv".equals(s.getMolecularProfileId()))
+            .map(StructuralVariant::getAnnotation)
+            .collect(Collectors.toList());
+        List<String> resultTcgaVariants = result.stream()
+            .filter(s -> "acc_tcga_sv".equals(s.getMolecularProfileId()))
+            .map(StructuralVariant::getAnnotation)
+            .collect(Collectors.toList());
+
+        Assert.assertArrayEquals(new String[] {"EML4-ALK.E6bA20.AB374362", "KIAA1549-BRAF.K16B10.COSF509"}, resultTcgaPubVariants.toArray());
+        Assert.assertEquals(0, resultTcgaVariants.size());
+    }
+
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesAnyGene1() throws Exception {
+
+        structVarFilterQuery1.getGene1Query()
+            .setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        structVarFilterQuery2.getGene1Query()
+            .setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, structVarQueries);
+
+        Assert.assertEquals(6,  result.size());
+    }
+
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesAnyGene2() throws Exception {
+
+        structVarFilterQuery1.getGene2Query()
+            .setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        structVarFilterQuery2.getGene2Query()
+            .setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, structVarQueries);
+
+        Assert.assertEquals(6,  result.size());
+    }
+    
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesNullGene1() throws Exception {
+
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, Arrays.asList(structVarFilterQueryNullGene1));
+
+        Assert.assertEquals(0,  result.size());
+    }
+    
+    @Test
+    public void fetchStructuralVariantsMultiStudyByStructVarQueriesNullGene2() throws Exception {
+
+        List<StructuralVariant> result =
+            structuralVariantMyBatisRepository.fetchStructuralVariantsByStructVarQueries(molecularProfileIds,
+                sampleIds, Arrays.asList(structVarFilterQueryNullGene2));
+
+        Assert.assertEquals(1,  result.size());
+    }
+
 }u}(ju  (f7047bdbdf707cd4c932acac690cbad2f787a7cdjVv  >persistence/persistence-mybatis/src/test/resources/testSql.sqljXv  modifiedjPv  KjQv  K jZv  Kj[v  https://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestSql.sqlj]v  https://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestSql.sqlj_v  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fresources%2FtestSql.sql?ref=2d79405d9e241719c0bc171bbb094d7f6d07559djav  X
  @@ -140,6 +140,7 @@ INSERT INTO alteration_driver_annotation (ALTERATION_EVENT_ID,GENETIC_PROFILE_ID
 INSERT INTO alteration_driver_annotation (ALTERATION_EVENT_ID,GENETIC_PROFILE_ID,SAMPLE_ID, DRIVER_FILTER, DRIVER_FILTER_ANNOTATION, DRIVER_TIERS_FILTER, DRIVER_TIERS_FILTER_ANNOTATION) VALUES (2040,6,1, 'Putative_Driver', 'Pathogenic', 'Tier 1', 'Highly Actionable');
 INSERT INTO alteration_driver_annotation (ALTERATION_EVENT_ID,GENETIC_PROFILE_ID,SAMPLE_ID, DRIVER_FILTER, DRIVER_FILTER_ANNOTATION, DRIVER_TIERS_FILTER, DRIVER_TIERS_FILTER_ANNOTATION) VALUES (2041,6,2, 'Putative_Passenger', 'Pathogenic', 'Tier 2', 'Potentially Actionable');
 INSERT INTO alteration_driver_annotation (ALTERATION_EVENT_ID,GENETIC_PROFILE_ID,SAMPLE_ID, DRIVER_FILTER, DRIVER_FILTER_ANNOTATION, DRIVER_TIERS_FILTER, DRIVER_TIERS_FILTER_ANNOTATION) VALUES (2042,6,3, 'Putative_Passenger', 'Pathogenic', 'Tier 1', 'Highly Actionable');
+INSERT INTO alteration_driver_annotation (ALTERATION_EVENT_ID,GENETIC_PROFILE_ID,SAMPLE_ID, DRIVER_FILTER, DRIVER_FILTER_ANNOTATION, DRIVER_TIERS_FILTER, DRIVER_TIERS_FILTER_ANNOTATION) VALUES (2042,8,15, 'Putative_Driver', 'Pathogenic', 'Tier 1', 'Highly Actionable');
 
 INSERT INTO mutation (MUTATION_EVENT_ID,GENETIC_PROFILE_ID,SAMPLE_ID,ENTREZ_GENE_ID,CENTER,SEQUENCER,MUTATION_STATUS,VALIDATION_STATUS,TUMOR_SEQ_ALLELE1,TUMOR_SEQ_ALLELE2,MATCHED_NORM_SAMPLE_BARCODE,MATCH_NORM_SEQ_ALLELE1,MATCH_NORM_SEQ_ALLELE2,TUMOR_VALIDATION_ALLELE1,TUMOR_VALIDATION_ALLELE2,MATCH_NORM_VALIDATION_ALLELE1,MATCH_NORM_VALIDATION_ALLELE2,VERIFICATION_STATUS,SEQUENCING_PHASE,SEQUENCE_SOURCE,VALIDATION_METHOD,SCORE,BAM_FILE,TUMOR_ALT_COUNT,TUMOR_REF_COUNT,NORMAL_ALT_COUNT,NORMAL_REF_COUNT,AMINO_ACID_CHANGE,ANNOTATION_JSON) VALUES (2038,6,6,672,'genome.wustl.edu','IlluminaGAIIx','NA','Unknown','G','A','TCGA-A1-A0SH-10A-03D-A099-09','G','A','NA','NA','NA','NA','Unknown','Phase_IV','Capture','NA','1','dbGAP',1,0,-1,-1,'cyclases/Protein','{"zygosity":{"status": "heterozygous"}}');
 INSERT INTO mutation (MUTATION_EVENT_ID,GENETIC_PROFILE_ID,SAMPLE_ID,ENTREZ_GENE_ID,CENTER,SEQUENCER,MUTATION_STATUS,VALIDATION_STATUS,TUMOR_SEQ_ALLELE1,TUMOR_SEQ_ALLELE2,MATCHED_NORM_SAMPLE_BARCODE,MATCH_NORM_SEQ_ALLELE1,MATCH_NORM_SEQ_ALLELE2,TUMOR_VALIDATION_ALLELE1,TUMOR_VALIDATION_ALLELE2,MATCH_NORM_VALIDATION_ALLELE1,MATCH_NORM_VALIDATION_ALLELE2,VERIFICATION_STATUS,SEQUENCING_PHASE,SEQUENCE_SOURCE,VALIDATION_METHOD,SCORE,BAM_FILE,TUMOR_ALT_COUNT,TUMOR_REF_COUNT,NORMAL_ALT_COUNT,NORMAL_REF_COUNT,AMINO_ACID_CHANGE,ANNOTATION_JSON) VALUES (22604,6,6,672,'genome.wustl.edu','IlluminaGAIIx','Germline','Unknown','A','C','TCGA-A1-A0SH-10A-03D-A099-09','A','C','NA','NA','NA','NA','Unknown','Phase_IV','Capture','NA','1','dbGAP',-1,-1,-1,-1,'cyclases/Protein','{"zygosity":{"status": "heterozygous"}}');u}(ju  (6fe7dc5d34d4c72498fa43daa6751eb394b4654cjVv  Jservice/src/main/java/org/cbioportal/service/StructuralVariantService.javajXv  modifiedjPv  KjQv  K jZv  Kj[v  https://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStructuralVariantService.javaj]v  https://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStructuralVariantService.javaj_v  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStructuralVariantService.java?ref=2d79405d9e241719c0bc171bbb094d7f6d07559djav  X  @@ -26,6 +26,7 @@
 import java.util.List;
 
 import org.cbioportal.model.GeneFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 
@@ -42,4 +43,7 @@ List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String> molecu
                                                                  List<String> sampleIds,
                                                                  List<GeneFilterQuery> geneQueries);
 
+    List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
+                                                                      List<String> sampleIds,
+                                                                      List<StructuralVariantFilterQuery> structVarQueries);
 }
\ No newline at end of fileu}(ju  (bbb420b2b2d035acd398ff99ead9ccbfaad68f5ajVv  Sservice/src/main/java/org/cbioportal/service/impl/StructuralVariantServiceImpl.javajXv  modifiedjPv  K	jQv  K jZv  K	j[v  https://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStructuralVariantServiceImpl.javaj]v  https://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStructuralVariantServiceImpl.javaj_v  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStructuralVariantServiceImpl.java?ref=2d79405d9e241719c0bc171bbb094d7f6d07559djav  X  @@ -24,6 +24,7 @@
 package org.cbioportal.service.impl;
 
 import org.cbioportal.model.GeneFilterQuery;
+import org.cbioportal.model.StructuralVariantFilterQuery;
 import org.cbioportal.model.StructuralVariant;
 import org.cbioportal.model.StructuralVariantQuery;
 import org.cbioportal.persistence.StructuralVariantRepository;
@@ -59,4 +60,12 @@ public List<StructuralVariant> fetchStructuralVariantsByGeneQueries(List<String>
             molecularProfileIds, sampleIds, geneQueries);
     }
 
+    @Override
+    public List<StructuralVariant> fetchStructuralVariantsByStructVarQueries(List<String> molecularProfileIds,
+                                                                             List<String> sampleIds,
+                                                                             List<StructuralVariantFilterQuery> structVarQueries) {
+        return structuralVariantRepository.fetchStructuralVariantsByStructVarQueries(
+            molecularProfileIds, sampleIds, structVarQueries);
+    }
+
 }u}(ju  (1b0093fe40804280cd2abe1cc1b17635a3d682edjVv  =web/src/main/java/org/cbioportal/web/StudyViewController.javajXv  modifiedjPv  KjQv  KjZv  Kj[v  https://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj]v  https://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj_v  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=2d79405d9e241719c0bc171bbb094d7f6d07559djav  X  @@ -441,6 +441,7 @@ private static double parseValueLinear(ClinicalData c) {
     @RequestMapping(value = "/clinical-data-density-plot/fetch", method = RequestMethod.POST,
         consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Fetch clinical data density plot bins by study view filter")
+    @Validated
     public ResponseEntity<DensityPlotData> fetchClinicalDataDensityPlot(
         @ApiParam(required = true, value = "Clinical Attribute ID of the X axis")
         @RequestParam String xAxisAttributeId,
@@ -467,7 +468,7 @@ public ResponseEntity<DensityPlotData> fetchClinicalDataDensityPlot(
         @ApiIgnore // 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,
         @ApiParam(required = true, value = "Study view filter")
-        @Valid @RequestBody(required = false) StudyViewFilter studyViewFilter) {
+        @RequestBody(required = false) StudyViewFilter studyViewFilter) {
 
         List<String> studyIds = new ArrayList<>();
         List<String> sampleIds = new ArrayList<>();u}(ju  (6a9e8c9b5a090c4009b997ce92ecaa613e5d8adcjVv  Cweb/src/main/java/org/cbioportal/web/parameter/StudyViewFilter.javajXv  modifiedjPv  KjQv  K jZv  Kj[v  https://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FStudyViewFilter.javaj]v  https://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FStudyViewFilter.javaj_v  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FStudyViewFilter.java?ref=2d79405d9e241719c0bc171bbb094d7f6d07559djav  X%  @@ -4,6 +4,7 @@
 import java.util.List;
 import java.util.Objects;
 
+import javax.validation.Valid;
 import javax.validation.constraints.AssertTrue;
 import javax.validation.constraints.Size;
 
@@ -12,6 +13,7 @@
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import org.cbioportal.model.AlterationFilter;
 import org.cbioportal.model.GeneFilter;
+import org.cbioportal.model.StudyViewStructuralVariantFilter;
 import org.cbioportal.web.parameter.filter.*;
 
 @JsonIgnoreProperties(ignoreUnknown = true)
@@ -24,6 +26,8 @@ public class StudyViewFilter implements Serializable {
     private List<String> studyIds;
     private List<ClinicalDataFilter> clinicalDataFilters;
     private List<GeneFilter> geneFilters;
+    @Valid
+    private List<StudyViewStructuralVariantFilter> structuralVariantFilters;
     private AndedSampleTreatmentFilters sampleTreatmentFilters;
     private AndedSampleTreatmentFilters sampleTreatmentGroupFilters;
     private AndedSampleTreatmentFilters sampleTreatmentTargetFilters;
@@ -110,6 +114,14 @@ public void setGeneFilters(List<GeneFilter> geneFilters) {
         this.geneFilters = geneFilters;
     }
 
+    public List<StudyViewStructuralVariantFilter> getStructuralVariantFilters() {
+        return structuralVariantFilters;
+    }
+
+    public void setStructuralVariantFilters(List<StudyViewStructuralVariantFilter> structuralVariantFilters) {
+        this.structuralVariantFilters = structuralVariantFilters;
+    }
+
     public List<List<String>> getGenomicProfiles() {
         return genomicProfiles;
     }u}(ju  (ff5c7aaf4ca8f52a87e547f200b7d9c2e963d0e2jVv  Vweb/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.javajXv  modifiedjPv  KjQv  K jZv  Kj[v  https://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaj]v  https://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaj_v  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.java?ref=2d79405d9e241719c0bc171bbb094d7f6d07559djav  XM  @@ -566,6 +566,11 @@ private boolean extractAttributesFromStudyViewFilter(HttpServletRequest request)
                 // when the AlterationFilter is not part of the request.
                 studyViewFilter.setAlterationFilter(new AlterationFilter());
             }
+            if (studyViewFilter.getStructuralVariantFilters() == null) {
+                // For backwards compatibility an inactive filter is set
+                // when the StructuralVariantFilters are not part of the request.
+                studyViewFilter.setStructuralVariantFilters(new ArrayList<>());
+            }
             LOG.debug("extracted studyViewFilter: " + studyViewFilter.toString());
             LOG.debug("setting interceptedStudyViewFilter to " + studyViewFilter);
             request.setAttribute("interceptedStudyViewFilter", studyViewFilter);u}(ju  (0c92bb446a5e2ba93f3c4d41edeacbf3516ffb36jVv  Bweb/src/main/java/org/cbioportal/web/util/StudyViewFilterUtil.javajXv  modifiedjPv  KRjQv  KjZv  KSj[v  https://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javaj]v  https://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javaj_v  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.java?ref=2d79405d9e241719c0bc171bbb094d7f6d07559djav  XZ  @@ -2,6 +2,7 @@
 
 import java.util.*;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.collections4.map.MultiKeyMap;
@@ -10,8 +11,13 @@
 import org.cbioportal.model.ClinicalDataCount;
 import org.cbioportal.model.ClinicalDataCountItem;
 import org.cbioportal.model.DataBin;
+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;
+import org.cbioportal.model.StructuralVariantSpecialValue;
+import org.cbioportal.service.GeneService;
 import org.cbioportal.service.util.CustomDataSession;
 import org.cbioportal.service.util.CustomDataValue;
 import org.cbioportal.service.util.MolecularProfileUtil;
@@ -23,6 +29,9 @@
 public class StudyViewFilterUtil {
     @Autowired
     private MolecularProfileUtil molecularProfileUtil;
+
+    @Autowired
+    private GeneService geneService;
     
     public void extractStudyAndSampleIds(
         List<SampleIdentifier> sampleIdentifiers, 
@@ -254,7 +263,78 @@ public List<Binnable> filterClinicalData(
 
         return combinedResult;
     }
-    
+
+    public List<GeneFilterQuery> cleanQueryGeneIds(List<GeneFilterQuery> geneQueries) {
+        List<String> hugoGeneSymbols = geneQueries
+            .stream()
+            .map(GeneFilterQuery::getHugoGeneSymbol)
+            .collect(Collectors.toList());
+
+        Map<String, Integer> symbolToEntrezGeneId = getStringIntegerMap(hugoGeneSymbols);
+
+        geneQueries.removeIf(
+            q -> !symbolToEntrezGeneId.containsKey(q.getHugoGeneSymbol())
+        );
+
+        geneQueries.stream().forEach(
+            q -> q.setEntrezGeneId(symbolToEntrezGeneId.get(q.getHugoGeneSymbol()))
+        );
+
+        return geneQueries;
+    }
+
+    private Map<String, Integer> getStringIntegerMap(List<String> hugoGeneSymbols) {
+        Map<String, Integer> symbolToEntrezGeneId = geneService
+            .fetchGenes(new ArrayList<>(hugoGeneSymbols),
+                GeneIdType.HUGO_GENE_SYMBOL.name(), Projection.SUMMARY.name())
+            .stream()
+            .collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
+        return symbolToEntrezGeneId;
+    }
+
+    public List<StructuralVariantFilterQuery> resolveEntrezGeneIds(List<StructuralVariantFilterQuery> structVarQueries) {
+
+        List<String> hugoGeneSymbols = structVarQueries
+            .stream()
+            .flatMap(q -> Stream.of(q.getGene1Query(), q.getGene2Query()))
+            .filter(structVarIdentifier -> structVarIdentifier.getHugoSymbol() != null)
+            .map(structVarIdentifier -> structVarIdentifier.getHugoSymbol())
+            .collect(Collectors.toList());
+
+        Map<String, Integer> symbolToEntrezGeneId = getStringIntegerMap(hugoGeneSymbols);
+
+        // Add Entrez gene ids to the queries.
+        structVarQueries.forEach(structVarQuery -> {
+            structVarQuery.getGene1Query().setEntrezId(
+                symbolToEntrezGeneId.getOrDefault(structVarQuery.getGene1Query().getHugoSymbol(), null)
+            );
+            structVarQuery.getGene2Query().setEntrezId(
+                symbolToEntrezGeneId.getOrDefault(structVarQuery.getGene2Query().getHugoSymbol(), null)
+            );
+        });
+
+        // Remove any genes where the Entrez gene id is needed, but translation failed.
+        structVarQueries.removeIf(
+            q ->   (q.getGene1Query().getSpecialValue() != StructuralVariantSpecialValue.NO_GENE
+                && q.getGene1Query().getSpecialValue() != StructuralVariantSpecialValue.ANY_GENE
+                && q.getGene1Query().getEntrezId() == null)
+                || (q.getGene2Query().getSpecialValue() != StructuralVariantSpecialValue.NO_GENE
+                && q.getGene2Query().getSpecialValue() != StructuralVariantSpecialValue.ANY_GENE
+                && q.getGene2Query().getEntrezId() == null)
+        );
+
+        return structVarQueries;
+    }
+
+    private Map<String, Integer> getHugoToEntrezQueryMap(List<String> hugoGeneSymbols) {
+        Map<String, Integer> 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<Binnable> filterClinicalDataByStudyAndSampleAndAttribute(
         List<Binnable> clinicalData,
         Map<String, String> sampleToStudyId,
@@ -311,4 +391,5 @@ private String generatePatientToStudyKey(Binnable clinicalData) {
     private String generateCaseToStudyKey(String studyId, String caseId) {
         return studyId + ":" + caseId;
     }
+    
 }u}(ju  (9367c54884b028616e93f45bb9039886c7153fe3jVv  Yweb/src/main/java/org/cbioportal/web/util/appliers/StructuralVariantSubFilterApplier.javajXv  addedjPv  KpjQv  K jZv  Kpj[v  https://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.javaj]v  https://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.javaj_v  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplier.java?ref=2d79405d9e241719c0bc171bbb094d7f6d07559djav  X  @@ -0,0 +1,112 @@
+package org.cbioportal.web.util.appliers;
+
+import org.cbioportal.model.MolecularProfile;
+import org.cbioportal.model.StructuralVariantFilterQuery;
+import org.cbioportal.model.StudyViewStructuralVariantFilter;
+import org.cbioportal.service.MolecularProfileService;
+import org.cbioportal.service.StructuralVariantService;
+import org.cbioportal.web.parameter.SampleIdentifier;
+import org.cbioportal.web.parameter.StudyViewFilter;
+import org.cbioportal.web.util.StudyViewFilterUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+@Component
+public class StructuralVariantSubFilterApplier implements StudyViewSubFilterApplier {
+
+    @Autowired
+    private MolecularProfileService molecularProfileService;
+
+    @Autowired
+    private StructuralVariantService structuralVariantService;
+
+    @Autowired
+    private StudyViewFilterUtil studyViewFilterUtil;
+    
+    @Override
+    public List<SampleIdentifier> filter(List<SampleIdentifier> toFilter, StudyViewFilter filters) {
+
+        final List<StudyViewStructuralVariantFilter> structVarFilters = getStructVarFilters(filters);
+
+        List<String> includedStudyIds = toFilter.stream()
+            .map(SampleIdentifier::getStudyId)
+            .distinct()
+            .collect(Collectors.toList());
+
+        List<MolecularProfile> molecularProfiles = molecularProfileService.getMolecularProfilesInStudies(includedStudyIds, "SUMMARY");
+        
+        Map<String, MolecularProfile> molecularProfileMap = molecularProfiles.stream()
+            .collect(Collectors.toMap(MolecularProfile::getStableId, Function.identity()));
+
+        List<SampleIdentifier> remainingSampleIdentifiers = toFilter;
+        
+        for (StudyViewStructuralVariantFilter structuralVariantFilter : structVarFilters) {
+
+            // Collect molecular profiles referenced in gene filter.
+            List<MolecularProfile> filteredMolecularProfiles = structuralVariantFilter
+                .getMolecularProfileIds()
+                .stream()
+                .map(molecularProfileId -> molecularProfileMap.get(molecularProfileId))
+                .collect(Collectors.toList());
+
+            Map<String, List<MolecularProfile>> mapByStudyId = filteredMolecularProfiles
+                .stream()
+                .collect(Collectors.groupingBy(MolecularProfile::getCancerStudyIdentifier));
+
+            for (List<StructuralVariantFilterQuery> structVarQueries: structuralVariantFilter.getStructVarQueries()) {
+
+                // Remove samples in remainingSampleIdentifiers that belong to a study that is not accessible to the current user
+                // (do not appear in the molecularProfileMap argument). 
+                final List<SampleIdentifier> filteredSampleIdentifiers = remainingSampleIdentifiers.stream()
+                    .filter(i -> mapByStudyId.containsKey(i.getStudyId())).collect(Collectors.toList());
+
+                final List<String> molecularProfileIds = filteredSampleIdentifiers.stream()
+                    .map(i -> mapByStudyId.get(i.getStudyId()).get(0).getStableId())
+                    .distinct()
+                    .collect(Collectors.toList());
+                
+                final List<String> sampleIds = filteredSampleIdentifiers.stream()
+                        .map(SampleIdentifier::getSampleId)
+                        .collect(Collectors.toList());
+
+                final List<StructuralVariantFilterQuery> entrezIdEnhancedSvQueries = studyViewFilterUtil.resolveEntrezGeneIds(structVarQueries);
+                remainingSampleIdentifiers = structuralVariantService
+                    .fetchStructuralVariantsByStructVarQueries(molecularProfileIds, sampleIds, entrezIdEnhancedSvQueries)
+                    .stream()
+                    .map(m -> {
+                        SampleIdentifier sampleIdentifier = new SampleIdentifier();
+                        sampleIdentifier.setSampleId(m.getSampleId());
+                        sampleIdentifier.setStudyId(m.getStudyId());
+                        return sampleIdentifier;
+                    })
+                    .distinct()
+                    .collect(Collectors.toList());
+            }
+
+        }
+        return remainingSampleIdentifiers;
+    }
+
+    @Override
+    public boolean shouldApplyFilter(StudyViewFilter studyViewFilter) {
+        return !getStructVarFilters(studyViewFilter).isEmpty();
+    }
+
+    private static List<StudyViewStructuralVariantFilter> getStructVarFilters(StudyViewFilter filters) {
+        final List<StudyViewStructuralVariantFilter> structuralVariantFilters = filters.getStructuralVariantFilters();
+        if (structuralVariantFilters == null || structuralVariantFilters.isEmpty()) {
+            return new ArrayList<>();
+        }
+        final List<StudyViewStructuralVariantFilter> structVarFilters = structuralVariantFilters.stream()
+            .filter(structuralVariantFilter -> !structuralVariantFilter.getStructVarQueries().isEmpty())
+            .collect(Collectors.toList());
+        return structVarFilters;
+    }
+    
+}u}(ju  (cc78e1522dc6ea0d1c6af0fee69ba6f24966576cjVv  Aweb/src/test/java/org/cbioportal/web/StudyViewControllerTest.javajXv  modifiedjPv  KjQv  K jZv  Kj[v  https://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj]v  https://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj_v  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.java?ref=2d79405d9e241719c0bc171bbb094d7f6d07559djav  X&  @@ -2,6 +2,7 @@
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.cbioportal.model.*;
+import org.cbioportal.model.util.Select;
 import org.cbioportal.persistence.AlterationRepository;
 import org.cbioportal.service.*;
 import org.cbioportal.service.util.MolecularProfileUtil;
@@ -128,6 +129,9 @@ public ViolinPlotService violinPlotService() {
         return mock(ViolinPlotService.class);
     }
 
+
+    private ArrayList<Sample> filteredSamples = new ArrayList<>();
+
     @Before
     public void setUp() throws Exception {
 
@@ -136,6 +140,17 @@ public void setUp() throws Exception {
         sampleIdentifier.setStudyId(TEST_STUDY_ID);
         filteredSampleIdentifiers.add(sampleIdentifier);
 
+        Sample sample1 = new Sample();
+        sample1.setStableId(TEST_SAMPLE_ID_1);
+        sample1.setPatientStableId(TEST_PATIENT_ID_1);
+        sample1.setCancerStudyIdentifier(TEST_STUDY_ID);
+        Sample sample2 = new Sample();
+        sample2.setStableId(TEST_SAMPLE_ID_2);
+        sample2.setPatientStableId(TEST_PATIENT_ID_2);
+        sample2.setCancerStudyIdentifier(TEST_STUDY_ID);
+        filteredSamples.add(sample1);
+        filteredSamples.add(sample2);
+
         ClinicalData clinicalData1 = new ClinicalData();
         clinicalData1.setAttrId(TEST_ATTRIBUTE_ID);
         clinicalData1.setAttrValue(TEST_CLINICAL_DATA_VALUE_1);
@@ -819,4 +834,154 @@ public void fetchClinicalEventTypeCounts() throws Exception
             .andExpect(MockMvcResultMatchers.jsonPath("$[0].count").value(TEST_CLINICAL_EVENT_TYPE_COUNT));
     }
 
+    @Test
+    public void validateStructVarFilter() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+        when(studyViewFilterApplier.apply(any(), eq(false))).thenReturn(filteredSampleIdentifiers);
+
+        List<Sample> filteredSamples = new ArrayList<>();
+        Sample sample1 = new Sample();
+        sample1.setStableId(TEST_SAMPLE_ID_1);
+        sample1.setPatientStableId(TEST_PATIENT_ID_1);
+        sample1.setCancerStudyIdentifier(TEST_STUDY_ID);
+        filteredSamples.add(sample1);
+        Sample sample2 = new Sample();
+        sample2.setStableId(TEST_SAMPLE_ID_2);
+        sample2.setPatientStableId(TEST_PATIENT_ID_2);
+        sample2.setCancerStudyIdentifier(TEST_STUDY_ID);
+        filteredSamples.add(sample2);
+
+        when(sampleService.fetchSamples(anyList(), anyList(),
+            anyString())).thenReturn(filteredSamples);
+
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery("A", null, "B", null,
+            true, true, true, Select.all(),
+            true, true, true, true);
+        final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
+        structuralVariantFilter.setStructVarQueries(Arrays.asList(Arrays.asList(structVarFilterQuery)));
+        studyViewFilter.setStructuralVariantFilters(Arrays.asList(structuralVariantFilter));
+
+        // Test case:
+        structVarFilterQuery.getGene1Query().setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        structVarFilterQuery.getGene2Query().setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        
+        mockMvc.perform(MockMvcRequestBuilders.post("/filtered-samples/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(studyViewFilter)))
+            .andExpect(MockMvcResultMatchers.status().isBadRequest());
+    }
+    @Test
+    public void validateStructVarFilterBothAnyGene() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+        when(studyViewFilterApplier.apply(any(), eq(false))).thenReturn(filteredSampleIdentifiers);
+        when(sampleService.fetchSamples(anyList(), anyList(), anyString())).thenReturn(filteredSamples);
+
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery("A", null, "B", null,
+            true, true, true, Select.all(),
+            true, true, true, true);
+        final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
+        structuralVariantFilter.setStructVarQueries(Arrays.asList(Arrays.asList(structVarFilterQuery)));
+        studyViewFilter.setStructuralVariantFilters(Arrays.asList(structuralVariantFilter));
+
+        // Test case:
+        structVarFilterQuery.getGene1Query().setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        structVarFilterQuery.getGene2Query().setSpecialValue(StructuralVariantSpecialValue.ANY_GENE);
+        
+        mockMvc.perform(MockMvcRequestBuilders.post("/filtered-samples/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(studyViewFilter)))
+            .andExpect(MockMvcResultMatchers.status().isBadRequest());
+    }
+    
+    @Test
+    public void validateStructVarFilterBothNoGene() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+        when(studyViewFilterApplier.apply(any(), eq(false))).thenReturn(filteredSampleIdentifiers);
+        when(sampleService.fetchSamples(anyList(), anyList(), anyString())).thenReturn(filteredSamples);
+
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery("A", null, "B", null,
+            true, true, true, Select.all(),
+            true, true, true, true);
+        final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
+        structuralVariantFilter.setStructVarQueries(Arrays.asList(Arrays.asList(structVarFilterQuery)));
+        studyViewFilter.setStructuralVariantFilters(Arrays.asList(structuralVariantFilter));
+
+        // Test case:
+        structVarFilterQuery.getGene1Query().setSpecialValue(StructuralVariantSpecialValue.NO_GENE);
+        structVarFilterQuery.getGene2Query().setSpecialValue(StructuralVariantSpecialValue.NO_GENE);
+        
+        mockMvc.perform(MockMvcRequestBuilders.post("/filtered-samples/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(studyViewFilter)))
+            .andExpect(MockMvcResultMatchers.status().isBadRequest());
+    }
+    
+    @Test
+    public void validateStructVarFilterBothNoGeneId() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+        when(studyViewFilterApplier.apply(any(), eq(false))).thenReturn(filteredSampleIdentifiers);
+        when(sampleService.fetchSamples(anyList(), anyList(), anyString())).thenReturn(filteredSamples);
+
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+
+        // Test case:
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery(null, null, null, null,
+            true, true, true, Select.all(),
+            true, true, true, true);
+            
+        final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
+        structuralVariantFilter.setStructVarQueries(Arrays.asList(Arrays.asList(structVarFilterQuery)));
+        studyViewFilter.setStructuralVariantFilters(Arrays.asList(structuralVariantFilter));
+
+        mockMvc.perform(MockMvcRequestBuilders.post("/filtered-samples/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(studyViewFilter)))
+            .andExpect(MockMvcResultMatchers.status().isBadRequest());
+    }
+    
+    @Test
+    public void validateStructVarFilterBothGeneIdAndSpecialValueNull() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+        when(studyViewFilterApplier.apply(any(), eq(false))).thenReturn(filteredSampleIdentifiers);
+        when(sampleService.fetchSamples(anyList(), anyList(), anyString())).thenReturn(filteredSamples);
+
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+
+        // Test case:
+        final StructuralVariantFilterQuery structVarFilterQuery = new StructuralVariantFilterQuery(null, null, "B", null,
+            true, true, true, Select.all(),
+            true, true, true, true);
+        structVarFilterQuery.getGene1Query().setSpecialValue(null);
+
+        final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
+        structuralVariantFilter.setStructVarQueries(Arrays.asList(Arrays.asList(structVarFilterQuery)));
+        studyViewFilter.setStructuralVariantFilters(Arrays.asList(structuralVariantFilter));
+
+        mockMvc.perform(MockMvcRequestBuilders.post("/filtered-samples/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(studyViewFilter)))
+            .andExpect(MockMvcResultMatchers.status().isBadRequest());
+    }
+
 }u}(ju  (e8bd8efba6d188222d0992dd3282008e6123bd58jVv  ]web/src/test/java/org/cbioportal/web/util/appliers/StructuralVariantSubFilterApplierTest.javajXv  addedjPv  KjQv  K jZv  Kj[v  https://github.com/cBioPortal/cbioportal/blob/2d79405d9e241719c0bc171bbb094d7f6d07559d/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.javaj]v  https://github.com/cBioPortal/cbioportal/raw/2d79405d9e241719c0bc171bbb094d7f6d07559d/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.javaj_v  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2Fappliers%2FStructuralVariantSubFilterApplierTest.java?ref=2d79405d9e241719c0bc171bbb094d7f6d07559djav  X  @@ -0,0 +1,142 @@
+package org.cbioportal.web.util.appliers;
+
+import org.cbioportal.model.MolecularProfile;
+import org.cbioportal.model.StructuralVariantFilterQuery;
+import org.cbioportal.model.StructuralVariant;
+import org.cbioportal.model.StudyViewStructuralVariantFilter;
+import org.cbioportal.model.util.Select;
+import org.cbioportal.service.MolecularProfileService;
+import org.cbioportal.service.impl.StructuralVariantServiceImpl;
+import org.cbioportal.web.parameter.SampleIdentifier;
+import org.cbioportal.web.parameter.StudyViewFilter;
+import org.cbioportal.web.util.StudyViewFilterUtil;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.junit.MockitoJUnitRunner;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+
+import static org.mockito.ArgumentMatchers.anyList;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.when;
+
+@RunWith(MockitoJUnitRunner.Silent.class)
+public class StructuralVariantSubFilterApplierTest {
+
+    static final String ST_1_ID = "ST_1_ID";
+    static final String MP_1_ID = "MP_1_ID";
+    static final String G1 = "G1";
+    static final String G2 = "G2";
+    
+    @InjectMocks
+    StructuralVariantSubFilterApplier subject;
+
+    @Mock
+    MolecularProfileService molecularProfileService;
+
+    @Mock
+    StructuralVariantServiceImpl structuralVariantService;
+
+    @Mock
+    StudyViewFilterUtil studyViewFilterUtil;
+
+    private StudyViewFilter emptyStudyViewFilter = new StudyViewFilter();
+    private StudyViewFilter structVarStudyViewFilter = new StudyViewFilter();
+
+    @Before
+    public void setUp() throws Exception {
+
+        // For the test this arrangement does not matter much. What is more important
+        // is the SVs returned by the structuralVariantService service mock in response to
+        // subsequent query filter calls.
+        List<StructuralVariantFilterQuery> svA = Arrays.asList(createQuery(G1, G2));
+        List<StructuralVariantFilterQuery> svB = Arrays.asList(createQuery(G1, G2));
+        List<List<StructuralVariantFilterQuery>> svA_and_svB_filterQuery = Arrays.asList(svA, svB);
+
+        final StudyViewStructuralVariantFilter structuralVariantFilter = new StudyViewStructuralVariantFilter();
+        structuralVariantFilter.setStructVarQueries(svA_and_svB_filterQuery);
+        structuralVariantFilter.setMolecularProfileIds(new HashSet<>(Arrays.asList(MP_1_ID)));
+        structVarStudyViewFilter.setStructuralVariantFilters(Arrays.asList(structuralVariantFilter));
+
+        MolecularProfile molecularProfile1 = new MolecularProfile();
+        molecularProfile1.setStableId(MP_1_ID);
+        molecularProfile1.setCancerStudyIdentifier(ST_1_ID);
+        molecularProfile1.setMolecularAlterationType(MolecularProfile.MolecularAlterationType.STRUCTURAL_VARIANT);
+
+        when(molecularProfileService.getMolecularProfilesInStudies(anyList(), eq("SUMMARY")))
+            .thenReturn(Arrays.asList(molecularProfile1));
+
+        final List<StructuralVariant> structuralVariantsQuerySvA = Arrays.asList(
+            createStructVar("1", ST_1_ID),
+            createStructVar("2", ST_1_ID),
+            createStructVar("3", ST_1_ID),
+            createStructVar("4", ST_1_ID),
+            createStructVar("5", ST_1_ID)
+        );
+        // This result determines the final result.
+        final List<StructuralVariant> structuralVariantsQuerySvB = Arrays.asList(
+            createStructVar("4", ST_1_ID),
+            createStructVar("5", ST_1_ID)
+        );
+        // Subsequently, return results for svA and svB queries.
+        when(studyViewFilterUtil.resolveEntrezGeneIds(anyList()))
+            .thenReturn(svA, svB);
+        when(structuralVariantService.fetchStructuralVariantsByStructVarQueries(anyList(), anyList(), anyList())
+        ).thenReturn(structuralVariantsQuerySvA, structuralVariantsQuerySvB);
+    }
+
+    // Does the function return OR relations between genes in the sv query filter?
+    @Test
+    public void filter() {
+        List<SampleIdentifier> sampleIdentifiers = Arrays.asList(
+            createSampleId("1", ST_1_ID),
+            createSampleId("2", ST_1_ID),
+            createSampleId("3", ST_1_ID),
+            createSampleId("4", ST_1_ID),
+            createSampleId("5", ST_1_ID),
+            createSampleId("6", ST_1_ID),
+            createSampleId("7", ST_1_ID),
+            createSampleId("8", ST_1_ID),
+            createSampleId("9", ST_1_ID),
+            createSampleId("10", ST_1_ID)
+        );
+        List<SampleIdentifier> expected = Arrays.asList(
+            createSampleId("4", ST_1_ID),
+            createSampleId("5", ST_1_ID)
+        );
+        Assert.assertEquals(expected, subject.filter(sampleIdentifiers, structVarStudyViewFilter));
+    }
+
+    @Test
+    public void shouldApplyFilter() {
+        Assert.assertFalse(subject.shouldApplyFilter(emptyStudyViewFilter));
+        Assert.assertTrue(subject.shouldApplyFilter(structVarStudyViewFilter)); 
+    }
+    
+    private StructuralVariantFilterQuery createQuery(String gene1, String gene2) {
+        return new StructuralVariantFilterQuery(gene1, null, gene2, null,
+            true, true, true, Select.all(),
+            true, true, true, true);
+    }
+    
+    private SampleIdentifier createSampleId(String samplId, String studyId) {
+        final SampleIdentifier sampleIdentifier = new SampleIdentifier();
+        sampleIdentifier.setStudyId(studyId);
+        sampleIdentifier.setSampleId(samplId);
+        return sampleIdentifier;
+    }
+    
+    private StructuralVariant createStructVar(String samplId, String studyId) {
+        final StructuralVariant structuralVariant = new StructuralVariant();
+        structuralVariant.setStudyId(studyId);
+        structuralVariant.setSampleId(samplId);
+        return structuralVariant;
+    }
+
+}
\ No newline at end of fileueu(21947e1e6a1888bbcb03c306432e619c1a790559}(sha(21947e1e6a1888bbcb03c306432e619c1a790559node_idEC_kwDOAe-hB9oAKDIxOTQ3ZTFlNmExODg4YmJjYjAzYzMwNjQzMmU2MTljMWE3OTA1NTkcommit}(author}(namehaynescdemailhaynescd@chop.edudate2023-05-03T15:29:27Zu	committer}(jw  haynescdjw  haynescd@chop.eduj	w  2023-05-24T19:37:37Zumessage%:books: Update Priority Documentationtree}(jv  (f086aa578a36c6935672960141c6f2c878502a6eurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/f086aa578a36c6935672960141c6f2c878502a6eujw  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/21947e1e6a1888bbcb03c306432e619c1a790559
comment_countK verification}(verified      reasonunsigned	signatureNpayloadNuujw  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/21947e1e6a1888bbcb03c306432e619c1a790559html_urlXhttps://github.com/cBioPortal/cbioportal/commit/21947e1e6a1888bbcb03c306432e619c1a790559comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/21947e1e6a1888bbcb03c306432e619c1a790559/commentsjw  }(loginhaynescdidJ jv  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5jw  %https://api.github.com/users/haynescdj!w  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminujw  }(j&w  haynescdj(w  J jv  MDQ6VXNlcjMzNjA4OTIwj*w  4https://avatars.githubusercontent.com/u/33608920?v=4j,w  h5jw  %https://api.github.com/users/haynescdj!w  https://github.com/haynescdj/w  /https://api.github.com/users/haynescd/followersj1w  <https://api.github.com/users/haynescd/following{/other_user}j3w  5https://api.github.com/users/haynescd/gists{/gist_id}j5w  <https://api.github.com/users/haynescd/starred{/owner}{/repo}j7w  3https://api.github.com/users/haynescd/subscriptionsj9w  *https://api.github.com/users/haynescd/orgsj;w  +https://api.github.com/users/haynescd/reposj=w  6https://api.github.com/users/haynescd/events{/privacy}j?w  5https://api.github.com/users/haynescd/received_eventsjAw  UserjCw  uparents]}(jv  (1f162e5067f7f42fa3de433bbf8fc38e3121904ajw  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1f162e5067f7f42fa3de433bbf8fc38e3121904aj!w  Xhttps://github.com/cBioPortal/cbioportal/commit/1f162e5067f7f42fa3de433bbf8fc38e3121904auastats}(totalK	additionsK	deletionsK ufiles]}(jv  (3f86d4b8a1eaaf0c5a15d955fec866ea355c6a3afilename*docs/deployment/customization/Studyview.mdstatusmodifiedj]w  Kj^w  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/21947e1e6a1888bbcb03c306432e619c1a790559/docs%2Fdeployment%2Fcustomization%2FStudyview.mdraw_urlhttps://github.com/cBioPortal/cbioportal/raw/21947e1e6a1888bbcb03c306432e619c1a790559/docs%2Fdeployment%2Fcustomization%2FStudyview.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2FStudyview.md?ref=21947e1e6a1888bbcb03c306432e619c1a790559patchX  @@ -25,6 +25,8 @@ The higher the score, the higher priority it will be displayed in the study view
 If you want to hide chart, please set the priority to 0.
 For combination chart, as long as one of the clinical attributes has been set to 0, it will be hidden.
 
+To disable the chart, set the priority to -1.(Currently disables charts for single clinical attributes only)
+
 Currently, we preassigned priority to few charts, but as long as you assign a priority in the database except than 1, these preassigned priorities will be overwritten.
 
 | Chart name(clinical attribute ID)                          	| Frontend default priority 	| Additional Info                                   |uau(ea5252dbc629bc6d600b08587a745c081b04eb5a}(sha(ea5252dbc629bc6d600b08587a745c081b04eb5anode_idEC_kwDOAe-hB9oAKGVhNTI1MmRiYzYyOWJjNmQ2MDBiMDg1ODdhNzQ1YzA4MWIwNGViNWEcommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-07-14T12:04:24Zu	committer}(jzw  
pvannieropj|w  pim@thehyve.nlj~w  2023-07-14T12:04:24Zumessage&Fix disabling SSL for MySQL connectiontree}(jrw  (c78ca88c1f32342e80aa184982d4bf3e8b452f6furlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c78ca88c1f32342e80aa184982d4bf3e8b452f6fujw  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/ea5252dbc629bc6d600b08587a745c081b04eb5a
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujw  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ea5252dbc629bc6d600b08587a745c081b04eb5ahtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/ea5252dbc629bc6d600b08587a745c081b04eb5acomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/ea5252dbc629bc6d600b08587a745c081b04eb5a/commentsjxw  }(login
pvannieropidJa jtw  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5jw  'https://api.github.com/users/pvannieropjw  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminujw  }(jw  
pvannieropjw  Ja jtw  MDQ6VXNlcjc0NTg4NQ==jw  2https://avatars.githubusercontent.com/u/745885?v=4jw  h5jw  'https://api.github.com/users/pvannieropjw  https://github.com/pvannieropjw  1https://api.github.com/users/pvannierop/followersjw  >https://api.github.com/users/pvannierop/following{/other_user}jw  7https://api.github.com/users/pvannierop/gists{/gist_id}jw  >https://api.github.com/users/pvannierop/starred{/owner}{/repo}jw  5https://api.github.com/users/pvannierop/subscriptionsjw  ,https://api.github.com/users/pvannierop/orgsjw  -https://api.github.com/users/pvannierop/reposjw  8https://api.github.com/users/pvannierop/events{/privacy}jw  7https://api.github.com/users/pvannierop/received_eventsjw  Userjw  uparents]}(jrw  (b3400e6aa562d5b7c093300cc94398e5ad0e9e84jw  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b3400e6aa562d5b7c093300cc94398e5ad0e9e84jw  Xhttps://github.com/cBioPortal/cbioportal/commit/b3400e6aa562d5b7c093300cc94398e5ad0e9e84uastats}(totalK	additionsK	deletionsK ufiles]}(jrw  (96e8c4665e6e840984518b4a64dfc807b6a4dcf4filename#core/src/main/scripts/migrate_db.pystatusmodifiedjw  Kjw  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/ea5252dbc629bc6d600b08587a745c081b04eb5a/core%2Fsrc%2Fmain%2Fscripts%2Fmigrate_db.pyraw_urlhttps://github.com/cBioPortal/cbioportal/raw/ea5252dbc629bc6d600b08587a745c081b04eb5a/core%2Fsrc%2Fmain%2Fscripts%2Fmigrate_db.pycontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fscripts%2Fmigrate_db.py?ref=ea5252dbc629bc6d600b08587a745c081b04eb5apatchX  @@ -61,6 +61,9 @@ def get_db_cursor(portal_properties):
         connection_kwargs['db'] = portal_properties.database_name
         if portal_properties.database_use_ssl == 'true':
             connection_kwargs['ssl'] = {"ssl_mode": True}
+            connection_kwargs['ssl_mode'] = 'REQUIRED'
+        else:
+            connection_kwargs['ssl_mode'] = 'DISABLED'          
         
         connection = MySQLdb.connect(**connection_kwargs)
     except MySQLdb.Error as exception:uau(b51a6e3be6769544956c8f9253d4fd82d5a6dddf}(sha(b51a6e3be6769544956c8f9253d4fd82d5a6dddfnode_idEC_kwDOAe-hB9oAKGI1MWE2ZTNiZTY3Njk1NDQ5NTZjOGY5MjUzZDRmZDgyZDVhNmRkZGYcommit}(author}(nameDjokovic0311email.55948986+Djokovic0311@users.noreply.github.comdate2023-08-17T20:03:34Zu	committer}(jw  Djokovic0311jw  .55948986+Djokovic0311@users.noreply.github.comjw  2023-08-17T20:03:34Zumessage"Update GenericAssayEnrichment.javatree}(jw  (335e6ec49a930b4cac67b8279013fd159affbc57urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/335e6ec49a930b4cac67b8279013fd159affbc57ujw  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/b51a6e3be6769544956c8f9253d4fd82d5a6dddf
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujw  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/b51a6e3be6769544956c8f9253d4fd82d5a6dddfhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/b51a6e3be6769544956c8f9253d4fd82d5a6dddfcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/b51a6e3be6769544956c8f9253d4fd82d5a6dddf/commentsjw  }(loginDjokovic0311idJUjw  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5jw  )https://api.github.com/users/Djokovic0311jx  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminujw  }(jx  Djokovic0311jx  JUjw  MDQ6VXNlcjU1OTQ4OTg2jx  4https://avatars.githubusercontent.com/u/55948986?v=4jx  h5jw  )https://api.github.com/users/Djokovic0311jx  https://github.com/Djokovic0311jx  3https://api.github.com/users/Djokovic0311/followersjx  @https://api.github.com/users/Djokovic0311/following{/other_user}jx  9https://api.github.com/users/Djokovic0311/gists{/gist_id}jx  @https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}j!x  7https://api.github.com/users/Djokovic0311/subscriptionsj#x  .https://api.github.com/users/Djokovic0311/orgsj%x  /https://api.github.com/users/Djokovic0311/reposj'x  :https://api.github.com/users/Djokovic0311/events{/privacy}j)x  9https://api.github.com/users/Djokovic0311/received_eventsj+x  Userj-x  uparents]}(jw  (24158cdb1aeb4c7a6e82add9885e57a646f08954jw  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/24158cdb1aeb4c7a6e82add9885e57a646f08954jx  Xhttps://github.com/cBioPortal/cbioportal/commit/24158cdb1aeb4c7a6e82add9885e57a646f08954uastats}(totalK		additionsK	deletionsKufiles]}(jw  (02491c2221b72744e6336cfd786377839e09b53efilenameDmodel/src/main/java/org/cbioportal/model/GenericAssayEnrichment.javastatusmodifiedjGx  KjHx  KchangesK	blob_urlhttps://github.com/cBioPortal/cbioportal/blob/b51a6e3be6769544956c8f9253d4fd82d5a6dddf/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayEnrichment.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/b51a6e3be6769544956c8f9253d4fd82d5a6dddf/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayEnrichment.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenericAssayEnrichment.java?ref=b51a6e3be6769544956c8f9253d4fd82d5a6dddfpatchX  @@ -40,15 +40,16 @@ public HashMap<String, String> getGenericEntityMetaProperties() {
 	public void setGenericEntityMetaProperties(HashMap<String, String> genericEntityMetaProperties) {
 		this.genericEntityMetaProperties = genericEntityMetaProperties;
 	}
-
-    public static int compare(GenericAssayEnrichment c1, GenericAssayEnrichment c2) {
-        return c1.getpValue().compareTo(c2.getpValue());
-    }
+    
     public BigDecimal getqValue() {
         return qValue;
     }
 
     public void setqValue(BigDecimal qValue) {
         this.qValue = qValue;
     }
+    
+    public static int compare(GenericAssayEnrichment c1, GenericAssayEnrichment c2) {
+        return c1.getpValue().compareTo(c2.getpValue());
+    }
 }uau(22c8433b6f5f975d8bad3b22c79940e19fab2efd}(sha(22c8433b6f5f975d8bad3b22c79940e19fab2efdnode_idEC_kwDOAe-hB9oAKDIyYzg0MzNiNmY1Zjk3NWQ4YmFkM2IyMmM3OTk0MGUxOWZhYjJlZmQcommit}(author}(namesbabyanushaemailsatravab@mskcc.orgdate2023-08-14T20:46:36Zu	committer}(jdx  sbabyanushajfx  satravab@mskcc.orgjhx  2023-08-14T20:46:36ZumessageUpdate News.mdtree}(j\x  (98a61b779d7aaf18435c358f66da43a2cc92958curlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/98a61b779d7aaf18435c358f66da43a2cc92958cujtx  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/22c8433b6f5f975d8bad3b22c79940e19fab2efd
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujtx  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/22c8433b6f5f975d8bad3b22c79940e19fab2efdhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/22c8433b6f5f975d8bad3b22c79940e19fab2efdcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/22c8433b6f5f975d8bad3b22c79940e19fab2efd/commentsjbx  }(loginsbabyanushaidJ`_j^x  MDQ6VXNlcjYxNDMxNjQ4
avatar_url4https://avatars.githubusercontent.com/u/61431648?v=4gravatar_idh5jtx  (https://api.github.com/users/sbabyanushajx  https://github.com/sbabyanusha
followers_url2https://api.github.com/users/sbabyanusha/followers
following_url?https://api.github.com/users/sbabyanusha/following{/other_user}	gists_url8https://api.github.com/users/sbabyanusha/gists{/gist_id}starred_url?https://api.github.com/users/sbabyanusha/starred{/owner}{/repo}subscriptions_url6https://api.github.com/users/sbabyanusha/subscriptionsorganizations_url-https://api.github.com/users/sbabyanusha/orgs	repos_url.https://api.github.com/users/sbabyanusha/repos
events_url9https://api.github.com/users/sbabyanusha/events{/privacy}received_events_url8https://api.github.com/users/sbabyanusha/received_eventstypeUser
site_adminujjx  }(jx  sbabyanushajx  J`_j^x  MDQ6VXNlcjYxNDMxNjQ4jx  4https://avatars.githubusercontent.com/u/61431648?v=4jx  h5jtx  (https://api.github.com/users/sbabyanushajx  https://github.com/sbabyanushajx  2https://api.github.com/users/sbabyanusha/followersjx  ?https://api.github.com/users/sbabyanusha/following{/other_user}jx  8https://api.github.com/users/sbabyanusha/gists{/gist_id}jx  ?https://api.github.com/users/sbabyanusha/starred{/owner}{/repo}jx  6https://api.github.com/users/sbabyanusha/subscriptionsjx  -https://api.github.com/users/sbabyanusha/orgsjx  .https://api.github.com/users/sbabyanusha/reposjx  9https://api.github.com/users/sbabyanusha/events{/privacy}jx  8https://api.github.com/users/sbabyanusha/received_eventsjx  Userjx  uparents]}(j\x  (7f523c88026c238576852145307d59d23a5395a1jtx  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7f523c88026c238576852145307d59d23a5395a1jx  Xhttps://github.com/cBioPortal/cbioportal/commit/7f523c88026c238576852145307d59d23a5395a1uastats}(totalKG	additionsK	deletionsK3ufiles]}(j\x  (903c745f93c15e6387c27bf0c5116e42d6bcb9f2filenamedocs/News.mdstatusmodifiedjx  Kjx  K3changesKGblob_urlehttps://github.com/cBioPortal/cbioportal/blob/22c8433b6f5f975d8bad3b22c79940e19fab2efd/docs%2FNews.mdraw_urldhttps://github.com/cBioPortal/cbioportal/raw/22c8433b6f5f975d8bad3b22c79940e19fab2efd/docs%2FNews.mdcontents_urlwhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FNews.md?ref=22c8433b6f5f975d8bad3b22c79940e19fab2efdpatchX}!  @@ -1,24 +1,23 @@
-## Aug 1, 2023
-*   **Enhancement**: One-sided Fisher's exact tests were changed to be two-sided. The affected pages are:
-    *    Results View Page - Mutual Exclusivity Tab
-    *    Results View Page - Comparison Tab - Genomic Alterations Tab
-    *    Comparison Page - Genomic Alterations Tab
-    *    Comparison Page - Mutations Tab
-    
-    Please note that the Mutations tab on the Comparison page is a recent feature and was introduced with the two-sided Fisher's exact test already implemented.
-
-    Several users pointed out that using a one-sided test was incorrect for these comparisons. Please see discussions [here](https://github.com/cBioPortal/cbioportal/issues/9943) for more information.
-
-## May 2, 2023
-*   **New Feature**: The mutations tab now shows variant annotations from the [repository of Variant with Unexpected Effects (reVUE)](https://www.cancerrevue.org/).
-    <img src="https://user-images.githubusercontent.com/16869603/234271379-6a0876ea-8477-426e-a0e4-5e0b0b66aef9.gif" width="700" />
-
-## Apr 11, 2023
-*   **New Feature**: Disable autocommit and manually commit filters in study view. Manually commit filters can improve cBioPortal performance when query large dataset.
-    <img src="https://user-images.githubusercontent.com/3323006/221857599-1eb6e9a5-55c7-4fb5-bc14-283699be0990.png" width="700" />
-    <img src="https://user-images.githubusercontent.com/3323006/221858244-bf359850-79b5-4f9c-8008-6b5271721854.png" width="700" />
-
-## Apr 5, 2023
+## Aug 15, 2023
+*   **Added data** consisting of 2,472 samples from 5 studies:
+    * [Lung Adenocarcinoma Met Organotropism (MSK, Cancer Cell 2023)](https://www.cbioportal.org/study/summary?id=luad_mskcc_2023_met_organotropism) *2653 samples*
+    * [Acute Myeloid Leukemia (OHSU, Cancer Cell 2022)](https://www.cbioportal.org/study/summary?id=aml_ohsu_2022) *942 samples*
+    * [Colon Cancer (Sidra-LUMC AC-ICAM, Nat Med 2023)](https://www.cbioportal.org/study/summary?id=coad_silu_2022) *348 samples*
+    * [Pediatric Neuroblastoma (MSK, Nat Genet 2023)](https://www.cbioportal.org/study/summary?id=nbl_msk_2023) *223 samples*    
+    * [Colorectal Adenocarcinoma (MSK, Nat Commun 2022)](https://www.cbioportal.org/study/summary?id=bowel_colitis_msk_2022) *180 samples*
+    * [Bladder Cancer (Columbia University/MSK, Cell 2018)](https://www.cbioportal.org/study/summary?id=bladder_columbia_msk_2018) *130 samples*
+    * [Myoepithelial Carcinomas of Soft Tissue (WCM, CSH Molecular Case Studies 2022)](https://www.cbioportal.org/study/summary?id=stmyec_wcm_2022) *12 samples*
+
+* **Gene Tables Update** Updated tables of genes (main and alias), based on [Apr 1, 2023 HGNC release](http://ftp.ebi.ac.uk/pub/databases/genenames/hgnc/archive/monthly/tsv/). See seedDB release note [here](https://github.com/cBioPortal/datahub/tree/master/seedDB#latest-seed-database) for details.
+
+* **Data Improvement**
+   * Pan-can studies methylation addition: methylation profile 450K is added to all 32 TCGA Pan-Can studies, in generic assay format. Data source: [GDC](https://gdc.cancer.gov/node/977). Example: Search by gene or probe from dropdown, to add a chart in study view, a track in Oncoprint (single study query only), or plots in plots tab. 
+<img width="1151" alt="Screen Shot 2023-08-14 at 1 57 29 PM" src="https://github.com/cBioPortal/datahub/assets/61431648/80ce4e7f-84c0-4de4-8cec-deaa79236201">
+
+   * Pan-can studies Ancestry addition: Genetic Ancestry data is added to all 32 TCGA Pan-Can studies, in generic assay format. Data source: [GDC](https://gdc.cancer.gov/about-data/publications/CCG-AIM-2020). Example: Search by each ancestry from dropdown, to add a chart in study view, a track in Oncoprint. 
+<img width="1129" alt="Screen Shot 2023-08-14 at 4 26 22 PM" src="https://github.com/cBioPortal/datahub/assets/61431648/1e5a212c-518c-4eb1-add4-330452c28926">
+
+## Mar 29, 2023
 *   **Added data** consisting of 2,472 samples from 5 studies:
     * [Bladder Cancer (MSK, Cell Reports 2022)](https://www.cbioportal.org/study/summary?id=paired_bladder_2022) *1659 samples*
     * [Gastrointestinal Stromal Tumor (MSK, NPJ Precis Oncol 2023)](https://www.cbioportal.org/study/summary?id=gist_msk_2022) *499 samples*
@@ -29,25 +28,6 @@
 *   **Data Improvement**
    	* Added TERT promoter mutation status to [Melanomas (TCGA, Cell 2015)](https://www.cbioportal.org/study/summary?id=skcm_tcga_pub_2015), [Papillary Thyroid Carcinoma (TCGA, Cell 2014)](https://www.cbioportal.org/study/summary?id=thca_tcga_pub) TCGA studies.
 
-## Apr 4, 2023
-*   **New Feature**: Allow numeric data type for custom data charts.
-    <img src="https://user-images.githubusercontent.com/33220871/222459360-9c251f7f-1005-442f-811d-dd1ee1103161.png" width="700" />
-    <img src="https://user-images.githubusercontent.com/33220871/222460439-ac7007c8-059a-4ecc-816c-90752adff444.png" width="700" />
-
-    This also allows to have numerical custom data after we query based on genes (custom data 2 in the image):
-    <img src="https://user-images.githubusercontent.com/33220871/223729410-03a094f4-7671-453f-b8b8-f7bc10b61c7c.png" width="700" />
-    <img src="https://user-images.githubusercontent.com/33220871/223729522-fd9e19e2-6218-40d4-b9fb-f253c4faa858.png" width="700" />
-
-## Jan 10, 2023
-*   **New Feature**: New Pathways tab on the Group Comparison view. 
-    [Example: Primary vs Metastasis samples in MSK-IMPACT Clinical Sequencing Cohort](https://www.cbioportal.org/comparison/pathways?comparisonId=61791fa92e3200072db9b64e&groupOrder=%5B%22Primary%22%2C%22Metastasis%22%5D)
-    <img src="https://user-images.githubusercontent.com/15748980/235750129-661682f7-6593-4b7e-8873-ebba70eeae32.png" width="700" />
-
-## Dec 13, 2022
-*   **New Feature**: New Mutations tab on the Group Comparison view.
-    [Example: Primary vs Metastasis samples in MSK-IMPACT Clinical Sequencing Cohort](https://www.cbioportal.org/comparison/mutations?comparisonId=61791fa92e3200072db9b64e&groupOrder=%5B%22Primary%22%2C%22Metastasis%22%5D)
-    <img src="https://user-images.githubusercontent.com/15748980/235748831-78652ccd-b3ab-496f-9626-74ceb8c7230d.png" width="700" />
-
 ## Oct 12, 2022
 *   **Added data** consisting of 1,459 samples from 10 studies:
 	* [Hepatocellular Carcinoma (MERiC/Basel, Nat Commun. 2022)](https://www.cbioportal.org/study/summary?id=hcc_meric_2021) *122 samples*
@@ -60,13 +40,6 @@
 	* [Mixed Tumors: Selpercatinib RET Trial (MSK, Nat Commun. 2022)](https://www.cbioportal.org/study/summary?id=mixed_selpercatinib_2020) *188 samples*
 	* [Low-Grade Serous Ovarian Cancer (MSK, Clin Cancer Res 2022)](https://www.cbioportal.org/study/summary?id=lgsoc_mapk_msk_2022) *119 samples*
 	* [Urothelial Carcinoma (BCAN/HCRN 2022)](http://www.cbioportal.org/study/summary?id=blca_bcan_hcrn_2022) *203 samples*
-
-## Sep 6, 2022
-*   **Enhancement**: Oncoprint can now save clinical tracks after login
-    <img src="https://user-images.githubusercontent.com/3323006/188828765-ded10947-7343-49dd-b605-50b58b67a388.png" width="700" />
-
-## Aug 11, 2022
-*   **New Major Release**: **v5.0.0** release drops support for fusions in the mutation data format. Going forward fusions can only be imported in the Structural Variant (SV) format. This is mainly a refactoring effort to simplify the codebase and pave the way for the development of novel structural variant visualizations in the future. For cBioPortal instance maintainer, please reference our [Migration Guide](https://docs.cbioportal.org/migration-guide/#v4---v5) for instruction.
 	
 ## Jul 26, 2022
 *   **Added data** consisting of 6,631 samples from 7 studies:
@@ -78,10 +51,6 @@
     * [Pan-cancer Analysis of Advanced and Metastatic Tumors (BCGSC, Nature Cancer 2020)](https://www.cbioportal.org/study/summary?id=pog570_bcgsc_2020) *570 samples*
     * [Prostate Adenocarcinoma (MSK, Clin Cancer Res. 2022)](https://www.cbioportal.org/study/summary?id=prad_pik3r1_msk_2021) *1,417 samples*
 
-## May 31, 2022
-* **New Feature**: Added Quartiles, Median split and Generate bins options for bar charts on the study view page, where Generate bins allows user to define bin size and min value
-    <img src="https://user-images.githubusercontent.com/53996876/151772297-f0aa55ef-5bb4-4e26-8f9b-b0a2369fff71.png" width="700" />
-
 ## May 12, 2022
 * **New Feature**: Show cohort alteration frequencies in pathways from [NDEx](https://www.ndexbio.org/iquery/) on the _Results View_. [Example: Glioblastoma signaling pathways in MSK-IMPACT (2017) cohort](https://bit.ly/3sE4UqD)
 uau(d5c78e05079f080b4e3dc0c69657bc80d8c05af3}(sha(d5c78e05079f080b4e3dc0c69657bc80d8c05af3node_idEC_kwDOAe-hB9oAKGQ1Yzc4ZTA1MDc5ZjA4MGI0ZTNkYzBjNjk2NTdiYzgwZDhjMDVhZjMcommit}(author}(name
Bas Leenknegtemailbasleenknegt@thehyve.nldate2023-06-29T14:04:48Zu	committer}(jx  
Bas Leenknegtjx  basleenknegt@thehyve.nljx  2023-06-29T14:04:48ZumessageJReplace authentication param with context call when retrieving all studiestree}(jx  (e8e90d5dbe5c6c0e3ceda02b05b9d54b67f1cb48urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/e8e90d5dbe5c6c0e3ceda02b05b9d54b67f1cb48ujx  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/d5c78e05079f080b4e3dc0c69657bc80d8c05af3
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujx  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d5c78e05079f080b4e3dc0c69657bc80d8c05af3html_urlXhttps://github.com/cBioPortal/cbioportal/commit/d5c78e05079f080b4e3dc0c69657bc80d8c05af3comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/d5c78e05079f080b4e3dc0c69657bc80d8c05af3/commentsjx  }(loginBasLeeidJ~2 jx  MDQ6VXNlcjMzMjMwMDY=
avatar_url3https://avatars.githubusercontent.com/u/3323006?v=4gravatar_idh5jx  #https://api.github.com/users/BasLeejx  https://github.com/BasLee
followers_url-https://api.github.com/users/BasLee/followers
following_url:https://api.github.com/users/BasLee/following{/other_user}	gists_url3https://api.github.com/users/BasLee/gists{/gist_id}starred_url:https://api.github.com/users/BasLee/starred{/owner}{/repo}subscriptions_url1https://api.github.com/users/BasLee/subscriptionsorganizations_url(https://api.github.com/users/BasLee/orgs	repos_url)https://api.github.com/users/BasLee/repos
events_url4https://api.github.com/users/BasLee/events{/privacy}received_events_url3https://api.github.com/users/BasLee/received_eventstypeUser
site_adminujx  }(jx  BasLeejx  J~2 jx  MDQ6VXNlcjMzMjMwMDY=jx  3https://avatars.githubusercontent.com/u/3323006?v=4j y  h5jx  #https://api.github.com/users/BasLeejx  https://github.com/BasLeejy  -https://api.github.com/users/BasLee/followersjy  :https://api.github.com/users/BasLee/following{/other_user}jy  3https://api.github.com/users/BasLee/gists{/gist_id}j	y  :https://api.github.com/users/BasLee/starred{/owner}{/repo}jy  1https://api.github.com/users/BasLee/subscriptionsj
y  (https://api.github.com/users/BasLee/orgsjy  )https://api.github.com/users/BasLee/reposjy  4https://api.github.com/users/BasLee/events{/privacy}jy  3https://api.github.com/users/BasLee/received_eventsjy  Userjy  uparents]}(jx  (2ef50ef0663dd8da65f8fa8b114af9f68fd313d4jx  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2ef50ef0663dd8da65f8fa8b114af9f68fd313d4jx  Xhttps://github.com/cBioPortal/cbioportal/commit/2ef50ef0663dd8da65f8fa8b114af9f68fd313d4uastats}(totalK	additionsK	deletionsKufiles](}(jx  (b194d1d49e7ab87b162e102f6be5a1860cfd0bbafilenameFcore/src/test/scripts/test_data/study_es_0/data_mutations_extended.mafstatusmodifiedj1y  K j2y  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/d5c78e05079f080b4e3dc0c69657bc80d8c05af3/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fdata_mutations_extended.mafraw_urlhttps://github.com/cBioPortal/cbioportal/raw/d5c78e05079f080b4e3dc0c69657bc80d8c05af3/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fdata_mutations_extended.mafcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fdata_mutations_extended.maf?ref=d5c78e05079f080b4e3dc0c69657bc80d8c05af3patchX  @@ -1,4 +1,3 @@
-#version 2.4
 Hugo_Symbol	Entrez_Gene_Id	Center	NCBI_Build	Chromosome	Start_Position	End_Position	Strand	Variant_Classification	Variant_Type	Reference_Allele	Tumor_Seq_Allele1	Tumor_Seq_Allele2	dbSNP_RS	dbSNP_Val_Status	Tumor_Sample_Barcode	Matched_Norm_Sample_Barcode	Match_Norm_Seq_Allele1	Match_Norm_Seq_Allele2	Tumor_Validation_Allele1	Tumor_Validation_Allele2	Match_Norm_Validation_Allele1	Match_Norm_Validation_Allele2	Verification_Status	Validation_Status	Mutation_Status	Sequencing_Phase	Sequence_Source	Validation_Method	Score	BAM_File	Sequencer	MA:FImpact	MA:FIS	Amino_Acid_Change	MA:link.MSA	MA:link.PDB	MA:link.var	Tumor_Sample_UUID	Matched_Norm_Sample_UUID	HGVSc	HGVSp	HGVSp_Short	Transcript_ID	Exon_Number	t_depth	t_ref_count	t_alt_count	n_depth	n_ref_count	n_alt_count	all_effects	Allele	Gene	Feature	Feature_type	Consequence	cDNA_position	CDS_position	Protein_position	Amino_acids	Codons	Existing_variation	ALLELE_NUM	DISTANCE	SYMBOL	SYMBOL_SOURCE	HGNC_ID	BIOTYPE	CANONICAL	CCDS	ENSP	SWISSPROT	TREMBL	UNIPARC	RefSeq	SIFT	PolyPhen	EXON	INTRON	DOMAINS	GMAF	AFR_MAF	AMR_MAF	ASN_MAF	EAS_MAF	EUR_MAF	SAS_MAF	AA_MAF	EA_MAF	CLIN_SIG	SOMATIC	PUBMED	MOTIF_NAME	MOTIF_POS	HIGH_INF_POS	MOTIF_SCORE_CHANGE	IMPACT	PICK	VARIANT_CLASS	TSL	HGVS_OFFSET	PHENO	chromosome_name_wu	start_wu	stop_wu	reference_wu	variant_wu	type_wu	gene_name_wu	transcript_name_wu	transcript_species_wu	transcript_source_wu	transcript_version_wu	strand_wu	transcript_status_wu	trv_type_wu	c_position_wu	amino_acid_change_wu	ucsc_cons_wu	domain_wu	all_domains_wu	deletion_substructures_wu	transcript_error_wu	default_gene_name_wu	gene_name_source_wu	ensembl_gene_id	normal_ref_reads	normal_var_reads	normal_vaf	tumor_ref_reads	tumors_var_reads	tumor_vaf	evs_ea	evs_aa	evs_all	chromosome_name_WU	start_WU	stop_WU	reference_WU	variant_WU	type_WU	gene_name_WU	transcript_name_WU	transcript_species_WU	transcript_source_WU	transcript_version_WU	strand_WU	transcript_status_WU	trv_type_WU	c_position_WU	amino_acid_change_WU	ucsc_cons_WU	domain_WU	all_domains_WU	deletion_substructures_WU	transcript_error_WU	default_gene_name_WU	gene_name_source_WU	EVS_EA	EVS_AA	EVS_All	cbp_driver	cbp_driver_annotation	cbp_driver_tiers	cbp_driver_tiers_annotation	Zygosity.name	Zygosity.code
 OR11H1		genome.wustl.edu	GRCh37	22	16449539	16449539	-1	Missense_Mutation	SNP	A	A	G			TCGA-A1-A0SB-01	TCGA-A1-A0SB-10	A	A					Unknown	Untested	Somatic	Phase_IV	WXS	none	1	dbGAP	Illumina GAIIx	low	1.49	V89A	getma.org/?cm=msa&ty=f&p=O11H1_HUMAN&rb=1&re=154&var=V89A		getma.org/?cm=var&var=hg19,22,16449539,A,G&fts=all	db9d40fb-bfce-4c3b-a6c2-41c5c88982f1	a3254f8e-3bbd-42fc-abea-a5f25b7648b3	c.266T>C	p.Val89Ala	p.V89A	ENST00000252835	1/1	0			0			OR11H1,missense_variant,p.Val89Ala,ENST00000252835,NM_001005239.1;	G	ENSG00000130538	ENST00000252835	Transcript	missense_variant	267/982	266/981	89/326	V/A	gTc/gCc	rs199856986,COSM1484040	1		OR11H1	HGNC	15404	protein_coding	YES	CCDS33594.1	ENSP00000252835	O11H1_HUMAN		UPI000004B1CF	NM_001005239.1	deleterious(0.02)	possibly_damaging(0.589)	1/1		Transmembrane_helices:TMhelix,PROSITE_profiles:PS50262,hmmpanther:PTHR24242:SF201,hmmpanther:PTHR24242,Gene3D:1.20.1070.10,Superfamily_domains:SSF81321											0,1						MODERATE	1	SNV			0,1	22	16449539	16449539	A	G	SNP	OR11H1	ENST00000252835	human	ensembl	69_37n	-1	known	missense	c.266	p.V89A	234	pfam_7TM_GPCR_Rhodpsn,pfscan_GPCR_Rhodpsn_supfam	pfam_7TM_GPCR_Rhodpsn,pfscan_GPCR_Rhodpsn_supfam,prints_Olfact_rcpt,prints_7TM_GPCR_Rhodpsn	-	no_errors	OR11H1	HGNC	ENSG00000130538	65	0	0	38	6	13.64	-	-	-	22	16449539	16449539	A	G	SNP	OR11H1	ENST00000252835	human	ensembl	69_37n	-1	known	missense	c.266	p.V89A	234	pfam_7TM_GPCR_Rhodpsn,pfscan_GPCR_Rhodpsn_supfam	pfam_7TM_GPCR_Rhodpsn,pfscan_GPCR_Rhodpsn_supfam,prints_Olfact_rcpt,prints_7TM_GPCR_Rhodpsn	-	no_errors	OR11H1	HGNC	-	-	-	Putative_Driver	Test driver				
 TMEM247		genome.wustl.edu	GRCh37	2	46707888	46707888	1	Frame_Shift_Del	DEL	G	G	-			TCGA-A1-A0SB-01	TCGA-A1-A0SB-10	G	G					Unknown	Untested	Somatic	Phase_IV	WXS	none	1	dbGAP	Illumina GAIIx							db9d40fb-bfce-4c3b-a6c2-41c5c88982f1	a3254f8e-3bbd-42fc-abea-a5f25b7648b3	c.463delG	p.Ala155ArgfsTer59	p.A155Rfs*59	ENST00000434431	2/3	0			0			TMEM247,frameshift_variant,p.Ala155ArgfsTer59,ENST00000434431,NM_001145051.2;TMEM247,intron_variant,,ENST00000432241,;	-	ENSG00000187600	ENST00000434431	Transcript	frameshift_variant	462/659	462/659	154/219	E/X	gaG/ga	COSM1408208,~rs70940616	1		TMEM247	HGNC	42967	protein_coding	YES	CCDS56117.1	ENSP00000388684	TM247_HUMAN		UPI0000366EF8	NM_001145051.2			2/3		Coiled-coils_(Ncoils):Coil,Pfam_domain:PF15444								-:0.0202	-:0.0439		1						HIGH	1	deletion		1	1	2	46707888	46707888	G	-	DEL	TMEM247	ENST00000434431	human	ensembl	69_37n	1	known	frame_shift_del	c.462	p.A155fs	83			-	no_stop_codon:bad_bp_length_for_coding_region	TMEM247	HGNC	ENSG00000187600	20	0	0	7	3	30	-	-	-	2	46707888	46707888	G	-	DEL	TMEM247	ENST00000434431	human	ensembl	69_37n	1	known	frame_shift_del	c.462	p.A155fs	83			-	no_stop_codon:bad_bp_length_for_coding_region	TMEM247	HGNC	-	-	-	Putative_Passenger	Test passenger	Class 2	Class annotation		u}(jx  (516225adbbfd0f6bf8c1c131cbbb6ace2ec86cf5j7y  9web/src/main/java/org/cbioportal/web/StudyController.javaj9y  modifiedj1y  Kj2y  Kj;y  K
j<y  https://github.com/cBioPortal/cbioportal/blob/d5c78e05079f080b4e3dc0c69657bc80d8c05af3/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.javaj>y  https://github.com/cBioPortal/cbioportal/raw/d5c78e05079f080b4e3dc0c69657bc80d8c05af3/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.javaj@y  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyController.java?ref=d5c78e05079f080b4e3dc0c69657bc80d8c05af3jBy  X  @@ -23,6 +23,7 @@
 import org.springframework.http.MediaType;
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -98,11 +99,10 @@ public ResponseEntity<List<CancerStudy>> getAllStudies(
         @ApiParam("Name of the property that the result list is sorted by")
         @RequestParam(required = false) StudySortBy sortBy,
         @ApiParam("Direction of the sort")
-        @RequestParam(defaultValue = "ASC") Direction direction,
-        // adding @RequestParam causes error HTTP 400 error as by default required = true 
-        // if set to required = false causes unauthorized studies to be shown as authorized - see issue 10221
-        @ApiParam(hidden = true)
-        Authentication authentication) {
+        @RequestParam(defaultValue = "ASC") Direction direction
+    ) {
+        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+        
         // Only use this feature on the public portal and make sure it is never used
         // on portals using auth, as in auth setting, different users will have different
         // results.ueu(f5edaec004b8432421cb6453ea490c54aec68d2e}(sha(f5edaec004b8432421cb6453ea490c54aec68d2enode_idEC_kwDOAe-hB9oAKGY1ZWRhZWMwMDRiODQzMjQyMWNiNjQ1M2VhNDkwYzU0YWVjNjhkMmUcommit}(author}(namePim van Nieropemailpim@thehyve.nldate2023-05-04T12:54:11Zu	committer}(jVy  
pvannieropjXy  pim@thehyve.nljZy  2023-06-13T08:41:11Zumessage*Return counts when gene 1 or gene2 is nulltree}(jNy  (cc760796f1267f3ec19656b1b62be28b8f54eb02urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/cc760796f1267f3ec19656b1b62be28b8f54eb02ujfy  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/f5edaec004b8432421cb6453ea490c54aec68d2e
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujfy  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/f5edaec004b8432421cb6453ea490c54aec68d2ehtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/f5edaec004b8432421cb6453ea490c54aec68d2ecomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/f5edaec004b8432421cb6453ea490c54aec68d2e/commentsjTy  }(login
pvannieropidJa jPy  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5jfy  'https://api.github.com/users/pvannieropjry  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminuj\y  }(jwy  
pvannieropjyy  Ja jPy  MDQ6VXNlcjc0NTg4NQ==j{y  2https://avatars.githubusercontent.com/u/745885?v=4j}y  h5jfy  'https://api.github.com/users/pvannieropjry  https://github.com/pvannieropjy  1https://api.github.com/users/pvannierop/followersjy  >https://api.github.com/users/pvannierop/following{/other_user}jy  7https://api.github.com/users/pvannierop/gists{/gist_id}jy  >https://api.github.com/users/pvannierop/starred{/owner}{/repo}jy  5https://api.github.com/users/pvannierop/subscriptionsjy  ,https://api.github.com/users/pvannierop/orgsjy  -https://api.github.com/users/pvannierop/reposjy  8https://api.github.com/users/pvannierop/events{/privacy}jy  7https://api.github.com/users/pvannierop/received_eventsjy  Userjy  uparents]}(jNy  (0de67b7d07c0d73f69fa64bf58815d1a2d864f38jfy  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/0de67b7d07c0d73f69fa64bf58815d1a2d864f38jry  Xhttps://github.com/cBioPortal/cbioportal/commit/0de67b7d07c0d73f69fa64bf58815d1a2d864f38uastats}(totalK^	additionsK9	deletionsK%ufiles](}(jNy  (91de51fb7356906110944cdd27eaf3761097919dfilenameGcore/src/test/scripts/test_data/study_es_0/data_structural_variants.txtstatusmodifiedjy  Kjy  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/f5edaec004b8432421cb6453ea490c54aec68d2e/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fdata_structural_variants.txtraw_urlhttps://github.com/cBioPortal/cbioportal/raw/f5edaec004b8432421cb6453ea490c54aec68d2e/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fdata_structural_variants.txtcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fscripts%2Ftest_data%2Fstudy_es_0%2Fdata_structural_variants.txt?ref=f5edaec004b8432421cb6453ea490c54aec68d2epatchX  @@ -45,3 +45,5 @@ TCGA-A2-A04Q-01	NA	SND1	ENST00000354725	10	1	10000000	EXON	SND1_BRAF_CUSTOMHYVE_
 TCGA-A2-A0SX-01	NA	MKRN1	ENST00000255977	4	1	10000000	EXON	MKRN1_BRAF_CUSTOMHYVE_1	NA	BRAF	ENST00000288602	11	1	10000000		EXON	MKRN1_BRAF_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	MKRN1_BRAF_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			
 TCGA-AO-A0JL-01	NA	MKRN1	ENST00000255977	4	1	10000000	EXON	MKRN1_BRAF_CUSTOMHYVE_1	NA	BRAF	ENST00000288602	11	1	10000000		EXON	MKRN1_BRAF_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	MKRN1_BRAF_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			
 TCGA-AO-A0JL-01	NA	BRAF	ENST00000288602	6	1	10000000	EXON	BRAF_TTN_CUSTOMHYVE_1	NA	TTN	ENST00000589042	2	1	111111111		EXON	BRAF_TTN_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	BRAF_TTN_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			
+TCGA-AO-A0JL-01	NA	BRAF	ENST00000288602	6	1	10000000	EXON	BRAF_NULL_CUSTOMHYVE_1	NA			2	1	111111111		EXON	BRAF_NULL_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	BRAF_NULL_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			
+TCGA-AO-A0JL-01	NA			6	1	10000000	EXON	NULL_TTN_CUSTOMHYVE_1	NA	TTN	ENST00000589042	2	1	111111111		EXON	NULL_TTN_CUSTOMHYVE_2	NA	GRCh37	no	yes	NA	1000	NA	900	NA	NA	NA	NA	NULL_TTN_CUSTOMHYVE	NA	NA	NA	Fusion	NA	NA	Gain-of-Function	NA	NA	NA	NA	NA	SOMATIC			u}(jNy  (01ed5f7bae7167941c488b34592e51cba881fbdejy  ppersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatis/AlterationCountsMapper.xmljy  modifiedjy  Kjy  Kjy  Kjy  https://github.com/cBioPortal/cbioportal/blob/f5edaec004b8432421cb6453ea490c54aec68d2e/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationCountsMapper.xmljy  https://github.com/cBioPortal/cbioportal/raw/f5edaec004b8432421cb6453ea490c54aec68d2e/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationCountsMapper.xmljy  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationCountsMapper.xml?ref=f5edaec004b8432421cb6453ea490c54aec68d2ejy  X  @@ -161,8 +161,8 @@
             <include refid="fromIncludeCustomAnnotationsSV" />
             INNER JOIN sample ON structural_variant.SAMPLE_ID = sample.INTERNAL_ID
             INNER JOIN patient ON sample.PATIENT_ID = patient.INTERNAL_ID
-            INNER JOIN gene as gene1 ON structural_variant.SITE1_ENTREZ_GENE_ID = gene1.ENTREZ_GENE_ID
-            INNER JOIN gene as gene2 ON structural_variant.SITE2_ENTREZ_GENE_ID = gene2.ENTREZ_GENE_ID
+            LEFT JOIN gene as gene1 ON structural_variant.SITE1_ENTREZ_GENE_ID = gene1.ENTREZ_GENE_ID
+            LEFT JOIN gene as gene2 ON structural_variant.SITE2_ENTREZ_GENE_ID = gene2.ENTREZ_GENE_ID
         <where>
             <include refid="whereCustomAnnotations"/>
             <include refid="whereSVStatus" />u}(jNy  (7330e13633afaa967c98ab5edcb30e2f3a0f5044jy  upersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/AlterationMyBatisRepositoryTest.javajy  modifiedjy  K5jy  K#jy  KXjy  https://github.com/cBioPortal/cbioportal/blob/f5edaec004b8432421cb6453ea490c54aec68d2e/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.javajy  https://github.com/cBioPortal/cbioportal/raw/f5edaec004b8432421cb6453ea490c54aec68d2e/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.javajy  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.java?ref=f5edaec004b8432421cb6453ea490c54aec68d2ejy  X=  @@ -19,7 +19,7 @@
 public class AlterationMyBatisRepositoryTest {
 
     //    mutation and cna events in testSql.sql
-    //        SAMPLE_ID,    ENTREZ_GENE_ID, HUGO_GENE_SYMBOL, GENETIC_PROFILE_ID, TYPE, MUTATION_TYPE, DRIVER_FILTER, DRIVER_TIERS_FILTER, PATIENT_ID, MUTATION_TYPE
+    //        SAMPLE_ID,    ENTREZ_GENE_ID, HUGO_GENE_SYMBOL, GENETIC_PROFILE_ID, TYPE, MUTATIONio_TYPE, DRIVER_FILTER, DRIVER_TIERS_FILTER, PATIENT_ID, MUTATION_TYPE
     //        1	    207	    AKT1	2	CNA         -2	                Putative_Driver	    Tier 1  TCGA-A1-A0SB    germline
     //        2	    207	    AKT1	2	CNA         2	                Putative_Passenger	Tier 2  TCGA-A1-A0SD    germline
     //        1	    207	    AKT1	6	MUTATION    Nonsense_Mutation	Putative_Driver	    Tier 1  TCGA-A1-A0SB    germline
@@ -42,7 +42,8 @@ public class AlterationMyBatisRepositoryTest {
     //       15     57670-673   KIAA..-BRAF 13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SD    somatic
     //        1     8031-5979   NCOA4-RET   7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
     //       15     8031-5979   NCOA4-RET   13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
-    //        1     7113-2078   TMPRSS2-ERG 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     7113-2078   TMPRSS2-ERG 7   SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
+    //       15     8031-       NCOA4-      13  SV          Fusion              <noi>               <noi>   TCGA-A1-A0SB    somatic
 
     @Autowired
     private AlterationMyBatisRepository alterationMyBatisRepository;
@@ -79,6 +80,7 @@ public void setup() {
         sampleIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SD-01", "study_tcga_pub_gistic"));
         svSampleIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SB-01", "study_tcga_pub_sv"));
         svSampleIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SD-01", "study_tcga_pub_sv"));
+        svSampleIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-B0SO-01", "acc_tcga_sv"));
 
         patientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SB", "study_tcga_pub_mutations"));
         patientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SE", "study_tcga_pub_mutations"));
@@ -91,6 +93,7 @@ public void setup() {
         patientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SD", "study_tcga_pub_gistic"));
         svPatientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SB", "study_tcga_pub_sv"));
         svPatientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-A0SD", "study_tcga_pub_sv"));
+        svPatientIdToProfileId.add(new MolecularProfileCaseIdentifier("TCGA-A1-B0SO", "acc_tcga_sv"));
 
         entrezGeneIds = Select.byValues(Arrays.asList(207, 208, 672, 2064));
         svEntrezGeneIds = Select.byValues(Arrays.asList(57670, 8031, 27436, 7113));
@@ -881,11 +884,14 @@ public void getSampleStructuralVariantCountIncludeOnlyGermline() throws Exceptio
 
         AlterationCountByGene result57670 = result.stream().filter(r -> r.getEntrezGeneId() == 57670).findFirst().get();
         AlterationCountByGene result27436 = result.stream().filter(r -> r.getEntrezGeneId() == 27436).findFirst().get();
-        Assert.assertEquals(2, result.size());
+        AlterationCountByGene result7113 = result.stream().filter(r -> r.getEntrezGeneId() == 7113).findFirst().get();
+        Assert.assertEquals(3, result.size());
         Assert.assertEquals((Integer) 1, result57670.getTotalCount());
         Assert.assertEquals((Integer) 1, result57670.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result27436.getTotalCount());
         Assert.assertEquals((Integer) 1, result27436.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, result7113.getTotalCount());
+        Assert.assertEquals((Integer) 1, result7113.getNumberOfAlteredCases());
     }
 
     @Test
@@ -905,10 +911,10 @@ public void getSampleStructuralVariantCountIncludeOnlySomatic() throws Exception
         AlterationCountByGene result8031 = result.stream().filter(r -> r.getEntrezGeneId() == 8031).findFirst().get();
         AlterationCountByGene result27436 = result.stream().filter(r -> r.getEntrezGeneId() == 27436).findFirst().get();
         AlterationCountByGene result7113 = result.stream().filter(r -> r.getEntrezGeneId() == 7113).findFirst().get();
-        Assert.assertEquals((Integer) 2, result57670.getTotalCount());
-        Assert.assertEquals((Integer) 2, result57670.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 1, result8031.getTotalCount());
-        Assert.assertEquals((Integer) 1, result8031.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, result57670.getTotalCount());
+        Assert.assertEquals((Integer) 3, result57670.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, result8031.getTotalCount());
+        Assert.assertEquals((Integer) 2, result8031.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result27436.getTotalCount());
         Assert.assertEquals((Integer) 1, result27436.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result7113.getTotalCount());
@@ -969,14 +975,17 @@ public void getPatientStructuralVariantCountIncludeOnlyGermline() throws Excepti
             svEntrezGeneIds,
             alterationFilter);
         // two structural variants in testSql.sql are germline mutations
-        Assert.assertEquals(2, result.size());
+        Assert.assertEquals(3, result.size());
 
         AlterationCountByGene result57670 = result.stream().filter(r -> r.getEntrezGeneId() == 57670).findFirst().get();
         AlterationCountByGene result27436 = result.stream().filter(r -> r.getEntrezGeneId() == 27436).findFirst().get();
+        AlterationCountByGene result7113 = result.stream().filter(r -> r.getEntrezGeneId() == 7113).findFirst().get();
         Assert.assertEquals((Integer) 1, result57670.getTotalCount());
         Assert.assertEquals((Integer) 1, result57670.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result27436.getTotalCount());
         Assert.assertEquals((Integer) 1, result27436.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, result7113.getTotalCount());
+        Assert.assertEquals((Integer) 1, result7113.getNumberOfAlteredCases());
     }
 
     @Test
@@ -996,10 +1005,10 @@ public void getPatientStructuralVariantCountIncludeOnlySomatic() throws Exceptio
         AlterationCountByGene result8031 = result.stream().filter(r -> r.getEntrezGeneId() == 8031).findFirst().get();
         AlterationCountByGene result27436 = result.stream().filter(r -> r.getEntrezGeneId() == 27436).findFirst().get();
         AlterationCountByGene result7113 = result.stream().filter(r -> r.getEntrezGeneId() == 7113).findFirst().get();
-        Assert.assertEquals((Integer) 2, result57670.getTotalCount());
-        Assert.assertEquals((Integer) 2, result57670.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 1, result8031.getTotalCount());
-        Assert.assertEquals((Integer) 1, result8031.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, result57670.getTotalCount());
+        Assert.assertEquals((Integer) 3, result57670.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, result8031.getTotalCount());
+        Assert.assertEquals((Integer) 2, result8031.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result27436.getTotalCount());
         Assert.assertEquals((Integer) 1, result27436.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, result7113.getTotalCount());
@@ -1049,27 +1058,29 @@ public void getPatientStructuralVariantCountIncludeCustomDriverAnnotationsExclud
         );
         Assert.assertEquals(1, result.size());
     }
-    
     @Test
     public void getSampleStructuralVariantCount() throws Exception {
         List<AlterationCountByStructuralVariant> result = alterationMyBatisRepository.getSampleStructuralVariantCounts(
             svSampleIdToProfileId,
             alterationFilter);
 
-        // Should be one KIAA154-BRAF and one NCOA4-RET
-        Assert.assertEquals(4, result.size());
+        // Should be one KIAA154-BRAF, one NCOA4-RET and one NCOA4-null
+        Assert.assertEquals(5, result.size());
         AlterationCountByStructuralVariant resultEmlAlk = findStructVarCount("EML4", "ALK", result);
         AlterationCountByStructuralVariant resultKiaaBraf= findStructVarCount("KIAA1549", "BRAF", result);
         AlterationCountByStructuralVariant resultTmprsErg = findStructVarCount("TMPRSS2", "ERG", result);
         AlterationCountByStructuralVariant resultNcoRet = findStructVarCount("NCOA4", "RET", result);
+        AlterationCountByStructuralVariant resultNcoNull = findStructVarCount("NCOA4", null, result);
         Assert.assertEquals((Integer) 2, resultEmlAlk.getTotalCount());
         Assert.assertEquals((Integer) 2, resultEmlAlk.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 3, resultKiaaBraf.getTotalCount());
-        Assert.assertEquals((Integer) 2, resultKiaaBraf.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 1, resultNcoRet.getTotalCount());
-        Assert.assertEquals((Integer) 1, resultNcoRet.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 1, resultTmprsErg.getTotalCount());
-        Assert.assertEquals((Integer) 1, resultTmprsErg.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 4, resultKiaaBraf.getTotalCount());
+        Assert.assertEquals((Integer) 3, resultKiaaBraf.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, resultNcoNull.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultNcoNull.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultTmprsErg.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultTmprsErg.getNumberOfAlteredCases());
     }
 
     @Test
@@ -1096,13 +1107,16 @@ public void getSampleStructuralVariantCountSomaticSvStatusExcluded() throws Exce
             svSampleIdToProfileId,
             alterationFilter);
 
-        Assert.assertEquals(2, result.size());
+        Assert.assertEquals(3, result.size());
         AlterationCountByStructuralVariant resultKiaaBraf= findStructVarCount("KIAA1549", "BRAF", result);
         AlterationCountByStructuralVariant resultEmlAlk = findStructVarCount("EML4", "ALK", result);
+        AlterationCountByStructuralVariant resultTmprsErg = findStructVarCount("TMPRSS2", "ERG", result);
         Assert.assertEquals((Integer) 1, resultKiaaBraf.getTotalCount());
         Assert.assertEquals((Integer) 1, resultKiaaBraf.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, resultEmlAlk.getTotalCount());
         Assert.assertEquals((Integer) 1, resultEmlAlk.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, resultTmprsErg.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultTmprsErg.getNumberOfAlteredCases());
     }
 
     @Test
@@ -1114,17 +1128,20 @@ public void getSampleStructuralVariantCountGermlineSvStatusExcluded() throws Exc
             svSampleIdToProfileId,
             alterationFilter);
 
-        Assert.assertEquals(4, result.size());
+        Assert.assertEquals(5, result.size());
         AlterationCountByStructuralVariant resultEmlAlk = findStructVarCount("EML4", "ALK", result);
         AlterationCountByStructuralVariant resultKiaaBraf= findStructVarCount("KIAA1549", "BRAF", result);
         AlterationCountByStructuralVariant resultTmprsErg = findStructVarCount("TMPRSS2", "ERG", result);
         AlterationCountByStructuralVariant resultNcoRet = findStructVarCount("NCOA4", "RET", result);
+        AlterationCountByStructuralVariant resultNcoNull = findStructVarCount("NCOA4", null, result);
         Assert.assertEquals((Integer) 1, resultEmlAlk.getTotalCount());
         Assert.assertEquals((Integer) 1, resultEmlAlk.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 2, resultKiaaBraf.getTotalCount());
-        Assert.assertEquals((Integer) 2, resultKiaaBraf.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 1, resultNcoRet.getTotalCount());
-        Assert.assertEquals((Integer) 1, resultNcoRet.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 3, resultKiaaBraf.getTotalCount());
+        Assert.assertEquals((Integer) 3, resultKiaaBraf.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 1, resultNcoNull.getTotalCount());
+        Assert.assertEquals((Integer) 1, resultNcoNull.getNumberOfAlteredCases());
         Assert.assertEquals((Integer) 1, resultTmprsErg.getTotalCount());
         Assert.assertEquals((Integer) 1, resultTmprsErg.getNumberOfAlteredCases());
     }
@@ -1142,20 +1159,21 @@ public void getPatientStructuralVariantCount() throws Exception {
         AlterationCountByStructuralVariant resultNcoRet = findStructVarCount("NCOA4", "RET", result);
         Assert.assertEquals((Integer) 2, resultEmlAlk.getTotalCount());
         Assert.assertEquals((Integer) 2, resultEmlAlk.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 3, resultKiaaBraf.getTotalCount());
-        Assert.assertEquals((Integer) 2, resultKiaaBraf.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 1, resultNcoRet.getTotalCount());
-        Assert.assertEquals((Integer) 1, resultNcoRet.getNumberOfAlteredCases());
-        Assert.assertEquals((Integer) 1, resultTmprsErg.getTotalCount());
-        Assert.assertEquals((Integer) 1, resultTmprsErg.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 4, resultKiaaBraf.getTotalCount());
+        Assert.assertEquals((Integer) 3, resultKiaaBraf.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultNcoRet.getNumberOfAlteredCases());
+        Assert.assertEquals((Integer) 2, resultTmprsErg.getTotalCount());
+        Assert.assertEquals((Integer) 2, resultTmprsErg.getNumberOfAlteredCases());
     }
 
     private AlterationCountByStructuralVariant findStructVarCount(String gene1HugoSymbol,
                                                                   String gene2HugoSymbol,
                                                                   List<AlterationCountByStructuralVariant> counts) {
         return counts.stream().filter(
-            c -> c.getGene1HugoGeneSymbol().equals(gene1HugoSymbol)
-                && c.getGene2HugoGeneSymbol().equals(gene2HugoSymbol)).findFirst().get();
+            c -> ((c.getGene1HugoGeneSymbol() == null && gene1HugoSymbol == null) || (c.getGene1HugoGeneSymbol() != null && c.getGene1HugoGeneSymbol().equals(gene1HugoSymbol)))
+              && ((c.getGene2HugoGeneSymbol() == null && gene2HugoSymbol == null) || (c.getGene2HugoGeneSymbol() != null && c.getGene2HugoGeneSymbol().equals(gene2HugoSymbol)))
+            ).findFirst().get();
     }
     
 }ueu(a2a74a9c0349a9c978461863702ec5d8c4b67438}(sha(a2a74a9c0349a9c978461863702ec5d8c4b67438node_idEC_kwDOAe-hB9oAKGEyYTc0YTljMDM0OWE5Yzk3ODQ2MTg2MzcwMmVjNWQ4YzRiNjc0Mzgcommit}(author}(name
Bas Leenknegtemailbasleenknegt@thehyve.nldate2023-08-02T13:46:18Zu	committer}(jy  
Bas Leenknegtjy  basleenknegt@thehyve.nljy  2023-08-02T13:46:18Zumessage;Add defaults for mutation heatmap and line chart checkboxestree}(jy  (40b0668af4bbfe57b72a121541fecfd27c1a2736urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/40b0668af4bbfe57b72a121541fecfd27c1a2736ujy  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/a2a74a9c0349a9c978461863702ec5d8c4b67438
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujy  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/a2a74a9c0349a9c978461863702ec5d8c4b67438html_urlXhttps://github.com/cBioPortal/cbioportal/commit/a2a74a9c0349a9c978461863702ec5d8c4b67438comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/a2a74a9c0349a9c978461863702ec5d8c4b67438/commentsjy  }(loginBasLeeidJ~2 jy  MDQ6VXNlcjMzMjMwMDY=
avatar_url3https://avatars.githubusercontent.com/u/3323006?v=4gravatar_idh5jy  #https://api.github.com/users/BasLeejy  https://github.com/BasLee
followers_url-https://api.github.com/users/BasLee/followers
following_url:https://api.github.com/users/BasLee/following{/other_user}	gists_url3https://api.github.com/users/BasLee/gists{/gist_id}starred_url:https://api.github.com/users/BasLee/starred{/owner}{/repo}subscriptions_url1https://api.github.com/users/BasLee/subscriptionsorganizations_url(https://api.github.com/users/BasLee/orgs	repos_url)https://api.github.com/users/BasLee/repos
events_url4https://api.github.com/users/BasLee/events{/privacy}received_events_url3https://api.github.com/users/BasLee/received_eventstypeUser
site_adminujy  }(jy  BasLeejy  J~2 jy  MDQ6VXNlcjMzMjMwMDY=j z  3https://avatars.githubusercontent.com/u/3323006?v=4jz  h5jy  #https://api.github.com/users/BasLeejy  https://github.com/BasLeejz  -https://api.github.com/users/BasLee/followersjz  :https://api.github.com/users/BasLee/following{/other_user}j	z  3https://api.github.com/users/BasLee/gists{/gist_id}jz  :https://api.github.com/users/BasLee/starred{/owner}{/repo}j
z  1https://api.github.com/users/BasLee/subscriptionsjz  (https://api.github.com/users/BasLee/orgsjz  )https://api.github.com/users/BasLee/reposjz  4https://api.github.com/users/BasLee/events{/privacy}jz  3https://api.github.com/users/BasLee/received_eventsjz  Userjz  uparents]}(jy  (58a9cbe48c327c00913673471442986a42422241jy  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/58a9cbe48c327c00913673471442986a42422241jy  Xhttps://github.com/cBioPortal/cbioportal/commit/58a9cbe48c327c00913673471442986a42422241uastats}(totalK	additionsK		deletionsKufiles](}(jy  (5dc3ba8c9feb1ec0fa5ec3a06b512338a51fc459filename)portal/src/main/webapp/config_service.jspstatusmodifiedj3z  Kj4z  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/a2a74a9c0349a9c978461863702ec5d8c4b67438/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspraw_urlhttps://github.com/cBioPortal/cbioportal/raw/a2a74a9c0349a9c978461863702ec5d8c4b67438/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=a2a74a9c0349a9c978461863702ec5d8c4b67438patchX  @@ -38,6 +38,7 @@
             "oncoprint.custom_driver_annotation.binary.default",
             "oncoprint.oncokb.default",
             "oncoprint.hotspots.default",
+            "oncoprint.clustered.default",
             "genomenexus.url",
             "genomenexus.url.grch38",
             "google_analytics_profile_id",
@@ -147,7 +148,9 @@
             "skin.patient_view.structural_variant_table.columns.show_on_init",
             "comparison.categorical_na_values",
             "study_download_url",
-            "skin.home_page.show_reference_genome"
+            "skin.home_page.show_reference_genome",
+            "vaf.sequential_mode.default",
+            "vaf.log_scale.default"
         };
 
 u}(jy  (2d9502892525f321e80ea0c7c530b6d2e3e5f699j9z  ,src/main/resources/portal.properties.EXAMPLEj;z  modifiedj3z  Kj4z  Kj=z  Kj>z  https://github.com/cBioPortal/cbioportal/blob/a2a74a9c0349a9c978461863702ec5d8c4b67438/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj@z  https://github.com/cBioPortal/cbioportal/raw/a2a74a9c0349a9c978461863702ec5d8c4b67438/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEjBz  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=a2a74a9c0349a9c978461863702ec5d8c4b67438jDz  Xf  @@ -316,6 +316,7 @@ oncoprint.oncokb.default=true
 oncoprint.hotspots.default=true
 # oncoprint.hide_vus.default=true
 # oncoprint.clinical_tracks.config_json=classpath:/oncoprint-default-tracks.json
+# oncoprint.clustered.default=true
 
 # Custom gene sets
 # querypage.setsofgenes.location=file:/<path>
@@ -435,4 +436,7 @@ persistence.cache_type=no-cache
 # Allows download links within DataSets Tab (See Portal.Properties documentation for more info)
 # study_download_url=
 
-# download_group=
\ No newline at end of file
+# download_group=
+
+# vaf.sequential_mode.default=false
+# vaf.log_scale.default=falseueu(a869c2a52ed0cfefa7a52a7abe378a2e4f3ca156}(sha(a869c2a52ed0cfefa7a52a7abe378a2e4f3ca156node_idEC_kwDOAe-hB9oAKGE4NjljMmE1MmVkMGNmZWZhN2E1MmE3YWJlMzc4YTJlNGYzY2ExNTY     commit}(author}(namehaynescdemailhaynescd@chop.edudate2023-07-06T13:35:13Zu	committer}(jXz  haynescdjZz  haynescd@chop.eduj\z  2023-07-06T13:35:13Zumessage!Clean up for clinical-data-countstree}(jPz  (790ab63df3dde4b54741970d772fc314c2a38cdburlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/790ab63df3dde4b54741970d772fc314c2a38cdbujhz  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/a869c2a52ed0cfefa7a52a7abe378a2e4f3ca156
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujhz  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/a869c2a52ed0cfefa7a52a7abe378a2e4f3ca156html_urlXhttps://github.com/cBioPortal/cbioportal/commit/a869c2a52ed0cfefa7a52a7abe378a2e4f3ca156comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/a869c2a52ed0cfefa7a52a7abe378a2e4f3ca156/commentsjVz  }(loginhaynescdidJ jRz  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5jhz  %https://api.github.com/users/haynescdjtz  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminuj^z  }(jyz  haynescdj{z  J jRz  MDQ6VXNlcjMzNjA4OTIwj}z  4https://avatars.githubusercontent.com/u/33608920?v=4jz  h5jhz  %https://api.github.com/users/haynescdjtz  https://github.com/haynescdjz  /https://api.github.com/users/haynescd/followersjz  <https://api.github.com/users/haynescd/following{/other_user}jz  5https://api.github.com/users/haynescd/gists{/gist_id}jz  <https://api.github.com/users/haynescd/starred{/owner}{/repo}jz  3https://api.github.com/users/haynescd/subscriptionsjz  *https://api.github.com/users/haynescd/orgsjz  +https://api.github.com/users/haynescd/reposjz  6https://api.github.com/users/haynescd/events{/privacy}jz  5https://api.github.com/users/haynescd/received_eventsjz  Userjz  uparents]}(jPz  (2b728705436ea9011fb936793a584b14c121d757jhz  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2b728705436ea9011fb936793a584b14c121d757jtz  Xhttps://github.com/cBioPortal/cbioportal/commit/2b728705436ea9011fb936793a584b14c121d757uastats}(totalK	additionsK	deletionsK	ufiles](}(jPz  (0440213f5844a68e0873c6ee31663dd699a03862filenameppersistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.javastatusmodifiedjz  Kjz  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/a869c2a52ed0cfefa7a52a7abe378a2e4f3ca156/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/a869c2a52ed0cfefa7a52a7abe378a2e4f3ca156/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.java?ref=a869c2a52ed0cfefa7a52a7abe378a2e4f3ca156patchX  @@ -13,13 +13,13 @@ public interface StudyViewMapper {
     List<AlterationCountByGene> getMutatedGenes(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter, boolean applyPatientIdFilters);
     
     List<ClinicalDataCount> getPatientClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter,
-                                                         boolean applyPatientIdFilters,  List<String> attributeIds, List<String> filterAttributeValues);
+                                                         boolean applyPatientIdFilters,  List<String> attributeIds, List<String> filteredAttributeValues);
 
     List<ClinicalDataCount> getSampleClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter,
-                                                        boolean applyPatientIdFilters, List<String> attributeIds, List<String> filterAttributeValues );
+                                                        boolean applyPatientIdFilters, List<String> attributeIds, List<String> filteredAttributeValues );
     
     List<ClinicalDataCount> getClinicalDataCounts(StudyViewFilter studyViewFilter, CategorizedClinicalDataCountFilter categorizedClinicalDataCountFilter,
-                                                  boolean applyPatientIdFilters, List<String> attributeIds, List<String> filterAttributeValues);
+                                                  boolean applyPatientIdFilters, List<String> attributeIds, List<String> filteredAttributeValues);
     
     List<String> getClinicalAttributeNames(String tableName);
 }u}(jPz  (8140ffc3916fffc8cc137ec1c9df9541c203956ejz  tpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmljz  modifiedjz  Kjz  Kjz  Kjz  https://github.com/cBioPortal/cbioportal/blob/a869c2a52ed0cfefa7a52a7abe378a2e4f3ca156/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmljz  https://github.com/cBioPortal/cbioportal/raw/a869c2a52ed0cfefa7a52a7abe378a2e4f3ca156/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmljz  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=a869c2a52ed0cfefa7a52a7abe378a2e4f3ca156jz  Xy  @@ -63,7 +63,7 @@
             </if>
             )
             AND UPPER(attribute_value) NOT IN
-            <foreach item="filteredAttributeValue" collection="filterAttributeValues" open="(" separator="," close=")">
+            <foreach item="filteredAttributeValue" collection="filteredAttributeValues" open="(" separator="," close=")">
                 #{filteredAttributeValue}
             </foreach>
             AND attribute_name IN
@@ -93,7 +93,7 @@
             </if>
             )
             AND UPPER(attribute_value) NOT IN
-            <foreach item="filteredAttributeValue" collection="filterAttributeValues" open="(" separator="," close=")">
+            <foreach item="filteredAttributeValue" collection="filteredAttributeValues" open="(" separator="," close=")">
                 #{filteredAttributeValue}
             </foreach>
             AND attribute_name INu}(jPz  (4a0ba7c812510aefb74d5a250d81906b5a8883a7jz  Kservice/src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.javajz  modifiedjz  K jz  Kjz  Kjz  https://github.com/cBioPortal/cbioportal/blob/a869c2a52ed0cfefa7a52a7abe378a2e4f3ca156/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javajz  https://github.com/cBioPortal/cbioportal/raw/a869c2a52ed0cfefa7a52a7abe378a2e4f3ca156/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javajz  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.java?ref=a869c2a52ed0cfefa7a52a7abe378a2e4f3ca156jz  X`  @@ -284,10 +284,6 @@ public List<ClinicalDataCountItem> getClinicalDataCountsFromColumnStore(StudyVie
             }).collect(Collectors.toList());
     }
     
-    private boolean isClinicalDataValueEmpty(String clinicalDataValue) {
-        return clinicalDataValue.equalsIgnoreCase("NA") || clinicalDataValue.equalsIgnoreCase("NAN") || clinicalDataValue.equalsIgnoreCase("N/A");
-    }
-
     private CategorizedClinicalDataCountFilter extractClinicalDataCountFilters(final StudyViewFilter studyViewFilter) {
         if(clinicalAttributeNameMap.isEmpty()) {
            buildClinicalAttributeNameMap(); ueu(de7243a46e32e39d89ba42ca1eb9237c2ef80ead}(sha(de7243a46e32e39d89ba42ca1eb9237c2ef80eadnode_idEC_kwDOAe-hB9oAKGRlNzI0M2E0NmUzMmUzOWQ4OWJhNDJjYTFlYjkyMzdjMmVmODBlYWQcommit}(author}(name
pvannieropemailpim@thehyve.nldate2023-07-27T14:21:35Zu	committer}(jz  
pvannieropjz  pim@thehyve.nljz  2023-07-27T14:21:35ZumessageUpdate migration docstree}(jz  (87aebead6c70d1c168ee73179cb9bad2178013c8urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/87aebead6c70d1c168ee73179cb9bad2178013c8ujz  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/de7243a46e32e39d89ba42ca1eb9237c2ef80ead
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuujz  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/de7243a46e32e39d89ba42ca1eb9237c2ef80eadhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/de7243a46e32e39d89ba42ca1eb9237c2ef80eadcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/de7243a46e32e39d89ba42ca1eb9237c2ef80ead/commentsjz  }(login
pvannieropidJa jz  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5jz  'https://api.github.com/users/pvannieropjz  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminujz  }(jz  
pvannieropj {  Ja jz  MDQ6VXNlcjc0NTg4NQ==j{  2https://avatars.githubusercontent.com/u/745885?v=4j{  h5jz  'https://api.github.com/users/pvannieropjz  https://github.com/pvannieropj{  1https://api.github.com/users/pvannierop/followersj	{  >https://api.github.com/users/pvannierop/following{/other_user}j{  7https://api.github.com/users/pvannierop/gists{/gist_id}j
{  >https://api.github.com/users/pvannierop/starred{/owner}{/repo}j{  5https://api.github.com/users/pvannierop/subscriptionsj{  ,https://api.github.com/users/pvannierop/orgsj{  -https://api.github.com/users/pvannierop/reposj{  8https://api.github.com/users/pvannierop/events{/privacy}j{  7https://api.github.com/users/pvannierop/received_eventsj{  Userj{  uparents]}(jz  (c1ea978cf89111a035014b5623ec94cdab5a0634jz  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/c1ea978cf89111a035014b5623ec94cdab5a0634jz  Xhttps://github.com/cBioPortal/cbioportal/commit/c1ea978cf89111a035014b5623ec94cdab5a0634uastats}(totalK)	additionsK 	deletionsK	ufiles](}(jz  (b5177e87276e210fe706015283d83e8dc249f607filenamedocs/Migration-Guide.mdstatusmodifiedj5{  Kj6{  KchangesK'blob_urlphttps://github.com/cBioPortal/cbioportal/blob/de7243a46e32e39d89ba42ca1eb9237c2ef80ead/docs%2FMigration-Guide.mdraw_urlohttps://github.com/cBioPortal/cbioportal/raw/de7243a46e32e39d89ba42ca1eb9237c2ef80ead/docs%2FMigration-Guide.mdcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FMigration-Guide.md?ref=de7243a46e32e39d89ba42ca1eb9237c2ef80eadpatchX  @@ -1,22 +1,45 @@
 # Migration Guide
-This page describes various changes deployers will need to make as they deploy newer versions of the portal. 
+
+This page describes various changes deployers will need to make as they deploy newer versions of the portal. -
+
+## <v5.3.16 --> v5.3.17
+
+- Remove `db.host` and `db.portal_db_name` and `db.use_ssl` properties from the _portal.properties_ file or JVM
+  parameters. Update property `db.connection_string` to encode the hostname, port, database and other parameters
+  according to [Database Settings](portal.properties-Reference.md#Database-Settings) documentation and pass via
+  _portal.properties_ file or as JVM parameter.
 
 ## v4 -> v5
-- All fusion profiles are now required to be migrated to structural variant format. One can use this [migration tool](https://github.com/cBioPortal/datahub-study-curation-tools/tree/master/fusion-to-sv-converter) to migrate the fusion files.
-- All fusion files on [datahub](https://github.com/cBioPortal/datahub) were migrated to the structural variant format and their molecular profile ids were renamed from `{study_id}_fusion` to `{study_id}_structural_variants`. If you are using these datahub files one would need to re-import them.
-- Study view user setting will be outdated after migration, please follow `Clear Study View User settings` section in [Session Service Management](Session-Service-Management.md#Clear-Study-View-User-settings)
-- The new default set of transcripts for each gene has changed from `uniprot` to `mskcc`. See the [Mutation Data Annotation Section](./mutation-data-transcript-annotation.md) for more details. To keep the old set of default transcripts add the property `genomenexus.isoform_override_source=uniprot` to [the properties file](https://docs.cbioportal.org/deployment/customization/portal.properties-reference/#properties).
+
+- All fusion profiles are now required to be migrated to structural variant format. One can use
+  this [migration tool](https://github.com/cBioPortal/datahub-study-curation-tools/tree/master/fusion-to-sv-converter)
+  to migrate the fusion files.
+- All fusion files on [datahub](https://github.com/cBioPortal/datahub) were migrated to the structural variant format
+  and their molecular profile ids were renamed from `{study_id}_fusion` to `{study_id}_structural_variants`. If you are
+  using these datahub files one would need to re-import them.
+- Study view user setting will be outdated after migration, please follow `Clear Study View User settings` section
+  in [Session Service Management](Session-Service-Management.md#Clear-Study-View-User-settings)
+- The new default set of transcripts for each gene has changed from `uniprot` to `mskcc`. See
+  the [Mutation Data Annotation Section](./mutation-data-transcript-annotation.md) for more details. To keep the old set
+  of default transcripts add the property `genomenexus.isoform_override_source=uniprot`
+  to [the properties file](https://docs.cbioportal.org/deployment/customization/portal.properties-reference/#properties).
 
 See the [v5.0.0 release notes](https://github.com/cBioPortal/cbioportal/releases/tag/v5.0.0) for more details.
 
 ## v3 -> v4
+
 - Introduces `logback` package for logging. If you don't have any custom log4j.properties file, no changes are necessary
-- Cleans up several old databases ([PR](https://github.com/cBioPortal/cbioportal/pull/9360)). In theory the migration should be seamless, since the docker container detects an old database version and migrates it automatically.
+- Cleans up several old databases ([PR](https://github.com/cBioPortal/cbioportal/pull/9360)). In theory the migration
+  should be seamless, since the docker container detects an old database version and migrates it automatically.
 
 See the [v4.0.0 release notes](https://github.com/cBioPortal/cbioportal/releases/tag/v4.0.0) for more details.
 
 ## v2 -> v3
-- Session service is now required to be set up. You can't run it without session service. The recommended way to run cBioPortal is to use the Docker Compose instructions.
+
+- Session service is now required to be set up. You can't run it without session service. The recommended way to run
+  cBioPortal is to use the Docker Compose instructions.
 
 ## v1 -> v2
-- Changes cBioPortal to a Single Page App (SPA) written in React, Mobx and bootstrap that uses a REST API. It shouldn't change anything for a deployer.
+
+- Changes cBioPortal to a Single Page App (SPA) written in React, Mobx and bootstrap that uses a REST API. It shouldn't
+  change anything for a deployer.u}(jz  (0fbbe48a256a8b7a3f2bd947c7d6470ca0cb8856j;{  <docs/deployment/customization/portal.properties-Reference.mdj={  modifiedj5{  Kj6{  Kj?{  Kj@{  https://github.com/cBioPortal/cbioportal/blob/de7243a46e32e39d89ba42ca1eb9237c2ef80ead/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdjB{  https://github.com/cBioPortal/cbioportal/raw/de7243a46e32e39d89ba42ca1eb9237c2ef80ead/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdjD{  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.md?ref=de7243a46e32e39d89ba42ca1eb9237c2ef80eadjF{  X  @@ -22,7 +22,7 @@ For example:
 jdbc:mysql://localhost:3306/cbiodb?zeroDateTimeBehavior=convertToNull&useSSL=false
 ```
 
-:warning: The fields `db.host` and `db.portal_db_name` are deprecated. It is recommended to configure the database connection using
+:warning: The fields `db.host` and `db.portal_db_name` and `db.use_ssl` are deprecated. It is recommended to configure the database connection using
 the `db.connection_string` instead.
 
 `db.tomcat_resource_name` is required in order to work with the tomcat database connection pool and should have the default value jdbc/cbioportal in order to work correctly with the your WAR file.ueu(9178c2989dbfbda052e8ece86ca65017dfa6a998}(sha(9178c2989dbfbda052e8ece86ca65017dfa6a998node_idEC_kwDOAe-hB9oAKDkxNzhjMjk4OWRiZmJkYTA1MmU4ZWNlODZjYTY1MDE3ZGZhNmE5OTgcommit}(author}(namealismanemaillisman.aaron@gmail.comdate2023-07-06T16:27:58Zu	committer}(jZ{  GitHubj\{  noreply@github.comj^{  2023-07-06T16:27:58Zumessage!Fix multiple gene filter (#10256)tree}(jR{  (77092513dfed2555e10fdd04ab936da71c308e63urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/77092513dfed2555e10fdd04ab936da71c308e63ujj{  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/9178c2989dbfbda052e8ece86ca65017dfa6a998
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkpuuOCRBK7hj4Ov3rIwAAkUYIADGf6dfsknPvlROS9tArwuWe
8Gx+Q8PX/gODnQLOK1XHsvpWj8lf9iFZdlVOrsFAeUQvE8PXJjpZqTFCYlKy1n4m
YmDEmMfqOhps1tSvDpGUPzeqmUQ+GW2pwZx52wPEJqLN+HecotigSZCvKiocov/A
jqW52SECOE1AWshETRc4D35TCBhoWtpBlYv82Kb4SJs9IWyS5HGHVGhn4YUBJLSf
HgVAOptEfecOtJNMiAnvIgAhuGkQAWcxzStww3/sAwcT6dG9sDi8wWwS7+U++cXI
OiYLA/w62ait5UXddYO4LkvLPgKVTR+4L2ObClFl/zLnsPByLfayxJEBygZ0DtA=
=6fAY
-----END PGP SIGNATURE-----
payloadtree 77092513dfed2555e10fdd04ab936da71c308e63
parent 34425b0c0b48de8ca46fa0ac6072656054308da0
author alisman <lisman.aaron@gmail.com> 1688660878 -0400
committer GitHub <noreply@github.com> 1688660878 -0400

Fix multiple gene filter (#10256)

uujj{  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9178c2989dbfbda052e8ece86ca65017dfa6a998html_urlXhttps://github.com/cBioPortal/cbioportal/commit/9178c2989dbfbda052e8ece86ca65017dfa6a998comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/9178c2989dbfbda052e8ece86ca65017dfa6a998/commentsjX{  }(loginalismanidJ jT{  MDQ6VXNlcjE4NjUyMQ==
avatar_url2https://avatars.githubusercontent.com/u/186521?v=4gravatar_idh5jj{  $https://api.github.com/users/alismanjx{  https://github.com/alisman
followers_url.https://api.github.com/users/alisman/followers
following_url;https://api.github.com/users/alisman/following{/other_user}	gists_url4https://api.github.com/users/alisman/gists{/gist_id}starred_url;https://api.github.com/users/alisman/starred{/owner}{/repo}subscriptions_url2https://api.github.com/users/alisman/subscriptionsorganizations_url)https://api.github.com/users/alisman/orgs	repos_url*https://api.github.com/users/alisman/repos
events_url5https://api.github.com/users/alisman/events{/privacy}received_events_url4https://api.github.com/users/alisman/received_eventstypeUser
site_adminuj`{  }(j}{  web-flowj{  J/jT{  MDQ6VXNlcjE5ODY0NDQ3j{  4https://avatars.githubusercontent.com/u/19864447?v=4j{  h5jj{  %https://api.github.com/users/web-flowjx{  https://github.com/web-flowj{  /https://api.github.com/users/web-flow/followersj{  <https://api.github.com/users/web-flow/following{/other_user}j{  5https://api.github.com/users/web-flow/gists{/gist_id}j{  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j{  3https://api.github.com/users/web-flow/subscriptionsj{  *https://api.github.com/users/web-flow/orgsj{  +https://api.github.com/users/web-flow/reposj{  6https://api.github.com/users/web-flow/events{/privacy}j{  5https://api.github.com/users/web-flow/received_eventsj{  Userj{  uparents]}(jR{  (34425b0c0b48de8ca46fa0ac6072656054308da0jj{  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/34425b0c0b48de8ca46fa0ac6072656054308da0jx{  Xhttps://github.com/cBioPortal/cbioportal/commit/34425b0c0b48de8ca46fa0ac6072656054308da0uastats}(totalKD	additionsK:	deletionsK
ufiles](}(jR{  (e16ee120811499bece7190c473ce31aac5cc8696filenametpersistence/persistence-mybatis/src/main/resources/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMapper.xmlstatusmodifiedj{  Kj{  KchangesK	blob_urlhttps://github.com/cBioPortal/cbioportal/blob/9178c2989dbfbda052e8ece86ca65017dfa6a998/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/9178c2989dbfbda052e8ece86ca65017dfa6a998/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xmlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Fmain%2Fresources%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMapper.xml?ref=9178c2989dbfbda052e8ece86ca65017dfa6a998patchX*  @@ -126,7 +126,7 @@
                     #{sampleIdentifier.getStudyId()}_#{sampleIdentifier.getSampleId()}
                 </foreach>
             </if>
-            <if test="studyViewFilter.geneFilters != null and !geneFilters.isEmpty()">
+            <if test="studyViewFilter.geneFilters != null and !studyViewFilter.geneFilters.isEmpty()">
                 INTERSECT
                 SELECT sample_unique_id
                 FROM genomic_event
@@ -137,12 +137,13 @@
                             <foreach item="molecularProfileId" collection="profileGroup.getMolecularProfileIds()" open="(" separator="," close=")">
                                 #{molecularProfileId}
                             </foreach>
-                            AND hugo_gene_symbol IN
-                            <foreach item="geneFilterQueryList" collection="profileGroup.getGeneQueries()">
-                                <foreach item="geneFilterQuery" collection="geneFilterQueryList" open="(" separator="," close=")">
+                            AND hugo_gene_symbol IN (
+                            <foreach item="geneFilterQueryList" collection="profileGroup.getGeneQueries()" separator=",">
+                                <foreach item="geneFilterQuery" collection="geneFilterQueryList" separator=",">
                                     #{geneFilterQuery.hugoGeneSymbol}
                                 </foreach>
                             </foreach>
+                            )
                         </foreach>
                     </trim>
                 </where>u}(jR{  (fe72ed27380dc45cf56f07c11cc0fce91da7cd43j{  persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatiscolumnstore/StudyViewMyBatisRepositoryTest.javaj{  modifiedj{  K5j{  Kj{  K;j{  https://github.com/cBioPortal/cbioportal/blob/9178c2989dbfbda052e8ece86ca65017dfa6a998/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaj{  https://github.com/cBioPortal/cbioportal/raw/9178c2989dbfbda052e8ece86ca65017dfa6a998/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.javaj{  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatiscolumnstore%2FStudyViewMyBatisRepositoryTest.java?ref=9178c2989dbfbda052e8ece86ca65017dfa6a998j{  X:  @@ -3,12 +3,10 @@
 import org.cbioportal.model.AlterationCountByGene;
 import org.cbioportal.model.ClinicalDataCount;
 import org.cbioportal.model.Sample;
+import org.cbioportal.model.util.Select;
 import org.cbioportal.persistence.enums.ClinicalAttributeDataSource;
 import org.cbioportal.persistence.enums.ClinicalAttributeDataType;
-import org.cbioportal.webparam.CategorizedClinicalDataCountFilter;
-import org.cbioportal.webparam.ClinicalDataFilter;
-import org.cbioportal.webparam.DataFilterValue;
-import org.cbioportal.webparam.StudyViewFilter;
+import org.cbioportal.webparam.*;
 import org.junit.Assert;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -19,13 +17,12 @@
 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 
 import java.math.BigDecimal;
+import java.util.*;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.function.Function;
 import java.util.stream.Collectors;
-import java.util.ArrayList;
-import java.util.List;
 
 @RunWith(SpringJUnit4ClassRunner.class)
 @ContextConfiguration("/testContextDatabaseClickhouse.xml")
@@ -63,6 +60,24 @@ public void getMutatedGenes() {
         Assert.assertEquals(2, mutations.size());
     }
     
+    @Test
+    public void getMutatedGenesFiltered() {
+        StudyViewFilter studyViewFilter = generateStudyViewFilter(new String[]{"msk_impact_2017"}, null);
+
+        List<StudyViewGeneFilter> studyViewGeneFilters = new ArrayList<>();
+        StudyViewGeneFilter mutationStudyViewGeneFilter = new StudyViewGeneFilter();
+        mutationStudyViewGeneFilter.setMolecularProfileIds(new HashSet<>(Arrays.asList("msk_impact_2017_mutations")));
+        
+        mutationStudyViewGeneFilter.setGeneQueries(getFilters.apply("moo"));
+
+        studyViewGeneFilters.add(mutationStudyViewGeneFilter);
+        
+        studyViewFilter.setGeneFilters(studyViewGeneFilters);
+        
+        List<AlterationCountByGene> mutations = studyViewMyBatisRepository.getMutatedGenes(studyViewFilter, CategorizedClinicalDataCountFilter.getBuilder().build());
+        Assert.assertEquals(414, mutations.size());
+    }
+    
     private StudyViewFilter generateStudyViewFilter(
         String[] studyIds,
         List<ClinicalDataFilter> clinicalDataFilters
@@ -98,6 +113,38 @@ private ClinicalDataFilter generateClinicalDataFilter(String attributeId, String
         return dataFilterValue;
     };
     
+    private final Function<String,List<List<GeneFilterQuery>>> getFilters = v -> {
+
+        boolean includeDriver = true;
+        boolean includeVUS = true;
+        boolean includeUnknownOncogenicity = true;
+        boolean includeGermline = true;
+        boolean includeSomatic = true;
+        boolean includeUnknownStatus = true;
+        Select<String> selectedTiers = Select.none();
+        boolean includeUnknownTier = true;
+
+        GeneFilterQuery geneFilterQuery1 = new GeneFilterQuery("SMARCD1", null,
+            null, includeDriver, includeVUS, includeUnknownOncogenicity,  selectedTiers, includeUnknownTier,
+            includeGermline, includeSomatic, includeUnknownStatus);
+
+        GeneFilterQuery geneFilterQuery2 = new GeneFilterQuery("TP53", null,
+            null, includeDriver, includeVUS, includeUnknownOncogenicity,  selectedTiers, includeUnknownTier,
+            includeGermline, includeSomatic, includeUnknownStatus);
+
+        List<List<GeneFilterQuery>> q1 = new ArrayList<>();
+        List<GeneFilterQuery> q2 = new ArrayList<>();
+        List<GeneFilterQuery> q3 = new ArrayList<>();
+        
+        q2.add(geneFilterQuery1);
+        q3.add(geneFilterQuery2);
+        q1.add(q2);
+        q1.add(q3);
+        return q1;
+        
+    };
+    
+    
     private final Function<String, DataFilterValue> mapNumericalValues = v -> {
         DataFilterValue dataFilterValue = new DataFilterValue();
 ueu(1777fa24898825859c6ea151fa3b9260bbdf4743}(sha(1777fa24898825859c6ea151fa3b9260bbdf4743node_idEC_kwDOAe-hB9oAKDE3NzdmYTI0ODk4ODI1ODU5YzZlYTE1MWZhM2I5MjYwYmJkZjQ3NDMcommit}(author}(nameKarthikemailkalletlakarthik@gmail.comdate2023-08-08T13:42:29Zu	committer}(j{  Karthikj{  kalletlakarthik@gmail.comj{  2023-08-08T13:42:29Zumessage$Update StudyViewServiceImplTest.javatree}(j{  (2b722bdcf96b8757339064576a425444139303a5urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/2b722bdcf96b8757339064576a425444139303a5uj{  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/1777fa24898825859c6ea151fa3b9260bbdf4743
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj{  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/1777fa24898825859c6ea151fa3b9260bbdf4743html_urlXhttps://github.com/cBioPortal/cbioportal/commit/1777fa24898825859c6ea151fa3b9260bbdf4743comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/1777fa24898825859c6ea151fa3b9260bbdf4743/commentsj{  }(login	kalletlakidJƴ j{  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5j{  &https://api.github.com/users/kalletlakj{  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminuj{  }(j{  	kalletlakj{  Jƴ j{  MDQ6VXNlcjEyOTU2ODcwj{  4https://avatars.githubusercontent.com/u/12956870?v=4j |  h5j{  &https://api.github.com/users/kalletlakj{  https://github.com/kalletlakj|  0https://api.github.com/users/kalletlak/followersj|  =https://api.github.com/users/kalletlak/following{/other_user}j|  6https://api.github.com/users/kalletlak/gists{/gist_id}j	|  =https://api.github.com/users/kalletlak/starred{/owner}{/repo}j|  4https://api.github.com/users/kalletlak/subscriptionsj
|  +https://api.github.com/users/kalletlak/orgsj|  ,https://api.github.com/users/kalletlak/reposj|  7https://api.github.com/users/kalletlak/events{/privacy}j|  6https://api.github.com/users/kalletlak/received_eventsj|  Userj|  uparents]}(j{  (5b9bafaa11d96f397f91f3daf93fd8c39b0b84b3j{  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/5b9bafaa11d96f397f91f3daf93fd8c39b0b84b3j{  Xhttps://github.com/cBioPortal/cbioportal/commit/5b9bafaa11d96f397f91f3daf93fd8c39b0b84b3uastats}(totalK	additionsK	deletionsKufiles]}(j{  (801ab8afebfc5a1dbd192628acb1791f70a2338afilenameOservice/src/test/java/org/cbioportal/service/impl/StudyViewServiceImplTest.javastatusmodifiedj1|  Kj2|  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/1777fa24898825859c6ea151fa3b9260bbdf4743/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/1777fa24898825859c6ea151fa3b9260bbdf4743/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.java?ref=1777fa24898825859c6ea151fa3b9260bbdf4743patchX  @@ -318,7 +318,7 @@ public void getCNAAlterationCountByGeneSpecific() throws Exception {
             .thenReturn(geneMolecularData);
         
         List<GenomicDataCountItem> result = studyViewService.getCNAAlterationCountsByGeneSpecific(studyIds, sampleIds, genomicDataFilters);
-        Assert.assertEquals(2L, result.size());
+        Assert.assertEquals(2, result.size());
         Assert.assertEquals(BaseServiceImplTest.HUGO_GENE_SYMBOL_1, result.get(0).getHugoGeneSymbol());
         Assert.assertEquals(BaseServiceImplTest.PROFILE_TYPE_1, result.get(0).getProfileType());
         Assert.assertEquals(2, result.get(0).getCounts().get(0).getCount().intValue());uau(70f459760dd6a22b794a47b2d33eeea2b35587e6}(sha(70f459760dd6a22b794a47b2d33eeea2b35587e6node_idEC_kwDOAe-hB9oAKDcwZjQ1OTc2MGRkNmEyMmI3OTRhNDdiMmQzM2VlZWEyYjM1NTg3ZTYcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-01T13:06:59Zu	committer}(jN|  GitHubjP|  noreply@github.comjR|  2023-08-01T13:06:59ZumessageSMerge pull request #10288 from gblaih/two-sided-fisher-test

Two sided fishers testtree}(jF|  (c2a3bd3f6860db4a0e01ff9ff004e8ced28e353durlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c2a3bd3f6860db4a0e01ff9ff004e8ced28e353duj^|  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/70f459760dd6a22b794a47b2d33eeea2b35587e6
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkyQNzCRBK7hj4Ov3rIwAApOcIAI6UKpRpX0FllaqMHyuWCo5K
u1BVvXv0uZlRLzLKjy2lvONNT71ylnH8axnJwNgYiAO+2RRmjbLTs2IWcDs/jdr9
UTCfAYh5Ub+7rZeZkCveEL+95qrD8ElsoECjscNVqy5itVhTES/7UQBbph6e2EBY
6A6w4Yc4BhElgohVz1AK6QnmFTkaHc0a0YEn8qL5J1seqwtDNTtgCUN0ePDCyap7
aX79RtxZjU6pKv70pHAXOd05Al25fctnlYTCjApeuHWKxigD4RikMcOYa38SZ4Y2
O16e8JSTFcW4CmNQL3aAbzJXIsN7NthvHx0udcFlkD7Cq3IWNpFvxHbjm1ABLog=
=Sl9W
-----END PGP SIGNATURE-----
payloadXl  tree c2a3bd3f6860db4a0e01ff9ff004e8ced28e353d
parent 0ed47592726452a87ac27cce7fef0cdce7719ada
parent 0425e7ba3d3957eda2ac70de37881e4c7bf20177
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1690895219 -0400
committer GitHub <noreply@github.com> 1690895219 -0400

Merge pull request #10288 from gblaih/two-sided-fisher-test

Two sided fishers testuuj^|  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/70f459760dd6a22b794a47b2d33eeea2b35587e6html_urlXhttps://github.com/cBioPortal/cbioportal/commit/70f459760dd6a22b794a47b2d33eeea2b35587e6comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/70f459760dd6a22b794a47b2d33eeea2b35587e6/commentsjL|  }(login
dippindotsidJtO jH|  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j^|  'https://api.github.com/users/dippindotsjl|  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminujT|  }(jq|  web-flowjs|  J/jH|  MDQ6VXNlcjE5ODY0NDQ3ju|  4https://avatars.githubusercontent.com/u/19864447?v=4jw|  h5j^|  %https://api.github.com/users/web-flowjl|  https://github.com/web-flowjz|  /https://api.github.com/users/web-flow/followersj||  <https://api.github.com/users/web-flow/following{/other_user}j~|  5https://api.github.com/users/web-flow/gists{/gist_id}j|  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j|  3https://api.github.com/users/web-flow/subscriptionsj|  *https://api.github.com/users/web-flow/orgsj|  +https://api.github.com/users/web-flow/reposj|  6https://api.github.com/users/web-flow/events{/privacy}j|  5https://api.github.com/users/web-flow/received_eventsj|  Userj|  uparents](}(jF|  (0ed47592726452a87ac27cce7fef0cdce7719adaj^|  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/0ed47592726452a87ac27cce7fef0cdce7719adajl|  Xhttps://github.com/cBioPortal/cbioportal/commit/0ed47592726452a87ac27cce7fef0cdce7719adau}(jF|  (0425e7ba3d3957eda2ac70de37881e4c7bf20177j^|  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/0425e7ba3d3957eda2ac70de37881e4c7bf20177jl|  Xhttps://github.com/cBioPortal/cbioportal/commit/0425e7ba3d3957eda2ac70de37881e4c7bf20177uestats}(totalKM	additionsK>	deletionsKufiles](}(jF|  (16073e48ff0caa8feab78e54ecfb5919ca20eb91filenameIcore/src/main/java/org/mskcc/cbio/portal/servlet/CalcFisherExactTest.javastatusmodifiedj|  Kj|  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/70f459760dd6a22b794a47b2d33eeea2b35587e6/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/70f459760dd6a22b794a47b2d33eeea2b35587e6/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fservlet%2FCalcFisherExactTest.java?ref=70f459760dd6a22b794a47b2d33eeea2b35587e6patchX'  @@ -44,13 +44,13 @@
 import org.mskcc.cbio.portal.stats.FisherExact;
 
 /**
- * Calculate the cumulative (one-tail) p-value out of fisher exact test
+ * Calculate the cumulative (two-tail) p-value out of fisher exact test
  * 
  * @param a a, b, c, d are the four cells in a 2x2 matrix
  * @param b
  * @param c
  * @param d
- * @return one-tailed P-value (right or left, whichever is smallest)
+ * @return two-tailed P-value (right or left, whichever is smallest)
  * 
  */
 public class CalcFisherExactTest extends HttpServlet  {
@@ -86,7 +86,7 @@ protected void doPost(HttpServletRequest httpServletRequest,
                 int c = Integer.parseInt(dataSet.split(" ")[2]);
                 int d = Integer.parseInt(dataSet.split(" ")[3]);    
                 FisherExact fisher = new FisherExact(a + b + c + d);
-                double pValue = fisher.getCumlativeP(a, b, c, d);
+                double pValue = fisher.getTwoTailedP(a, b, c, d);
                 result = result.concat(String.valueOf(pValue) + " ");                
             }
         }u}(jF|  (92f8f83955924145d906564446465c5750ab3d2fj|  =core/src/main/java/org/mskcc/cbio/portal/stats/OddsRatio.javaj|  modifiedj|  Kj|  Kj|  Kj|  https://github.com/cBioPortal/cbioportal/blob/70f459760dd6a22b794a47b2d33eeea2b35587e6/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.javaj|  https://github.com/cBioPortal/cbioportal/raw/70f459760dd6a22b794a47b2d33eeea2b35587e6/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.javaj|  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FOddsRatio.java?ref=70f459760dd6a22b794a47b2d33eeea2b35587e6j|  X  @@ -87,7 +87,7 @@ public OddsRatio(ProfileDataSummary pDataSummary, String geneA, String geneB) {
 
         oddsRatio = ((double) (a * d)) / ((double) (b * c));
         FisherExact fisher = new FisherExact(a + b + c + d);
-        pValue = fisher.getCumlativeP(a, b, c, d);
+        pValue = fisher.getTwoTailedP(a, b, c, d);
         lowerConfidenceInterval = Math.exp(Math.log(oddsRatio) - 1.96 * (Math.sqrt(1 / (double) a
                 + 1 / (double) b + 1 / (double) c + 1 / (double) d)));
         upperConfidenceInterval = Math.exp(Math.log(oddsRatio) + 1.96 * (Math.sqrt(1 / (double) a
@@ -103,7 +103,7 @@ public double getOddsRatio() {
         return oddsRatio;
     }
 
-    public double getCumulativeP() {
+    public double getTwoTailedP() {
         return pValue;
     }
 u}(jF|  (c1c4adac53791a81208af5b00182bdaa40e6f0fej|  Jcore/src/main/java/org/mskcc/cbio/portal/util/EnrichmentsAnalysisUtil.javaj|  modifiedj|  Kj|  Kj|  Kj|  https://github.com/cBioPortal/cbioportal/blob/70f459760dd6a22b794a47b2d33eeea2b35587e6/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FEnrichmentsAnalysisUtil.javaj|  https://github.com/cBioPortal/cbioportal/raw/70f459760dd6a22b794a47b2d33eeea2b35587e6/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FEnrichmentsAnalysisUtil.javaj|  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FEnrichmentsAnalysisUtil.java?ref=70f459760dd6a22b794a47b2d33eeea2b35587e6j|  X  @@ -652,7 +652,7 @@ private double runFisherExactTest(HashMap<Integer, String> singleGeneCaseValueMa
             }
         }
         FisherExact fisher = new FisherExact(a + b + c + d);
-        return fisher.getCumlativeP(a, b, c, d);
+        return fisher.getTwoTailedP(a, b, c, d);
     }
 
     private String getCytoband(int geneticEntityId, String geneticProfileStableId) {u}(jF|  (06377765dfed89750dc17672a9cb7f4cfefca759j|  Ccore/src/test/java/org/mskcc/cbio/portal/stats/TestFisherExact.javaj|  modifiedj|  Kj|  Kj|  Kj|  https://github.com/cBioPortal/cbioportal/blob/70f459760dd6a22b794a47b2d33eeea2b35587e6/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestFisherExact.javaj|  https://github.com/cBioPortal/cbioportal/raw/70f459760dd6a22b794a47b2d33eeea2b35587e6/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestFisherExact.javaj|  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestFisherExact.java?ref=70f459760dd6a22b794a47b2d33eeea2b35587e6j|  XO  @@ -39,7 +39,7 @@ public class TestFisherExact extends TestCase {
 
     public void testFisherExact() {
         FisherExact fisher = new FisherExact(43 + 2 + 17 + 7);
-        double p = fisher.getCumlativeP(43, 2, 17, 7);
+        double p = fisher.getTwoTailedP(43, 2, 17, 7);
         assertEquals(0.006653, p, 0.00001);
     }
 }u}(jF|  (108fdb5785e60048a79f3c23d5bfb4f01dc550e2j|  Acore/src/test/java/org/mskcc/cbio/portal/stats/TestOddsRatio.javaj|  modifiedj|  Kj|  Kj|  Kj|  https://github.com/cBioPortal/cbioportal/blob/70f459760dd6a22b794a47b2d33eeea2b35587e6/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.javaj|  https://github.com/cBioPortal/cbioportal/raw/70f459760dd6a22b794a47b2d33eeea2b35587e6/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.javaj|  https://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Ftest%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Fstats%2FTestOddsRatio.java?ref=70f459760dd6a22b794a47b2d33eeea2b35587e6j|  X  @@ -70,9 +70,9 @@ public void testFisherExact() throws IOException {
 
         OddsRatio oddsRatio = new OddsRatio(pDataSummary, "BRCA1", "BRCA2");
         double oddsRatioValue = oddsRatio.getOddsRatio();
-        double p = oddsRatio.getCumulativeP();
+        double p = oddsRatio.getTwoTailedP();
         assertEquals(0.16666, oddsRatioValue, 0.0001);
-        assertEquals(0.0849, p, 0.0001);
+        assertEquals(0.1698, p, 0.0001);
         //System.out.println (oddsRatio.getRCommand());
     }
 }u}(jF|  (ea7d3d653e00ae80f179717fa6f02d7409dfba19j|  docs/user-guide/faq.mdj|  modifiedj|  Kj|  Kj|  Kj|  qhttps://github.com/cBioPortal/cbioportal/blob/70f459760dd6a22b794a47b2d33eeea2b35587e6/docs%2Fuser-guide%2Ffaq.mdj|  phttps://github.com/cBioPortal/cbioportal/raw/70f459760dd6a22b794a47b2d33eeea2b35587e6/docs%2Fuser-guide%2Ffaq.mdj|  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fuser-guide%2Ffaq.md?ref=70f459760dd6a22b794a47b2d33eeea2b35587e6j|  X  @@ -146,7 +146,7 @@ Group Comparison is a suite of analysis features which allows a user to compare
 - Other tabs
     - 2 groups
         - Continuous data: one-sided t-test
-        - Categorical data: one-sided Fisher's exact test
+        - Categorical data: two-sided Fisher's exact test
     - 3 or more groups
         - Continuous data: one-way ANOVA
         - Categorical data: Chi-squared testu}(jF|  (3ea53acf77ec5c9fdaefb19fc9864e431e4b655ej|  upersistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/AlterationMyBatisRepositoryTest.javaj|  modifiedj|  Kj|  Kj|  Kj|  https://github.com/cBioPortal/cbioportal/blob/70f459760dd6a22b794a47b2d33eeea2b35587e6/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.javaj|  https://github.com/cBioPortal/cbioportal/raw/70f459760dd6a22b794a47b2d33eeea2b35587e6/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.javaj|  https://api.github.com/repos/cBioPortal/cbioportal/contents/persistence%2Fpersistence-mybatis%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fpersistence%2Fmybatis%2FAlterationMyBatisRepositoryTest.java?ref=70f459760dd6a22b794a47b2d33eeea2b35587e6j|  X  @@ -1034,7 +1034,7 @@ public void getPatientStructuralVariantCountIncludeCustomDriverAnnotationsInclud
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        alterationFilter.setSelectedTiers(Select.byValues(List.of("Class 2")));
+        alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Class 2")));
         alterationFilter.setIncludeUnknownTier(true);
         List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,
@@ -1049,7 +1049,7 @@ public void getPatientStructuralVariantCountIncludeCustomDriverAnnotationsExclud
         alterationFilter.setStructuralVariants(true);
         alterationFilter.setMutationTypeSelect(Select.none());
         alterationFilter.setCnaTypeSelect(Select.none());
-        alterationFilter.setSelectedTiers(Select.byValues(List.of("Class 2")));
+        alterationFilter.setSelectedTiers(Select.byValues(Arrays.asList("Class 2")));
         alterationFilter.setIncludeUnknownTier(false);
         List<AlterationCountByGene> result = alterationMyBatisRepository.getPatientAlterationGeneCounts(
             svPatientIdToProfileId,u}(jF|  (8113cc63f7380d8cff4cb9026990fc7050114c95j|  Oservice/src/main/java/org/cbioportal/service/util/AlterationEnrichmentUtil.javaj|  modifiedj|  Kj|  Kj|  Kj|  https://github.com/cBioPortal/cbioportal/blob/70f459760dd6a22b794a47b2d33eeea2b35587e6/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javaj|  https://github.com/cBioPortal/cbioportal/raw/70f459760dd6a22b794a47b2d33eeea2b35587e6/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.javaj|  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtil.java?ref=70f459760dd6a22b794a47b2d33eeea2b35587e6j|  X  @@ -132,7 +132,7 @@ public List<AlterationEnrichment> createAlterationEnrichments(Map<String, Pair<L
                         int alteredOnlyInQueryGenesCount = counts.get(0).getProfiledCount()
                             - counts.get(0).getAlteredCount();
 
-                        pValue = fisherExactTestCalculator.getCumulativePValue(alteredInNoneCount,
+                        pValue = fisherExactTestCalculator.getTwoTailedPValue(alteredInNoneCount,
                             counts.get(1).getAlteredCount(), alteredOnlyInQueryGenesCount,
                             counts.get(0).getAlteredCount());
                     } else {u}(jF|  (ed94cad2b5bfc09610d8c17eae97a74684a109ddj|  Pservice/src/main/java/org/cbioportal/service/util/FisherExactTestCalculator.javaj|  modifiedj|  K/j|  K j|  K/j|  https://github.com/cBioPortal/cbioportal/blob/70f459760dd6a22b794a47b2d33eeea2b35587e6/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javaj|  https://github.com/cBioPortal/cbioportal/raw/70f459760dd6a22b794a47b2d33eeea2b35587e6/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.javaj|  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FFisherExactTestCalculator.java?ref=70f459760dd6a22b794a47b2d33eeea2b35587e6j|  X(  @@ -40,4 +40,51 @@ public double getCumulativePValue(int a, int b, int c, int d) {
         }
         return p;
     }
+
+    public double getTwoTailedPValue(int a, int b, int c, int d) {
+        
+        int min, i;
+        int n = a + b + c + d;
+        double p = 0;
+        double[] f = new double[n + 1];
+        f[0] = 0.0;
+
+        for (int j = 1; j <= n; j++) {
+            f[j] = f[j - 1] + Math.log(j);
+        }
+
+        double baseP = getPValue(a, b, c, d, f);
+//         in order for a table under consideration to have its p-value included
+//         in the final result, it must have a p-value less than the baseP, i.e.
+//         Fisher's exact test computes the probability, given the observed marginal
+//         frequencies, of obtaining exactly the frequencies observed and any configuration more extreme.
+//         By "more extreme," we mean any configuration (given observed marginals) with a smaller probability of
+//         occurrence in the same direction (one-tailed) or in both directions (two-tailed).
+        
+        int initialA = a, initialB = b, initialC = c, initialD = d;
+        p += baseP;
+        
+        min = (c < b) ? c : b;
+        for (i = 0; i < min; i++) {
+            double tempP = getPValue(++a, --b, --c, ++d, f);
+            if (tempP <= baseP) {
+                p += tempP;
+            }
+        }
+
+        // reset the values to their original so we can repeat this process for the other side
+        a = initialA;
+        b = initialB;
+        c = initialC;
+        d = initialD;
+        
+        min = (a < d) ? a : d;
+        for (i = 0; i < min; i++) {
+            double pTemp = getPValue(--a, ++b, ++c, --d, f);
+            if (pTemp <= baseP) {
+                p += pTemp;
+            }
+        }
+        return p;
+    }
 }u}(jF|  (7020d01ef0eaf51b229e44889e165bd1a5b7955bj|  Sservice/src/test/java/org/cbioportal/service/util/AlterationEnrichmentUtilTest.javaj|  modifiedj|  Kj|  Kj|  Kj|  https://github.com/cBioPortal/cbioportal/blob/70f459760dd6a22b794a47b2d33eeea2b35587e6/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.javaj|  https://github.com/cBioPortal/cbioportal/raw/70f459760dd6a22b794a47b2d33eeea2b35587e6/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.javaj|  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Futil%2FAlterationEnrichmentUtilTest.java?ref=70f459760dd6a22b794a47b2d33eeea2b35587e6j|  X  @@ -101,8 +101,8 @@ public void createAlterationEnrichments() throws Exception {
 
         // START: for 2 groups
 
-        Mockito.when(fisherExactTestCalculator.getCumulativePValue(1, 1, 2, 0)).thenReturn(1.0);
-        Mockito.when(fisherExactTestCalculator.getCumulativePValue(2, 0, 0, 2)).thenReturn(0.3);
+        Mockito.when(fisherExactTestCalculator.getTwoTailedPValue(1, 1, 2, 0)).thenReturn(1.0);
+        Mockito.when(fisherExactTestCalculator.getTwoTailedPValue(2, 0, 0, 2)).thenReturn(0.3);
 
         List<AlterationEnrichment> result = alterationEnrichmentUtil.createAlterationEnrichments(
                 mutationCountsbyEntrezGeneIdAndGroup);ueu(9fb4bcd3b47f54bb7f4544c4a8f8356df38e60e0}(sha(9fb4bcd3b47f54bb7f4544c4a8f8356df38e60e0node_idEC_kwDOAe-hB9oAKDlmYjRiY2QzYjQ3ZjU0YmI3ZjQ1NDRjNGE4ZjgzNTZkZjM4ZTYwZTAcommit}(author}(namesbabyanushaemailsatravab@mskcc.orgdate2023-08-15T22:26:00Zu	committer}(j}  sbabyanushaj}  satravab@mskcc.orgj}  2023-08-15T22:26:00ZumessageWMerge branch 'master' of github.com:cBioPortal/cbioportal into Aug-15-2023-news-releasetree}(j	}  (d442d14dabedb39209fde38941b89bf35b515d48urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/d442d14dabedb39209fde38941b89bf35b515d48uj!}  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/9fb4bcd3b47f54bb7f4544c4a8f8356df38e60e0
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj!}  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9fb4bcd3b47f54bb7f4544c4a8f8356df38e60e0html_urlXhttps://github.com/cBioPortal/cbioportal/commit/9fb4bcd3b47f54bb7f4544c4a8f8356df38e60e0comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/9fb4bcd3b47f54bb7f4544c4a8f8356df38e60e0/commentsj}  }(loginsbabyanushaidJ`_j}  MDQ6VXNlcjYxNDMxNjQ4
avatar_url4https://avatars.githubusercontent.com/u/61431648?v=4gravatar_idh5j!}  (https://api.github.com/users/sbabyanushaj-}  https://github.com/sbabyanusha
followers_url2https://api.github.com/users/sbabyanusha/followers
following_url?https://api.github.com/users/sbabyanusha/following{/other_user}	gists_url8https://api.github.com/users/sbabyanusha/gists{/gist_id}starred_url?https://api.github.com/users/sbabyanusha/starred{/owner}{/repo}subscriptions_url6https://api.github.com/users/sbabyanusha/subscriptionsorganizations_url-https://api.github.com/users/sbabyanusha/orgs	repos_url.https://api.github.com/users/sbabyanusha/repos
events_url9https://api.github.com/users/sbabyanusha/events{/privacy}received_events_url8https://api.github.com/users/sbabyanusha/received_eventstypeUser
site_adminuj}  }(j2}  sbabyanushaj4}  J`_j}  MDQ6VXNlcjYxNDMxNjQ4j6}  4https://avatars.githubusercontent.com/u/61431648?v=4j8}  h5j!}  (https://api.github.com/users/sbabyanushaj-}  https://github.com/sbabyanushaj;}  2https://api.github.com/users/sbabyanusha/followersj=}  ?https://api.github.com/users/sbabyanusha/following{/other_user}j?}  8https://api.github.com/users/sbabyanusha/gists{/gist_id}jA}  ?https://api.github.com/users/sbabyanusha/starred{/owner}{/repo}jC}  6https://api.github.com/users/sbabyanusha/subscriptionsjE}  -https://api.github.com/users/sbabyanusha/orgsjG}  .https://api.github.com/users/sbabyanusha/reposjI}  9https://api.github.com/users/sbabyanusha/events{/privacy}jK}  8https://api.github.com/users/sbabyanusha/received_eventsjM}  UserjO}  uparents](}(j	}  (020655dc919769a707771284ae948a976b410068j!}  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/020655dc919769a707771284ae948a976b410068j-}  Xhttps://github.com/cBioPortal/cbioportal/commit/020655dc919769a707771284ae948a976b410068u}(j	}  (e9cbd82f07ef7eb4cfb2054e10890ef6b91e666ej!}  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/e9cbd82f07ef7eb4cfb2054e10890ef6b91e666ej-}  Xhttps://github.com/cBioPortal/cbioportal/commit/e9cbd82f07ef7eb4cfb2054e10890ef6b91e666euestats}(totalK4	additionsK3	deletionsKufiles](}(j	}  (ceb4c8b79341f873df9e2fb7bb25e0457b947f93filename!.github/workflows/label-check.ymlstatusaddedjm}  K2jn}  K changesK2blob_url|https://github.com/cBioPortal/cbioportal/blob/9fb4bcd3b47f54bb7f4544c4a8f8356df38e60e0/.github%2Fworkflows%2Flabel-check.ymlraw_url{https://github.com/cBioPortal/cbioportal/raw/9fb4bcd3b47f54bb7f4544c4a8f8356df38e60e0/.github%2Fworkflows%2Flabel-check.ymlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/.github%2Fworkflows%2Flabel-check.yml?ref=9fb4bcd3b47f54bb7f4544c4a8f8356df38e60e0patchX  @@ -0,0 +1,50 @@
+# This GitHub Actions workflow is designed to automatically check pull requests in the cBioPortal repository for valid labels before they can be merged.
+# The workflow ensures that pull requests have labels that are defined in the .github/release-drafter.yml file's "categories" section.
+# If a pull request lacks a valid label, the workflow will fail, preventing the merge until valid labels are applied.
+name: Label Check
+
+on:
+  pull_request:
+    types:
+      - opened
+      - synchronize
+
+jobs:
+  label-check:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check PR Labels
+        uses: actions/checkout@v2
+
+      - name: Install dependencies
+        run: |
+          wget https://github.com/mikefarah/yq/releases/download/v4.34.2/yq_linux_amd64 -O /usr/local/bin/yq
+          chmod +x /usr/local/bin/yq
+      - name: Get Labels from release-drafter.yml
+        id: get_labels
+        run: |
+          curl -s "https://raw.githubusercontent.com/cBioPortal/cbioportal/master/.github/release-drafter.yml" | \
+            yq -r '.categories[].labels[]' > labels.txt
+      - name: Check Labels
+        id: check_labels
+        run: |
+          PR_NUMBER=$(jq -r ".number" $GITHUB_EVENT_PATH)
+          PR_LABELS=$(curl -s "https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER" | \
+                       jq -r '.labels[].name')
+          mapfile -t AVAILABLE_LABELS < labels.txt
+          for LABEL in ${PR_LABELS[@]}; do
+            if [[ "$LABEL" == "skip-changelog" ]]; then
+              echo "PR contains a valid label: skip-changelog"
+              exit 0  # Valid label found, exit successfully
+            fi
+            for AVAILABLE_LABEL in "${AVAILABLE_LABELS[@]}"; do
+              if [[ "$AVAILABLE_LABEL" == "$LABEL" ]]; then
+                echo "PR contains a valid label: $LABEL"
+                exit 0  # Valid label found, exit successfully
+              fi
+            done
+          done
+          echo "No valid label found on PR."
+          echo "Available label options from release-drafter.yml:"
+          cat labels.txt
+          exit 1  # No valid label found, exit with an erroru}(j	}  (d2c8c98c3a8ad67862705fdc52f754f44cec26f8js}  pom.xmlju}  modifiedjm}  Kjn}  Kjw}  Kjx}  ^https://github.com/cBioPortal/cbioportal/blob/9fb4bcd3b47f54bb7f4544c4a8f8356df38e60e0/pom.xmljz}  ]https://github.com/cBioPortal/cbioportal/raw/9fb4bcd3b47f54bb7f4544c4a8f8356df38e60e0/pom.xmlj|}  phttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=9fb4bcd3b47f54bb7f4544c4a8f8356df38e60e0j~}  XY  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.17</frontend.version>
+    <frontend.version>v5.3.18</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>ueu(4b90204f32aa8c76bfa9c1520a22b74a5f537865}(sha(4b90204f32aa8c76bfa9c1520a22b74a5f537865node_idEC_kwDOAe-hB9oAKDRiOTAyMDRmMzJhYThjNzZiZmE5YzE1MjBhMjJiNzRhNWY1Mzc4NjUcommit}(author}(namesbabyanushaemailsatravab@mskcc.orgdate2023-08-14T20:58:12Zu	committer}(j}  sbabyanushaj}  satravab@mskcc.orgj}  2023-08-14T20:58:12ZumessageUpdate News.mdtree}(j}  (80e5f9846e2a84af22429b5d61a155e2d43256d9urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/80e5f9846e2a84af22429b5d61a155e2d43256d9uj}  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/4b90204f32aa8c76bfa9c1520a22b74a5f537865
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj}  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4b90204f32aa8c76bfa9c1520a22b74a5f537865html_urlXhttps://github.com/cBioPortal/cbioportal/commit/4b90204f32aa8c76bfa9c1520a22b74a5f537865comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/4b90204f32aa8c76bfa9c1520a22b74a5f537865/commentsj}  }(loginsbabyanushaidJ`_j}  MDQ6VXNlcjYxNDMxNjQ4
avatar_url4https://avatars.githubusercontent.com/u/61431648?v=4gravatar_idh5j}  (https://api.github.com/users/sbabyanushaj}  https://github.com/sbabyanusha
followers_url2https://api.github.com/users/sbabyanusha/followers
following_url?https://api.github.com/users/sbabyanusha/following{/other_user}	gists_url8https://api.github.com/users/sbabyanusha/gists{/gist_id}starred_url?https://api.github.com/users/sbabyanusha/starred{/owner}{/repo}subscriptions_url6https://api.github.com/users/sbabyanusha/subscriptionsorganizations_url-https://api.github.com/users/sbabyanusha/orgs	repos_url.https://api.github.com/users/sbabyanusha/repos
events_url9https://api.github.com/users/sbabyanusha/events{/privacy}received_events_url8https://api.github.com/users/sbabyanusha/received_eventstypeUser
site_adminuj}  }(j}  sbabyanushaj}  J`_j}  MDQ6VXNlcjYxNDMxNjQ4j}  4https://avatars.githubusercontent.com/u/61431648?v=4j}  h5j}  (https://api.github.com/users/sbabyanushaj}  https://github.com/sbabyanushaj}  2https://api.github.com/users/sbabyanusha/followersj}  ?https://api.github.com/users/sbabyanusha/following{/other_user}j}  8https://api.github.com/users/sbabyanusha/gists{/gist_id}j}  ?https://api.github.com/users/sbabyanusha/starred{/owner}{/repo}j}  6https://api.github.com/users/sbabyanusha/subscriptionsj}  -https://api.github.com/users/sbabyanusha/orgsj}  .https://api.github.com/users/sbabyanusha/reposj}  9https://api.github.com/users/sbabyanusha/events{/privacy}j}  8https://api.github.com/users/sbabyanusha/received_eventsj}  Userj}  uparents]}(j}  (63d2c6a2dc80d078c83d983f7c7067b52d7bc316j}  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/63d2c6a2dc80d078c83d983f7c7067b52d7bc316j}  Xhttps://github.com/cBioPortal/cbioportal/commit/63d2c6a2dc80d078c83d983f7c7067b52d7bc316uastats}(totalK	additionsK	deletionsK ufiles]}(j}  (3255c6b11f16bd4f94d614e4f74881c20d73bd2efilenamedocs/News.mdstatusmodifiedj}  Kj}  K changesKblob_urlehttps://github.com/cBioPortal/cbioportal/blob/4b90204f32aa8c76bfa9c1520a22b74a5f537865/docs%2FNews.mdraw_urldhttps://github.com/cBioPortal/cbioportal/raw/4b90204f32aa8c76bfa9c1520a22b74a5f537865/docs%2FNews.mdcontents_urlwhttps://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FNews.md?ref=4b90204f32aa8c76bfa9c1520a22b74a5f537865patchX
  @@ -1,3 +1,22 @@
+## Aug 15, 2023
+*   **Added data** consisting of 2,472 samples from 5 studies:
+    * [Lung Adenocarcinoma Met Organotropism (MSK, Cancer Cell 2023)](https://www.cbioportal.org/study/summary?id=luad_mskcc_2023_met_organotropism) *2653 samples*
+    * [Acute Myeloid Leukemia (OHSU, Cancer Cell 2022)](https://www.cbioportal.org/study/summary?id=aml_ohsu_2022) *942 samples*
+    * [Colon Cancer (Sidra-LUMC AC-ICAM, Nat Med 2023)](https://www.cbioportal.org/study/summary?id=coad_silu_2022) *348 samples*
+    * [Pediatric Neuroblastoma (MSK, Nat Genet 2023)](https://www.cbioportal.org/study/summary?id=nbl_msk_2023) *223 samples*    
+    * [Colorectal Adenocarcinoma (MSK, Nat Commun 2022)](https://www.cbioportal.org/study/summary?id=bowel_colitis_msk_2022) *180 samples*
+    * [Bladder Cancer (Columbia University/MSK, Cell 2018)](https://www.cbioportal.org/study/summary?id=bladder_columbia_msk_2018) *130 samples*
+    * [Myoepithelial Carcinomas of Soft Tissue (WCM, CSH Molecular Case Studies 2022)](https://www.cbioportal.org/study/summary?id=stmyec_wcm_2022) *12 samples*
+
+* **Gene Tables Update** Updated tables of genes (main and alias), based on [Apr 1, 2023 HGNC release](http://ftp.ebi.ac.uk/pub/databases/genenames/hgnc/archive/monthly/tsv/). See seedDB release note [here](https://github.com/cBioPortal/datahub/tree/master/seedDB#latest-seed-database) for details.
+
+* **Data Improvement**
+   * Pan-can studies methylation addition: methylation profile 450K is added to all 32 TCGA Pan-Can studies, in generic assay format. Data source: [GDC](https://gdc.cancer.gov/node/977). Example: Search by gene or probe from dropdown, to add a chart in study view, a track in Oncoprint (single study query only), or plots in plots tab. 
+<img width="1151" alt="Screen Shot 2023-08-14 at 1 57 29 PM" src="https://github.com/cBioPortal/datahub/assets/61431648/80ce4e7f-84c0-4de4-8cec-deaa79236201">
+
+   * Pan-can studies Ancestry addition: Genetic Ancestry data is added to all 32 TCGA Pan-Can studies, in generic assay format. Data source: [GDC](https://gdc.cancer.gov/about-data/publications/CCG-AIM-2020). Example: Search by each ancestry from dropdown, to add a chart in study view, a track in Oncoprint. 
+<img width="1129" alt="Screen Shot 2023-08-14 at 4 26 22 PM" src="https://github.com/cBioPortal/datahub/assets/61431648/1e5a212c-518c-4eb1-add4-330452c28926">
+
 ## Aug 1, 2023
 *   **Enhancement**: One-sided Fisher's exact tests were changed to be two-sided. The affected pages are:
     *    Results View Page - Mutual Exclusivity Tabuau     (58a9cbe48c327c00913673471442986a42422241}(sha(58a9cbe48c327c00913673471442986a42422241node_idEC_kwDOAe-hB9oAKDU4YTljYmU0OGMzMjdjMDA5MTM2NzM0NzE0NDI5ODZhNDI0MjIyNDEcommit}(author}(nameGaofei Zhaoemail,15748980+dippindots@users.noreply.github.comdate2023-08-01T19:07:05Zu	committer}(j~  GitHubj	~  noreply@github.comj~  2023-08-01T19:07:05ZumessageLMerge pull request #10306 from cBioPortal/frontend-v5.3.16

Frontend v5.3.16tree}(j}  (1ea0f392f3ff991d6ae2de9ed1af932bc0ee96b5urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/1ea0f392f3ff991d6ae2de9ed1af932bc0ee96b5uj~  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/58a9cbe48c327c00913673471442986a42422241
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkyVfZCRBK7hj4Ov3rIwAA2SMIABAv/QuaE7oyHlzY6Wjr4BIC
VfAaHjilJ4z6+jwwqTwiKXbDr6Ezzo7Ku0dISV+WEpe+pKRu9CP8maC2ZKSlzHpq
9+P8YYrdDo/DDEMLHSxcOyJSA15pUzEDVpFJ5avHAgbgM5gvVeNDsctCRVbgcO8w
UUQYPbtDKOEBvZQAJB4xqYOQ2Mc5VdRtTN/vcJMM30ztpStch3SkrNcsDkOuO2Eo
7sGfpQ1NFEQYzQcEHYRRel/FxrvcVghZ0fKzJh3g5zpLsaAGUkPCvWu40ufof0Aj
aWGG5Q5eZheN/zo/8LwH80DtWSevXh/QhdT/sCTYzA/UdpShoW5wZCxHREslayg=
=tHdQ
-----END PGP SIGNATURE-----
payloadXe  tree 1ea0f392f3ff991d6ae2de9ed1af932bc0ee96b5
parent 731bd621429536b2c9c10751007c46f5c06d79c5
parent 4b76f510ea131b3a2daf7ce9bd3bdecff2e82835
author Gaofei Zhao <15748980+dippindots@users.noreply.github.com> 1690916825 -0400
committer GitHub <noreply@github.com> 1690916825 -0400

Merge pull request #10306 from cBioPortal/frontend-v5.3.16

Frontend v5.3.16uuj~  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/58a9cbe48c327c00913673471442986a42422241html_urlXhttps://github.com/cBioPortal/cbioportal/commit/58a9cbe48c327c00913673471442986a42422241comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/58a9cbe48c327c00913673471442986a42422241/commentsj~  }(login
dippindotsidJtO j~  MDQ6VXNlcjE1NzQ4OTgw
avatar_url4https://avatars.githubusercontent.com/u/15748980?v=4gravatar_idh5j~  'https://api.github.com/users/dippindotsj%~  https://github.com/dippindots
followers_url1https://api.github.com/users/dippindots/followers
following_url>https://api.github.com/users/dippindots/following{/other_user}	gists_url7https://api.github.com/users/dippindots/gists{/gist_id}starred_url>https://api.github.com/users/dippindots/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/dippindots/subscriptionsorganizations_url,https://api.github.com/users/dippindots/orgs	repos_url-https://api.github.com/users/dippindots/repos
events_url8https://api.github.com/users/dippindots/events{/privacy}received_events_url7https://api.github.com/users/dippindots/received_eventstypeUser
site_adminuj
~  }(j*~  web-flowj,~  J/j~  MDQ6VXNlcjE5ODY0NDQ3j.~  4https://avatars.githubusercontent.com/u/19864447?v=4j0~  h5j~  %https://api.github.com/users/web-flowj%~  https://github.com/web-flowj3~  /https://api.github.com/users/web-flow/followersj5~  <https://api.github.com/users/web-flow/following{/other_user}j7~  5https://api.github.com/users/web-flow/gists{/gist_id}j9~  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j;~  3https://api.github.com/users/web-flow/subscriptionsj=~  *https://api.github.com/users/web-flow/orgsj?~  +https://api.github.com/users/web-flow/reposjA~  6https://api.github.com/users/web-flow/events{/privacy}jC~  5https://api.github.com/users/web-flow/received_eventsjE~  UserjG~  uparents](}(j}  (731bd621429536b2c9c10751007c46f5c06d79c5j~  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/731bd621429536b2c9c10751007c46f5c06d79c5j%~  Xhttps://github.com/cBioPortal/cbioportal/commit/731bd621429536b2c9c10751007c46f5c06d79c5u}(j}  (4b76f510ea131b3a2daf7ce9bd3bdecff2e82835j~  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/4b76f510ea131b3a2daf7ce9bd3bdecff2e82835j%~  Xhttps://github.com/cBioPortal/cbioportal/commit/4b76f510ea131b3a2daf7ce9bd3bdecff2e82835uestats}(totalK	additionsK	deletionsKufiles]}(j}  (3f38fbcb38d59cde6328185e08cd53e0ef836775filenamepom.xmlstatusmodifiedje~  Kjf~  KchangesKblob_url^https://github.com/cBioPortal/cbioportal/blob/58a9cbe48c327c00913673471442986a42422241/pom.xmlraw_url]https://github.com/cBioPortal/cbioportal/raw/58a9cbe48c327c00913673471442986a42422241/pom.xmlcontents_urlphttps://api.github.com/repos/cBioPortal/cbioportal/contents/pom.xml?ref=58a9cbe48c327c00913673471442986a42422241patchXY  @@ -276,7 +276,7 @@
   </profiles>
 
   <properties>
-    <frontend.version>v5.3.15</frontend.version>
+    <frontend.version>v5.3.16</frontend.version>
     <frontend.groupId>com.github.cbioportal</frontend.groupId>
     <spring.version>5.2.20.RELEASE</spring.version>
     <spring.integration.version>5.3.0.RELEASE</spring.integration.version>uau(8f6534e47ba1adb65a1c77ee92e397cfd8a146cf}(sha(8f6534e47ba1adb65a1c77ee92e397cfd8a146cfnode_idEC_kwDOAe-hB9oAKDhmNjUzNGU0N2JhMWFkYjY1YTFjNzdlZTkyZTM5N2NmZDhhMTQ2Y2Ycommit}(author}(name	Karthik Kemailkalletlakarthik@gmail.comdate2023-07-19T14:45:51Zu	committer}(j~  GitHubj~  noreply@github.comj~  2023-07-19T14:45:51ZumessageuMerge pull request #10254 from kalletlak/feature/10248

Set download button visibility in UI based on user role/grouptree}(jz~  (9883095c30c8dbb7f013402a9e815ea97d9f5310urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/9883095c30c8dbb7f013402a9e815ea97d9f5310uj~  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/8f6534e47ba1adb65a1c77ee92e397cfd8a146cf
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkt/cfCRBK7hj4Ov3rIwAA5S4IAFnLd8GfKX/bqIAskyuv9eVp
Z8s0iw/OJRoAHJyZNQ0dCr8+Lgi6os4ctCxzHPob4f0q8mnRoop9D1ZSR5dOFqkm
xdiKahtFiQQ2Wq0XqbxOvOfsmrg/bQZRi/lNhGlP1W/hLGARLyuSGD0XWGuJmGpi
o3pddSr+Mz736Hu4fbFXIpywIS79JyiKTMB9R9cLeAV00y4ZhHHt1XktAQwoMMJE
q3nAESiVbPl7/jzxyvrfzcj+lUl96P2hAi2+TxLYhcHdhM5fIJAqaDpk3xEMsbsB
2vH1VJzxCViQAdkFMqCwN6tw4lE+bfqaA7VjMYgHkvwEjsDYqmE9Qnd/dHkoYTI=
=oqe8
-----END PGP SIGNATURE-----
payloadXy  tree 9883095c30c8dbb7f013402a9e815ea97d9f5310
parent a3794f7cd5a60974b8c04938d5b3d784a5bfb09a
parent 16acfa77f9049f56019845322794989f996ec78f
author Karthik K <kalletlakarthik@gmail.com> 1689777951 -0400
committer GitHub <noreply@github.com> 1689777951 -0400

Merge pull request #10254 from kalletlak/feature/10248

Set download button visibility in UI based on user role/groupuuj~  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8f6534e47ba1adb65a1c77ee92e397cfd8a146cfhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/8f6534e47ba1adb65a1c77ee92e397cfd8a146cfcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/8f6534e47ba1adb65a1c77ee92e397cfd8a146cf/commentsj~  }(login	kalletlakidJƴ j|~  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5j~  &https://api.github.com/users/kalletlakj~  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminuj~  }(j~  web-flowj~  J/j|~  MDQ6VXNlcjE5ODY0NDQ3j~  4https://avatars.githubusercontent.com/u/19864447?v=4j~  h5j~  %https://api.github.com/users/web-flowj~  https://github.com/web-flowj~  /https://api.github.com/users/web-flow/followersj~  <https://api.github.com/users/web-flow/following{/other_user}j~  5https://api.github.com/users/web-flow/gists{/gist_id}j~  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j~  3https://api.github.com/users/web-flow/subscriptionsj~  *https://api.github.com/users/web-flow/orgsj~  +https://api.github.com/users/web-flow/reposj~  6https://api.github.com/users/web-flow/events{/privacy}j~  5https://api.github.com/users/web-flow/received_eventsj~  Userj~  uparents](}(jz~  (a3794f7cd5a60974b8c04938d5b3d784a5bfb09aj~  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/a3794f7cd5a60974b8c04938d5b3d784a5bfb09aj~  Xhttps://github.com/cBioPortal/cbioportal/commit/a3794f7cd5a60974b8c04938d5b3d784a5bfb09au}(jz~  (16acfa77f9049f56019845322794989f996ec78fj~  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/16acfa77f9049f56019845322794989f996ec78fj~  Xhttps://github.com/cBioPortal/cbioportal/commit/16acfa77f9049f56019845322794989f996ec78fuestats}(totalK7	additionsK)	deletionsKufiles](}(jz~  (ba311e72ad546f15e928b0da81d7aa27c78d222dfilenameCcore/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.javastatusmodifiedj~  Kj~  KchangesK*blob_urlhttps://github.com/cBioPortal/cbioportal/blob/8f6534e47ba1adb65a1c77ee92e397cfd8a146cf/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/8f6534e47ba1adb65a1c77ee92e397cfd8a146cf/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.java?ref=8f6534e47ba1adb65a1c77ee92e397cfd8a146cfpatchX  @@ -50,11 +50,13 @@
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.commons.lang.StringUtils;
 import org.cbioportal.security.spring.authentication.PortalUserDetails;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Component;
 import org.springframework.util.ResourceUtils;
@@ -362,6 +364,10 @@ public static String parseUrl(String url)
     @Value("${frontend.url.runtime:}") 
     public void setFrontendUrlRuntime(String property) { frontendUrlRuntime = property; }
 
+    private static String downloadGroup;
+    @Value("${download_group:}") // default is empty string
+    public void setDownloadGroup(String property) { downloadGroup = property; }
+
     private static Logger LOG = LoggerFactory.getLogger(GlobalProperties.class);
     private static ConfigPropertyResolver portalProperties = new ConfigPropertyResolver();
     private static Properties mavenProperties = initializeProperties(MAVEN_PROPERTIES_FILE_NAME);
@@ -1264,18 +1270,30 @@ public static String getOncoKbToken()  {
     }
 
     public static String getDownloadControl() {
-        String downloadControlOption = getProperty("skin.hide_download_controls");
-        /*
-            skin.hide_download_controls   return_value
-                    true                    hide
-                    false                   show
-                    data                    data
-                    null/empty              show
-         */
-        switch ((downloadControlOption != null) ? downloadControlOption.trim().toLowerCase() : "false") {
-            case "true" : return "hide";
-            case "data" : return "data";
-            default: return "show";
+        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+
+        if (authentication != null &&
+            StringUtils.isNotEmpty(downloadGroup) &&
+            authentication.getAuthorities().contains(new SimpleGrantedAuthority(downloadGroup))) {
+            return "show";
+        } else {
+            String downloadControlOption = getProperty("skin.hide_download_controls");
+            /*
+                skin.hide_download_controls   return_value
+                        true                    hide
+                        false                   show
+                        data                    data
+                        null/empty              show
+             */
+            switch ((downloadControlOption != null) ? downloadControlOption.trim().toLowerCase() : "false") {
+                case "true":
+                    return "hide";
+                case "data":
+                    return "data";
+                case "false":
+                default:
+                    return "show";
+            }
         }
     }
 }u}(jz~  (7575ad635078b9f00b139a0c52ec234c01eba5c0j~  Hdocs/deployment/customization/Customizing-your-instance-of-cBioPortal.mdj~  modifiedj~  Kj~  K j~  Kj~  https://github.com/cBioPortal/cbioportal/blob/8f6534e47ba1adb65a1c77ee92e397cfd8a146cf/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdj~  https://github.com/cBioPortal/cbioportal/raw/8f6534e47ba1adb65a1c77ee92e397cfd8a146cf/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdj~  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.md?ref=8f6534e47ba1adb65a1c77ee92e397cfd8a146cfj~  X<  @@ -246,6 +246,13 @@ Below you can find the complete list of all the available skin properties.
             <td>controls download options in UI. **true**: hides all download options. **false**:  shows all download options. **data**: disable data download but not figure download</td>
             <td>false</td>
             <td>true / false / data</td>
+        </tr>
+		<tr>
+            <td>download_group</td>
+            <td>controls download options in UI for each user. If present and user is authenticated, this value is checked against user roles.
+If the download_group is present in user groups then download options are shown in UI, else it fallback to **skin.hide_download_controls**</td>
+            <td></td>
+            <td>text</td>
         </tr>
         <tr>
             <td>skin.show_settings_menu</td>u}(jz~  (ab5bbf48c3e1265677a20e9b240c0521c4e4da03j~  )portal/src/main/webapp/config_service.jspj~  modifiedj~  Kj~  Kj~  Kj~  https://github.com/cBioPortal/cbioportal/blob/8f6534e47ba1adb65a1c77ee92e397cfd8a146cf/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj~  https://github.com/cBioPortal/cbioportal/raw/8f6534e47ba1adb65a1c77ee92e397cfd8a146cf/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj~  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=8f6534e47ba1adb65a1c77ee92e397cfd8a146cfj~  Xp  @@ -202,7 +202,7 @@
         obj.put("oncoKbTokenDefined", !StringUtils.isEmpty(GlobalProperties.getOncoKbToken()));
 
         obj.put("sessionServiceEnabled", !StringUtils.isEmpty(GlobalProperties.getSessionServiceUrl()));
-        
+
         obj.put("skin_hide_download_controls", GlobalProperties.getDownloadControl());
 
         out.println(obj.toJSONString());u}(jz~  (efae1b8c7946f5f768afae5b44f7b2585dab18b9j~  ,src/main/resources/portal.properties.EXAMPLEj~  modifiedj~  Kj~  Kj~  Kj~  https://github.com/cBioPortal/cbioportal/blob/8f6534e47ba1adb65a1c77ee92e397cfd8a146cf/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj~  https://github.com/cBioPortal/cbioportal/raw/8f6534e47ba1adb65a1c77ee92e397cfd8a146cf/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj~  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=8f6534e47ba1adb65a1c77ee92e397cfd8a146cfj~  X-  @@ -433,4 +433,6 @@ persistence.cache_type=no-cache
 
 # Set StudyDownloadLinkUrl
 # Allows download links within DataSets Tab (See Portal.Properties documentation for more info)
-# study_download_url=
\ No newline at end of file
+# study_download_url=
+
+# download_group=
\ No newline at end of fileueu(3d4a62a1dfe59660f957cc6273495a9303e60142}(sha(3d4a62a1dfe59660f957cc6273495a9303e60142node_idEC_kwDOAe-hB9oAKDNkNGE2MmExZGZlNTk2NjBmOTU3Y2M2MjczNDk1YTkzMDNlNjAxNDIcommit}(author}(namehaynescdemailhaynescd@chop.edudate2023-06-28T16:28:55Zu	committer}(j  haynescdj  haynescd@chop.eduj  2023-06-28T16:28:55Zumessagerenametree}(j
  (c4c5fcd837e503db63c997d313477d24ddd9a1cfurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/c4c5fcd837e503db63c997d313477d24ddd9a1cfuj%  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/3d4a62a1dfe59660f957cc6273495a9303e60142
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj%  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/3d4a62a1dfe59660f957cc6273495a9303e60142html_urlXhttps://github.com/cBioPortal/cbioportal/commit/3d4a62a1dfe59660f957cc6273495a9303e60142comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/3d4a62a1dfe59660f957cc6273495a9303e60142/commentsj  }(loginhaynescdidJ j  MDQ6VXNlcjMzNjA4OTIw
avatar_url4https://avatars.githubusercontent.com/u/33608920?v=4gravatar_idh5j%  %https://api.github.com/users/haynescdj1  https://github.com/haynescd
followers_url/https://api.github.com/users/haynescd/followers
following_url<https://api.github.com/users/haynescd/following{/other_user}	gists_url5https://api.github.com/users/haynescd/gists{/gist_id}starred_url<https://api.github.com/users/haynescd/starred{/owner}{/repo}subscriptions_url3https://api.github.com/users/haynescd/subscriptionsorganizations_url*https://api.github.com/users/haynescd/orgs	repos_url+https://api.github.com/users/haynescd/repos
events_url6https://api.github.com/users/haynescd/events{/privacy}received_events_url5https://api.github.com/users/haynescd/received_eventstypeUser
site_adminuj  }(j6  haynescdj8  J j  MDQ6VXNlcjMzNjA4OTIwj:  4https://avatars.githubusercontent.com/u/33608920?v=4j<  h5j%  %https://api.github.com/users/haynescdj1  https://github.com/haynescdj?  /https://api.github.com/users/haynescd/followersjA  <https://api.github.com/users/haynescd/following{/other_user}jC  5https://api.github.com/users/haynescd/gists{/gist_id}jE  <https://api.github.com/users/haynescd/starred{/owner}{/repo}jG  3https://api.github.com/users/haynescd/subscriptionsjI  *https://api.github.com/users/haynescd/orgsjK  +https://api.github.com/users/haynescd/reposjM  6https://api.github.com/users/haynescd/events{/privacy}jO  5https://api.github.com/users/haynescd/received_eventsjQ  UserjS  uparents]}(j
  (f19f4a0a356cb954f5d33c7bf3b57e2b3745f7acj%  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/f19f4a0a356cb954f5d33c7bf3b57e2b3745f7acj1  Xhttps://github.com/cBioPortal/cbioportal/commit/f19f4a0a356cb954f5d33c7bf3b57e2b3745f7acuastats}(totalK	additionsK	deletionsKufiles]}(j
  (84e7fdf2ba86a01d77599fe4b6c9958126cc2cc6filenameTweb/src/main/java/org/cbioportal/web/columnstore/StudyViewColumnStoreController.javastatusrenamedjm  Kjn  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/3d4a62a1dfe59660f957cc6273495a9303e60142/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/3d4a62a1dfe59660f957cc6273495a9303e60142/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fcolumnstore%2FStudyViewColumnStoreController.java?ref=3d4a62a1dfe59660f957cc6273495a9303e60142patch@@ -29,7 +29,7 @@
 @RestController
 @Validated
 @Api(tags = "Study View Column Store")
-public class StudyViewControllerColumnStore {
+public class StudyViewColumnStoreController {
 
     @Autowired
     private StudyViewService studyViewService;previous_filenameTweb/src/main/java/org/cbioportal/web/columnstore/StudyViewControllerColumnStore.javauau(2bad83ff26610548f04f0984e98041ebfe20d2b2}(sha(2bad83ff26610548f04f0984e98041ebfe20d2b2node_idEC_kwDOAe-hB9oAKDJiYWQ4M2ZmMjY2MTA1NDhmMDRmMDk4NGU5ODA0MWViZmUyMGQyYjIcommit}(author}(namePim van Nieropemailpim@thehyve.nldate2023-04-19T14:50:40Zu	committer}(j  
pvannieropj  pim@thehyve.nlj  2023-07-19T14:29:55Zumessage5Fix handling of connection_strin in entrypoint scripttree}(j  (b219449fb025e785d5c12ed33cce5320365fe413urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/b219449fb025e785d5c12ed33cce5320365fe413uj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/2bad83ff26610548f04f0984e98041ebfe20d2b2
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/2bad83ff26610548f04f0984e98041ebfe20d2b2html_urlXhttps://github.com/cBioPortal/cbioportal/commit/2bad83ff26610548f04f0984e98041ebfe20d2b2comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/2bad83ff26610548f04f0984e98041ebfe20d2b2/commentsj  }(login
pvannieropidJa j  MDQ6VXNlcjc0NTg4NQ==
avatar_url2https://avatars.githubusercontent.com/u/745885?v=4gravatar_idh5j  'https://api.github.com/users/pvannieropj  https://github.com/pvannierop
followers_url1https://api.github.com/users/pvannierop/followers
following_url>https://api.github.com/users/pvannierop/following{/other_user}	gists_url7https://api.github.com/users/pvannierop/gists{/gist_id}starred_url>https://api.github.com/users/pvannierop/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/pvannierop/subscriptionsorganizations_url,https://api.github.com/users/pvannierop/orgs	repos_url-https://api.github.com/users/pvannierop/repos
events_url8https://api.github.com/users/pvannierop/events{/privacy}received_events_url7https://api.github.com/users/pvannierop/received_eventstypeUser
site_adminuj  }(j  
pvannieropj  Ja j  MDQ6VXNlcjc0NTg4NQ==j  2https://avatars.githubusercontent.com/u/745885?v=4j  h5j  'https://api.github.com/users/pvannieropj  https://github.com/pvannieropj  1https://api.github.com/users/pvannierop/followersj  >https://api.github.com/users/pvannierop/following{/other_user}j  7https://api.github.com/users/pvannierop/gists{/gist_id}j  >https://api.github.com/users/pvannierop/starred{/owner}{/repo}j  5https://api.github.com/users/pvannierop/subscriptionsj  ,https://api.github.com/users/pvannierop/orgsj  -https://api.github.com/users/pvannierop/reposj  8https://api.github.com/users/pvannierop/events{/privacy}j  7https://api.github.com/users/pvannierop/received_eventsj  Userj  uparents]}(j  (659bfa94fe6d606649df09acd8a46df4f27c05f8j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/659bfa94fe6d606649df09acd8a46df4f27c05f8j  Xhttps://github.com/cBioPortal/cbioportal/commit/659bfa94fe6d606649df09acd8a46df4f27c05f8uastats}(totalK7	additionsK,	deletionsKufiles](}(j  (a86e226666e3a928812e13c8f3bc34b738396120filename&.github/workflows/integration-test.ymlstatusmodifiedj  Kj  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/2bad83ff26610548f04f0984e98041ebfe20d2b2/.github%2Fworkflows%2Fintegration-test.ymlraw_urlhttps://github.com/cBioPortal/cbioportal/raw/2bad83ff26610548f04f0984e98041ebfe20d2b2/.github%2Fworkflows%2Fintegration-test.ymlcontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/.github%2Fworkflows%2Fintegration-test.yml?ref=2bad83ff26610548f04f0984e98041ebfe20d2b2patchXs  @@ -43,7 +43,7 @@ jobs:
         run: |
           cd ./data && ./init.sh && rm -rf ./studies/* && cd ../config && \
           cat $PORTAL_SOURCE_DIR/portal/target/portal/WEB-INF/classes/portal.properties | \
-              sed 's|db.connection_string=.*|db.connection_string=jdbc:mysql://cbioportal-database:3306/cbioportal?useSSL=false|g' \
+              sed 's|db.connection_string=.*|db.connection_string=jdbc:mysql://cbioportal-database-container:3306/cbioportal?useSSL=false|g' \
               > portal.properties
       - name: 'Start cbioportal-docker-compose'
         working-directory: ./cbioportal-docker-composeu}(j  (99f8fa68e8b930aa2e8944a6c0f8d49379732686j  (docker/web-and-data/docker-entrypoint.shj  modifiedj  K*j  K	j  K3j  https://github.com/cBioPortal/cbioportal/blob/2bad83ff26610548f04f0984e98041ebfe20d2b2/docker%2Fweb-and-data%2Fdocker-entrypoint.shj  https://github.com/cBioPortal/cbioportal/raw/2bad83ff26610548f04f0984e98041ebfe20d2b2/docker%2Fweb-and-data%2Fdocker-entrypoint.shj  https://api.github.com/repos/cBioPortal/cbioportal/contents/docker%2Fweb-and-data%2Fdocker-entrypoint.sh?ref=2bad83ff26610548f04f0984e98041ebfe20d2b2j  X  @@ -3,7 +3,7 @@ set -eo pipefail
 shopt -s nullglob
 
 BAKED_IN_WAR_CONFIG_FILE=/cbioportal-webapp/WEB-INF/classes/portal.properties
-CUSTOM_PROPERTIES_FILE=/cbioportal/portal.properties
+CUSTOM_PROPERTIES_FILE=cbioportal/portal.properties
 
 # check to see if this file is being run or sourced from another script
 _is_sourced() {
@@ -23,19 +23,53 @@ parse_db_params_from_config_and_command_line() {
     else
         PROPERTIES_FILE=$BAKED_IN_WAR_CONFIG_FILE
     fi
-
-    for param in db.host db.user db.portal_db_name db.password; do
+    for param in db.host db.user db.portal_db_name db.password db.connection_string; do
         if $(parse_db_params_from_command_line $@ | grep -q $param); then
-            parse_db_params_from_command_line $@ | grep "^$param"
+            prop=$(parse_db_params_from_command_line $@ | grep "^$param" || [[ $? == 1 ]])
         else
-            grep -v '^#' $PROPERTIES_FILE | grep "^$param"
+            prop=$(grep -v '^#' $PROPERTIES_FILE | grep "^$param" || [[ $? == 1 ]])
+        fi
+        if [[ -n "$prop" ]]
+        then
+            # Replace dot in parameter name with underscore.
+            prop=$(sed "s/^db\./db_/" <<< $prop)
+            if [[ $param == db.connection_string ]]
+            then
+                # Remove the parameters (?...) from the connection URL.
+                echo $(sed -r "s/^([^=]+)=([^\?]+).*/\1=\2/" <<< $prop)
+            else 
+                echo $prop
+            fi
         fi
     done
 }
 
+parse_connection_string() {
+    # Adapted from: https://stackoverflow.com/a/45977232
+    readonly URI_REGEX='^(([^:/?#]+):)+?(//((([^:/?#]+)@)?([^:/?#]+)(:([0-9]+))?))?(/([^?#]*))(\?([^#]*))?(#(.*))?'
+    #                    ↑↑             ↑  ↑↑↑            ↑         ↑ ↑            ↑ ↑        ↑  ↑        ↑ ↑
+    #                    |2 scheme      |  ||6 userinfo   7 host    | 9 port       | 11 rpath |  13 query | 15 fragment
+    #                    1 scheme:      |  |5 userinfo@             8 :…           10 path    12 ?…       14 #…
+    #                                   |  4 authority
+    #                                   3 //…
+    echo db_host=$([[ "$1" =~ $URI_REGEX ]] && echo "${BASH_REMATCH[7]}")
+    echo db_port=$([[ "$1" =~ $URI_REGEX ]] && echo "${BASH_REMATCH[9]}")
+}
+
 check_db_connection() {
-    eval "$(parse_db_params_from_config_and_command_line $@ | sed 's/^db\./db_/g')"
-    POTENTIAL_DB_PARAMS=$@
+    eval $(parse_db_params_from_config_and_command_line $@)
+    
+    if ([[ -n $db_host ]] || [[ -n $db_portal_db_name ]] || [[ -n $db_use_ssl ]]) && [[ -n $db_connection_string ]]
+    then
+        echo "The portal.properties file defines both db.connection_string and (one of) db.host, db.portal_db_name and "
+        echo "db.use_ssl. Please configure with either db.connection_string (preferred), or db.host, db.portal_db_name and db.use_ssl."
+        exit 1
+    fi
+
+    if [[ -n $db_connection_string ]]
+    then 
+        eval "$(parse_connection_string $db_connection_string)"
+    fi
 
     if [ -z ${db_port+x} ] # is $db_port unset?
     then 
@@ -46,7 +80,6 @@ check_db_connection() {
         fi
     fi
 
-
     while ! mysqladmin ping -s -h$(echo ${db_host} | cut -d: -f1) -P${db_port} -u${db_user} -p${db_password};
     do
         sleep 5s;
@@ -77,7 +110,7 @@ _main() {
         # available, otherwise use portal.properties
         if [ -n "$SHOW_DEBUG_INFO" ] && [ "$SHOW_DEBUG_INFO" != "false" ]; then
             echo "Using database config:"
-            parse_db_params_from_config_and_command_line $@
+            #parse_db_params_from_config_and_command_line $@
         fi
 
         check_db_connection $@u}(j  (958c75492a88e9a646abf21dd1641877bf0f4c4aj  .test/integration/docker-compose-localbuild.ymlj  modifiedj  Kj  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/2bad83ff26610548f04f0984e98041ebfe20d2b2/test%2Fintegration%2Fdocker-compose-localbuild.ymlj  https://github.com/cBioPortal/cbioportal/raw/2bad83ff26610548f04f0984e98041ebfe20d2b2/test%2Fintegration%2Fdocker-compose-localbuild.ymlj  https://api.github.com/repos/cBioPortal/cbioportal/contents/test%2Fintegration%2Fdocker-compose-localbuild.yml?ref=2bad83ff26610548f04f0984e98041ebfe20d2b2j  Xb  @@ -10,6 +10,6 @@ services:
      - $PORTAL_INFO_DIR:/portalinfo/
      # make docker compose run the cbioportal version-under-test
      # by volume mounting the local portal source folder into the container
-     # and running 
+     # and running
      - $PORTAL_SOURCE_DIR:/cbioportal/
      - $PORTAL_SOURCE_DIR/portal/target/cbioportal.war:/app.warueu(8b911fc3b52efd581a7b09a6939a8a3ca2722dfa}(sha(8b911fc3b52efd581a7b09a6939a8a3ca2722dfanode_idEC_kwDOAe-hB9oAKDhiOTExZmMzYjUyZWZkNTgxYTdiMDlhNjkzOWE4YTNjYTI3MjJkZmEcommit}(author}(namealismanemaillisman.aaron@gmail.comdate2023-06-26T13:53:32Zu	committer}(j  GitHubj  noreply@github.comj  2023-06-26T13:53:32Zumessage\Merge pull request #10239 from onursumer/about-us-name-correction

Fix contributor last nametree}(j	  (7678778472434f8a26638f72e15eb91365903e7furlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/7678778472434f8a26638f72e15eb91365903e7fuj!  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/8b911fc3b52efd581a7b09a6939a8a3ca2722dfa
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJkmZhcCRBK7hj4Ov3rIwAAjUQIAAuASivvyUwpBPU9I//NQjoV
aeksy6t3GrJbRU1PItRV7L7PVj2BqNMMrUz6Q2BCKAeKKSukCoKUZE1mH6qCq9A8
PEkaJZS9opufGwa4kMNKsOpePu+6RoRT/6XV6dWVaI/sJ4oTj7eAyZy6KMP1Gp3A
Jsjy5K9HRWnbF6kyNAAcqc7N45tD1U4OLYpNsaDfflTUW4ZW5L4NvPx1RTQhnvd4
+HXEX+nB4MPfSuGm7aZDdBmo5EHrHFEF4MG132EqAJils4UtUG5SrM+7m39u6f1a
0kH84ZHOxIAzFIGEU6ZYwYA+kTLtMpsUpBD4vbchNp8VpBjo/C5ndKYJoNUCVes=
=PeHd
-----END PGP SIGNATURE-----
payloadX[  tree 7678778472434f8a26638f72e15eb91365903e7f
parent 8bf1312544943ac06a3e7b932ead81a41aa232d0
parent 7e7717f35dba6d42c3072e9140c99cded89846a8
author alisman <lisman.aaron@gmail.com> 1687787612 -0400
committer GitHub <noreply@github.com> 1687787612 -0400

Merge pull request #10239 from onursumer/about-us-name-correction

Fix contributor last nameuuj!  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8b911fc3b52efd581a7b09a6939a8a3ca2722dfahtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/8b911fc3b52efd581a7b09a6939a8a3ca2722dfacomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/8b911fc3b52efd581a7b09a6939a8a3ca2722dfa/commentsj  }(loginalismanidJ j  MDQ6VXNlcjE4NjUyMQ==
avatar_url2https://avatars.githubusercontent.com/u/186521?v=4gravatar_idh5j!  $https://api.github.com/users/alismanj/  https://github.com/alisman
followers_url.https://api.github.com/users/alisman/followers
following_url;https://api.github.com/users/alisman/following{/other_user}	gists_url4https://api.github.com/users/alisman/gists{/gist_id}starred_url;https://api.github.com/users/alisman/starred{/owner}{/repo}subscriptions_url2https://api.github.com/users/alisman/subscriptionsorganizations_url)https://api.github.com/users/alisman/orgs	repos_url*https://api.github.com/users/alisman/repos
events_url5https://api.github.com/users/alisman/events{/privacy}received_events_url4https://api.github.com/users/alisman/received_eventstypeUser
site_adminuj  }(j4  web-flowj6  J/j  MDQ6VXNlcjE5ODY0NDQ3j8  4https://avatars.githubusercontent.com/u/19864447?v=4j:  h5j!  %https://api.github.com/users/web-flowj/  https://github.com/web-flowj=  /https://api.github.com/users/web-flow/followersj?  <https://api.github.com/users/web-flow/following{/other_user}jA  5https://api.github.com/users/web-flow/gists{/gist_id}jC  <https://api.github.com/users/web-flow/starred{/owner}{/repo}jE  3https://api.github.com/users/web-flow/subscriptionsjG  *https://api.github.com/users/web-flow/orgsjI  +https://api.github.com/users/web-flow/reposjK  6https://api.github.com/users/web-flow/events{/privacy}jM  5https://api.github.com/users/web-flow/received_eventsjO  UserjQ  uparents](}(j	  (8bf1312544943ac06a3e7b932ead81a41aa232d0j!  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/8bf1312544943ac06a3e7b932ead81a41aa232d0j/  Xhttps://github.com/cBioPortal/cbioportal/commit/8bf1312544943ac06a3e7b932ead81a41aa232d0u}(j	  (7e7717f35dba6d42c3072e9140c99cded89846a8j!  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/7e7717f35dba6d42c3072e9140c99cded89846a8j/  Xhttps://github.com/cBioPortal/cbioportal/commit/7e7717f35dba6d42c3072e9140c99cded89846a8uestats}(totalK	additionsK	deletionsKufiles]}(j	  (da0e1d8da27a90f8f79a0aa2719702af91f4ff4ffilenamedocs/About-Us.mdstatusmodifiedjo  Kjp  KchangesKblob_urlihttps://github.com/cBioPortal/cbioportal/blob/8b911fc3b52efd581a7b09a6939a8a3ca2722dfa/docs%2FAbout-Us.mdraw_urlhhttps://github.com/cBioPortal/cbioportal/raw/8b911fc3b52efd581a7b09a6939a8a3ca2722dfa/docs%2FAbout-Us.mdcontents_url{https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FAbout-Us.md?ref=8b911fc3b52efd581a7b09a6939a8a3ca2722dfapatch@@ -61,7 +61,7 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 
 ## Bilkent University
 * Ugur Dogrusoz
-* Yusuf Ziya Sengul
+* Yusuf Ziya Ozgul
 
 ## Alumni
 * Adam Abeshouseuau(654a5d60311fb89a34eccf5ddc4678cf8d9bad8c}(sha(654a5d60311fb89a34eccf5ddc4678cf8d9bad8cnode_idEC_kwDOAe-hB9oAKDY1NGE1ZDYwMzExZmI4OWEzNGVjY2Y1ZGRjNDY3OGNmOGQ5YmFkOGMcommit}(author}(name
Bas Leenknegtemailbasleenknegt@thehyve.nldate2023-06-15T14:46:24Zu	committer}(j  
Bas Leenknegtj  basleenknegt@thehyve.nlj  2023-06-15T15:11:38Zumessage3Revert controler rename to keep backward compatibletree}(j  (a4705ed76ea5151ed20281ab27657cfd0c2e59eeurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/a4705ed76ea5151ed20281ab27657cfd0c2e59eeuj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/654a5d60311fb89a34eccf5ddc4678cf8d9bad8c
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/654a5d60311fb89a34eccf5ddc4678cf8d9bad8chtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/654a5d60311fb89a34eccf5ddc4678cf8d9bad8ccomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/654a5d60311fb89a34eccf5ddc4678cf8d9bad8c/commentsj  }(loginBasLeeidJ~2 j  MDQ6VXNlcjMzMjMwMDY=
avatar_url3https://avatars.githubusercontent.com/u/3323006?v=4gravatar_idh5j  #https://api.github.com/users/BasLeej  https://github.com/BasLee
followers_url-https://api.github.com/users/BasLee/followers
following_url:https://api.github.com/users/BasLee/following{/other_user}	gists_url3https://api.github.com/users/BasLee/gists{/gist_id}starred_url:https://api.github.com/users/BasLee/starred{/owner}{/repo}subscriptions_url1https://api.github.com/users/BasLee/subscriptionsorganizations_url(https://api.github.com/users/BasLee/orgs	repos_url)https://api.github.com/users/BasLee/repos
events_url4https://api.github.com/users/BasLee/events{/privacy}received_events_url3https://api.github.com/users/BasLee/received_eventstypeUser
site_adminuj  }(j  BasLeej  J~2 j  MDQ6VXNlcjMzMjMwMDY=j  3https://avatars.githubusercontent.com/u/3323006?v=4j  h5j  #https://api.github.com/users/BasLeej  https://github.com/BasLeej  -https://api.github.com/users/BasLee/followersj  :https://api.github.com/users/BasLee/following{/other_user}j  3https://api.github.com/users/BasLee/gists{/gist_id}j  :https://api.github.com/users/BasLee/starred{/owner}{/repo}j  1https://api.github.com/users/BasLee/subscriptionsj  (https://api.github.com/users/BasLee/orgsj  )https://api.github.com/users/BasLee/reposjĀ  4https://api.github.com/users/BasLee/events{/privacy}jƀ  3https://api.github.com/users/BasLee/received_eventsjȀ  Userjʀ  uparents]}(j  (9d7c2b38fba7b0573088fd403706ac4ab035d5e7j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/9d7c2b38fba7b0573088fd403706ac4ab035d5e7j  Xhttps://github.com/cBioPortal/cbioportal/commit/9d7c2b38fba7b0573088fd403706ac4ab035d5e7uastats}(totalK	additionsK	deletionsKufiles](}(j  (3216dd5054aba561d153e938c07daa1cc15ebe21filename=web/src/main/java/org/cbioportal/web/StudyViewController.javastatusmodifiedj  Kj  KchangesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/654a5d60311fb89a34eccf5ddc4678cf8d9bad8c/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/654a5d60311fb89a34eccf5ddc4678cf8d9bad8c/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=654a5d60311fb89a34eccf5ddc4678cf8d9bad8cpatchX  @@ -883,7 +883,7 @@ public ResponseEntity<List<GenericAssayDataBin>> fetchGenericAssayDataBinCounts(
     @RequestMapping(value = "/clinical-data-table/fetch", method = RequestMethod.POST,
         consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Fetch clinical data for the Clinical Tab of Study View")
-    public ResponseEntity<ClinicalDataCollection> fetchClinicalTable(
+    public ResponseEntity<ClinicalDataCollection> fetchClinicalDataClinicalTable(
         @ApiParam(required = true, value = "Study view filter")
         @Valid @RequestBody(required = false) 
             StudyViewFilter studyViewFilter,u}(j  (027b928a95166459b3173677858e968b15d0d769j  Aweb/src/test/java/org/cbioportal/web/StudyViewControllerTest.javaj  modifiedj  K j  Kj  Kj  https://github.com/cBioPortal/cbioportal/blob/654a5d60311fb89a34eccf5ddc4678cf8d9bad8c/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj  https://github.com/cBioPortal/cbioportal/raw/654a5d60311fb89a34eccf5ddc4678cf8d9bad8c/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.java?ref=654a5d60311fb89a34eccf5ddc4678cf8d9bad8cj  X  @@ -765,7 +765,6 @@ public void fetchGenericAssayDataCounts() throws Exception {
 
     @Test
     public void fetchClinicalDataClinicalTable() throws Exception {
-
         // For this sake of this test the sample clinical data and patient clinical data are identical.
         when(clinicalDataService.fetchSampleClinicalTable(anyList(), anyList(),
             anyInt(), anyInt(), anyString(), any(), anyString())).thenReturn(clinicalData);ueu(3c736f9da04830593ff1899f0dc6a3df1a12e799}(sha(3c736f9da04830593ff1899f0dc6a3df1a12e799node_idEC_kwDOAe-hB9oAKDNjNzM2ZjlkYTA0ODMwNTkzZmYxODk5ZjBkYzZhM2RmMWExMmU3OTkcommit}(author}(name
Jiahang Liemail.55948986+Djokovic0311@users.noreply.github.comdate2023-08-08T16:47:03Zu	committer}(j	  GitHubj  noreply@github.comj
  2023-08-08T16:47:03Zumessage/Merge branch 'master' into GenericAssay-Jiahangtree}(j  (cea9cd9e66a1a7be235c301a3dfcf6b8f1f3cbbeurlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/cea9cd9e66a1a7be235c301a3dfcf6b8f1f3cbbeuj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/3c736f9da04830593ff1899f0dc6a3df1a12e799
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk0nGHCRBK7hj4Ov3rIwAALlgIAK24CdrMjKZqaPyccbZ5+LJR
fIZFR9w5LIWC+CFVRCOeu2R8HZWttK3PQNNs3RAFaOra4mDk3iN8c6KksBGS9hfs
KF2ESivlQawQEjN6RRE7Nd7KNdkZjH3wN2OO38CFW2IE0lINEMHC8suV2DeY97co
PMxvllnSTX2OrWMKTvPIjui75OMoUVTuWY7pSweSTqXjFrrs2pqaOLRm3E/4O5mc
3TURddMq2NItIn+Pz4MPKjcPV0Zo9Z5iFrl1eKSbvIhXEdjSOdFpIR7zUXnb4QTB
lIMpXGIIsRZQBBSrYrdVqrymCcVK0VlHp4AjsyZy64yLx22XjR7aoV1gmopNcBU=
=jUxW
-----END PGP SIGNATURE-----
payloadXI  tree cea9cd9e66a1a7be235c301a3dfcf6b8f1f3cbbe
parent bbf98d2cfffb5d0b96b88a73d5e1b49897eb887b
parent ca2bdff949965b3628bc5a96d379074d21546de6
author Jiahang Li <55948986+Djokovic0311@users.noreply.github.com> 1691513223 -0400
committer GitHub <noreply@github.com> 1691513223 -0400

Merge branch 'master' into GenericAssay-Jiahanguuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/3c736f9da04830593ff1899f0dc6a3df1a12e799html_urlXhttps://github.com/cBioPortal/cbioportal/commit/3c736f9da04830593ff1899f0dc6a3df1a12e799comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/3c736f9da04830593ff1899f0dc6a3df1a12e799/commentsj  }(loginDjokovic0311idJUj  MDQ6VXNlcjU1OTQ4OTg2
avatar_url4https://avatars.githubusercontent.com/u/55948986?v=4gravatar_idh5j  )https://api.github.com/users/Djokovic0311j'  https://github.com/Djokovic0311
followers_url3https://api.github.com/users/Djokovic0311/followers
following_url@https://api.github.com/users/Djokovic0311/following{/other_user}	gists_url9https://api.github.com/users/Djokovic0311/gists{/gist_id}starred_url@https://api.github.com/users/Djokovic0311/starred{/owner}{/repo}subscriptions_url7https://api.github.com/users/Djokovic0311/subscriptionsorganizations_url.https://api.github.com/users/Djokovic0311/orgs	repos_url/https://api.github.com/users/Djokovic0311/repos
events_url:https://api.github.com/users/Djokovic0311/events{/privacy}received_events_url9https://api.github.com/users/Djokovic0311/received_eventstypeUser
site_adminuj  }(j,  web-flowj.  J/j  MDQ6VXNlcjE5ODY0NDQ3j0  4https://avatars.githubusercontent.com/u/19864447?v=4j2  h5j  %https://api.github.com/users/web-flowj'  https://github.com/web-flowj5  /https://api.github.com/users/web-flow/followersj7  <https://api.github.com/users/web-flow/following{/other_user}j9  5https://api.github.com/users/web-flow/gists{/gist_id}j;  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j=  3https://api.github.com/users/web-flow/subscriptionsj?  *https://api.github.com/users/web-flow/orgsjA  +https://api.github.com/users/web-flow/reposjC  6https://api.github.com/users/web-flow/events{/privacy}jE  5https://api.github.com/users/web-flow/received_eventsjG  UserjI  uparents](}(j  (bbf98d2cfffb5d0b96b88a73d5e1b49897eb887bj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887bj'  Xhttps://github.com/cBioPortal/cbioportal/commit/bbf98d2cfffb5d0b96b88a73d5e1b49897eb887bu}(j  (ca2bdff949965b3628bc5a96d379074d21546de6j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ca2bdff949965b3628bc5a96d379074d21546de6j'  Xhttps://github.com/cBioPortal/cbioportal/commit/ca2bdff949965b3628bc5a96d379074d21546de6uestats}(totalM	additionsM+	deletionsK]ufiles](}(j  (bd9ae14cdaf137a97c116177c885b70a16bf7d34filenameBmodel/src/main/java/org/cbioportal/model/GenomicDataCountItem.javastatusaddedjg  K#jh  K changesK#blob_urlhttps://github.com/cBioPortal/cbioportal/blob/3c736f9da04830593ff1899f0dc6a3df1a12e799/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenomicDataCountItem.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/3c736f9da04830593ff1899f0dc6a3df1a12e799/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenomicDataCountItem.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenomicDataCountItem.java?ref=3c736f9da04830593ff1899f0dc6a3df1a12e799patchXL  @@ -0,0 +1,35 @@
+package org.cbioportal.model;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class GenomicDataCountItem implements Serializable {
+
+    private String hugoGeneSymbol;
+    private String profileType;
+    private List<GenomicDataCount> counts;
+
+    public String getHugoGeneSymbol() {
+        return hugoGeneSymbol;
+    }
+
+    public void setHugoGeneSymbol(String hugoGeneSymbol) {
+        this.hugoGeneSymbol = hugoGeneSymbol;
+    }
+
+    public String getProfileType() {
+        return profileType;
+    }
+
+    public void setProfileType(String profileType) {
+        this.profileType = profileType;
+    }
+
+    public List<GenomicDataCount> getCounts() {
+        return counts;
+    }
+
+    public void setCounts(List<GenomicDataCount> counts) {
+        this.counts = counts;
+    }
+}u}(j  (67191ea758842520498fa65865633766fcae06dbjm  Bservice/src/main/java/org/cbioportal/service/StudyViewService.javajo  modifiedjg  Kjh  K jq  Kjr  https://github.com/cBioPortal/cbioportal/blob/3c736f9da04830593ff1899f0dc6a3df1a12e799/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javajt  https://github.com/cBioPortal/cbioportal/raw/3c736f9da04830593ff1899f0dc6a3df1a12e799/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javajv  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.java?ref=3c736f9da04830593ff1899f0dc6a3df1a12e799jx  X  @@ -1,6 +1,8 @@
 package org.cbioportal.service;
 
+import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
+import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.exception.StudyNotFoundException;
 
 import java.util.List;
@@ -19,6 +21,8 @@ List<AlterationCountByGene> getStructuralVariantAlterationCountByGenes(List<Stri
     List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> studyIds, List<String> sampleIds, AlterationFilter annotationFilter)
         throws StudyNotFoundException;
 
+    List<GenomicDataCountItem> getCNAAlterationCountsByGeneSpecific(List<String> studyIds, List<String> sampleIds, List<Pair<String, String>> genomicDataFilters);
+
     List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String> sampleIds, List<String> studyIds, List<String> stableIds, List<String> profileTypes);
 
 }u}(j  (510fa8f0206c012b5da48c56b46b1b5332445673jm  Kservice/src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.javajo  modifiedjg  Kcjh  Kjq  Kejr  https://github.com/cBioPortal/cbioportal/blob/3c736f9da04830593ff1899f0dc6a3df1a12e799/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javajt  https://github.com/cBioPortal/cbioportal/raw/3c736f9da04830593ff1899f0dc6a3df1a12e799/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javajv  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.java?ref=3c736f9da04830593ff1899f0dc6a3df1a12e799jx  X  @@ -2,6 +2,7 @@
 
 import org.apache.commons.collections4.map.MultiKeyMap;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
 import org.cbioportal.model.util.Select;
 import org.cbioportal.persistence.AlterationRepository;
@@ -15,6 +16,7 @@
 import java.util.*;
 import java.util.function.Function;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 @Service
 public class StudyViewServiceImpl implements StudyViewService {
@@ -37,6 +39,12 @@ public class StudyViewServiceImpl implements StudyViewService {
     @Autowired
     private AlterationRepository alterationRepository;
 
+    @Autowired
+    private GeneService geneService;
+    
+    @Autowired 
+    private MolecularDataService molecularDataService;
+    
     @Override
     public List<GenomicDataCount> getGenomicDataCounts(List<String> studyIds, List<String> sampleIds) {
         List<MolecularProfileCaseIdentifier> molecularProfileSampleIdentifiers =
@@ -154,7 +162,7 @@ public List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> stu
         throws StudyNotFoundException {
         List<MolecularProfileCaseIdentifier> caseIdentifiers =
             molecularProfileService.getFirstDiscreteCNAProfileCaseIdentifiers(studyIds, sampleIds);
-        Select<CNA> cnaTypes = Select.byValues(CNA_TYPES_AMP_AND_HOMDEL);
+        
         List<CopyNumberCountByGene> copyNumberCountByGenes = alterationCountService.getSampleCnaGeneCounts(
             caseIdentifiers,
             Select.all(),
@@ -186,6 +194,96 @@ public List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> stu
         return copyNumberCountByGenes;
     }
 
+    @Override
+    public List<GenomicDataCountItem> getCNAAlterationCountsByGeneSpecific(List<String> studyIds, 
+                                                                           List<String> sampleIds,
+                                                                           List<Pair<String, String>> genomicDataFilters) {
+        
+        List<MolecularProfile> molecularProfiles = molecularProfileService.getMolecularProfilesInStudies(studyIds,
+            "SUMMARY");
+
+        Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
+            .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
+
+        Set<String> hugoGeneSymbols = genomicDataFilters.stream().map(Pair::getKey)
+            .collect(Collectors.toSet());
+
+        Map<String, Integer> geneSymbolIdMap = geneService
+            .fetchGenes(new ArrayList<>(hugoGeneSymbols), "HUGO_GENE_SYMBOL",
+                "SUMMARY")
+            .stream().collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
+        
+        return genomicDataFilters
+            .stream()
+            .flatMap(gdFilter -> {
+                GenomicDataCountItem genomicDataCountItem = new GenomicDataCountItem();
+                String hugoGeneSymbol = gdFilter.getKey();
+                String profileType = gdFilter.getValue();
+                genomicDataCountItem.setHugoGeneSymbol(hugoGeneSymbol);
+                genomicDataCountItem.setProfileType(profileType);
+                
+                List<String> stableIds = Arrays.asList(geneSymbolIdMap.get(hugoGeneSymbol).toString());
+
+                Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
+                    .getOrDefault(profileType, new ArrayList<MolecularProfile>()).stream()
+                    .collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
+                        MolecularProfile::getStableId));
+                
+                List<String> mappedSampleIds = new ArrayList<>();
+                List<String> mappedProfileIds = new ArrayList<>();
+
+                for (int i = 0; i < sampleIds.size(); i++) {
+                    String studyId = studyIds.get(i);
+                    if (studyIdToMolecularProfileIdMap.containsKey(studyId)) {
+                        mappedSampleIds.add(sampleIds.get(i));
+                        mappedProfileIds.add(studyIdToMolecularProfileIdMap.get(studyId));
+                    }
+                }
+
+                if (mappedSampleIds.isEmpty()) {
+                    return Stream.of();
+                }
+
+                List<GeneMolecularData> geneMolecularDataList = molecularDataService.getMolecularDataInMultipleMolecularProfiles(mappedProfileIds, mappedSampleIds,
+                        stableIds.stream().map(Integer::parseInt).collect(Collectors.toList()), "SUMMARY");
+                
+                List<GenomicDataCount> genomicDataCounts = geneMolecularDataList
+                    .stream()
+                    .filter(g -> StringUtils.isNotEmpty(g.getValue()) && !g.getValue().equals("NA"))
+                    .collect(Collectors.groupingBy(GeneMolecularData::getValue))
+                    .entrySet()
+                    .stream()
+                    .map(entry -> {
+                        Integer alteration = Integer.valueOf(entry.getKey());
+                        List<GeneMolecularData> geneMolecularData = entry.getValue();
+                        int count = geneMolecularData.size();
+
+                        String label = CNA.getByCode(alteration.shortValue()).getDescription();
+
+                        GenomicDataCount genomicDataCount = new GenomicDataCount();
+                        genomicDataCount.setLabel(label);
+                        genomicDataCount.setValue(String.valueOf(alteration));
+                        genomicDataCount.setCount(count);
+
+                        return genomicDataCount;
+                    }).collect(Collectors.toList());
+
+                int totalCount = genomicDataCounts.stream().mapToInt(GenomicDataCount::getCount).sum();
+                int naCount = sampleIds.size() - totalCount;
+                
+                if (naCount > 0) {
+                    GenomicDataCount genomicDataCount = new GenomicDataCount();
+                    genomicDataCount.setLabel("NA");
+                    genomicDataCount.setValue("NA");
+                    genomicDataCount.setCount(naCount);
+                    genomicDataCounts.add(genomicDataCount);
+                }
+                
+                genomicDataCountItem.setCounts(genomicDataCounts);
+                return Stream.of(genomicDataCountItem);
+            }).collect(Collectors.toList());
+    };
+
     @Override
     public List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String> sampleIds, List<String> studyIds,
                                                                List<String> stableIds, List<String> profileTypes) {
@@ -261,5 +359,4 @@ public List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String>
             })
             .collect(Collectors.toList());
     }
-
 }u}(j  (827a7b752a515684801b8188ec8e397a80da98bfjm  Jservice/src/test/java/org/cbioportal/service/impl/BaseServiceImplTest.javajo  modifiedjg  Kjh  Kjq  Kjr  https://github.com/cBioPortal/cbioportal/blob/3c736f9da04830593ff1899f0dc6a3df1a12e799/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.javajt  https://github.com/cBioPortal/cbioportal/raw/3c736f9da04830593ff1899f0dc6a3df1a12e799/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.javajv  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.java?ref=3c736f9da04830593ff1899f0dc6a3df1a12e799jx  X  @@ -59,5 +59,7 @@ public class BaseServiceImplTest {
     public static final String CATEGORY_VALUE_1 = "category_value1";
     public static final String CATEGORY_VALUE_2 = "category_value2";
     public static final String EMPTY_VALUE_1 = "";
-    public static final String EMPTY_VALUE_2 = "NA";    
+    public static final String EMPTY_VALUE_2 = "NA";
+    public static final String PROFILE_TYPE_1 = "profile_type1";
+    public static final String PROFILE_TYPE_2 = "profile_type2";
 }u}(j  (801ab8afebfc5a1dbd192628acb1791f70a2338ajm  Oservice/src/test/java/org/cbioportal/service/impl/StudyViewServiceImplTest.javajo  modifiedjg  KNjh  Kjq  KRjr  https://github.com/cBioPortal/cbioportal/blob/3c736f9da04830593ff1899f0dc6a3df1a12e799/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javajt  https://github.com/cBioPortal/cbioportal/raw/3c736f9da04830593ff1899f0dc6a3df1a12e799/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javajv  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.java?ref=3c736f9da04830593ff1899f0dc6a3df1a12e799jx  Xv  @@ -14,10 +14,7 @@
 import org.mockito.Spy;
 import org.mockito.junit.MockitoJUnitRunner;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
+import java.util.*;
 
 import static org.mockito.ArgumentMatchers.*;
 
@@ -41,6 +38,10 @@ public class StudyViewServiceImplTest extends BaseServiceImplTest {
     private SignificantCopyNumberRegionService significantCopyNumberRegionService;
     @Mock
     private GenericAssayService genericAssayService;
+    @Mock
+    private MolecularDataService molecularDataService;
+    @Mock
+    private GeneService geneService;
     private AlterationFilter alterationFilter = new AlterationFilter();
 
     @Test
@@ -255,6 +256,79 @@ public void getCNAAlterationCountByGenes() throws Exception {
         Assert.assertEquals(1, result.size());
     }
 
+    @Test
+    public void getCNAAlterationCountByGeneSpecific() throws Exception {
+
+        List<String> sampleIds = Arrays.asList(BaseServiceImplTest.SAMPLE_ID1, BaseServiceImplTest.SAMPLE_ID2, BaseServiceImplTest.SAMPLE_ID3);
+        List<String> studyIds = Collections.nCopies(3, BaseServiceImplTest.STUDY_ID);
+        List<Pair<String, String>> genomicDataFilters = new ArrayList<>();
+        Pair<String, String> genomicDataFilter1 = new Pair<>(BaseServiceImplTest.HUGO_GENE_SYMBOL_1, BaseServiceImplTest.PROFILE_TYPE_1);
+        Pair<String, String> genomicDataFilter2 = new Pair<>(BaseServiceImplTest.HUGO_GENE_SYMBOL_2, BaseServiceImplTest.PROFILE_TYPE_2);
+        genomicDataFilters.add(genomicDataFilter1);
+        genomicDataFilters.add(genomicDataFilter2);
+
+        List<MolecularProfile> molecularProfiles = new ArrayList<>();
+        MolecularProfile molecularProfile = new MolecularProfile();
+        molecularProfile.setCancerStudyIdentifier(BaseServiceImplTest.STUDY_ID);
+        molecularProfile.setStableId(BaseServiceImplTest.STUDY_ID + "_" + BaseServiceImplTest.MOLECULAR_PROFILE_ID_A);
+        molecularProfiles.add(molecularProfile);
+        
+        Mockito.when(molecularProfileService.getMolecularProfilesInStudies(studyIds, "SUMMARY"))
+            .thenReturn(molecularProfiles);
+        
+        Map<String, List<MolecularProfile>> molecularProfileMap = new HashMap<>();
+        molecularProfileMap.put(BaseServiceImplTest.PROFILE_TYPE_1, molecularProfiles);
+        molecularProfileMap.put(BaseServiceImplTest.PROFILE_TYPE_2, molecularProfiles);
+   
+        Mockito.when(molecularProfileUtil.categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles))
+            .thenReturn(molecularProfileMap);
+        
+        List<Gene> genes = new ArrayList<>();
+        Gene gene1 = new Gene();
+        gene1.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
+        gene1.setHugoGeneSymbol(BaseServiceImplTest.HUGO_GENE_SYMBOL_1);
+        Gene gene2 = new Gene();
+        gene2.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_2);
+        gene2.setHugoGeneSymbol(BaseServiceImplTest.HUGO_GENE_SYMBOL_2);
+        genes.add(gene1);
+        genes.add(gene2);
+
+        Mockito.when(geneService.fetchGenes(anyList(), anyString(), anyString()))
+                .thenReturn(genes);
+
+        List<GeneMolecularData> geneMolecularData = new ArrayList<>();
+        GeneMolecularData geneMolecularData1 = new GeneMolecularData();
+        geneMolecularData1.setValue("-2");
+        GeneMolecularData geneMolecularData2 = new GeneMolecularData();
+        geneMolecularData2.setValue("-2");
+        GeneMolecularData geneMolecularData3 = new GeneMolecularData();
+        geneMolecularData3.setValue("2");
+        GeneMolecularData geneMolecularData4 = new GeneMolecularData();
+        geneMolecularData4.setValue("2");
+        geneMolecularData.add(geneMolecularData1);
+        geneMolecularData.add(geneMolecularData2);
+        geneMolecularData.add(geneMolecularData3);
+        geneMolecularData.add(geneMolecularData4);
+        
+        Mockito.when(molecularDataService.getMolecularDataInMultipleMolecularProfiles(
+            anyList(),
+            anyList(),
+            anyList(),
+            anyString()))
+            .thenReturn(geneMolecularData);
+        
+        List<GenomicDataCountItem> result = studyViewService.getCNAAlterationCountsByGeneSpecific(studyIds, sampleIds, genomicDataFilters);
+        Assert.assertEquals(2, result.size());
+        Assert.assertEquals(BaseServiceImplTest.HUGO_GENE_SYMBOL_1, result.get(0).getHugoGeneSymbol());
+        Assert.assertEquals(BaseServiceImplTest.PROFILE_TYPE_1, result.get(0).getProfileType());
+        Assert.assertEquals(2, result.get(0).getCounts().get(0).getCount().intValue());
+        Assert.assertEquals(2, result.get(0).getCounts().get(1).getCount().intValue());
+        Assert.assertEquals(BaseServiceImplTest.HUGO_GENE_SYMBOL_2, result.get(1).getHugoGeneSymbol());
+        Assert.assertEquals(BaseServiceImplTest.PROFILE_TYPE_2, result.get(1).getProfileType());
+        Assert.assertEquals(2, result.get(1).getCounts().get(0).getCount().intValue());
+        Assert.assertEquals(2, result.get(1).getCounts().get(1).getCount().intValue());
+    }
+
     @Test
     public void fetchGenericAssayDataCounts() throws Exception {
 u}(j  (f4ca464cf50123869269b7357a228fd1745d50f4jm  =web/src/main/java/org/cbioportal/web/StudyViewController.javajo  modifiedjg  K*jh  Kjq  K+jr  https://github.com/cBioPortal/cbioportal/blob/3c736f9da04830593ff1899f0dc6a3df1a12e799/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javajt  https://github.com/cBioPortal/cbioportal/raw/3c736f9da04830593ff1899f0dc6a3df1a12e799/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javajv  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=3c736f9da04830593ff1899f0dc6a3df1a12e799jx  Xh  @@ -9,14 +9,14 @@
 import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.commons.math3.stat.correlation.PearsonsCorrelation;
 import org.apache.commons.math3.stat.correlation.SpearmansCorrelation;
+import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
 import org.cbioportal.service.*;
 import org.cbioportal.service.exception.StudyNotFoundException;
 import org.cbioportal.service.util.ClinicalAttributeUtil;
 import org.cbioportal.web.config.annotation.InternalApi;
 import org.cbioportal.model.AlterationFilter;
 import org.cbioportal.web.parameter.*;
-import org.cbioportal.web.parameter.sort.ClinicalDataSortBy;
 import org.cbioportal.web.util.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.Cacheable;
@@ -861,6 +861,47 @@ public ResponseEntity<List<GenomicDataBin>> fetchGenomicDataBinCounts(
         return new ResponseEntity<>(studyViewFilterApplier.getDataBins(dataBinMethod, interceptedGenomicDataBinCountFilter), HttpStatus.OK);
     }
 
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @RequestMapping(value = "/genomic-data-counts/fetch", method = RequestMethod.POST,
+        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch genomic data counts by GenomicDataCountFilter")
+    public ResponseEntity<List<GenomicDataCountItem>> fetchGenomicDataCounts(
+        @ApiParam(required = true, value = "Genomic data count filter") @Valid @RequestBody(required = false) GenomicDataCountFilter genomicDataCountFilter,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiParam(required = true, value = "Intercepted Genomic Data Count Filter")
+        @ApiIgnore
+        @Valid @RequestAttribute(required = false, value = "interceptedGenomicDataCountFilter") GenomicDataCountFilter interceptedGenomicDataCountFilter
+    ) throws StudyNotFoundException {
+        List<GenomicDataFilter> gdFilters = interceptedGenomicDataCountFilter.getGenomicDataFilters();
+        StudyViewFilter studyViewFilter = interceptedGenomicDataCountFilter.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 (gdFilters.size() == 1) {
+            studyViewFilterUtil.removeSelfFromGenomicDataFilter(
+                gdFilters.get(0).getHugoGeneSymbol(), 
+                gdFilters.get(0).getProfileType(), 
+                studyViewFilter);
+        }
+        List<SampleIdentifier> filteredSampleIdentifiers = studyViewFilterApplier.apply(studyViewFilter);
+
+        if (filteredSampleIdentifiers.isEmpty()) {
+            return new ResponseEntity<>(new ArrayList<>(), HttpStatus.OK);
+        }
+
+        List<String> studyIds = new ArrayList<>();
+        List<String> sampleIds = new ArrayList<>();
+        studyViewFilterUtil.extractStudyAndSampleIds(filteredSampleIdentifiers, studyIds, sampleIds);
+        
+        List<GenomicDataCountItem> result = studyViewService.getCNAAlterationCountsByGeneSpecific(
+            studyIds,
+            sampleIds,
+            gdFilters.stream().map(gdFilter -> new Pair<>(gdFilter.getHugoGeneSymbol(), gdFilter.getProfileType())).collect(Collectors.toList()));
+
+        return new ResponseEntity<>(result, HttpStatus.OK);
+    }
+    
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/generic-assay-data-counts/fetch", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Fetch generic assay data counts by study view filter")uU      }(j  (c01ec7696c1c982450178be39d0a178edd3ad3dcjm  Jweb/src/main/java/org/cbioportal/web/parameter/GenomicDataCountFilter.javajo  addedjg  Kjh  K jq  Kjr  https://github.com/cBioPortal/cbioportal/blob/3c736f9da04830593ff1899f0dc6a3df1a12e799/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FGenomicDataCountFilter.javajt  https://github.com/cBioPortal/cbioportal/raw/3c736f9da04830593ff1899f0dc6a3df1a12e799/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FGenomicDataCountFilter.javajv  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FGenomicDataCountFilter.java?ref=3c736f9da04830593ff1899f0dc6a3df1a12e799jx  X  @@ -0,0 +1,26 @@
+package org.cbioportal.web.parameter;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class GenomicDataCountFilter implements Serializable {
+
+    private List<GenomicDataFilter> genomicDataFilters;
+    private StudyViewFilter studyViewFilter;
+
+    public List<GenomicDataFilter> getGenomicDataFilters() {
+        return genomicDataFilters;
+    }
+
+    public void setGenomicDataFilters(List<GenomicDataFilter> genomicDataFilters) {
+        this.genomicDataFilters = genomicDataFilters;
+    }
+
+    public StudyViewFilter getStudyViewFilter() {
+        return studyViewFilter;
+    }
+
+    public void setStudyViewFilter(StudyViewFilter studyViewFilter) {
+        this.studyViewFilter = studyViewFilter;
+    }
+}u}(j  (91720ee1f819695a41680c798e7c320a580a0fcajm  Vweb/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.javajo  modifiedjg  K jh  Kjq  K!jr  https://github.com/cBioPortal/cbioportal/blob/3c736f9da04830593ff1899f0dc6a3df1a12e799/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javajt  https://github.com/cBioPortal/cbioportal/raw/3c736f9da04830593ff1899f0dc6a3df1a12e799/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javajv  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.java?ref=3c736f9da04830593ff1899f0dc6a3df1a12e799jx  X  @@ -75,6 +75,7 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
     public static final String STUDY_VIEW_CLINICAL_DATA_BIN_COUNTS_PATH = "/clinical-data-bin-counts/fetch";
     public static final String STUDY_VIEW_CUSTOM_DATA_BIN_COUNTS_PATH = "/custom-data-bin-counts/fetch";
     public static final String STUDY_VIEW_GENOMICL_DATA_BIN_COUNTS_PATH = "/genomic-data-bin-counts/fetch";
+    public static final String STUDY_VIEW_GENOMICL_DATA_COUNTS_PATH = "/genomic-data-counts/fetch";
     public static final String STUDY_VIEW_GENERIC_ASSAY_DATA_BIN_COUNTS_PATH = "/generic-assay-data-bin-counts/fetch";
     public static final String STUDY_VIEW_GENERIC_ASSAY_DATA_COUNTS_PATH = "/generic-assay-data-counts/fetch";
     public static final String STUDY_VIEW_CLINICAL_DATA_COUNTS_PATH = "/clinical-data-counts/fetch";
@@ -132,14 +133,16 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
             return extractAttributesFromClinicalDataBinCountFilter(request);
         } else if (requestPathInfo.equals(STUDY_VIEW_GENOMICL_DATA_BIN_COUNTS_PATH)) {
             return extractAttributesFromGenomicDataBinCountFilter(request);
+        } else if (requestPathInfo.equals(STUDY_VIEW_GENOMICL_DATA_COUNTS_PATH)) {
+            return extractAttributesFromGenomicDataCountFilter(request);
         } else if (requestPathInfo.equals(STUDY_VIEW_GENERIC_ASSAY_DATA_BIN_COUNTS_PATH)) {
             return extractAttributesFromGenericAssayDataBinCountFilter(request);
         } else if (requestPathInfo.equals(STUDY_VIEW_GENERIC_ASSAY_DATA_COUNTS_PATH)) {
             return extractAttributesFromGenericAssayDataCountFilter(request);
         } else if (Arrays.asList(STUDY_VIEW_CLINICAL_DATA_COUNTS_PATH, STUDY_VIEW_CUSTOM_DATA_COUNTS_PATH)
                 .contains(requestPathInfo)) {
             return extractAttributesFromClinicalDataCountFilter(request);
-        } else if (Arrays.asList(STUDY_VIEW_CLINICAL_DATA_DENSITY_PATH, STUDY_VIEW_CLINICAL_DATA_VIOLIN_PATH, STUDY_VIEW_CNA_GENES,
+        } 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
@@ -481,6 +484,26 @@ private boolean extractAttributesFromGenomicDataBinCountFilter(HttpServletReques
         return true;
     }
 
+    private boolean extractAttributesFromGenomicDataCountFilter(HttpServletRequest request) {
+        try {
+            GenomicDataCountFilter genomicDataCountFilter = objectMapper.readValue(request.getInputStream(),
+                GenomicDataCountFilter.class);
+            LOG.debug("extracted genomicDataCountFilter: " + genomicDataCountFilter.toString());
+            LOG.debug("setting interceptedGenomicDataCountFilter to " + genomicDataCountFilter);
+            request.setAttribute("interceptedGenomicDataCountFilter", genomicDataCountFilter);
+            if (cacheMapUtil.hasCacheEnabled()) {
+                Collection<String> cancerStudyIdCollection = extractCancerStudyIdsFromGenomicDataCountFilter(
+                    genomicDataCountFilter);
+                LOG.debug("setting involvedCancerStudies to " + cancerStudyIdCollection);
+                request.setAttribute("involvedCancerStudies", cancerStudyIdCollection);
+            }
+        } catch (Exception e) {
+            LOG.error("exception thrown during extraction of genomicDataCountFilter: " + e);
+            return false;
+        }
+        return true;
+    }
+
     private boolean extractAttributesFromGenericAssayDataBinCountFilter(HttpServletRequest request) {
         try {
             GenericAssayDataBinCountFilter genericAssayDataBinCountFilter = objectMapper
@@ -726,6 +749,14 @@ private Set<String> extractCancerStudyIdsFromGenomicDataBinCountFilter(
         return new HashSet<String>();
     }
 
+    private Set<String> extractCancerStudyIdsFromGenomicDataCountFilter(
+        GenomicDataCountFilter genomicDataCountFilter) {
+        if (genomicDataCountFilter.getStudyViewFilter() != null) {
+            return extractCancerStudyIdsFromStudyViewFilter(genomicDataCountFilter.getStudyViewFilter());
+        }
+        return new HashSet<String>();
+    }
+
     private Set<String> extractCancerStudyIdsFromGenericAssayDataBinCountFilter(
             GenericAssayDataBinCountFilter genericAssayDataBinCountFilter) {
         if (genericAssayDataBinCountFilter.getStudyViewFilter() != null) {u}(j  (0b97b6df9543ab021cea2f48c0727c7b578a7517jm  Eweb/src/main/java/org/cbioportal/web/util/StudyViewFilterApplier.javajo  modifiedjg  Kjh  KQjq  Kjr  https://github.com/cBioPortal/cbioportal/blob/3c736f9da04830593ff1899f0dc6a3df1a12e799/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.javajt  https://github.com/cBioPortal/cbioportal/raw/3c736f9da04830593ff1899f0dc6a3df1a12e799/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.javajv  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.java?ref=3c736f9da04830593ff1899f0dc6a3df1a12e799jx  Xt?  @@ -166,8 +166,39 @@ public List<SampleIdentifier> apply(StudyViewFilter studyViewFilter, Boolean neg
             molecularProfiles = molecularProfileService.getMolecularProfilesInStudies(studyIds, "SUMMARY");
         }
 
-        sampleIdentifiers = intervalFilterExpressionData(sampleIdentifiers, molecularProfiles,
-                studyViewFilter.getGenomicDataFilters(), negateFilters);
+        List<GenomicDataFilter> genomicDataEqualityFilters = new ArrayList<>();
+        List<GenomicDataFilter> genomicDataIntervalFilters = new ArrayList<>();
+
+        List<GenomicDataFilter> genomicDataFilters = studyViewFilter.getGenomicDataFilters();
+
+        if (!CollectionUtils.isEmpty(genomicDataFilters)) {
+            Map<String, MolecularProfile> molecularProfileMapByType = molecularProfileUtil
+                .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles)
+                .entrySet()
+                .stream()
+                .collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().get(0)));
+
+            genomicDataFilters.forEach(genomicDataFilter -> {
+                String profileType = genomicDataFilter.getProfileType();
+                if (molecularProfileMapByType.containsKey(profileType)) {
+                    if (molecularProfileMapByType.get(profileType).getDatatype().equals("DISCRETE")) {
+                        genomicDataEqualityFilters.add(genomicDataFilter);
+                    } else {
+                        genomicDataIntervalFilters.add(genomicDataFilter);
+                    }
+                }
+            });
+        }
+        
+        if (!CollectionUtils.isEmpty(genomicDataEqualityFilters)) {
+            sampleIdentifiers = equalityFilterExpressionData(sampleIdentifiers, molecularProfiles,
+                genomicDataEqualityFilters, negateFilters);
+        }
+        
+        if (!CollectionUtils.isEmpty(genomicDataIntervalFilters)) {
+            sampleIdentifiers = intervalFilterExpressionData(sampleIdentifiers, molecularProfiles,
+                genomicDataIntervalFilters, negateFilters);
+        }
 
         sampleIdentifiers = intervalFilterExpressionData(sampleIdentifiers, molecularProfiles,
                 studyViewFilter.getGenericAssayDataFilters(), negateFilters);
@@ -847,99 +878,39 @@ private GenericAssayDataBin dataBintoGenericAssayDataBin(GenericAssayDataBinFilt
     }
 
     public <S extends DataFilter> List<SampleIdentifier> intervalFilterExpressionData(
-            List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
-            Boolean negateFilters) {
-
-        if (!CollectionUtils.isEmpty(dataFilters) && !CollectionUtils.isEmpty(sampleIdentifiers)) {
-
-            Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
-                    .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
+        Boolean negateFilters) {
 
-            List<String> studyIds = new ArrayList<>();
-            List<String> sampleIds = new ArrayList<>();
-            studyViewFilterUtil.extractStudyAndSampleIds(sampleIdentifiers, studyIds, sampleIds);
-            List<ClinicalData> clinicalDatas = new ArrayList<>();
-            List<ClinicalDataFilter> attributes = new ArrayList<>();
-            if (dataFilters.get(0) instanceof GenomicDataFilter) {
-                List<GenomicDataFilter> genomicDataIntervalFilters = (List<GenomicDataFilter>) dataFilters;
-                Set<String> hugoGeneSymbols = genomicDataIntervalFilters.stream()
-                        .map(GenomicDataFilter::getHugoGeneSymbol).collect(Collectors.toSet());
-                Map<String, Integer> geneNameIdMap = geneService
-                        .fetchGenes(new ArrayList<>(hugoGeneSymbols), GeneIdType.HUGO_GENE_SYMBOL.name(),
-                                Projection.SUMMARY.name())
-                        .stream().collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
-
-                clinicalDatas = genomicDataIntervalFilters.stream().flatMap(genomicDataFilter -> {
-
-                    Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
-                            .getOrDefault(genomicDataFilter.getProfileType(), new ArrayList<>())
-                            .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
-                                    MolecularProfile::getStableId));
-
-                    GenomicDataBinFilter genomicDataBinFilter = new GenomicDataBinFilter();
-                    genomicDataBinFilter.setHugoGeneSymbol(genomicDataFilter.getHugoGeneSymbol());
-                    genomicDataBinFilter.setProfileType(genomicDataFilter.getProfileType());
-                    return invokeDataFunc(sampleIds, studyIds,
-                            Arrays.asList(geneNameIdMap.get(genomicDataFilter.getHugoGeneSymbol()).toString()),
-                            studyIdToMolecularProfileIdMap, genomicDataBinFilter, fetchMolecularData);
-                }).collect(Collectors.toList());
-
-                attributes = genomicDataIntervalFilters.stream().map(genomicDataIntervalFilter -> {
-                    String attributeId = studyViewFilterUtil.getGenomicDataFilterUniqueKey(
-                            genomicDataIntervalFilter.getHugoGeneSymbol(), genomicDataIntervalFilter.getProfileType());
-                    ClinicalDataFilter clinicalDataIntervalFilter = new ClinicalDataFilter();
-                    clinicalDataIntervalFilter.setAttributeId(attributeId);
-                    clinicalDataIntervalFilter.setValues(genomicDataIntervalFilter.getValues());
-                    return clinicalDataIntervalFilter;
-                }).collect(Collectors.toList());
-            } else {
-                List<GenericAssayDataFilter> genericAssayDataFilters = (List<GenericAssayDataFilter>) dataFilters;
-
-                clinicalDatas = genericAssayDataFilters.stream().flatMap(genericAssayDataFilter -> {
+        return filterExpressionData(sampleIdentifiers, molecularProfiles, dataFilters, negateFilters, clinicalDataIntervalFilterApplier);
+    }
 
-                    Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
-                            .getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>())
-                            .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
-                                    MolecularProfile::getStableId));
-                    GenericAssayDataBinFilter genericAssayDataBinFilter = new GenericAssayDataBinFilter();
-                    genericAssayDataBinFilter.setStableId(genericAssayDataFilter.getStableId());
-                    genericAssayDataBinFilter.setProfileType(genericAssayDataFilter.getProfileType());
+    public <S extends DataFilter> List<SampleIdentifier> equalityFilterExpressionData(
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
+        Boolean negateFilters) {
 
-                    // get original data stream from invokeDataFunc
-                    Stream<ClinicalData> dataStream = invokeDataFunc(sampleIds, studyIds, Arrays.asList(genericAssayDataBinFilter.getStableId()),
-                        studyIdToMolecularProfileIdMap, genericAssayDataBinFilter, fetchGenericAssayData);
-                    // For patient level generic assay profile, only keep the one sample per patient
-                    List<MolecularProfile> profiles = molecularProfileMap.getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>());
-                    if (profiles.size() > 0 && profiles.get(0).getPatientLevel() == true) {
-                        dataStream = dataStream.collect(Collectors.groupingBy(d -> d.getPatientId())).values().stream()
-                            .flatMap(d -> d.stream().limit(1));
-                    }
-                    // don't change anything for non patient level data
-                    return dataStream;
-                }).collect(Collectors.toList());
+        return filterExpressionData(sampleIdentifiers, molecularProfiles, dataFilters, negateFilters, clinicalDataEqualityFilterApplier);
+    }
 
-                attributes = genericAssayDataFilters.stream().map(genericAssayDataFilter -> {
-                    String attributeId = studyViewFilterUtil.getGenericAssayDataFilterUniqueKey(
-                            genericAssayDataFilter.getStableId(), genericAssayDataFilter.getProfileType());
-                    ClinicalDataFilter clinicalDataIntervalFilter = new ClinicalDataFilter();
-                    clinicalDataIntervalFilter.setAttributeId(attributeId);
-                    clinicalDataIntervalFilter.setValues(genericAssayDataFilter.getValues());
-                    return clinicalDataIntervalFilter;
-                }).collect(Collectors.toList());
 
-            }
+    public <S extends DataFilter> List<SampleIdentifier> filterExpressionData(
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
+        Boolean negateFilters, ClinicalDataFilterApplier clinicalDataFilterApplier) {
+        if (!CollectionUtils.isEmpty(dataFilters) && !CollectionUtils.isEmpty(sampleIdentifiers)) {
+            List<ClinicalData> clinicalDatas =
+                fetchDataAndTransformToClinicalDataList(sampleIdentifiers, molecularProfiles, dataFilters);
+            List<ClinicalDataFilter> attributes =transformToClinicalDataFilter(dataFilters);
 
             MultiKeyMap clinicalDataMap = new MultiKeyMap();
 
             clinicalDatas.forEach(clinicalData -> {
                 clinicalDataMap.put(clinicalData.getStudyId(), clinicalData.getSampleId(), clinicalData.getAttrId(),
-                        clinicalData.getAttrValue());
+                    clinicalData.getAttrValue());
             });
 
             List<SampleIdentifier> newSampleIdentifiers = new ArrayList<>();
             for (SampleIdentifier sampleIdentifier : sampleIdentifiers) {
-                int count = clinicalDataIntervalFilterApplier.apply(attributes, clinicalDataMap,
-                        sampleIdentifier.getSampleId(), sampleIdentifier.getStudyId(), negateFilters);
+                int count = clinicalDataFilterApplier.apply(attributes, clinicalDataMap,
+                    sampleIdentifier.getSampleId(), sampleIdentifier.getStudyId(), negateFilters);
 
                 if (count == attributes.size()) {
                     newSampleIdentifiers.add(sampleIdentifier);
@@ -951,4 +922,86 @@ public <S extends DataFilter> List<SampleIdentifier> intervalFilterExpressionDat
 
         return sampleIdentifiers;
     }
+    
+    private <S extends DataFilter> List<ClinicalData> fetchDataAndTransformToClinicalDataList(
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters) {
+        Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
+            .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
+
+        List<String> studyIds = new ArrayList<>();
+        List<String> sampleIds = new ArrayList<>();
+        studyViewFilterUtil.extractStudyAndSampleIds(sampleIdentifiers, studyIds, sampleIds);
+        
+        if (dataFilters.get(0) instanceof GenomicDataFilter) {
+            List<GenomicDataFilter> genomicDataIntervalFilters = (List<GenomicDataFilter>) dataFilters;
+            Set<String> hugoGeneSymbols = genomicDataIntervalFilters.stream()
+                .map(GenomicDataFilter::getHugoGeneSymbol).collect(Collectors.toSet());
+            Map<String, Integer> geneNameIdMap = geneService
+                .fetchGenes(new ArrayList<>(hugoGeneSymbols), GeneIdType.HUGO_GENE_SYMBOL.name(),
+                    Projection.SUMMARY.name())
+                .stream().collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
+
+            return genomicDataIntervalFilters.stream().flatMap(genomicDataFilter -> {
+
+                Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
+                    .getOrDefault(genomicDataFilter.getProfileType(), new ArrayList<>())
+                    .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
+                        MolecularProfile::getStableId));
+
+                GenomicDataBinFilter genomicDataBinFilter = new GenomicDataBinFilter();
+                genomicDataBinFilter.setHugoGeneSymbol(genomicDataFilter.getHugoGeneSymbol());
+                genomicDataBinFilter.setProfileType(genomicDataFilter.getProfileType());
+                return invokeDataFunc(sampleIds, studyIds,
+                    Collections.singletonList(geneNameIdMap.get(genomicDataFilter.getHugoGeneSymbol()).toString()),
+                    studyIdToMolecularProfileIdMap, genomicDataBinFilter, fetchMolecularData);
+            }).collect(Collectors.toList());
+
+        } else {
+
+            return ((List<GenericAssayDataFilter>) dataFilters).stream().flatMap(genericAssayDataFilter -> {
+
+                Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
+                    .getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>())
+                    .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
+                        MolecularProfile::getStableId));
+                GenericAssayDataBinFilter genericAssayDataBinFilter = new GenericAssayDataBinFilter();
+                genericAssayDataBinFilter.setStableId(genericAssayDataFilter.getStableId());
+                genericAssayDataBinFilter.setProfileType(genericAssayDataFilter.getProfileType());
+
+                // get original data stream from invokeDataFunc
+                Stream<ClinicalData> dataStream = invokeDataFunc(sampleIds, studyIds, Collections.singletonList(genericAssayDataBinFilter.getStableId()),
+                    studyIdToMolecularProfileIdMap, genericAssayDataBinFilter, fetchGenericAssayData);
+                // For patient level generic assay profile, only keep the one sample per patient
+                List<MolecularProfile> profiles = molecularProfileMap.getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<>());
+                if (profiles.size() > 0 && profiles.get(0).getPatientLevel()) {
+                    dataStream = dataStream.collect(Collectors.groupingBy(ClinicalData::getPatientId)).values().stream()
+                        .flatMap(d -> d.stream().limit(1));
+                }
+                // don't change anything for non patient level data
+                return dataStream;
+            }).collect(Collectors.toList());
+
+        }
+    }
+
+    private <S extends DataFilter> List<ClinicalDataFilter> transformToClinicalDataFilter(List<S> dataFilters) {
+        List<ClinicalDataFilter> attributes;
+        attributes = dataFilters.stream().map(dataFilter -> {
+            String attributeId;
+            if (dataFilter instanceof GenomicDataFilter) {
+                GenomicDataFilter genomicDataFilter = (GenomicDataFilter) dataFilter;
+                attributeId = studyViewFilterUtil.getGenomicDataFilterUniqueKey(genomicDataFilter.getHugoGeneSymbol(), genomicDataFilter.getProfileType());
+            } else {
+                GenericAssayDataFilter genericAssayDataFilter = (GenericAssayDataFilter) dataFilter;
+                attributeId = studyViewFilterUtil.getGenericAssayDataFilterUniqueKey(
+                    genericAssayDataFilter.getStableId(), genericAssayDataFilter.getProfileType());
+            }
+
+            ClinicalDataFilter clinicalDataFilter = new ClinicalDataFilter();
+            clinicalDataFilter.setAttributeId(attributeId);
+            clinicalDataFilter.setValues(dataFilter.getValues());
+            return clinicalDataFilter;
+        }).collect(Collectors.toList());
+        return attributes;
+    }
 }u}(j  (ecf5bdab85cceb359f2f511895ea0a4e26cbd0b9jm  Bweb/src/main/java/org/cbioportal/web/util/StudyViewFilterUtil.javajo  modifiedjg  Kjh  Kjq  Kjr  https://github.com/cBioPortal/cbioportal/blob/3c736f9da04830593ff1899f0dc6a3df1a12e799/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javajt  https://github.com/cBioPortal/cbioportal/raw/3c736f9da04830593ff1899f0dc6a3df1a12e799/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javajv  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.java?ref=3c736f9da04830593ff1899f0dc6a3df1a12e799jx  X  @@ -45,19 +45,27 @@ public void extractStudyAndSampleIds(
     }
 
     public void removeSelfFromFilter(String attributeId, StudyViewFilter studyViewFilter) {
-        if (studyViewFilter!= null && studyViewFilter.getClinicalDataFilters() != null) {
+        if (studyViewFilter != null && studyViewFilter.getClinicalDataFilters() != null) {
             studyViewFilter.getClinicalDataFilters().removeIf(f -> f.getAttributeId().equals(attributeId));
         }
     }
+    
+    public void removeSelfFromGenomicDataFilter(String hugoGeneSymbol, String profileType, StudyViewFilter studyViewFilter) {
+        if (studyViewFilter != null && studyViewFilter.getGenomicDataFilters() != null) {
+            studyViewFilter.getGenomicDataFilters().removeIf(f -> 
+                f.getHugoGeneSymbol().equals(hugoGeneSymbol) && f.getProfileType().equals(profileType)
+            );
+        }
+    }
 
     public void removeSelfFromGenericAssayFilter(String stableId, StudyViewFilter studyViewFilter) {
-        if (studyViewFilter!= null && studyViewFilter.getGenericAssayDataFilters() != null) {
+        if (studyViewFilter != null && studyViewFilter.getGenericAssayDataFilters() != null) {
             studyViewFilter.getGenericAssayDataFilters().removeIf(f -> f.getStableId().equals(stableId));
         }
     }
 
     public void removeSelfCustomDataFromFilter(String attributeId, StudyViewFilter studyViewFilter) {
-        if (studyViewFilter!= null && studyViewFilter.getCustomDataFilters() != null) {
+        if (studyViewFilter != null && studyViewFilter.getCustomDataFilters() != null) {
             studyViewFilter.getCustomDataFilters().removeIf(f -> f.getAttributeId().equals(attributeId));
         }
     }u}(j  (3951e57b963be731abed688f002aa194fc2f0793jm  Aweb/src/test/java/org/cbioportal/web/StudyViewControllerTest.javajo  modifiedjg  K[jh  K jq  K[jr  https://github.com/cBioPortal/cbioportal/blob/3c736f9da04830593ff1899f0dc6a3df1a12e799/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javajt  https://github.com/cBioPortal/cbioportal/raw/3c736f9da04830593ff1899f0dc6a3df1a12e799/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javajv  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.java?ref=3c736f9da04830593ff1899f0dc6a3df1a12e799jx  X  @@ -62,6 +62,11 @@ public class StudyViewControllerTest {
     private static final String TEST_GENERIC_ASSAY_DATA_VALUE_2 = "value2";
     private static final String TEST_CLINICAL_EVENT_TYPE = "STATUS";
     private static final Integer TEST_CLINICAL_EVENT_TYPE_COUNT = 513;
+    private static final String TEST_CNA_ALTERATION_NAME_1 = "test_cna_event_type_1";
+    private static final String TEST_CNA_ALTERATION_NAME_2 = "test_cna_event_type_2";
+    private static final String TEST_CNA_ALTERATION_VALUE_1 = "2";
+    private static final String TEST_CNA_ALTERATION_VALUE_2 = "-2";
+    private static final String TEST_MOLECULAR_PROFILE_TYPE = "test_molecular_profile_type";
 
     private List<SampleIdentifier> filteredSampleIdentifiers = new ArrayList<>();
     private List<ClinicalData> clinicalData = new ArrayList<>();
@@ -506,6 +511,92 @@ public void fetchSampleCounts() throws Exception {
             .andExpect(MockMvcResultMatchers.jsonPath("$[1].count").value(2));
     }
 
+
+    @Test
+    public void fetchGenomicDataCounts() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+
+        List<GenomicDataCountItem> genomicDataCountItems = new ArrayList<>();
+
+        GenomicDataCount genomicDataCount1 = new GenomicDataCount();
+        genomicDataCount1.setLabel(TEST_CNA_ALTERATION_NAME_1);
+        genomicDataCount1.setValue(TEST_CNA_ALTERATION_VALUE_1);
+        genomicDataCount1.setCount(1);
+        
+        GenomicDataCount genomicDataCount2 = new GenomicDataCount();
+        genomicDataCount2.setLabel(TEST_CNA_ALTERATION_NAME_2);
+        genomicDataCount2.setValue(TEST_CNA_ALTERATION_VALUE_2);
+        genomicDataCount2.setCount(1);
+
+        GenomicDataCountItem genomicDataCountItem1 = new GenomicDataCountItem();
+        List<GenomicDataCount> genomicDataCounts1 = new ArrayList<>();
+        genomicDataCounts1.add(genomicDataCount1);
+        genomicDataCounts1.add(genomicDataCount2);
+        genomicDataCountItem1.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_1);
+        genomicDataCountItem1.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataCountItem1.setCounts(genomicDataCounts1);
+
+        GenomicDataCountItem genomicDataCountItem2 = new GenomicDataCountItem();
+        List<GenomicDataCount> genomicDataCounts2 = new ArrayList<>();
+        genomicDataCounts2.add(genomicDataCount1);
+        genomicDataCounts2.add(genomicDataCount2);
+        genomicDataCountItem2.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_2);
+        genomicDataCountItem2.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataCountItem2.setCounts(genomicDataCounts2);
+
+        genomicDataCountItems.add(genomicDataCountItem1);
+        genomicDataCountItems.add(genomicDataCountItem2);
+
+        when(studyViewService.getCNAAlterationCountsByGeneSpecific(
+            anyList(),
+            anyList(),
+            anyList()))
+            .thenReturn(genomicDataCountItems);
+
+        GenomicDataCountFilter genomicDataCountFilter = new GenomicDataCountFilter();
+        List<GenomicDataFilter> genomicDataFilters = new ArrayList<>();
+        
+        GenomicDataFilter genomicDataFilter1 = new GenomicDataFilter();
+        genomicDataFilter1.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_1);
+        genomicDataFilter1.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataFilters.add(genomicDataFilter1);
+        
+        GenomicDataFilter genomicDataFilter2 = new GenomicDataFilter();
+        genomicDataFilter2.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_2);
+        genomicDataFilter2.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataFilters.add(genomicDataFilter2);
+        
+        genomicDataCountFilter.setGenomicDataFilters(genomicDataFilters);
+        
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+        genomicDataCountFilter.setStudyViewFilter(studyViewFilter);
+
+        mockMvc.perform(MockMvcRequestBuilders.post("/genomic-data-counts/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(genomicDataCountFilter)))
+            .andExpect(MockMvcResultMatchers.status().isOk())
+            .andExpect(MockMvcResultMatchers.content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].hugoGeneSymbol").value(TEST_HUGO_GENE_SYMBOL_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].profileType").value(TEST_MOLECULAR_PROFILE_TYPE))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[0].label").value(TEST_CNA_ALTERATION_NAME_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[0].value").value(TEST_CNA_ALTERATION_VALUE_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[0].count").value(1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[1].label").value(TEST_CNA_ALTERATION_NAME_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[1].value").value(TEST_CNA_ALTERATION_VALUE_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[1].count").value(1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].hugoGeneSymbol").value(TEST_HUGO_GENE_SYMBOL_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].profileType").value(TEST_MOLECULAR_PROFILE_TYPE))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[0].label").value(TEST_CNA_ALTERATION_NAME_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[0].value").value(TEST_CNA_ALTERATION_VALUE_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[0].count").value(1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[1].label").value(TEST_CNA_ALTERATION_NAME_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[1].value").value(TEST_CNA_ALTERATION_VALUE_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[1].count").value(1));
+    }
+    
     @Ignore("Skip StudyViewControllerTest.fetchClinicalDataDensityPlot due to assertion errors")
     @Test
     public void fetchClinicalDataDensityPlot() throws Exception {ueu(16acfa77f9049f56019845322794989f996ec78f}(sha(16acfa77f9049f56019845322794989f996ec78fnode_idEC_kwDOAe-hB9oAKDE2YWNmYTc3ZjkwNDlmNTYwMTk4NDUzMjI3OTQ5ODlmOTk2ZWM3OGYcommit}(author}(nameKarthikemailkalletlakarthik@gmail.comdate2023-07-03T04:15:09Zu	committer}(jԁ  Karthikjց  kalletlakarthik@gmail.comj؁  2023-07-19T13:24:30Zumessage!Changes related to download grouptree}(j́  (9883095c30c8dbb7f013402a9e815ea97d9f5310urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/9883095c30c8dbb7f013402a9e815ea97d9f5310uj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/16acfa77f9049f56019845322794989f996ec78f
comment_countK verification}(verifiedreasonunsigned	signatureNpayloadNuuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/16acfa77f9049f56019845322794989f996ec78fhtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/16acfa77f9049f56019845322794989f996ec78fcomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/16acfa77f9049f56019845322794989f996ec78f/commentsjҁ  }(login	kalletlakidJƴ j΁  MDQ6VXNlcjEyOTU2ODcw
avatar_url4https://avatars.githubusercontent.com/u/12956870?v=4gravatar_idh5j  &https://api.github.com/users/kalletlakj  https://github.com/kalletlak
followers_url0https://api.github.com/users/kalletlak/followers
following_url=https://api.github.com/users/kalletlak/following{/other_user}	gists_url6https://api.github.com/users/kalletlak/gists{/gist_id}starred_url=https://api.github.com/users/kalletlak/starred{/owner}{/repo}subscriptions_url4https://api.github.com/users/kalletlak/subscriptionsorganizations_url+https://api.github.com/users/kalletlak/orgs	repos_url,https://api.github.com/users/kalletlak/repos
events_url7https://api.github.com/users/kalletlak/events{/privacy}received_events_url6https://api.github.com/users/kalletlak/received_eventstypeUser
site_adminujځ  }(j  	kalletlakj  Jƴ j΁  MDQ6VXNlcjEyOTU2ODcwj  4https://avatars.githubusercontent.com/u/12956870?v=4j  h5j  &https://api.github.com/users/kalletlakj  https://github.com/kalletlakj  0https://api.github.com/users/kalletlak/followersj   =https://api.github.com/users/kalletlak/following{/other_user}j  6https://api.github.com/users/kalletlak/gists{/gist_id}j  =https://api.github.com/users/kalletlak/starred{/owner}{/repo}j  4https://api.github.com/users/kalletlak/subscriptionsj  +https://api.github.com/users/kalletlak/orgsj
  ,https://api.github.com/users/kalletlak/reposj  7https://api.github.com/users/kalletlak/events{/privacy}j  6https://api.github.com/users/kalletlak/received_eventsj  Userj  uparents]}(j́  (a3794f7cd5a60974b8c04938d5b3d784a5bfb09aj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/a3794f7cd5a60974b8c04938d5b3d784a5bfb09aj  Xhttps://github.com/cBioPortal/cbioportal/commit/a3794f7cd5a60974b8c04938d5b3d784a5bfb09auastats}(totalK7	additionsK)	deletionsKufiles](}(j́  (ba311e72ad546f15e928b0da81d7aa27c78d222dfilenameCcore/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.javastatusmodifiedj,  Kj-  KchangesK*blob_urlhttps://github.com/cBioPortal/cbioportal/blob/16acfa77f9049f56019845322794989f996ec78f/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/16acfa77f9049f56019845322794989f996ec78f/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.java?ref=16acfa77f9049f56019845322794989f996ec78fpatchX  @@ -50,11 +50,13 @@
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.commons.lang.StringUtils;
 import org.cbioportal.security.spring.authentication.PortalUserDetails;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.security.core.Authentication;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Component;
 import org.springframework.util.ResourceUtils;
@@ -362,6 +364,10 @@ public static String parseUrl(String url)
     @Value("${frontend.url.runtime:}") 
     public void setFrontendUrlRuntime(String property) { frontendUrlRuntime = property; }
 
+    private static String downloadGroup;
+    @Value("${download_group:}") // default is empty string
+    public void setDownloadGroup(String property) { downloadGroup = property; }
+
     private static Logger LOG = LoggerFactory.getLogger(GlobalProperties.class);
     private static ConfigPropertyResolver portalProperties = new ConfigPropertyResolver();
     private static Properties mavenProperties = initializeProperties(MAVEN_PROPERTIES_FILE_NAME);
@@ -1264,18 +1270,30 @@ public static String getOncoKbToken()  {
     }
 
     public static String getDownloadControl() {
-        String downloadControlOption = getProperty("skin.hide_download_controls");
-        /*
-            skin.hide_download_controls   return_value
-                    true                    hide
-                    false                   show
-                    data                    data
-                    null/empty              show
-         */
-        switch ((downloadControlOption != null) ? downloadControlOption.trim().toLowerCase() : "false") {
-            case "true" : return "hide";
-            case "data" : return "data";
-            default: return "show";
+        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+
+        if (authentication != null &&
+            StringUtils.isNotEmpty(downloadGroup) &&
+            authentication.getAuthorities().contains(new SimpleGrantedAuthority(downloadGroup))) {
+            return "show";
+        } else {
+            String downloadControlOption = getProperty("skin.hide_download_controls");
+            /*
+                skin.hide_download_controls   return_value
+                        true                    hide
+                        false                   show
+                        data                    data
+                        null/empty              show
+             */
+            switch ((downloadControlOption != null) ? downloadControlOption.trim().toLowerCase() : "false") {
+                case "true":
+                    return "hide";
+                case "data":
+                    return "data";
+                case "false":
+                default:
+                    return "show";
+            }
         }
     }
 }u}(j́  (7575ad635078b9f00b139a0c52ec234c01eba5c0j2  Hdocs/deployment/customization/Customizing-your-instance-of-cBioPortal.mdj4  modifiedj,  Kj-  K j6  Kj7  https://github.com/cBioPortal/cbioportal/blob/16acfa77f9049f56019845322794989f996ec78f/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdj9  https://github.com/cBioPortal/cbioportal/raw/16acfa77f9049f56019845322794989f996ec78f/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdj;  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.md?ref=16acfa77f9049f56019845322794989f996ec78fj=  X<  @@ -246,6 +246,13 @@ Below you can find the complete list of all the available skin properties.
             <td>controls download options in UI. **true**: hides all download options. **false**:  shows all download options. **data**: disable data download but not figure download</td>
             <td>false</td>
             <td>true / false / data</td>
+        </tr>
+		<tr>
+            <td>download_group</td>
+            <td>controls download options in UI for each user. If present and user is authenticated, this value is checked against user roles.
+If the download_group is present in user groups then download options are shown in UI, else it fallback to **skin.hide_download_controls**</td>
+            <td></td>
+            <td>text</td>
         </tr>
         <tr>
             <td>skin.show_settings_menu</td>u}(j́  (ab5bbf48c3e1265677a20e9b240c0521c4e4da03j2  )portal/src/main/webapp/config_service.jspj4  modifiedj,  Kj-  Kj6  Kj7  https://github.com/cBioPortal/cbioportal/blob/16acfa77f9049f56019845322794989f996ec78f/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj9  https://github.com/cBioPortal/cbioportal/raw/16acfa77f9049f56019845322794989f996ec78f/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj;  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=16acfa77f9049f56019845322794989f996ec78fj=  Xp  @@ -202,7 +202,7 @@
         obj.put("oncoKbTokenDefined", !StringUtils.isEmpty(GlobalProperties.getOncoKbToken()));
 
         obj.put("sessionServiceEnabled", !StringUtils.isEmpty(GlobalProperties.getSessionServiceUrl()));
-        
+
         obj.put("skin_hide_download_controls", GlobalProperties.getDownloadControl());
 
         out.println(obj.toJSONString());u}(j́  (efae1b8c7946f5f768afae5b44f7b2585dab18b9j2  ,src/main/resources/portal.properties.EXAMPLEj4  modifiedj,  Kj-  Kj6  Kj7  https://github.com/cBioPortal/cbioportal/blob/16acfa77f9049f56019845322794989f996ec78f/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj9  https://github.com/cBioPortal/cbioportal/raw/16acfa77f9049f56019845322794989f996ec78f/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLEj;  https://api.github.com/repos/cBioPortal/cbioportal/contents/src%2Fmain%2Fresources%2Fportal.properties.EXAMPLE?ref=16acfa77f9049f56019845322794989f996ec78fj=  X-  @@ -433,4 +433,6 @@ persistence.cache_type=no-cache
 
 # Set StudyDownloadLinkUrl
 # Allows download links within DataSets Tab (See Portal.Properties documentation for more info)
-# study_download_url=
\ No newline at end of file
+# study_download_url=
+
+# download_group=
\ No newline at end of fileueu(cd2253390e6640d8bfdb84cd79d0ab25e6b422de}(sha(cd2253390e6640d8bfdb84cd79d0ab25e6b422denode_idEC_kwDOAe-hB9oAKGNkMjI1MzM5MGU2NjQwZDhiZmRiODRjZDc5ZDBhYjI1ZTZiNDIyZGUcommit}(author}(name
Ino de Bruijnemailino@ino.biodate2023-08-08T21:11:09Zu	committer}(ja  GitHubjc  noreply@github.comje  2023-08-08T21:11:09Zumessage"Add Karthik to Caris on About Pagetree}(jY  (1a2cf2bb5a1dddff91979d26a6b5a5d034e12ee2urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/1a2cf2bb5a1dddff91979d26a6b5a5d034e12ee2ujq  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/cd2253390e6640d8bfdb84cd79d0ab25e6b422de
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk0q9uCRBK7hj4Ov3rIwAA/mUIAGl8W1TssJm0gEWqYx5hST/W
Qi5yGfMi4JSCJAJo6eJKIQNxZvrd9qd12rYtq4EaMZtiep8/zEFsXf6Vbce/Wqu4
sJ9UngWghlecmi6fuZsxNJhWvcDZnegxbwySgxwPLgrxlfQl8ZjLtM9xepE1gN5n
wZStlyoFJaIGSftUXTGTLGa7oyUp2fYTtUkoCr+owx/1WvxZHxeujQa1z7acOj5f
BKNZiUA87ynLnh04LXtuqIjZZh+y15hW1in5DIjDN63hnNem82UN6sfgXWAgbJXm
fP0PMOpE1Hz7fYLJKNxQTcdoXDtID2w89FHuR7Ffjm0bV3ZY8wET1QQD4+8mCR8=
=Biz4
-----END PGP SIGNATURE-----
payloadtree 1a2cf2bb5a1dddff91979d26a6b5a5d034e12ee2
parent ca2bdff949965b3628bc5a96d379074d21546de6
author Ino de Bruijn <ino@ino.bio> 1691529069 -0400
committer GitHub <noreply@github.com> 1691529069 -0400

Add Karthik to Caris on About Pageuujq  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/cd2253390e6640d8bfdb84cd79d0ab25e6b422dehtml_urlXhttps://github.com/cBioPortal/cbioportal/commit/cd2253390e6640d8bfdb84cd79d0ab25e6b422decomments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/cd2253390e6640d8bfdb84cd79d0ab25e6b422de/commentsj_  }(logininodbidJZ j[  MDQ6VXNlcjEzMzQwMDQ=
avatar_url3https://avatars.githubusercontent.com/u/1334004?v=4gravatar_idh5jq  "https://api.github.com/users/inodbj  https://github.com/inodb
followers_url,https://api.github.com/users/inodb/followers
following_url9https://api.github.com/users/inodb/following{/other_user}	gists_url2https://api.github.com/users/inodb/gists{/gist_id}starred_url9https://api.github.com/users/inodb/starred{/owner}{/repo}subscriptions_url0https://api.github.com/users/inodb/subscriptionsorganizations_url'https://api.github.com/users/inodb/orgs	repos_url(https://api.github.com/users/inodb/repos
events_url3https://api.github.com/users/inodb/events{/privacy}received_events_url2https://api.github.com/users/inodb/received_eventstypeUser
site_adminujg  }(j  web-flowj  J/j[  MDQ6VXNlcjE5ODY0NDQ3j  4https://avatars.githubusercontent.com/u/19864447?v=4j  h5jq  %https://api.github.com/users/web-flowj  https://github.com/web-flowj  /https://api.github.com/users/web-flow/followersj  <https://api.github.com/users/web-flow/following{/other_user}j  5https://api.github.com/users/web-flow/gists{/gist_id}j  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j  3https://api.github.com/users/web-flow/subscriptionsj  *https://api.github.com/users/web-flow/orgsj  +https://api.github.com/users/web-flow/reposj  6https://api.github.com/users/web-flow/events{/privacy}j  5https://api.github.com/users/web-flow/received_eventsj  Userj  uparents]}(jY  (ca2bdff949965b3628bc5a96d379074d21546de6jq  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ca2bdff949965b3628bc5a96d379074d21546de6j  Xhttps://github.com/cBioPortal/cbioportal/commit/ca2bdff949965b3628bc5a96d379074d21546de6uastats}(totalK	additionsK	deletionsKufiles]}(jY  (eb821670a42a3e0d37dbe90f7b61cee4379dbdc7filenamedocs/About-Us.mdstatusmodifiedj  Kj  KchangesKblob_urlihttps://github.com/cBioPortal/cbioportal/blob/cd2253390e6640d8bfdb84cd79d0ab25e6b422de/docs%2FAbout-Us.mdraw_urlhhttps://github.com/cBioPortal/cbioportal/raw/cd2253390e6640d8bfdb84cd79d0ab25e6b422de/docs%2FAbout-Us.mdcontents_url{https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2FAbout-Us.md?ref=cd2253390e6640d8bfdb84cd79d0ab25e6b422depatchX  @@ -42,6 +42,7 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 ## Caris Life Sciences
 * Jianjiong Gao
 * Priti Kumari
+* Karthik Kalletla
 
 ## The Hyve
 * Oleguer Plantalech
@@ -82,7 +83,6 @@ The cBioPortal for Cancer Genomics was originally developed at [Memorial Sloan K
 * Zachary Heins
 * Michael Heuer
 * Anders Jacobsen
-* Karthik Kalletla
 * Peter Kok
 * Erik Larsson
 * Dong Liuau(fe2c82e9ef6870cb26c6ac0ad21cff4124464984}(sha(fe2c82e9ef6870cb26c6ac0ad21cff4124464984node_idEC_kwDOAe-hB9oAKGZlMmM4MmU5ZWY2ODcwY2IyNmM2YWMwYWQyMWNmZjQxMjQ0NjQ5ODQcommit}(author}(name
Beking0912email,37431792+Beking0912@users.noreply.github.comdate2023-08-17T19:45:51Zu	committer}(j؂  GitHubjڂ  noreply@github.comj܂  2023-08-17T19:45:51Zumessage$add property show_web_tours (#10333)tree}(jЂ  (853bd059a37ed6bf747c13a10077c210fd40ef5durlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/853bd059a37ed6bf747c13a10077c210fd40ef5duj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/fe2c82e9ef6870cb26c6ac0ad21cff4124464984
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk3njvCRBK7hj4Ov3rIwAApz0IAKcDqbTFvbpCx7vZkIlssFai
D3E2QUvFvD902X/f5pK0XIVERF840soJozkfJs0lV3KyGedjOaKkqVBUg6Bi5naU
w3wdHOcVY2pfNK7/bAZqJvsREOp7YQwObfHnpOV4Ch4UTljS/Y2L1VnE8vdPayyO
5GNXUYIWOzmHPYobmk5mnCCLE0sQPyiPdgYlm1l+ZAoIx11gT34Ija9goG9wwKdO
gHR40rT5MYoa9QbcEMnXVQDsnDMXqqne5SH7elUAYpTn8sQjIBgyaZWt9CJACe1x
V9gi5HagTSkdVip3uSpFYl75+eZO5X8fA4VpX9FGBzh9GFRSKOyAYPNL3/2bvIk=
=w8bY
-----END PGP SIGNATURE-----
payloadX  tree 853bd059a37ed6bf747c13a10077c210fd40ef5d
parent 643cfcdb15b3649e6160c6e8bb6f80fcf4df3338
author Beking0912 <37431792+Beking0912@users.noreply.github.com> 1692301551 -0400
committer GitHub <noreply@github.com> 1692301551 -0400

add property show_web_tours (#10333)

uuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/fe2c82e9ef6870cb26c6ac0ad21cff4124464984html_urlXhttps://github.com/cBioPortal/cbioportal/commit/fe2c82e9ef6870cb26c6ac0ad21cff4124464984comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/fe2c82e9ef6870cb26c6ac0ad21cff4124464984/commentsjւ  }(login
Beking0912idJ);j҂  MDQ6VXNlcjM3NDMxNzky
avatar_url4https://avatars.githubusercontent.com/u/37431792?v=4gravatar_idh5j  'https://api.github.com/users/Beking0912j  https://github.com/Beking0912
followers_url1https://api.github.com/users/Beking0912/followers
following_url>https://api.github.com/users/Beking0912/following{/other_user}	gists_url7https://api.github.com/users/Beking0912/gists{/gist_id}starred_url>https://api.github.com/users/Beking0912/starred{/owner}{/repo}subscriptions_url5https://api.github.com/users/Beking0912/subscriptionsorganizations_url,https://api.github.com/users/Beking0912/orgs	repos_url-https://api.github.com/users/Beking0912/repos
events_url8https://api.github.com/users/Beking0912/events{/privacy}received_events_url7https://api.github.com/users/Beking0912/received_eventstypeUser
site_adminujނ  }(j  web-flowj  J/j҂  MDQ6VXNlcjE5ODY0NDQ3j  4https://avatars.githubusercontent.com/u/19864447?v=4j  h5j  %https://api.github.com/users/web-flowj  https://github.com/web-flowj  /https://api.github.com/users/web-flow/followersj  <https://api.github.com/users/web-flow/following{/other_user}j  5https://api.github.com/users/web-flow/gists{/gist_id}j
  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j  3https://api.github.com/users/web-flow/subscriptionsj  *https://api.github.com/users/web-flow/orgsj  +https://api.github.com/users/web-flow/reposj  6https://api.github.com/users/web-flow/events{/privacy}j  5https://api.github.com/users/web-flow/received_eventsj  Userj  uparents]}(jЂ  (643cfcdb15b3649e6160c6e8bb6f80fcf4df3338j  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/643cfcdb15b3649e6160c6e8bb6f80fcf4df3338j  Xhttps://github.com/cBioPortal/cbioportal/commit/643cfcdb15b3649e6160c6e8bb6f80fcf4df3338uastats}(totalK	additionsK	deletionsK ufiles](}(jЂ  (88fbcf4a8efca7addd3afc42448276c2eca47d97filenameCcore/src/main/java/org/mskcc/cbio/portal/util/GlobalProperties.javastatusmodifiedj2  Kj3  K changesKblob_urlhttps://github.com/cBioPortal/cbioportal/blob/fe2c82e9ef6870cb26c6ac0ad21cff4124464984/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/fe2c82e9ef6870cb26c6ac0ad21cff4124464984/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fmskcc%2Fcbio%2Fportal%2Futil%2FGlobalProperties.java?ref=fe2c82e9ef6870cb26c6ac0ad21cff4124464984patchX  @@ -122,6 +122,7 @@ public class GlobalProperties {
     public static final String SKIN_RIGHT_NAV_SHOW_EXAMPLES = "skin.right_nav.show_examples";
     public static final String SKIN_RIGHT_NAV_SHOW_TESTIMONIALS = "skin.right_nav.show_testimonials";
     public static final String SKIN_RIGHT_NAV_SHOW_WHATS_NEW = "skin.right_nav.show_whats_new";
+    public static final String SKIN_RIGHT_NAV_SHOW_WEB_TOURS = "skin.right_nav.show_web_tours";
     private static String skinAuthorizationMessage;
     @Value("${skin.authorization_message:Access to this portal is only available to authorized users.}")
     public void setSkinAuthorizationMessage(String property) { skinAuthorizationMessage = property; }
@@ -805,6 +806,12 @@ public static boolean showRightNavWhatsNew()
         return showFlag == null || Boolean.parseBoolean(showFlag);
     }
 
+    public static boolean showRightNavWebTours()
+    {
+        String showFlag = portalProperties.getProperty(SKIN_RIGHT_NAV_SHOW_WEB_TOURS);
+        return showFlag == null || Boolean.parseBoolean(showFlag);
+    }
+
     public static String getAuthorizationMessage()
     {
         return skinAuthorizationMessage;u}(jЂ  (1f389f4159d5b043d463a79b2fa1c0d26cb72275j8  Hdocs/deployment/customization/Customizing-your-instance-of-cBioPortal.mdj:  modifiedj2  Kj3  K j<  Kj=  https://github.com/cBioPortal/cbioportal/blob/fe2c82e9ef6870cb26c6ac0ad21cff4124464984/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdj?  https://github.com/cBioPortal/cbioportal/raw/fe2c82e9ef6870cb26c6ac0ad21cff4124464984/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.mdjA  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2FCustomizing-your-instance-of-cBioPortal.md?ref=fe2c82e9ef6870cb26c6ac0ad21cff4124464984jC  X  @@ -145,6 +145,12 @@ Below you can find the complete list of all the available skin properties.
 			<td>Text for public cBioPortal.org.</td>
 			<td>Any HTML text</td>
 		</tr>
+        <tr>
+			<td>skin.right_nav.show_web_tours</td>
+			<td>set the "Interactive Tours" section in the right navigation bar</td>
+			<td>true</td>
+			<td>true / false</td>
+		</tr>
 		<tr>
 			<td>skin.show_about_tab</td>
 			<td>show the "ABOUT" tab in the header</td>u}(jЂ  (89cadeee479ebc2c7c0dc918d3db918984dcf343j8  <docs/deployment/customization/portal.properties-Reference.mdj:  modifiedj2  Kj3  K j<  Kj=  https://github.com/cBioPortal/cbioportal/blob/fe2c82e9ef6870cb26c6ac0ad21cff4124464984/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdj?  https://github.com/cBioPortal/cbioportal/raw/fe2c82e9ef6870cb26c6ac0ad21cff4124464984/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.mdjA  https://api.github.com/repos/cBioPortal/cbioportal/contents/docs%2Fdeployment%2Fcustomization%2Fportal.properties-Reference.md?ref=fe2c82e9ef6870cb26c6ac0ad21cff4124464984jC  Xx  @@ -100,6 +100,9 @@ skin.right_nav.show_whats_new=
 skin.right_nav.show_twitter=
 ```
 
+#Interactive tours section
+skin.right_nav.show_web_tours=
+
 ### Control the content of specific sections
 
 Setting controlling the blurb: you can add any HTML code here that you want to visualize. This will be shown between the cBioPortal menu and the Query selector in the main page.u}(jЂ  (0d20e91ebde0e5440f8a6a740c6ff6c2910ec892j8  =portal/src/main/webapp/WEB-INF/jsp/global/frontend_config.jspj:  modifiedj2  Kj3  K j<  Kj=  https://github.com/cBioPortal/cbioportal/blob/fe2c82e9ef6870cb26c6ac0ad21cff4124464984/portal%2Fsrc%2Fmain%2Fwebapp%2FWEB-INF%2Fjsp%2Fglobal%2Ffrontend_config.jspj?  https://github.com/cBioPortal/cbioportal/raw/fe2c82e9ef6870cb26c6ac0ad21cff4124464984/portal%2Fsrc%2Fmain%2Fwebapp%2FWEB-INF%2Fjsp%2Fglobal%2Ffrontend_config.jspjA  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2FWEB-INF%2Fjsp%2Fglobal%2Ffrontend_config.jsp?ref=fe2c82e9ef6870cb26c6ac0ad21cff4124464984jC  X  @@ -30,6 +30,7 @@ window.legacySupportFrontendConfig = {
     skinRightNavShowExamples : <%=GlobalProperties.showRightNavExamples()%>,
     skinRightNavShowTestimonials : <%=GlobalProperties.showRightNavTestimonials()%>,
     skinRightNavShowWhatsNew : <%=GlobalProperties.showRightNavWhatsNew()%>,
+    skinRightNavShowWebTours: <%=GlobalProperties.showRightNavInteractiveTour()%>,
     skinRightNavExamplesHTML : '<%=GlobalProperties.getExamplesRightColumnHtml()%>',
     skinRightNavExamplesHTML : '<%=GlobalProperties.getExamplesRightColumnHtml()%>',
     skinRightNavWhatsNewBlurb : '<%=GlobalProperties.getRightNavWhatsNewBlurb()%>',u}(jЂ  (1fe5079ae3adc05da94f4540043eb101c02d42ddj8  )portal/src/main/webapp/config_service.jspj:  modifiedj2  Kj3  K j<  Kj=  https://github.com/cBioPortal/cbioportal/blob/fe2c82e9ef6870cb26c6ac0ad21cff4124464984/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspj?  https://github.com/cBioPortal/cbioportal/raw/fe2c82e9ef6870cb26c6ac0ad21cff4124464984/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jspjA  https://api.github.com/repos/cBioPortal/cbioportal/contents/portal%2Fsrc%2Fmain%2Fwebapp%2Fconfig_service.jsp?ref=fe2c82e9ef6870cb26c6ac0ad21cff4124464984jC  X2  @@ -98,6 +98,7 @@
             "skin.right_nav.show_whats_new",
             "skin.right_nav.show_twitter",
             "skin.right_nav.whats_new_blurb",
+            "skin.right_nav.show_web_tours",
             "skin.show_about_tab",
             "skin.show_data_tab",
             "skin.show_faqs_tab",ueu(ca2bdff949965b3628bc5a96d379074d21546de6}(sha(ca2bdff949965b3628bc5a96d379074d21546de6node_idEC_kwDOAe-hB9oAKGNhMmJkZmY5NDk5NjViMzYyOGJjNWE5NmQzNzkwNzRkMjE1NDZkZTYcommit}(author}(name
qi-xuan.luemailh164654156465@outlook.comdate2023-08-08T13:44:49Zu	committer}(jo  GitHubjq  noreply@github.comjs  2023-08-08T13:44:49ZumessageX)  Genomic data counts study-view endpoint (#10300)

* implement getting CNA types for a gene specific

* add tests for genomic-data-counts endpoint

* change CopyNumberDataCounterFilter to StudyViewFilter and GenomicDataCountFilter

* change to molecularDataService to fetch data

* add filter logic for DISCRETE molecular profiles

* Refactor

* count NA and clean up codes

* Updates

* Update StudyViewServiceImplTest.java

---------

Co-authored-by: Qi-Xuan Lu <qlu@carisls.com>
Co-authored-by: Karthik <kalletlakarthik@gmail.com>tree}(jg  (720233968704a87abf96305b357102c5f3f23949urlehttps://api.github.com/repos/cBioPortal/cbioportal/git/trees/720233968704a87abf96305b357102c5f3f23949uj  ghttps://api.github.com/repos/cBioPortal/cbioportal/git/commits/ca2bdff949965b3628bc5a96d379074d21546de6
comment_countK verification}(verifiedreasonvalid	signatureX  -----BEGIN PGP SIGNATURE-----

wsBcBAABCAAQBQJk0kbRCRBK7hj4Ov3rIwAAvIYIAJjuIywD0ANfzNfyhDOQr1/L
nolsV01Kx4+CSdfHSKcpo5CmOjG2QcBCa+z2M35nYn5NUHREuvby2BHeoByN6PhO
zVzcHHrqNmpvGR8WDqv6ZkrZioMIMZ14NXDgeKWpOH0F8RZ/l4vhdN4AfSX15/5p
41Dw612b96qX0rwrhR3gBo6tArBF7oGcEgy6psGlQRNgaLVooAqFYBEvF0zSB/1F
EvP5pP9MJClA3vPFoaXrhHfKAlZztiO5kTrDFyWW/+hPKTuVBJ0VRrGqp3IeMVhV
bnFxIVsKsPPdX2WfdS4mFbHOiB9dAFHmFrSrRcdkSCBqOQrndQ1lhLYEtb9y2Qw=
=HPM9
-----END PGP SIGNATURE-----
payloadX  tree 720233968704a87abf96305b357102c5f3f23949
parent d035bb17653da699592fd650682c3ef35db16fcc
author qi-xuan.lu <h164654156465@outlook.com> 1691502289 +0800
committer GitHub <noreply@github.com> 1691502289 -0400

Genomic data counts study-view endpoint (#10300)

* implement getting CNA types for a gene specific

* add tests for genomic-data-counts endpoint

* change CopyNumberDataCounterFilter to StudyViewFilter and GenomicDataCountFilter

* change to molecularDataService to fetch data

* add filter logic for DISCRETE molecular profiles

* Refactor

* count NA and clean up codes

* Updates

* Update StudyViewServiceImplTest.java

---------

Co-authored-by: Qi-Xuan Lu <qlu@carisls.com>
Co-authored-by: Karthik <kalletlakarthik@gmail.com>uuj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/ca2bdff949965b3628bc5a96d379074d21546de6html_urlXhttps://github.com/cBioPortal/cbioportal/commit/ca2bdff949965b3628bc5a96d379074d21546de6comments_urllhttps://api.github.com/repos/cBioPortal/cbioportal/commits/ca2bdff949965b3628bc5a96d379074d21546de6/commentsjm  }(login
h164654156465idJ3
iji  MDQ6VXNlcjIzNjYxODc1
avatar_url4https://avatars.githubusercontent.com/u/23661875?v=4gravatar_idh5j  *https://api.github.com/users/h164654156465j   https://github.com/h164654156465
followers_url4https://api.github.com/users/h164654156465/followers
following_urlAhttps://api.github.com/users/h164654156465/following{/other_user}	gists_url:https://api.github.com/users/h164654156465/gists{/gist_id}starred_urlAhttps://api.github.com/users/h164654156465/starred{/owner}{/repo}subscriptions_url8https://api.github.com/users/h164654156465/subscriptionsorganizations_url/https://api.github.com/users/h164654156465/orgs	repos_url0https://api.github.com/users/h164654156465/repos
events_url;https://api.github.com/users/h164654156465/events{/privacy}received_events_url:https://api.github.com/users/h164654156465/received_eventstypeUser
site_adminuju  }(j  web-flowj  J/ji  MDQ6VXNlcjE5ODY0NDQ3j  4https://avatars.githubusercontent.com/u/19864447?v=4j  h5j  %https://api.github.com/users/web-flowj  https://github.com/web-flowj  /https://api.github.com/users/web-flow/followersj  <https://api.github.com/users/web-flow/following{/other_user}j  5https://api.github.com/users/web-flow/gists{/gist_id}j  <https://api.github.com/users/web-flow/starred{/owner}{/repo}j  3https://api.github.com/users/web-flow/subscriptionsj  *https://api.github.com/users/web-flow/orgsj  +https://api.github.com/users/web-flow/reposj  6https://api.github.com/users/web-flow/events{/privacy}j  5https://api.github.com/users/web-flow/received_eventsj  Userj  uparents]}(jg  (d035bb17653da699592fd650682c3ef35db16fccj  chttps://api.github.com/repos/cBioPortal/cbioportal/commits/d035bb17653da699592fd650682c3ef35db16fccj  Xhttps://github.com/cBioPortal/cbioportal/commit/d035bb17653da699592fd650682c3ef35db16fccuastats}(totalM	additionsM+	deletionsK]ufiles](}(jg  (bd9ae14cdaf137a97c116177c885b70a16bf7d34filenameBmodel/src/main/java/org/cbioportal/model/GenomicDataCountItem.javastatusaddedjɃ  K#jʃ  K changesK#blob_urlhttps://github.com/cBioPortal/cbioportal/blob/ca2bdff949965b3628bc5a96d379074d21546de6/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenomicDataCountItem.javaraw_urlhttps://github.com/cBioPortal/cbioportal/raw/ca2bdff949965b3628bc5a96d379074d21546de6/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenomicDataCountItem.javacontents_urlhttps://api.github.com/repos/cBioPortal/cbioportal/contents/model%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fmodel%2FGenomicDataCountItem.java?ref=ca2bdff949965b3628bc5a96d379074d21546de6patchXL  @@ -0,0 +1,35 @@
+package org.cbioportal.model;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class GenomicDataCountItem implements Serializable {
+
+    private String hugoGeneSymbol;
+    private String profileType;
+    private List<GenomicDataCount> counts;
+
+    public String getHugoGeneSymbol() {
+        return hugoGeneSymbol;
+    }
+
+    public void setHugoGeneSymbol(String hugoGeneSymbol) {
+        this.hugoGeneSymbol = hugoGeneSymbol;
+    }
+
+    public String getProfileType() {
+        return profileType;
+    }
+
+    public void setProfileType(String profileType) {
+        this.profileType = profileType;
+    }
+
+    public List<GenomicDataCount> getCounts() {
+        return counts;
+    }
+
+    public void setCounts(List<GenomicDataCount> counts) {
+        this.counts = counts;
+    }
+}u|      }(jg  (67191ea758842520498fa65865633766fcae06dbjσ  Bservice/src/main/java/org/cbioportal/service/StudyViewService.javajу  modifiedjɃ  Kjʃ  K jӃ  Kjԃ  https://github.com/cBioPortal/cbioportal/blob/ca2bdff949965b3628bc5a96d379074d21546de6/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javajփ  https://github.com/cBioPortal/cbioportal/raw/ca2bdff949965b3628bc5a96d379074d21546de6/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.javaj؃  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2FStudyViewService.java?ref=ca2bdff949965b3628bc5a96d379074d21546de6jڃ  X  @@ -1,6 +1,8 @@
 package org.cbioportal.service;
 
+import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
+import org.cbioportal.service.exception.MolecularProfileNotFoundException;
 import org.cbioportal.service.exception.StudyNotFoundException;
 
 import java.util.List;
@@ -19,6 +21,8 @@ List<AlterationCountByGene> getStructuralVariantAlterationCountByGenes(List<Stri
     List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> studyIds, List<String> sampleIds, AlterationFilter annotationFilter)
         throws StudyNotFoundException;
 
+    List<GenomicDataCountItem> getCNAAlterationCountsByGeneSpecific(List<String> studyIds, List<String> sampleIds, List<Pair<String, String>> genomicDataFilters);
+
     List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String> sampleIds, List<String> studyIds, List<String> stableIds, List<String> profileTypes);
 
 }u}(jg  (510fa8f0206c012b5da48c56b46b1b5332445673jσ  Kservice/src/main/java/org/cbioportal/service/impl/StudyViewServiceImpl.javajу  modifiedjɃ  Kcjʃ  KjӃ  Kejԃ  https://github.com/cBioPortal/cbioportal/blob/ca2bdff949965b3628bc5a96d379074d21546de6/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javajփ  https://github.com/cBioPortal/cbioportal/raw/ca2bdff949965b3628bc5a96d379074d21546de6/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.javaj؃  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImpl.java?ref=ca2bdff949965b3628bc5a96d379074d21546de6jڃ  X  @@ -2,6 +2,7 @@
 
 import org.apache.commons.collections4.map.MultiKeyMap;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
 import org.cbioportal.model.util.Select;
 import org.cbioportal.persistence.AlterationRepository;
@@ -15,6 +16,7 @@
 import java.util.*;
 import java.util.function.Function;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 @Service
 public class StudyViewServiceImpl implements StudyViewService {
@@ -37,6 +39,12 @@ public class StudyViewServiceImpl implements StudyViewService {
     @Autowired
     private AlterationRepository alterationRepository;
 
+    @Autowired
+    private GeneService geneService;
+    
+    @Autowired 
+    private MolecularDataService molecularDataService;
+    
     @Override
     public List<GenomicDataCount> getGenomicDataCounts(List<String> studyIds, List<String> sampleIds) {
         List<MolecularProfileCaseIdentifier> molecularProfileSampleIdentifiers =
@@ -154,7 +162,7 @@ public List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> stu
         throws StudyNotFoundException {
         List<MolecularProfileCaseIdentifier> caseIdentifiers =
             molecularProfileService.getFirstDiscreteCNAProfileCaseIdentifiers(studyIds, sampleIds);
-        Select<CNA> cnaTypes = Select.byValues(CNA_TYPES_AMP_AND_HOMDEL);
+        
         List<CopyNumberCountByGene> copyNumberCountByGenes = alterationCountService.getSampleCnaGeneCounts(
             caseIdentifiers,
             Select.all(),
@@ -186,6 +194,96 @@ public List<CopyNumberCountByGene> getCNAAlterationCountByGenes(List<String> stu
         return copyNumberCountByGenes;
     }
 
+    @Override
+    public List<GenomicDataCountItem> getCNAAlterationCountsByGeneSpecific(List<String> studyIds, 
+                                                                           List<String> sampleIds,
+                                                                           List<Pair<String, String>> genomicDataFilters) {
+        
+        List<MolecularProfile> molecularProfiles = molecularProfileService.getMolecularProfilesInStudies(studyIds,
+            "SUMMARY");
+
+        Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
+            .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
+
+        Set<String> hugoGeneSymbols = genomicDataFilters.stream().map(Pair::getKey)
+            .collect(Collectors.toSet());
+
+        Map<String, Integer> geneSymbolIdMap = geneService
+            .fetchGenes(new ArrayList<>(hugoGeneSymbols), "HUGO_GENE_SYMBOL",
+                "SUMMARY")
+            .stream().collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
+        
+        return genomicDataFilters
+            .stream()
+            .flatMap(gdFilter -> {
+                GenomicDataCountItem genomicDataCountItem = new GenomicDataCountItem();
+                String hugoGeneSymbol = gdFilter.getKey();
+                String profileType = gdFilter.getValue();
+                genomicDataCountItem.setHugoGeneSymbol(hugoGeneSymbol);
+                genomicDataCountItem.setProfileType(profileType);
+                
+                List<String> stableIds = Arrays.asList(geneSymbolIdMap.get(hugoGeneSymbol).toString());
+
+                Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
+                    .getOrDefault(profileType, new ArrayList<MolecularProfile>()).stream()
+                    .collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
+                        MolecularProfile::getStableId));
+                
+                List<String> mappedSampleIds = new ArrayList<>();
+                List<String> mappedProfileIds = new ArrayList<>();
+
+                for (int i = 0; i < sampleIds.size(); i++) {
+                    String studyId = studyIds.get(i);
+                    if (studyIdToMolecularProfileIdMap.containsKey(studyId)) {
+                        mappedSampleIds.add(sampleIds.get(i));
+                        mappedProfileIds.add(studyIdToMolecularProfileIdMap.get(studyId));
+                    }
+                }
+
+                if (mappedSampleIds.isEmpty()) {
+                    return Stream.of();
+                }
+
+                List<GeneMolecularData> geneMolecularDataList = molecularDataService.getMolecularDataInMultipleMolecularProfiles(mappedProfileIds, mappedSampleIds,
+                        stableIds.stream().map(Integer::parseInt).collect(Collectors.toList()), "SUMMARY");
+                
+                List<GenomicDataCount> genomicDataCounts = geneMolecularDataList
+                    .stream()
+                    .filter(g -> StringUtils.isNotEmpty(g.getValue()) && !g.getValue().equals("NA"))
+                    .collect(Collectors.groupingBy(GeneMolecularData::getValue))
+                    .entrySet()
+                    .stream()
+                    .map(entry -> {
+                        Integer alteration = Integer.valueOf(entry.getKey());
+                        List<GeneMolecularData> geneMolecularData = entry.getValue();
+                        int count = geneMolecularData.size();
+
+                        String label = CNA.getByCode(alteration.shortValue()).getDescription();
+
+                        GenomicDataCount genomicDataCount = new GenomicDataCount();
+                        genomicDataCount.setLabel(label);
+                        genomicDataCount.setValue(String.valueOf(alteration));
+                        genomicDataCount.setCount(count);
+
+                        return genomicDataCount;
+                    }).collect(Collectors.toList());
+
+                int totalCount = genomicDataCounts.stream().mapToInt(GenomicDataCount::getCount).sum();
+                int naCount = sampleIds.size() - totalCount;
+                
+                if (naCount > 0) {
+                    GenomicDataCount genomicDataCount = new GenomicDataCount();
+                    genomicDataCount.setLabel("NA");
+                    genomicDataCount.setValue("NA");
+                    genomicDataCount.setCount(naCount);
+                    genomicDataCounts.add(genomicDataCount);
+                }
+                
+                genomicDataCountItem.setCounts(genomicDataCounts);
+                return Stream.of(genomicDataCountItem);
+            }).collect(Collectors.toList());
+    };
+
     @Override
     public List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String> sampleIds, List<String> studyIds,
                                                                List<String> stableIds, List<String> profileTypes) {
@@ -261,5 +359,4 @@ public List<GenericAssayDataCountItem> fetchGenericAssayDataCounts(List<String>
             })
             .collect(Collectors.toList());
     }
-
 }u}(jg  (827a7b752a515684801b8188ec8e397a80da98bfjσ  Jservice/src/test/java/org/cbioportal/service/impl/BaseServiceImplTest.javajу  modifiedjɃ  Kjʃ  KjӃ  Kjԃ  https://github.com/cBioPortal/cbioportal/blob/ca2bdff949965b3628bc5a96d379074d21546de6/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.javajփ  https://github.com/cBioPortal/cbioportal/raw/ca2bdff949965b3628bc5a96d379074d21546de6/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.javaj؃  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FBaseServiceImplTest.java?ref=ca2bdff949965b3628bc5a96d379074d21546de6jڃ  X  @@ -59,5 +59,7 @@ public class BaseServiceImplTest {
     public static final String CATEGORY_VALUE_1 = "category_value1";
     public static final String CATEGORY_VALUE_2 = "category_value2";
     public static final String EMPTY_VALUE_1 = "";
-    public static final String EMPTY_VALUE_2 = "NA";    
+    public static final String EMPTY_VALUE_2 = "NA";
+    public static final String PROFILE_TYPE_1 = "profile_type1";
+    public static final String PROFILE_TYPE_2 = "profile_type2";
 }u}(jg  (801ab8afebfc5a1dbd192628acb1791f70a2338ajσ  Oservice/src/test/java/org/cbioportal/service/impl/StudyViewServiceImplTest.javajу  modifiedjɃ  KNjʃ  KjӃ  KRjԃ  https://github.com/cBioPortal/cbioportal/blob/ca2bdff949965b3628bc5a96d379074d21546de6/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javajփ  https://github.com/cBioPortal/cbioportal/raw/ca2bdff949965b3628bc5a96d379074d21546de6/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.javaj؃  https://api.github.com/repos/cBioPortal/cbioportal/contents/service%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fservice%2Fimpl%2FStudyViewServiceImplTest.java?ref=ca2bdff949965b3628bc5a96d379074d21546de6jڃ  Xv  @@ -14,10 +14,7 @@
 import org.mockito.Spy;
 import org.mockito.junit.MockitoJUnitRunner;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
+import java.util.*;
 
 import static org.mockito.ArgumentMatchers.*;
 
@@ -41,6 +38,10 @@ public class StudyViewServiceImplTest extends BaseServiceImplTest {
     private SignificantCopyNumberRegionService significantCopyNumberRegionService;
     @Mock
     private GenericAssayService genericAssayService;
+    @Mock
+    private MolecularDataService molecularDataService;
+    @Mock
+    private GeneService geneService;
     private AlterationFilter alterationFilter = new AlterationFilter();
 
     @Test
@@ -255,6 +256,79 @@ public void getCNAAlterationCountByGenes() throws Exception {
         Assert.assertEquals(1, result.size());
     }
 
+    @Test
+    public void getCNAAlterationCountByGeneSpecific() throws Exception {
+
+        List<String> sampleIds = Arrays.asList(BaseServiceImplTest.SAMPLE_ID1, BaseServiceImplTest.SAMPLE_ID2, BaseServiceImplTest.SAMPLE_ID3);
+        List<String> studyIds = Collections.nCopies(3, BaseServiceImplTest.STUDY_ID);
+        List<Pair<String, String>> genomicDataFilters = new ArrayList<>();
+        Pair<String, String> genomicDataFilter1 = new Pair<>(BaseServiceImplTest.HUGO_GENE_SYMBOL_1, BaseServiceImplTest.PROFILE_TYPE_1);
+        Pair<String, String> genomicDataFilter2 = new Pair<>(BaseServiceImplTest.HUGO_GENE_SYMBOL_2, BaseServiceImplTest.PROFILE_TYPE_2);
+        genomicDataFilters.add(genomicDataFilter1);
+        genomicDataFilters.add(genomicDataFilter2);
+
+        List<MolecularProfile> molecularProfiles = new ArrayList<>();
+        MolecularProfile molecularProfile = new MolecularProfile();
+        molecularProfile.setCancerStudyIdentifier(BaseServiceImplTest.STUDY_ID);
+        molecularProfile.setStableId(BaseServiceImplTest.STUDY_ID + "_" + BaseServiceImplTest.MOLECULAR_PROFILE_ID_A);
+        molecularProfiles.add(molecularProfile);
+        
+        Mockito.when(molecularProfileService.getMolecularProfilesInStudies(studyIds, "SUMMARY"))
+            .thenReturn(molecularProfiles);
+        
+        Map<String, List<MolecularProfile>> molecularProfileMap = new HashMap<>();
+        molecularProfileMap.put(BaseServiceImplTest.PROFILE_TYPE_1, molecularProfiles);
+        molecularProfileMap.put(BaseServiceImplTest.PROFILE_TYPE_2, molecularProfiles);
+   
+        Mockito.when(molecularProfileUtil.categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles))
+            .thenReturn(molecularProfileMap);
+        
+        List<Gene> genes = new ArrayList<>();
+        Gene gene1 = new Gene();
+        gene1.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_1);
+        gene1.setHugoGeneSymbol(BaseServiceImplTest.HUGO_GENE_SYMBOL_1);
+        Gene gene2 = new Gene();
+        gene2.setEntrezGeneId(BaseServiceImplTest.ENTREZ_GENE_ID_2);
+        gene2.setHugoGeneSymbol(BaseServiceImplTest.HUGO_GENE_SYMBOL_2);
+        genes.add(gene1);
+        genes.add(gene2);
+
+        Mockito.when(geneService.fetchGenes(anyList(), anyString(), anyString()))
+                .thenReturn(genes);
+
+        List<GeneMolecularData> geneMolecularData = new ArrayList<>();
+        GeneMolecularData geneMolecularData1 = new GeneMolecularData();
+        geneMolecularData1.setValue("-2");
+        GeneMolecularData geneMolecularData2 = new GeneMolecularData();
+        geneMolecularData2.setValue("-2");
+        GeneMolecularData geneMolecularData3 = new GeneMolecularData();
+        geneMolecularData3.setValue("2");
+        GeneMolecularData geneMolecularData4 = new GeneMolecularData();
+        geneMolecularData4.setValue("2");
+        geneMolecularData.add(geneMolecularData1);
+        geneMolecularData.add(geneMolecularData2);
+        geneMolecularData.add(geneMolecularData3);
+        geneMolecularData.add(geneMolecularData4);
+        
+        Mockito.when(molecularDataService.getMolecularDataInMultipleMolecularProfiles(
+            anyList(),
+            anyList(),
+            anyList(),
+            anyString()))
+            .thenReturn(geneMolecularData);
+        
+        List<GenomicDataCountItem> result = studyViewService.getCNAAlterationCountsByGeneSpecific(studyIds, sampleIds, genomicDataFilters);
+        Assert.assertEquals(2, result.size());
+        Assert.assertEquals(BaseServiceImplTest.HUGO_GENE_SYMBOL_1, result.get(0).getHugoGeneSymbol());
+        Assert.assertEquals(BaseServiceImplTest.PROFILE_TYPE_1, result.get(0).getProfileType());
+        Assert.assertEquals(2, result.get(0).getCounts().get(0).getCount().intValue());
+        Assert.assertEquals(2, result.get(0).getCounts().get(1).getCount().intValue());
+        Assert.assertEquals(BaseServiceImplTest.HUGO_GENE_SYMBOL_2, result.get(1).getHugoGeneSymbol());
+        Assert.assertEquals(BaseServiceImplTest.PROFILE_TYPE_2, result.get(1).getProfileType());
+        Assert.assertEquals(2, result.get(1).getCounts().get(0).getCount().intValue());
+        Assert.assertEquals(2, result.get(1).getCounts().get(1).getCount().intValue());
+    }
+
     @Test
     public void fetchGenericAssayDataCounts() throws Exception {
 u}(jg  (f4ca464cf50123869269b7357a228fd1745d50f4jσ  =web/src/main/java/org/cbioportal/web/StudyViewController.javajу  modifiedjɃ  K*jʃ  KjӃ  K+jԃ  https://github.com/cBioPortal/cbioportal/blob/ca2bdff949965b3628bc5a96d379074d21546de6/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javajփ  https://github.com/cBioPortal/cbioportal/raw/ca2bdff949965b3628bc5a96d379074d21546de6/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.javaj؃  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewController.java?ref=ca2bdff949965b3628bc5a96d379074d21546de6jڃ  Xh  @@ -9,14 +9,14 @@
 import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.commons.math3.stat.correlation.PearsonsCorrelation;
 import org.apache.commons.math3.stat.correlation.SpearmansCorrelation;
+import org.apache.commons.math3.util.Pair;
 import org.cbioportal.model.*;
 import org.cbioportal.service.*;
 import org.cbioportal.service.exception.StudyNotFoundException;
 import org.cbioportal.service.util.ClinicalAttributeUtil;
 import org.cbioportal.web.config.annotation.InternalApi;
 import org.cbioportal.model.AlterationFilter;
 import org.cbioportal.web.parameter.*;
-import org.cbioportal.web.parameter.sort.ClinicalDataSortBy;
 import org.cbioportal.web.util.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.Cacheable;
@@ -861,6 +861,47 @@ public ResponseEntity<List<GenomicDataBin>> fetchGenomicDataBinCounts(
         return new ResponseEntity<>(studyViewFilterApplier.getDataBins(dataBinMethod, interceptedGenomicDataBinCountFilter), HttpStatus.OK);
     }
 
+    @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
+    @RequestMapping(value = "/genomic-data-counts/fetch", method = RequestMethod.POST,
+        consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+    @ApiOperation("Fetch genomic data counts by GenomicDataCountFilter")
+    public ResponseEntity<List<GenomicDataCountItem>> fetchGenomicDataCounts(
+        @ApiParam(required = true, value = "Genomic data count filter") @Valid @RequestBody(required = false) GenomicDataCountFilter genomicDataCountFilter,
+        @ApiIgnore // prevent reference to this attribute in the swagger-ui interface
+        @RequestAttribute(required = false, value = "involvedCancerStudies") Collection<String> involvedCancerStudies,
+        @ApiParam(required = true, value = "Intercepted Genomic Data Count Filter")
+        @ApiIgnore
+        @Valid @RequestAttribute(required = false, value = "interceptedGenomicDataCountFilter") GenomicDataCountFilter interceptedGenomicDataCountFilter
+    ) throws StudyNotFoundException {
+        List<GenomicDataFilter> gdFilters = interceptedGenomicDataCountFilter.getGenomicDataFilters();
+        StudyViewFilter studyViewFilter = interceptedGenomicDataCountFilter.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 (gdFilters.size() == 1) {
+            studyViewFilterUtil.removeSelfFromGenomicDataFilter(
+                gdFilters.get(0).getHugoGeneSymbol(), 
+                gdFilters.get(0).getProfileType(), 
+                studyViewFilter);
+        }
+        List<SampleIdentifier> filteredSampleIdentifiers = studyViewFilterApplier.apply(studyViewFilter);
+
+        if (filteredSampleIdentifiers.isEmpty()) {
+            return new ResponseEntity<>(new ArrayList<>(), HttpStatus.OK);
+        }
+
+        List<String> studyIds = new ArrayList<>();
+        List<String> sampleIds = new ArrayList<>();
+        studyViewFilterUtil.extractStudyAndSampleIds(filteredSampleIdentifiers, studyIds, sampleIds);
+        
+        List<GenomicDataCountItem> result = studyViewService.getCNAAlterationCountsByGeneSpecific(
+            studyIds,
+            sampleIds,
+            gdFilters.stream().map(gdFilter -> new Pair<>(gdFilter.getHugoGeneSymbol(), gdFilter.getProfileType())).collect(Collectors.toList()));
+
+        return new ResponseEntity<>(result, HttpStatus.OK);
+    }
+    
     @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection<CancerStudyId>', T(org.cbioportal.utils.security.AccessLevel).READ)")
     @RequestMapping(value = "/generic-assay-data-counts/fetch", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
     @ApiOperation("Fetch generic assay data counts by study view filter")u}(jg  (c01ec7696c1c982450178be39d0a178edd3ad3dcjσ  Jweb/src/main/java/org/cbioportal/web/parameter/GenomicDataCountFilter.javajу  addedjɃ  Kjʃ  K jӃ  Kjԃ  https://github.com/cBioPortal/cbioportal/blob/ca2bdff949965b3628bc5a96d379074d21546de6/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FGenomicDataCountFilter.javajփ  https://github.com/cBioPortal/cbioportal/raw/ca2bdff949965b3628bc5a96d379074d21546de6/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FGenomicDataCountFilter.javaj؃  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Fparameter%2FGenomicDataCountFilter.java?ref=ca2bdff949965b3628bc5a96d379074d21546de6jڃ  X  @@ -0,0 +1,26 @@
+package org.cbioportal.web.parameter;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class GenomicDataCountFilter implements Serializable {
+
+    private List<GenomicDataFilter> genomicDataFilters;
+    private StudyViewFilter studyViewFilter;
+
+    public List<GenomicDataFilter> getGenomicDataFilters() {
+        return genomicDataFilters;
+    }
+
+    public void setGenomicDataFilters(List<GenomicDataFilter> genomicDataFilters) {
+        this.genomicDataFilters = genomicDataFilters;
+    }
+
+    public StudyViewFilter getStudyViewFilter() {
+        return studyViewFilter;
+    }
+
+    public void setStudyViewFilter(StudyViewFilter studyViewFilter) {
+        this.studyViewFilter = studyViewFilter;
+    }
+}u}(jg  (f56a51727b02e8666ff8e488ef65a6fa437382d3jσ  Vweb/src/main/java/org/cbioportal/web/util/InvolvedCancerStudyExtractorInterceptor.javajу  modifiedjɃ  K jʃ  KjӃ  K!jԃ  https://github.com/cBioPortal/cbioportal/blob/ca2bdff949965b3628bc5a96d379074d21546de6/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javajփ  https://github.com/cBioPortal/cbioportal/raw/ca2bdff949965b3628bc5a96d379074d21546de6/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.javaj؃  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FInvolvedCancerStudyExtractorInterceptor.java?ref=ca2bdff949965b3628bc5a96d379074d21546de6jڃ  X  @@ -75,6 +75,7 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
     public static final String STUDY_VIEW_CLINICAL_DATA_BIN_COUNTS_PATH = "/clinical-data-bin-counts/fetch";
     public static final String STUDY_VIEW_CUSTOM_DATA_BIN_COUNTS_PATH = "/custom-data-bin-counts/fetch";
     public static final String STUDY_VIEW_GENOMICL_DATA_BIN_COUNTS_PATH = "/genomic-data-bin-counts/fetch";
+    public static final String STUDY_VIEW_GENOMICL_DATA_COUNTS_PATH = "/genomic-data-counts/fetch";
     public static final String STUDY_VIEW_GENERIC_ASSAY_DATA_BIN_COUNTS_PATH = "/generic-assay-data-bin-counts/fetch";
     public static final String STUDY_VIEW_GENERIC_ASSAY_DATA_COUNTS_PATH = "/generic-assay-data-counts/fetch";
     public static final String STUDY_VIEW_CLINICAL_DATA_COUNTS_PATH = "/clinical-data-counts/fetch";
@@ -130,14 +131,16 @@ public class InvolvedCancerStudyExtractorInterceptor extends HandlerInterceptorA
             return extractAttributesFromClinicalDataBinCountFilter(request);
         } else if (requestPathInfo.equals(STUDY_VIEW_GENOMICL_DATA_BIN_COUNTS_PATH)) {
             return extractAttributesFromGenomicDataBinCountFilter(request);
+        } else if (requestPathInfo.equals(STUDY_VIEW_GENOMICL_DATA_COUNTS_PATH)) {
+            return extractAttributesFromGenomicDataCountFilter(request);
         } else if (requestPathInfo.equals(STUDY_VIEW_GENERIC_ASSAY_DATA_BIN_COUNTS_PATH)) {
             return extractAttributesFromGenericAssayDataBinCountFilter(request);
         } else if (requestPathInfo.equals(STUDY_VIEW_GENERIC_ASSAY_DATA_COUNTS_PATH)) {
             return extractAttributesFromGenericAssayDataCountFilter(request);
         } else if (Arrays.asList(STUDY_VIEW_CLINICAL_DATA_COUNTS_PATH, STUDY_VIEW_CUSTOM_DATA_COUNTS_PATH)
                 .contains(requestPathInfo)) {
             return extractAttributesFromClinicalDataCountFilter(request);
-        } else if (Arrays.asList(STUDY_VIEW_CLINICAL_DATA_DENSITY_PATH, STUDY_VIEW_CLINICAL_DATA_VIOLIN_PATH, STUDY_VIEW_CNA_GENES,
+        } 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
@@ -477,6 +480,26 @@ private boolean extractAttributesFromGenomicDataBinCountFilter(HttpServletReques
         return true;
     }
 
+    private boolean extractAttributesFromGenomicDataCountFilter(HttpServletRequest request) {
+        try {
+            GenomicDataCountFilter genomicDataCountFilter = objectMapper.readValue(request.getInputStream(),
+                GenomicDataCountFilter.class);
+            LOG.debug("extracted genomicDataCountFilter: " + genomicDataCountFilter.toString());
+            LOG.debug("setting interceptedGenomicDataCountFilter to " + genomicDataCountFilter);
+            request.setAttribute("interceptedGenomicDataCountFilter", genomicDataCountFilter);
+            if (cacheMapUtil.hasCacheEnabled()) {
+                Collection<String> cancerStudyIdCollection = extractCancerStudyIdsFromGenomicDataCountFilter(
+                    genomicDataCountFilter);
+                LOG.debug("setting involvedCancerStudies to " + cancerStudyIdCollection);
+                request.setAttribute("involvedCancerStudies", cancerStudyIdCollection);
+            }
+        } catch (Exception e) {
+            LOG.error("exception thrown during extraction of genomicDataCountFilter: " + e);
+            return false;
+        }
+        return true;
+    }
+
     private boolean extractAttributesFromGenericAssayDataBinCountFilter(HttpServletRequest request) {
         try {
             GenericAssayDataBinCountFilter genericAssayDataBinCountFilter = objectMapper
@@ -722,6 +745,14 @@ private Set<String> extractCancerStudyIdsFromGenomicDataBinCountFilter(
         return new HashSet<String>();
     }
 
+    private Set<String> extractCancerStudyIdsFromGenomicDataCountFilter(
+        GenomicDataCountFilter genomicDataCountFilter) {
+        if (genomicDataCountFilter.getStudyViewFilter() != null) {
+            return extractCancerStudyIdsFromStudyViewFilter(genomicDataCountFilter.getStudyViewFilter());
+        }
+        return new HashSet<String>();
+    }
+
     private Set<String> extractCancerStudyIdsFromGenericAssayDataBinCountFilter(
             GenericAssayDataBinCountFilter genericAssayDataBinCountFilter) {
         if (genericAssayDataBinCountFilter.getStudyViewFilter() != null) {u}(jg  (0b97b6df9543ab021cea2f48c0727c7b578a7517jσ  Eweb/src/main/java/org/cbioportal/web/util/StudyViewFilterApplier.javajу  modifiedjɃ  Kjʃ  KQjӃ  Kjԃ  https://github.com/cBioPortal/cbioportal/blob/ca2bdff949965b3628bc5a96d379074d21546de6/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.javajփ  https://github.com/cBioPortal/cbioportal/raw/ca2bdff949965b3628bc5a96d379074d21546de6/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.javaj؃  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterApplier.java?ref=ca2bdff949965b3628bc5a96d379074d21546de6jڃ  Xt?  @@ -166,8 +166,39 @@ public List<SampleIdentifier> apply(StudyViewFilter studyViewFilter, Boolean neg
             molecularProfiles = molecularProfileService.getMolecularProfilesInStudies(studyIds, "SUMMARY");
         }
 
-        sampleIdentifiers = intervalFilterExpressionData(sampleIdentifiers, molecularProfiles,
-                studyViewFilter.getGenomicDataFilters(), negateFilters);
+        List<GenomicDataFilter> genomicDataEqualityFilters = new ArrayList<>();
+        List<GenomicDataFilter> genomicDataIntervalFilters = new ArrayList<>();
+
+        List<GenomicDataFilter> genomicDataFilters = studyViewFilter.getGenomicDataFilters();
+
+        if (!CollectionUtils.isEmpty(genomicDataFilters)) {
+            Map<String, MolecularProfile> molecularProfileMapByType = molecularProfileUtil
+                .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles)
+                .entrySet()
+                .stream()
+                .collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().get(0)));
+
+            genomicDataFilters.forEach(genomicDataFilter -> {
+                String profileType = genomicDataFilter.getProfileType();
+                if (molecularProfileMapByType.containsKey(profileType)) {
+                    if (molecularProfileMapByType.get(profileType).getDatatype().equals("DISCRETE")) {
+                        genomicDataEqualityFilters.add(genomicDataFilter);
+                    } else {
+                        genomicDataIntervalFilters.add(genomicDataFilter);
+                    }
+                }
+            });
+        }
+        
+        if (!CollectionUtils.isEmpty(genomicDataEqualityFilters)) {
+            sampleIdentifiers = equalityFilterExpressionData(sampleIdentifiers, molecularProfiles,
+                genomicDataEqualityFilters, negateFilters);
+        }
+        
+        if (!CollectionUtils.isEmpty(genomicDataIntervalFilters)) {
+            sampleIdentifiers = intervalFilterExpressionData(sampleIdentifiers, molecularProfiles,
+                genomicDataIntervalFilters, negateFilters);
+        }
 
         sampleIdentifiers = intervalFilterExpressionData(sampleIdentifiers, molecularProfiles,
                 studyViewFilter.getGenericAssayDataFilters(), negateFilters);
@@ -847,99 +878,39 @@ private GenericAssayDataBin dataBintoGenericAssayDataBin(GenericAssayDataBinFilt
     }
 
     public <S extends DataFilter> List<SampleIdentifier> intervalFilterExpressionData(
-            List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
-            Boolean negateFilters) {
-
-        if (!CollectionUtils.isEmpty(dataFilters) && !CollectionUtils.isEmpty(sampleIdentifiers)) {
-
-            Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
-                    .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
+        Boolean negateFilters) {
 
-            List<String> studyIds = new ArrayList<>();
-            List<String> sampleIds = new ArrayList<>();
-            studyViewFilterUtil.extractStudyAndSampleIds(sampleIdentifiers, studyIds, sampleIds);
-            List<ClinicalData> clinicalDatas = new ArrayList<>();
-            List<ClinicalDataFilter> attributes = new ArrayList<>();
-            if (dataFilters.get(0) instanceof GenomicDataFilter) {
-                List<GenomicDataFilter> genomicDataIntervalFilters = (List<GenomicDataFilter>) dataFilters;
-                Set<String> hugoGeneSymbols = genomicDataIntervalFilters.stream()
-                        .map(GenomicDataFilter::getHugoGeneSymbol).collect(Collectors.toSet());
-                Map<String, Integer> geneNameIdMap = geneService
-                        .fetchGenes(new ArrayList<>(hugoGeneSymbols), GeneIdType.HUGO_GENE_SYMBOL.name(),
-                                Projection.SUMMARY.name())
-                        .stream().collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
-
-                clinicalDatas = genomicDataIntervalFilters.stream().flatMap(genomicDataFilter -> {
-
-                    Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
-                            .getOrDefault(genomicDataFilter.getProfileType(), new ArrayList<>())
-                            .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
-                                    MolecularProfile::getStableId));
-
-                    GenomicDataBinFilter genomicDataBinFilter = new GenomicDataBinFilter();
-                    genomicDataBinFilter.setHugoGeneSymbol(genomicDataFilter.getHugoGeneSymbol());
-                    genomicDataBinFilter.setProfileType(genomicDataFilter.getProfileType());
-                    return invokeDataFunc(sampleIds, studyIds,
-                            Arrays.asList(geneNameIdMap.get(genomicDataFilter.getHugoGeneSymbol()).toString()),
-                            studyIdToMolecularProfileIdMap, genomicDataBinFilter, fetchMolecularData);
-                }).collect(Collectors.toList());
-
-                attributes = genomicDataIntervalFilters.stream().map(genomicDataIntervalFilter -> {
-                    String attributeId = studyViewFilterUtil.getGenomicDataFilterUniqueKey(
-                            genomicDataIntervalFilter.getHugoGeneSymbol(), genomicDataIntervalFilter.getProfileType());
-                    ClinicalDataFilter clinicalDataIntervalFilter = new ClinicalDataFilter();
-                    clinicalDataIntervalFilter.setAttributeId(attributeId);
-                    clinicalDataIntervalFilter.setValues(genomicDataIntervalFilter.getValues());
-                    return clinicalDataIntervalFilter;
-                }).collect(Collectors.toList());
-            } else {
-                List<GenericAssayDataFilter> genericAssayDataFilters = (List<GenericAssayDataFilter>) dataFilters;
-
-                clinicalDatas = genericAssayDataFilters.stream().flatMap(genericAssayDataFilter -> {
+        return filterExpressionData(sampleIdentifiers, molecularProfiles, dataFilters, negateFilters, clinicalDataIntervalFilterApplier);
+    }
 
-                    Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
-                            .getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>())
-                            .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
-                                    MolecularProfile::getStableId));
-                    GenericAssayDataBinFilter genericAssayDataBinFilter = new GenericAssayDataBinFilter();
-                    genericAssayDataBinFilter.setStableId(genericAssayDataFilter.getStableId());
-                    genericAssayDataBinFilter.setProfileType(genericAssayDataFilter.getProfileType());
+    public <S extends DataFilter> List<SampleIdentifier> equalityFilterExpressionData(
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
+        Boolean negateFilters) {
 
-                    // get original data stream from invokeDataFunc
-                    Stream<ClinicalData> dataStream = invokeDataFunc(sampleIds, studyIds, Arrays.asList(genericAssayDataBinFilter.getStableId()),
-                        studyIdToMolecularProfileIdMap, genericAssayDataBinFilter, fetchGenericAssayData);
-                    // For patient level generic assay profile, only keep the one sample per patient
-                    List<MolecularProfile> profiles = molecularProfileMap.getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>());
-                    if (profiles.size() > 0 && profiles.get(0).getPatientLevel() == true) {
-                        dataStream = dataStream.collect(Collectors.groupingBy(d -> d.getPatientId())).values().stream()
-                            .flatMap(d -> d.stream().limit(1));
-                    }
-                    // don't change anything for non patient level data
-                    return dataStream;
-                }).collect(Collectors.toList());
+        return filterExpressionData(sampleIdentifiers, molecularProfiles, dataFilters, negateFilters, clinicalDataEqualityFilterApplier);
+    }
 
-                attributes = genericAssayDataFilters.stream().map(genericAssayDataFilter -> {
-                    String attributeId = studyViewFilterUtil.getGenericAssayDataFilterUniqueKey(
-                            genericAssayDataFilter.getStableId(), genericAssayDataFilter.getProfileType());
-                    ClinicalDataFilter clinicalDataIntervalFilter = new ClinicalDataFilter();
-                    clinicalDataIntervalFilter.setAttributeId(attributeId);
-                    clinicalDataIntervalFilter.setValues(genericAssayDataFilter.getValues());
-                    return clinicalDataIntervalFilter;
-                }).collect(Collectors.toList());
 
-            }
+    public <S extends DataFilter> List<SampleIdentifier> filterExpressionData(
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters,
+        Boolean negateFilters, ClinicalDataFilterApplier clinicalDataFilterApplier) {
+        if (!CollectionUtils.isEmpty(dataFilters) && !CollectionUtils.isEmpty(sampleIdentifiers)) {
+            List<ClinicalData> clinicalDatas =
+                fetchDataAndTransformToClinicalDataList(sampleIdentifiers, molecularProfiles, dataFilters);
+            List<ClinicalDataFilter> attributes =transformToClinicalDataFilter(dataFilters);
 
             MultiKeyMap clinicalDataMap = new MultiKeyMap();
 
             clinicalDatas.forEach(clinicalData -> {
                 clinicalDataMap.put(clinicalData.getStudyId(), clinicalData.getSampleId(), clinicalData.getAttrId(),
-                        clinicalData.getAttrValue());
+                    clinicalData.getAttrValue());
             });
 
             List<SampleIdentifier> newSampleIdentifiers = new ArrayList<>();
             for (SampleIdentifier sampleIdentifier : sampleIdentifiers) {
-                int count = clinicalDataIntervalFilterApplier.apply(attributes, clinicalDataMap,
-                        sampleIdentifier.getSampleId(), sampleIdentifier.getStudyId(), negateFilters);
+                int count = clinicalDataFilterApplier.apply(attributes, clinicalDataMap,
+                    sampleIdentifier.getSampleId(), sampleIdentifier.getStudyId(), negateFilters);
 
                 if (count == attributes.size()) {
                     newSampleIdentifiers.add(sampleIdentifier);
@@ -951,4 +922,86 @@ public <S extends DataFilter> List<SampleIdentifier> intervalFilterExpressionDat
 
         return sampleIdentifiers;
     }
+    
+    private <S extends DataFilter> List<ClinicalData> fetchDataAndTransformToClinicalDataList(
+        List<SampleIdentifier> sampleIdentifiers, List<MolecularProfile> molecularProfiles, List<S> dataFilters) {
+        Map<String, List<MolecularProfile>> molecularProfileMap = molecularProfileUtil
+            .categorizeMolecularProfilesByStableIdSuffixes(molecularProfiles);
+
+        List<String> studyIds = new ArrayList<>();
+        List<String> sampleIds = new ArrayList<>();
+        studyViewFilterUtil.extractStudyAndSampleIds(sampleIdentifiers, studyIds, sampleIds);
+        
+        if (dataFilters.get(0) instanceof GenomicDataFilter) {
+            List<GenomicDataFilter> genomicDataIntervalFilters = (List<GenomicDataFilter>) dataFilters;
+            Set<String> hugoGeneSymbols = genomicDataIntervalFilters.stream()
+                .map(GenomicDataFilter::getHugoGeneSymbol).collect(Collectors.toSet());
+            Map<String, Integer> geneNameIdMap = geneService
+                .fetchGenes(new ArrayList<>(hugoGeneSymbols), GeneIdType.HUGO_GENE_SYMBOL.name(),
+                    Projection.SUMMARY.name())
+                .stream().collect(Collectors.toMap(Gene::getHugoGeneSymbol, Gene::getEntrezGeneId));
+
+            return genomicDataIntervalFilters.stream().flatMap(genomicDataFilter -> {
+
+                Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
+                    .getOrDefault(genomicDataFilter.getProfileType(), new ArrayList<>())
+                    .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
+                        MolecularProfile::getStableId));
+
+                GenomicDataBinFilter genomicDataBinFilter = new GenomicDataBinFilter();
+                genomicDataBinFilter.setHugoGeneSymbol(genomicDataFilter.getHugoGeneSymbol());
+                genomicDataBinFilter.setProfileType(genomicDataFilter.getProfileType());
+                return invokeDataFunc(sampleIds, studyIds,
+                    Collections.singletonList(geneNameIdMap.get(genomicDataFilter.getHugoGeneSymbol()).toString()),
+                    studyIdToMolecularProfileIdMap, genomicDataBinFilter, fetchMolecularData);
+            }).collect(Collectors.toList());
+
+        } else {
+
+            return ((List<GenericAssayDataFilter>) dataFilters).stream().flatMap(genericAssayDataFilter -> {
+
+                Map<String, String> studyIdToMolecularProfileIdMap = molecularProfileMap
+                    .getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<MolecularProfile>())
+                    .stream().collect(Collectors.toMap(MolecularProfile::getCancerStudyIdentifier,
+                        MolecularProfile::getStableId));
+                GenericAssayDataBinFilter genericAssayDataBinFilter = new GenericAssayDataBinFilter();
+                genericAssayDataBinFilter.setStableId(genericAssayDataFilter.getStableId());
+                genericAssayDataBinFilter.setProfileType(genericAssayDataFilter.getProfileType());
+
+                // get original data stream from invokeDataFunc
+                Stream<ClinicalData> dataStream = invokeDataFunc(sampleIds, studyIds, Collections.singletonList(genericAssayDataBinFilter.getStableId()),
+                    studyIdToMolecularProfileIdMap, genericAssayDataBinFilter, fetchGenericAssayData);
+                // For patient level generic assay profile, only keep the one sample per patient
+                List<MolecularProfile> profiles = molecularProfileMap.getOrDefault(genericAssayDataFilter.getProfileType(), new ArrayList<>());
+                if (profiles.size() > 0 && profiles.get(0).getPatientLevel()) {
+                    dataStream = dataStream.collect(Collectors.groupingBy(ClinicalData::getPatientId)).values().stream()
+                        .flatMap(d -> d.stream().limit(1));
+                }
+                // don't change anything for non patient level data
+                return dataStream;
+            }).collect(Collectors.toList());
+
+        }
+    }
+
+    private <S extends DataFilter> List<ClinicalDataFilter> transformToClinicalDataFilter(List<S> dataFilters) {
+        List<ClinicalDataFilter> attributes;
+        attributes = dataFilters.stream().map(dataFilter -> {
+            String attributeId;
+            if (dataFilter instanceof GenomicDataFilter) {
+                GenomicDataFilter genomicDataFilter = (GenomicDataFilter) dataFilter;
+                attributeId = studyViewFilterUtil.getGenomicDataFilterUniqueKey(genomicDataFilter.getHugoGeneSymbol(), genomicDataFilter.getProfileType());
+            } else {
+                GenericAssayDataFilter genericAssayDataFilter = (GenericAssayDataFilter) dataFilter;
+                attributeId = studyViewFilterUtil.getGenericAssayDataFilterUniqueKey(
+                    genericAssayDataFilter.getStableId(), genericAssayDataFilter.getProfileType());
+            }
+
+            ClinicalDataFilter clinicalDataFilter = new ClinicalDataFilter();
+            clinicalDataFilter.setAttributeId(attributeId);
+            clinicalDataFilter.setValues(dataFilter.getValues());
+            return clinicalDataFilter;
+        }).collect(Collectors.toList());
+        return attributes;
+    }
 }u}(jg  (ecf5bdab85cceb359f2f511895ea0a4e26cbd0b9jσ  Bweb/src/main/java/org/cbioportal/web/util/StudyViewFilterUtil.javajу  modifiedjɃ  Kjʃ  KjӃ  Kjԃ  https://github.com/cBioPortal/cbioportal/blob/ca2bdff949965b3628bc5a96d379074d21546de6/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javajփ  https://github.com/cBioPortal/cbioportal/raw/ca2bdff949965b3628bc5a96d379074d21546de6/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.javaj؃  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Fmain%2Fjava%2Forg%2Fcbioportal%2Fweb%2Futil%2FStudyViewFilterUtil.java?ref=ca2bdff949965b3628bc5a96d379074d21546de6jڃ  X  @@ -45,19 +45,27 @@ public void extractStudyAndSampleIds(
     }
 
     public void removeSelfFromFilter(String attributeId, StudyViewFilter studyViewFilter) {
-        if (studyViewFilter!= null && studyViewFilter.getClinicalDataFilters() != null) {
+        if (studyViewFilter != null && studyViewFilter.getClinicalDataFilters() != null) {
             studyViewFilter.getClinicalDataFilters().removeIf(f -> f.getAttributeId().equals(attributeId));
         }
     }
+    
+    public void removeSelfFromGenomicDataFilter(String hugoGeneSymbol, String profileType, StudyViewFilter studyViewFilter) {
+        if (studyViewFilter != null && studyViewFilter.getGenomicDataFilters() != null) {
+            studyViewFilter.getGenomicDataFilters().removeIf(f -> 
+                f.getHugoGeneSymbol().equals(hugoGeneSymbol) && f.getProfileType().equals(profileType)
+            );
+        }
+    }
 
     public void removeSelfFromGenericAssayFilter(String stableId, StudyViewFilter studyViewFilter) {
-        if (studyViewFilter!= null && studyViewFilter.getGenericAssayDataFilters() != null) {
+        if (studyViewFilter != null && studyViewFilter.getGenericAssayDataFilters() != null) {
             studyViewFilter.getGenericAssayDataFilters().removeIf(f -> f.getStableId().equals(stableId));
         }
     }
 
     public void removeSelfCustomDataFromFilter(String attributeId, StudyViewFilter studyViewFilter) {
-        if (studyViewFilter!= null && studyViewFilter.getCustomDataFilters() != null) {
+        if (studyViewFilter != null && studyViewFilter.getCustomDataFilters() != null) {
             studyViewFilter.getCustomDataFilters().removeIf(f -> f.getAttributeId().equals(attributeId));
         }
     }u}(jg  (3951e57b963be731abed688f002aa194fc2f0793jσ  Aweb/src/test/java/org/cbioportal/web/StudyViewControllerTest.javajу  modifiedjɃ  K[jʃ  K jӃ  K[jԃ  https://github.com/cBioPortal/cbioportal/blob/ca2bdff949965b3628bc5a96d379074d21546de6/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javajփ  https://github.com/cBioPortal/cbioportal/raw/ca2bdff949965b3628bc5a96d379074d21546de6/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.javaj؃  https://api.github.com/repos/cBioPortal/cbioportal/contents/web%2Fsrc%2Ftest%2Fjava%2Forg%2Fcbioportal%2Fweb%2FStudyViewControllerTest.java?ref=ca2bdff949965b3628bc5a96d379074d21546de6jڃ  X  @@ -62,6 +62,11 @@ public class StudyViewControllerTest {
     private static final String TEST_GENERIC_ASSAY_DATA_VALUE_2 = "value2";
     private static final String TEST_CLINICAL_EVENT_TYPE = "STATUS";
     private static final Integer TEST_CLINICAL_EVENT_TYPE_COUNT = 513;
+    private static final String TEST_CNA_ALTERATION_NAME_1 = "test_cna_event_type_1";
+    private static final String TEST_CNA_ALTERATION_NAME_2 = "test_cna_event_type_2";
+    private static final String TEST_CNA_ALTERATION_VALUE_1 = "2";
+    private static final String TEST_CNA_ALTERATION_VALUE_2 = "-2";
+    private static final String TEST_MOLECULAR_PROFILE_TYPE = "test_molecular_profile_type";
 
     private List<SampleIdentifier> filteredSampleIdentifiers = new ArrayList<>();
     private List<ClinicalData> clinicalData = new ArrayList<>();
@@ -506,6 +511,92 @@ public void fetchSampleCounts() throws Exception {
             .andExpect(MockMvcResultMatchers.jsonPath("$[1].count").value(2));
     }
 
+
+    @Test
+    public void fetchGenomicDataCounts() throws Exception {
+
+        when(studyViewFilterApplier.apply(any())).thenReturn(filteredSampleIdentifiers);
+
+        List<GenomicDataCountItem> genomicDataCountItems = new ArrayList<>();
+
+        GenomicDataCount genomicDataCount1 = new GenomicDataCount();
+        genomicDataCount1.setLabel(TEST_CNA_ALTERATION_NAME_1);
+        genomicDataCount1.setValue(TEST_CNA_ALTERATION_VALUE_1);
+        genomicDataCount1.setCount(1);
+        
+        GenomicDataCount genomicDataCount2 = new GenomicDataCount();
+        genomicDataCount2.setLabel(TEST_CNA_ALTERATION_NAME_2);
+        genomicDataCount2.setValue(TEST_CNA_ALTERATION_VALUE_2);
+        genomicDataCount2.setCount(1);
+
+        GenomicDataCountItem genomicDataCountItem1 = new GenomicDataCountItem();
+        List<GenomicDataCount> genomicDataCounts1 = new ArrayList<>();
+        genomicDataCounts1.add(genomicDataCount1);
+        genomicDataCounts1.add(genomicDataCount2);
+        genomicDataCountItem1.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_1);
+        genomicDataCountItem1.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataCountItem1.setCounts(genomicDataCounts1);
+
+        GenomicDataCountItem genomicDataCountItem2 = new GenomicDataCountItem();
+        List<GenomicDataCount> genomicDataCounts2 = new ArrayList<>();
+        genomicDataCounts2.add(genomicDataCount1);
+        genomicDataCounts2.add(genomicDataCount2);
+        genomicDataCountItem2.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_2);
+        genomicDataCountItem2.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataCountItem2.setCounts(genomicDataCounts2);
+
+        genomicDataCountItems.add(genomicDataCountItem1);
+        genomicDataCountItems.add(genomicDataCountItem2);
+
+        when(studyViewService.getCNAAlterationCountsByGeneSpecific(
+            anyList(),
+            anyList(),
+            anyList()))
+            .thenReturn(genomicDataCountItems);
+
+        GenomicDataCountFilter genomicDataCountFilter = new GenomicDataCountFilter();
+        List<GenomicDataFilter> genomicDataFilters = new ArrayList<>();
+        
+        GenomicDataFilter genomicDataFilter1 = new GenomicDataFilter();
+        genomicDataFilter1.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_1);
+        genomicDataFilter1.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataFilters.add(genomicDataFilter1);
+        
+        GenomicDataFilter genomicDataFilter2 = new GenomicDataFilter();
+        genomicDataFilter2.setHugoGeneSymbol(TEST_HUGO_GENE_SYMBOL_2);
+        genomicDataFilter2.setProfileType(TEST_MOLECULAR_PROFILE_TYPE);
+        genomicDataFilters.add(genomicDataFilter2);
+        
+        genomicDataCountFilter.setGenomicDataFilters(genomicDataFilters);
+        
+        StudyViewFilter studyViewFilter = new StudyViewFilter();
+        studyViewFilter.setStudyIds(Arrays.asList(TEST_STUDY_ID));
+        genomicDataCountFilter.setStudyViewFilter(studyViewFilter);
+
+        mockMvc.perform(MockMvcRequestBuilders.post("/genomic-data-counts/fetch")
+                .accept(MediaType.APPLICATION_JSON)
+                .contentType(MediaType.APPLICATION_JSON)
+                .content(objectMapper.writeValueAsString(genomicDataCountFilter)))
+            .andExpect(MockMvcResultMatchers.status().isOk())
+            .andExpect(MockMvcResultMatchers.content().contentTypeCompatibleWith(MediaType.APPLICATION_JSON))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].hugoGeneSymbol").value(TEST_HUGO_GENE_SYMBOL_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].profileType").value(TEST_MOLECULAR_PROFILE_TYPE))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[0].label").value(TEST_CNA_ALTERATION_NAME_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[0].value").value(TEST_CNA_ALTERATION_VALUE_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[0].count").value(1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[1].label").value(TEST_CNA_ALTERATION_NAME_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[1].value").value(TEST_CNA_ALTERATION_VALUE_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[0].counts[1].count").value(1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].hugoGeneSymbol").value(TEST_HUGO_GENE_SYMBOL_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].profileType").value(TEST_MOLECULAR_PROFILE_TYPE))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[0].label").value(TEST_CNA_ALTERATION_NAME_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[0].value").value(TEST_CNA_ALTERATION_VALUE_1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[0].count").value(1))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[1].label").value(TEST_CNA_ALTERATION_NAME_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[1].value").value(TEST_CNA_ALTERATION_VALUE_2))
+            .andExpect(MockMvcResultMatchers.jsonPath("$[1].counts[1].count").value(1));
+    }
+    
     @Ignore("Skip StudyViewControllerTest.fetchClinicalDataDensityPlot due to assertion errors")
     @Test
     public void fetchClinicalDataDensityPlot() throws Exception {ueuu.