diff --git a/src/shared/components/query/GenesetsHierarchySelector.tsx b/src/shared/components/query/GenesetsHierarchySelector.tsx index 42482476f53..abd79dbf526 100644 --- a/src/shared/components/query/GenesetsHierarchySelector.tsx +++ b/src/shared/components/query/GenesetsHierarchySelector.tsx @@ -6,11 +6,12 @@ import GenesetsHierarchyFilterForm, { validPercentile, } from './GenesetsHierarchyFilterForm'; import { getServerConfig } from 'config/config'; +import { SampleList } from 'cbioportal-ts-api-client'; export interface GenesetsHierarchySelectorProps { initialSelection: string[]; gsvaProfile: string; - sampleListId: string | undefined; + sampleList: SampleList | undefined; onSelect: (map_geneSet_selected: ObservableMap) => void; } @@ -47,6 +48,20 @@ export default class GenesetsHierarchySelector extends React.Component< render() { return (
+
+ + Selected sample set:{' '} + + {this.props.sampleList?.name} ( + {this.props.sampleList?.sampleCount}) + + +
+ + The outcome of score-based selection depends on the + geneset scores of samples included in the analysis. + +
Search hierarchy
diff --git a/src/shared/components/query/GenesetsSelector.tsx b/src/shared/components/query/GenesetsSelector.tsx index 9f7b50a3582..2214dfe6489 100644 --- a/src/shared/components/query/GenesetsSelector.tsx +++ b/src/shared/components/query/GenesetsSelector.tsx @@ -139,9 +139,7 @@ export default class GenesetsSelector extends QueryStoreComponent< 'GENESET_SCORE' )[0].molecularProfileId } - sampleListId={ - this.store.defaultSelectedSampleListId - } + sampleList={this.store.selectedSampleList} onSelect={map_geneset_selected => { this.store.applyGenesetSelection( map_geneset_selected diff --git a/src/shared/components/query/QueryStore.ts b/src/shared/components/query/QueryStore.ts index b48a84d3b93..1a4ed79d99b 100644 --- a/src/shared/components/query/QueryStore.ts +++ b/src/shared/components/query/QueryStore.ts @@ -465,6 +465,13 @@ export class QueryStore { this._selectedSampleListId = value; } + @computed + public get selectedSampleList() { + return this.selectedSampleListId + ? this.dict_sampleListId_sampleList[this.selectedSampleListId] + : undefined; + } + @observable caseIds = ''; // this variable is used to set set custom case ids if the query is a shared virtual study query @@ -1759,7 +1766,7 @@ export class QueryStore { Number(this.volcanoPlotSelectedPercentile.value), 0, 1, - this.defaultSelectedSampleListId + this.selectedSampleListId ); return hierarchyData; },