diff --git a/src/pages/groupComparison/GenericAssayEnrichments.tsx b/src/pages/groupComparison/GenericAssayEnrichments.tsx deleted file mode 100644 index a93e7642074..00000000000 --- a/src/pages/groupComparison/GenericAssayEnrichments.tsx +++ /dev/null @@ -1,125 +0,0 @@ -import * as React from 'react'; -import { observer } from 'mobx-react'; -import autobind from 'autobind-decorator'; -import { MolecularProfile } from 'cbioportal-ts-api-client'; -import { MakeMobxView } from '../../shared/components/MobxView'; -import Loader from '../../shared/components/loadingIndicator/LoadingIndicator'; -import ErrorMessage from '../../shared/components/ErrorMessage'; -import { MakeEnrichmentsTabUI } from './GroupComparisonUtils'; -import _ from 'lodash'; -import ComparisonStore from '../../shared/lib/comparison/ComparisonStore'; -import GenericAssayEnrichmentsContainer from 'pages/resultsView/enrichments/GenericAssayEnrichmentsContainer'; -import EnrichmentsDataSetDropdown from 'pages/resultsView/enrichments/EnrichmentsDataSetDropdown'; - -export interface IGenericAssayEnrichmentsProps { - store: ComparisonStore; - genericAssayType: string; - resultsViewMode?: boolean; -} - -@observer -export default class GenericAssayEnrichments extends React.Component< - IGenericAssayEnrichmentsProps, - {} -> { - @autobind - private onChangeProfile(profileMap: { - [studyId: string]: MolecularProfile; - }) { - this.props.store.setGenericAssayEnrichmentProfileMap( - profileMap, - this.props.genericAssayType - ); - } - - readonly tabUI = MakeEnrichmentsTabUI( - () => this.props.store, - () => this.enrichmentsUI, - this.props.genericAssayType, - true, - true, - false - ); - - readonly enrichmentsUI = MakeMobxView({ - await: () => { - const ret: any[] = [ - this.props.store.gaEnrichmentDataByAssayType, - this.props.store - .selectedGenericAssayEnrichmentProfileMapGroupedByGenericAssayType, - this.props.store.gaEnrichmentGroupsByAssayType, - this.props.store.studies, - ]; - if ( - this.props.store.gaEnrichmentDataByAssayType.isComplete && - this.props.store.gaEnrichmentDataByAssayType.result![ - this.props.genericAssayType - ] - ) { - ret.push( - this.props.store.gaEnrichmentDataByAssayType.result![ - this.props.genericAssayType - ] - ); - } - return ret; - }, - render: () => { - // since generic assay enrichments tab is enabled only for one study, selectedGenericAssayEnrichmentProfileMap - // would contain only one key. - const studyId = Object.keys( - this.props.store - .selectedGenericAssayEnrichmentProfileMapGroupedByGenericAssayType - .result![this.props.genericAssayType] - )[0]; - // select the first found profile in the study as the default selection for selected genericAssayType - const selectedProfile = this.props.store - .selectedGenericAssayEnrichmentProfileMapGroupedByGenericAssayType - .result![this.props.genericAssayType][studyId]; - return ( -
- - -
- ); - }, - renderPending: () => ( - - ), - renderError: () => , - }); - - render() { - return this.tabUI.component; - } -} diff --git a/src/shared/lib/comparison/ComparisonStore.ts b/src/shared/lib/comparison/ComparisonStore.ts index 6d24da88278..eccf5b62161 100644 --- a/src/shared/lib/comparison/ComparisonStore.ts +++ b/src/shared/lib/comparison/ComparisonStore.ts @@ -1699,14 +1699,14 @@ export default abstract class ComparisonStore extends AnalysisStore readonly gaEnrichmentGroupsByAssayType = remoteData({ await: () => [ this - .selectedGenericAssayEnrichmentProfileMapGroupedByGenericAssayType, + .selectedAllGenericAssayEnrichmentProfileMapGroupedByGenericAssayType, this.enrichmentAnalysisGroups, ], invoke: () => { return Promise.resolve( _.mapValues( this - .selectedGenericAssayEnrichmentProfileMapGroupedByGenericAssayType + .selectedAllGenericAssayEnrichmentProfileMapGroupedByGenericAssayType .result!, selectedGenericAssayEnrichmentProfileMap => { let studyIds = Object.keys( @@ -1850,7 +1850,7 @@ export default abstract class ComparisonStore extends AnalysisStore await: () => [ this.gaEnrichmentGroupsByAssayType, this - .selectedGenericAssayEnrichmentProfileMapGroupedByGenericAssayType, + .selectedAllGenericAssayEnrichmentProfileMapGroupedByGenericAssayType, ], invoke: () => { return Promise.resolve( @@ -1866,7 +1866,7 @@ export default abstract class ComparisonStore extends AnalysisStore sample => ({ caseId: sample.sampleId, molecularProfileId: this - .selectedGenericAssayEnrichmentProfileMapGroupedByGenericAssayType + .selectedAllGenericAssayEnrichmentProfileMapGroupedByGenericAssayType .result![genericAssayType][ sample.studyId ].molecularProfileId, @@ -1973,7 +1973,7 @@ export default abstract class ComparisonStore extends AnalysisStore await: () => [], getSelectedProfileMap: () => this - .selectedGenericAssayEnrichmentProfileMapGroupedByGenericAssayType + .selectedAllGenericAssayEnrichmentProfileMapGroupedByGenericAssayType .result![genericAssayType], // returns an empty array if the selected study doesn't have any generic assay profiles fetchData: () => { if (