diff --git a/src/pages/resultsView/ResultsViewPage.tsx b/src/pages/resultsView/ResultsViewPage.tsx index 62a0868d13a..bd630273a9f 100644 --- a/src/pages/resultsView/ResultsViewPage.tsx +++ b/src/pages/resultsView/ResultsViewPage.tsx @@ -313,10 +313,8 @@ export default class ResultsViewPage extends React.Component< driverAnnotationSettings={ store.driverAnnotationSettings } - studyIdToStudy={store.studyIdToStudy.result} - structuralVariants={ - store.structuralVariants.result - } + studyIdToStudy={store.studyIdToStudy} + structuralVariants={store.structuralVariants} hugoGeneSymbols={store.hugoGeneSymbols} selectedGenericAssayEntitiesGroupByMolecularProfileId={ store.selectedGenericAssayEntitiesGroupByMolecularProfileId diff --git a/src/pages/studyView/StudyViewPage.tsx b/src/pages/studyView/StudyViewPage.tsx index c99856eca9b..6e14ee1e991 100644 --- a/src/pages/studyView/StudyViewPage.tsx +++ b/src/pages/studyView/StudyViewPage.tsx @@ -850,15 +850,13 @@ export default class StudyViewPage extends React.Component< .driverAnnotationSettings } studyIdToStudy={ - this.store.studyIdToStudy.result + this.store.studyIdToStudy } structuralVariants={ this.store.structuralVariants - .result } - hugoGeneSymbols={ + allHugoGeneSymbols={ this.store.allHugoGeneSymbols - .result } selectedGenericAssayEntitiesGroupByMolecularProfileId={ this.store @@ -873,7 +871,6 @@ export default class StudyViewPage extends React.Component< genePanelDataForAllProfiles={ this.store .genePanelDataForAllProfiles - .result } patients={this.store.patients} /> diff --git a/src/shared/components/plots/PlotsTab.tsx b/src/shared/components/plots/PlotsTab.tsx index d1890336965..3781401b5d2 100644 --- a/src/shared/components/plots/PlotsTab.tsx +++ b/src/shared/components/plots/PlotsTab.tsx @@ -328,9 +328,10 @@ export interface IPlotsTabProps { [studyId: string]: MolecularProfile; }>; driverAnnotationSettings: DriverAnnotationSettings; - studyIdToStudy?: _.Dictionary; - structuralVariants?: StructuralVariant[]; - hugoGeneSymbols: string[]; + studyIdToStudy?: MobxPromiseUnionTypeWithDefault<_.Dictionary>; + structuralVariants?: MobxPromiseUnionType; + hugoGeneSymbols?: string[]; + allHugoGeneSymbols?: MobxPromiseUnionTypeWithDefault; selectedGenericAssayEntitiesGroupByMolecularProfileId: { [molecularProfileId: string]: string[]; }; @@ -339,7 +340,7 @@ export interface IPlotsTabProps { }>; urlWrapper: ResultsViewURLWrapper | StudyViewURLWrapper; hasNoQueriedGenes?: boolean; - genePanelDataForAllProfiles?: GenePanelData[]; + genePanelDataForAllProfiles?: MobxPromiseUnionType; queryContainsOql?: boolean; includeGermlineMutations?: boolean; mutationsReportByGene?: MobxPromise<{ @@ -3477,7 +3478,7 @@ export default class PlotsTab extends React.Component { private scatterPlotTooltip(d: IScatterPlotData) { return scatterPlotTooltip( d, - this.props.studyIdToStudy || {}, + this.props.studyIdToStudy?.result!, this.horzLogScaleFunction, this.vertLogScaleFunction, this.coloringMenuSelection.selectedOption && @@ -3489,7 +3490,7 @@ export default class PlotsTab extends React.Component { private waterfallPlotTooltip(d: IWaterfallPlotData) { return waterfallPlotTooltip( d, - this.props.studyIdToStudy || {}, + this.props.studyIdToStudy?.result!, this.coloringMenuSelection.selectedOption && this.coloringMenuSelection.selectedOption.info.clinicalAttribute ); @@ -3501,7 +3502,7 @@ export default class PlotsTab extends React.Component { if (this.boxPlotData.isComplete) { content = boxPlotTooltip( d, - this.props.studyIdToStudy || {}, + this.props.studyIdToStudy?.result!, this.boxPlotData.result.horizontal, this.boxPlotData.result.horizontal ? this.horzLogScaleFunction @@ -3683,7 +3684,7 @@ export default class PlotsTab extends React.Component { // we don't want to allow the data to be viewed by variantClass (Variant Type in UI) so remove // that from the options const filterStructuralVariantOptions = _.every( - this.props.structuralVariants, + this.props.structuralVariants?.result || [], sv => { return !sv.variantClass || sv.variantClass === 'NA'; } @@ -3812,13 +3813,16 @@ export default class PlotsTab extends React.Component { } let genericAssayOptionsCount: number = 0; let filteredGenericAssayOptionsCount: number = 0; + const hugoGeneSymbols: string[] = this.props.hugoGeneSymbols + ? this.props.hugoGeneSymbols + : this.props.allHugoGeneSymbols!.result; if (vertical && this.vertGenericAssayOptions.result) { genericAssayOptions = this.makeGenericAssayGroupOptions( this.vertGenericAssayOptions.result, selectedEntities, this._vertGenericAssaySearchText, - this.props.hugoGeneSymbols, + hugoGeneSymbols, this.horzSelection.selectedGeneOption?.label, GENERIC_ASSAY_CONFIG.genericAssayConfigByType[ axisSelection.dataType! @@ -3846,7 +3850,7 @@ export default class PlotsTab extends React.Component { this.horzGenericAssayOptions.result, selectedEntities, this._horzGenericAssaySearchText, - this.props.hugoGeneSymbols, + hugoGeneSymbols, this.vertSelection.selectedGeneOption?.label, GENERIC_ASSAY_CONFIG.genericAssayConfigByType[ axisSelection.dataType! @@ -3889,7 +3893,7 @@ export default class PlotsTab extends React.Component { options = options.filter(stringCompare).slice(0, 10); const genes = await fetchGenes(options.map(o => o.label)); const coverageInformationPromise = getCoverageInformation( - this.props.genePanelDataForAllProfiles!, + this.props.genePanelDataForAllProfiles!.result!, this.props.sampleKeyToSample.result!, this.props.patients.result!, genes