Skip to content

Commit

Permalink
Add plots tab wrapper to defer loading of genes data till plots tab i…
Browse files Browse the repository at this point in the history
…s shown
  • Loading branch information
alisman committed Sep 24, 2024
1 parent 1d98489 commit a0fb907
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 136 deletions.
156 changes: 20 additions & 136 deletions src/pages/studyView/StudyViewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,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 @@ -760,142 +761,25 @@ export default class StudyViewPage extends React.Component<
/>
</div>
</MSKTab>
{/*<MSKTab*/}
{/* key={5}*/}
{/* id={StudyViewPageTabKeyEnum.PLOTS}*/}
{/* linkText={*/}
{/* <span>*/}
{/* {*/}
{/* StudyViewPageTabDescriptions.PLOTS*/}
{/* }{' '}*/}
{/* <strong className={'beta-text'}>*/}
{/* Beta!*/}
{/* </strong>*/}
{/* </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*/}
{/* }*/}
{/* 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*/}
{/* }*/}
{/* urlWrapper={this.urlWrapper}*/}
{/* hasNoQueriedGenes={true}*/}
{/* genePanelDataForAllProfiles={*/}
{/* this.store*/}
{/* .genePanelDataForAllProfiles*/}
{/* .result*/}
{/* }*/}
{/* patients={this.store.patients}*/}
{/* />*/}
{/*</MSKTab>*/}
<MSKTab
key={5}
id={StudyViewPageTabKeyEnum.PLOTS}
linkText={
<span>
{
StudyViewPageTabDescriptions.PLOTS
}{' '}
<strong className={'beta-text'}>
Beta!
</strong>
</span>
}
>
<PlotsTabWrapper
store={this.store}
urlWrapper={this.urlWrapper}
/>
</MSKTab>

{this.resourceTabs.component}
{this.customTabs}
Expand Down
71 changes: 71 additions & 0 deletions src/pages/studyView/StudyViewPlotsTabWrapper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
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
}
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 a0fb907

Please sign in to comment.