Skip to content

Commit

Permalink
Defer loading of gene panel data until plots tab is shown (#5087)
Browse files Browse the repository at this point in the history
  • Loading branch information
alisman authored Jan 17, 2025
1 parent 7cbf290 commit ce9f9fd
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 122 deletions.
125 changes: 3 additions & 122 deletions src/pages/studyView/StudyViewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ import {
import { VirtualStudyModal } from 'pages/studyView/virtualStudy/VirtualStudyModal';
import PlotsTab from 'shared/components/plots/PlotsTab';
import { RFC80Test } from 'pages/studyView/rfc80Tester';
import { PlotsTabWrapper } from 'pages/studyView/StudyViewPlotsTabWrapper';

export interface IStudyViewPageProps {
routing: any;
Expand Down Expand Up @@ -753,129 +754,9 @@ export default class StudyViewPage extends React.Component<
</span>
}
>
<PlotsTab
filteredSamplesByDetailedCancerType={
this.store
.filteredSamplesByDetailedCancerType
}
mutations={this.store.mutations}
studies={
this.store
.queriedPhysicalStudies
}
molecularProfileIdSuffixToMolecularProfiles={
this.store
.molecularProfileIdSuffixToMolecularProfiles
}
entrezGeneIdToGene={
this.store.entrezGeneIdToGeneAll
}
sampleKeyToSample={
this.store.sampleSetByKey
}
genes={this.store.allGenes}
clinicalAttributes={
this.store.clinicalAttributes
}
customAttributes={
this.store.customAttributes
}
genesets={this.store.genesets}
genericAssayEntitiesGroupByMolecularProfileId={
this.store
.genericAssayEntitiesGroupedByProfileId
}
studyIds={
this.store
.queriedPhysicalStudyIds
}
molecularProfilesWithData={
this.store
.molecularProfilesInStudies
}
molecularProfilesInStudies={
this.store
.molecularProfilesInStudies
}
annotatedCnaCache={
this.store.annotatedCnaCache
}
annotatedMutationCache={
this.store
.annotatedMutationCache
}
structuralVariantCache={
this.store
.structuralVariantCache
}
studyToMutationMolecularProfile={
this.store
.studyToMutationMolecularProfile
}
studyToMolecularProfileDiscreteCna={
this.store
.studyToMolecularProfileDiscreteCna
}
clinicalDataCache={
this.store.clinicalDataCache
}
patientKeyToFilteredSamples={
this.store
.patientKeyToFilteredSamples
}
numericGeneMolecularDataCache={
this.store
.numericGeneMolecularDataCache
}
coverageInformation={
this.store.coverageInformation
}
filteredSamples={
this.store.selectedSamples
}
genesetMolecularDataCache={
this.store
.genesetMolecularDataCache
}
genericAssayMolecularDataCache={
this.store
.genericAssayMolecularDataCache
}
studyToStructuralVariantMolecularProfile={
this.store
.studyToStructuralVariantMolecularProfile
}
driverAnnotationSettings={
this.store
.driverAnnotationSettings
}
studyIdToStudy={
this.store.studyIdToStudy.result
}
structuralVariants={
this.store.structuralVariants
.result
}
hugoGeneSymbols={
this.store.allHugoGeneSymbols
.result
}
selectedGenericAssayEntitiesGroupByMolecularProfileId={
this.store
.selectedGenericAssayEntitiesGroupByMolecularProfileId
}
molecularProfileIdToMolecularProfile={
this.store
.molecularProfileIdToMolecularProfile
}
<PlotsTabWrapper
store={this.store}
urlWrapper={this.urlWrapper}
hasNoQueriedGenes={true}
genePanelDataForAllProfiles={
this.store
.genePanelDataForAllProfiles
.result
}
patients={this.store.patients}
/>
</MSKTab>

Expand Down
72 changes: 72 additions & 0 deletions src/pages/studyView/StudyViewPlotsTabWrapper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import * as React from 'react';
import { StudyViewPageStore } from 'pages/studyView/StudyViewPageStore';
import StudyViewURLWrapper from 'pages/studyView/StudyViewURLWrapper';
import { observer } from 'mobx-react';
import PlotsTab from 'shared/components/plots/PlotsTab';

export const PlotsTabWrapper: React.FunctionComponent<{
store: StudyViewPageStore;
urlWrapper: StudyViewURLWrapper;
}> = observer(function({ store, urlWrapper }) {
return (
<PlotsTab
filteredSamplesByDetailedCancerType={
store.filteredSamplesByDetailedCancerType
}
mutations={store.mutations}
studies={store.queriedPhysicalStudies}
molecularProfileIdSuffixToMolecularProfiles={
store.molecularProfileIdSuffixToMolecularProfiles
}
entrezGeneIdToGene={store.entrezGeneIdToGeneAll}
sampleKeyToSample={store.sampleSetByKey}
genes={store.allGenes}
clinicalAttributes={store.clinicalAttributes}
genesets={store.genesets}
genericAssayEntitiesGroupByMolecularProfileId={
store.genericAssayEntitiesGroupedByProfileId
}
customAttributes={store.customAttributes}
studyIds={store.queriedPhysicalStudyIds}
molecularProfilesWithData={store.molecularProfilesInStudies}
molecularProfilesInStudies={store.molecularProfilesInStudies}
annotatedCnaCache={store.annotatedCnaCache}
annotatedMutationCache={store.annotatedMutationCache}
structuralVariantCache={store.structuralVariantCache}
studyToMutationMolecularProfile={
store.studyToMutationMolecularProfile
}
studyToMolecularProfileDiscreteCna={
store.studyToMolecularProfileDiscreteCna
}
clinicalDataCache={store.clinicalDataCache}
patientKeyToFilteredSamples={store.patientKeyToFilteredSamples}
numericGeneMolecularDataCache={store.numericGeneMolecularDataCache}
coverageInformation={store.coverageInformation}
filteredSamples={store.selectedSamples}
genesetMolecularDataCache={store.genesetMolecularDataCache}
genericAssayMolecularDataCache={
store.genericAssayMolecularDataCache
}
studyToStructuralVariantMolecularProfile={
store.studyToStructuralVariantMolecularProfile
}
driverAnnotationSettings={store.driverAnnotationSettings}
studyIdToStudy={store.studyIdToStudy.result}
structuralVariants={store.structuralVariants.result}
hugoGeneSymbols={store.allHugoGeneSymbols.result}
selectedGenericAssayEntitiesGroupByMolecularProfileId={
store.selectedGenericAssayEntitiesGroupByMolecularProfileId
}
molecularProfileIdToMolecularProfile={
store.molecularProfileIdToMolecularProfile
}
urlWrapper={urlWrapper}
hasNoQueriedGenes={true}
genePanelDataForAllProfiles={
store.genePanelDataForAllProfiles.result
}
patients={store.patients}
/>
);
});

0 comments on commit ce9f9fd

Please sign in to comment.