import * as React from 'react'; import { observer } from 'mobx-react'; import { action, computed, makeObservable, observable } from 'mobx'; import { MakeMobxView } from '../../../shared/components/MobxView'; import { MSKTab, MSKTabs } from '../../../shared/components/MSKTabs/MSKTabs'; import Overlap from '../../groupComparison/Overlap'; import ClinicalData from '../../groupComparison/ClinicalData'; import MRNAEnrichments from '../../groupComparison/MRNAEnrichments'; import ProteinEnrichments from '../../groupComparison/ProteinEnrichments'; import LoadingIndicator from '../../../shared/components/loadingIndicator/LoadingIndicator'; import ErrorMessage from '../../../shared/components/ErrorMessage'; import { trackEvent } from '../../../shared/lib/tracking'; import ReactSelect from 'react-select'; import ResultsViewURLWrapper from '../ResultsViewURLWrapper'; import { OverlapStrategy } from '../../../shared/lib/comparison/ComparisonStore'; import ResultsViewComparisonStore from './ResultsViewComparisonStore'; import { AppStore } from '../../../AppStore'; import { ResultsViewPageStore } from '../ResultsViewPageStore'; import { ResultsViewComparisonSubTab } from '../ResultsViewPageHelpers'; import { GENOMIC_ALTERATIONS_TAB_NAME, GroupComparisonTab, } from '../../groupComparison/GroupComparisonTabs'; import Survival from '../../groupComparison/Survival'; import AlterationFilterWarning from '../../../shared/components/banners/AlterationFilterWarning'; import OqlStatusBanner from '../../../shared/components/banners/OqlStatusBanner'; import _ from 'lodash'; import groupComparisonStyles from '../../../pages/groupComparison/styles.module.scss'; import GroupSelector from '../../groupComparison/groupSelector/GroupSelector'; import CaseFilterWarning from '../../../shared/components/banners/CaseFilterWarning'; import MethylationEnrichments from 'pages/groupComparison/MethylationEnrichments'; import AlterationEnrichments from 'pages/groupComparison/AlterationEnrichments'; import AlterationEnrichmentTypeSelector from 'shared/lib/comparison/AlterationEnrichmentTypeSelector'; import GenericAssayEnrichments from 'pages/groupComparison/GenericAssayEnrichments'; import styles from 'pages/resultsView/comparison/styles.module.scss'; import { getServerConfig } from 'config/config'; import { AlterationFilterMenuSection } from 'pages/groupComparison/GroupComparisonUtils'; import { getSortedGenericAssayTabSpecs } from 'shared/lib/GenericAssayUtils/GenericAssayCommonUtils'; export interface IComparisonTabProps { urlWrapper: ResultsViewURLWrapper; appStore: AppStore; store: ResultsViewPageStore; } @observer export default class ComparisonTab extends React.Component< IComparisonTabProps, {} > { @observable.ref private store: ResultsViewComparisonStore; constructor(props: IComparisonTabProps) { super(props); makeObservable(this); (window as any).comparisonTab = this; this.store = new ResultsViewComparisonStore( this.props.appStore, this.props.urlWrapper, this.props.store ); } componentWillUnmount() { this.store && this.store.destroy(); } readonly overlapStrategySelector = MakeMobxView({ await: () => [this.store.overlapComputations], render: () => { if ( !this.store.overlapComputations.result!.totalSampleOverlap && !this.store.overlapComputations.result!.totalPatientOverlap ) { return null; } else { const includeLabel = 'Include overlapping samples and patients'; const excludeLabel = 'Exclude overlapping samples and patients'; return (