Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/pages/resultsView/ResultsViewPageStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}),
},
[]
Expand Down Expand Up @@ -3238,7 +3238,6 @@ export class ResultsViewPageStore extends AnalysisStore
);
}
);

return Promise.all(promises).then((cnaData: any[]) =>
_.flattenDeep(cnaData)
);
Expand Down Expand Up @@ -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)
);
},
},
[]
Expand Down
9 changes: 5 additions & 4 deletions src/pages/studyView/StudyViewPageStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6178,13 +6178,14 @@ export class StudyViewPageStore
},
});

readonly namespaceAttributes = remoteData({
readonly namespaceAttributes = remoteData<NamespaceAttribute[]>({
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 [];
},
Expand Down
2 changes: 1 addition & 1 deletion src/shared/api/cbioportalClientInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
2 changes: 1 addition & 1 deletion src/shared/api/cbioportalInternalClientInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
24 changes: 14 additions & 10 deletions src/shared/lib/GenericAssayUtils/GenericAssayCommonUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Loading