diff --git a/src/pages/resultsView/ResultsViewPageStore.ts b/src/pages/resultsView/ResultsViewPageStore.ts index 72d1b7be72f..465c15abf09 100644 --- a/src/pages/resultsView/ResultsViewPageStore.ts +++ b/src/pages/resultsView/ResultsViewPageStore.ts @@ -3068,7 +3068,7 @@ export class ResultsViewPageStore extends AnalysisStore { invoke: async () => await getClient().getAllStudiesUsingGET({ - projection: REQUEST_ARG_ENUM.PROJECTION_SUMMARY, + projection: REQUEST_ARG_ENUM.PROJECTION_DETAILED, }), }, [] @@ -3238,7 +3238,6 @@ export class ResultsViewPageStore extends AnalysisStore ); } ); - return Promise.all(promises).then((cnaData: any[]) => _.flattenDeep(cnaData) ); @@ -4259,10 +4258,14 @@ export class ResultsViewPageStore extends AnalysisStore { await: () => [this.studyIds], invoke: async () => { - return getClient().fetchStudiesUsingPOST({ - studyIds: this.studyIds.result!, + // we do this because get all studies (detailed projection) will be in cache + // for all users since it is the same for everyone + const allStudies = await getClient().getAllStudiesUsingGET({ projection: REQUEST_ARG_ENUM.PROJECTION_DETAILED, }); + return allStudies.filter(study => + this.studyIds.result!.includes(study.studyId) + ); }, }, [] diff --git a/src/pages/studyView/StudyViewPageStore.ts b/src/pages/studyView/StudyViewPageStore.ts index 926ece672c8..4a934292fbb 100644 --- a/src/pages/studyView/StudyViewPageStore.ts +++ b/src/pages/studyView/StudyViewPageStore.ts @@ -6178,13 +6178,14 @@ export class StudyViewPageStore }, }); - readonly namespaceAttributes = remoteData({ + readonly namespaceAttributes = remoteData({ await: () => [this.queriedPhysicalStudyIds], invoke: async () => { if (this.queriedPhysicalStudyIds.result.length > 0) { - return await getClient().fetchNamespaceAttributesUsingPOST({ - studyIds: this.queriedPhysicalStudyIds.result, - }); + return []; + // return await getClient().fetchNamespaceAttributesUsingPOST({ + // studyIds: this.queriedPhysicalStudyIds.result, + // }); } return []; }, diff --git a/src/shared/api/cbioportalClientInstance.ts b/src/shared/api/cbioportalClientInstance.ts index 7a414c774b4..e745e654186 100644 --- a/src/shared/api/cbioportalClientInstance.ts +++ b/src/shared/api/cbioportalClientInstance.ts @@ -19,6 +19,6 @@ proxyColumnStore(clientColumnStore, 'getSamplesByKeyword'); proxyColumnStore(clientColumnStore, 'getSampleInStudy'); proxyColumnStore(clientColumnStore, 'getAllSamplesInStudy'); proxyColumnStore(clientColumnStore, 'getAllSamplesOfPatientInStudy'); -//proxyColumnStore(clientColumnStore, 'getAllStudies'); +proxyColumnStore(clientColumnStore, 'getAllStudies'); export default client; diff --git a/src/shared/api/cbioportalInternalClientInstance.ts b/src/shared/api/cbioportalInternalClientInstance.ts index 1b463a6a427..56c43d8ab4e 100644 --- a/src/shared/api/cbioportalInternalClientInstance.ts +++ b/src/shared/api/cbioportalInternalClientInstance.ts @@ -32,7 +32,7 @@ proxyColumnStore(internalClientColumnStore, 'fetchGenomicDataBinCounts'); proxyColumnStore(internalClientColumnStore, 'fetchGenericAssayDataBinCounts'); proxyColumnStore(internalClientColumnStore, 'fetchGenericAssayDataCounts'); proxyColumnStore(internalClientColumnStore, 'fetchClinicalDataViolinPlots'); -//proxyColumnStore(internalClientColumnStore, 'fetchAlterationEnrichments'); +proxyColumnStore(internalClientColumnStore, 'fetchAlterationEnrichments'); export default internalClient; diff --git a/src/shared/lib/GenericAssayUtils/GenericAssayCommonUtils.ts b/src/shared/lib/GenericAssayUtils/GenericAssayCommonUtils.ts index 112f8780a99..9672b162f9f 100644 --- a/src/shared/lib/GenericAssayUtils/GenericAssayCommonUtils.ts +++ b/src/shared/lib/GenericAssayUtils/GenericAssayCommonUtils.ts @@ -96,17 +96,21 @@ export async function fetchGenericAssayMetaByMolecularProfileIdsGroupByMolecular [molecularProfileId: string]: GenericAssayMeta[]; } = {}; - await Promise.all( - genericAssayProfiles.map(profile => - fetchGenericAssayMetaByProfileIds([ - profile.molecularProfileId, - ]).then(genericAssayMeta => { - genericAssayMetaGroupByMolecularProfileId[ - profile.molecularProfileId - ] = genericAssayMeta; - }) - ) + const allProfileIds = genericAssayProfiles.map( + profile => profile.molecularProfileId ); + const allGenericAssayMeta = await fetchGenericAssayMetaByProfileIds( + allProfileIds + ); + + // Populate each profile with the full metadata list + // Note: The API returns all metadata for all profiles combined, + // so each profile gets the same complete list + allProfileIds.forEach(profileId => { + genericAssayMetaGroupByMolecularProfileId[ + profileId + ] = allGenericAssayMeta; + }); return genericAssayMetaGroupByMolecularProfileId; }