Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add plots tab to study view #4802

Merged
merged 14 commits into from
Mar 25, 2024
1 change: 1 addition & 0 deletions end-to-end-test/local/specs/hide-download-controls.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ describe('hide download controls feature', function() {
'Clinical Data',
'CN Segments',
'Files & Links',
'Plots Beta!',
'Study Sponsors',
];
before(() => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion end-to-end-test/remote/specs/core/customTabs.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ function runTests(pageName, url, tabLocation) {

$('.mainTabs').waitForDisplayed();

if (tabLocation === 'STUDY_PAGE') {
$('i.fa-chevron-right').waitForDisplayed();
$('i.fa-chevron-right').click();
}

assert.equal(
$('=Patient Tab').isDisplayed(),
false,
Expand Down Expand Up @@ -143,6 +148,11 @@ function runTests(pageName, url, tabLocation) {

$('.mainTabs').waitForDisplayed();

if (tabLocation === 'STUDY_PAGE') {
$('i.fa-chevron-right').waitForDisplayed();
$('i.fa-chevron-right').click();
}

assert.equal(
$('=Hidden Tab').isDisplayed(),
false,
Expand Down Expand Up @@ -235,7 +245,8 @@ function runTests(pageName, url, tabLocation) {
};
});

$('=Async Tab').click();
// offset to avoid overlapping elements
$('=Async Tab').click({ x: -10 });

browser.pause(1000);

Expand Down
2 changes: 1 addition & 1 deletion src/pages/groupComparison/ClinicalData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
isStringData,
IStringAxisData,
makeBoxScatterPlotData,
} from 'pages/resultsView/plots/PlotsTabUtils';
} from 'shared/components/plots/PlotsTabUtils';
import ScrollBar from 'shared/components/Scrollbar/ScrollBar';
import { IBoxScatterPlotData } from 'shared/components/plots/BoxScatterPlot';
import { scatterPlotSize } from 'shared/components/plots/PlotUtils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import BoxScatterPlot, {
IBoxScatterPlotProps,
toBoxPlotData,
} from 'shared/components/plots/BoxScatterPlot';
import { IBoxScatterPlotPoint } from 'pages/resultsView/plots/PlotsTabUtils';
import { IBoxScatterPlotPoint } from 'shared/components/plots/PlotsTabUtils';
import React from 'react';
import { computed, makeObservable } from 'mobx';
import { SummaryStatisticsTable } from './SummaryStatisticsTable';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/groupComparison/MultipleCategoryBarPlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import * as ReactDOM from 'react-dom';
import { Popover } from 'react-bootstrap';
import classnames from 'classnames';
import { toConditionalPrecisionWithMinimum } from 'shared/lib/FormatUtils';
import { IStringAxisData } from 'pages/resultsView/plots/PlotsTabUtils';
import { IStringAxisData } from 'shared/components/plots/PlotsTabUtils';
import WindowStore from 'shared/components/window/WindowStore';

export interface IMultipleCategoryBarPlotProps {
Expand Down
93 changes: 91 additions & 2 deletions src/pages/resultsView/ResultsViewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import StructuralVariants from 'pages/resultsView/structuralVariant/StructuralVa
import './styles.scss';
import ResultsViewOncoprint from 'shared/components/oncoprint/ResultsViewOncoprint';
import QuerySummary from './querySummary/QuerySummary';
import PlotsTab from './plots/PlotsTab';
import PlotsTab from 'shared/components/plots/PlotsTab';
import { MSKTab, MSKTabs } from '../../shared/components/MSKTabs/MSKTabs';
import { PageLayout } from '../../shared/components/PageLayout/PageLayout';
import autobind from 'autobind-decorator';
Expand Down Expand Up @@ -254,8 +254,97 @@ export default class ResultsViewPage extends React.Component<
linkText={'Plots'}
>
<PlotsTab
store={store}
filteredSamplesByDetailedCancerType={
store.filteredSamplesByDetailedCancerType
}
mutations={store.mutations}
studies={store.studies}
molecularProfileIdSuffixToMolecularProfiles={
store.molecularProfileIdSuffixToMolecularProfiles
}
entrezGeneIdToGene={store.entrezGeneIdToGene}
sampleKeyToSample={store.sampleKeyToSample}
genes={store.genes}
clinicalAttributes={store.clinicalAttributes}
genesets={store.genesets}
genericAssayEntitiesGroupByMolecularProfileId={
store.genericAssayEntitiesGroupByMolecularProfileId
}
studyIds={store.studyIds}
molecularProfilesWithData={
store.molecularProfilesWithData
}
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}
genesetMolecularDataCache={
store.genesetMolecularDataCache
}
genericAssayMolecularDataCache={
store.genericAssayMolecularDataCache
}
studyToStructuralVariantMolecularProfile={
store.studyToStructuralVariantMolecularProfile
}
driverAnnotationSettings={
store.driverAnnotationSettings
}
studyIdToStudy={store.studyIdToStudy.result}
structuralVariants={
store.structuralVariants.result
}
hugoGeneSymbols={store.hugoGeneSymbols}
selectedGenericAssayEntitiesGroupByMolecularProfileId={
store.selectedGenericAssayEntitiesGroupByMolecularProfileId
}
molecularProfileIdToMolecularProfile={
store.molecularProfileIdToMolecularProfile
}
urlWrapper={this.urlWrapper}
queryContainsOql={store.queryContainsOql}
includeGermlineMutations={
store.includeGermlineMutations
}
mutationsReportByGene={
store.mutationsReportByGene
}
oqlFilteredMutationsReport={
store.oqlFilteredMutationsReport
}
oqlFilteredMolecularDataReport={
store.oqlFilteredMolecularDataReport
}
oqlFilteredStructuralVariantsReport={
store.oqlFilteredStructuralVariantsReport
}
samples={store.samples}
filteredSamples={store.filteredSamples}
patients={store.patients}
filteredPatients={store.filteredPatients}
hideUnprofiledSamples={
store.hideUnprofiledSamples
}
/>
</MSKTab>
);
Expand Down
41 changes: 38 additions & 3 deletions src/pages/resultsView/cancerSummary/CancerSummaryContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,46 @@ export default class CancerSummaryContainer extends React.Component<
<div className={'tabMessageContainer'}>
<OqlStatusBanner
className="cancer-types-summary-oql-status-banner"
store={this.props.store}
queryContainsOql={
this.props.store.queryContainsOql
}
tabReflectsOql={true}
/>
<AlterationFilterWarning store={this.props.store} />
<CaseFilterWarning store={this.props.store} />
<AlterationFilterWarning
driverAnnotationSettings={
this.props.store.driverAnnotationSettings
}
includeGermlineMutations={
this.props.store.includeGermlineMutations
}
mutationsReportByGene={
this.props.store.mutationsReportByGene
}
oqlFilteredMutationsReport={
this.props.store.oqlFilteredMutationsReport
}
oqlFilteredMolecularDataReport={
this.props.store
.oqlFilteredMolecularDataReport
}
oqlFilteredStructuralVariantsReport={
this.props.store
.oqlFilteredStructuralVariantsReport
}
/>
<CaseFilterWarning
samples={this.props.store.samples}
filteredSamples={
this.props.store.filteredSamples
}
patients={this.props.store.patients}
filteredPatients={
this.props.store.filteredPatients
}
hideUnprofiledSamples={
this.props.store.hideUnprofiledSamples
}
/>
</div>
<MSKTabs
onTabClick={this.handleTabClick}
Expand Down
10 changes: 9 additions & 1 deletion src/pages/resultsView/cnSegments/CNSegments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,15 @@ export default class CNSegments extends React.Component<
}
/>
<div className={'tabMessageContainer'}>
<CaseFilterWarning store={this.props.store} />
<CaseFilterWarning
samples={this.props.store.samples}
filteredSamples={this.props.store.filteredSamples}
patients={this.props.store.patients}
filteredPatients={this.props.store.filteredPatients}
hideUnprofiledSamples={
this.props.store.hideUnprofiledSamples
}
/>
</div>
<Nav
bsStyle="pills"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/resultsView/coExpression/CoExpressionPlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
} from './CoExpressionPlotUtils';
import _ from 'lodash';
import { scatterPlotSize } from '../../../shared/components/plots/PlotUtils';
import { IAxisLogScaleParams } from 'pages/resultsView/plots/PlotsTabUtils';
import { IAxisLogScaleParams } from 'shared/components/plots/PlotsTabUtils';
import autobind from 'autobind-decorator';
import { GeneticEntity } from 'shared/model/GeneticEntity';
import { getServerConfig } from 'config/config';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import _ from 'lodash';
import { IAxisLogScaleParams } from 'pages/resultsView/plots/PlotsTabUtils';
import { IAxisLogScaleParams } from 'shared/components/plots/PlotsTabUtils';
import { CoExpressionPlotData } from 'pages/resultsView/coExpression/CoExpressionPlot';
import { MolecularProfile } from 'cbioportal-ts-api-client';
import { GeneticEntity } from 'shared/model/GeneticEntity';
Expand Down
31 changes: 28 additions & 3 deletions src/pages/resultsView/coExpression/CoExpressionTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -652,14 +652,39 @@ export default class CoExpressionTab extends React.Component<
<div className={'tabMessageContainer'}>
<OqlStatusBanner
className="coexp-oql-status-banner"
store={this.props.store}
queryContainsOql={this.props.store.queryContainsOql}
tabReflectsOql={false}
/>
<AlterationFilterWarning
store={this.props.store}
driverAnnotationSettings={
this.props.store.driverAnnotationSettings
}
includeGermlineMutations={
this.props.store.includeGermlineMutations
}
mutationsReportByGene={
this.props.store.mutationsReportByGene
}
oqlFilteredMutationsReport={
this.props.store.oqlFilteredMutationsReport
}
oqlFilteredMolecularDataReport={
this.props.store.oqlFilteredMolecularDataReport
}
oqlFilteredStructuralVariantsReport={
this.props.store.oqlFilteredStructuralVariantsReport
}
isUnaffected={true}
/>
<CaseFilterWarning store={this.props.store} />
<CaseFilterWarning
samples={this.props.store.samples}
filteredSamples={this.props.store.filteredSamples}
patients={this.props.store.patients}
filteredPatients={this.props.store.filteredPatients}
hideUnprofiledSamples={
this.props.store.hideUnprofiledSamples
}
/>
</div>

{status === 'complete' && divContents}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/resultsView/coExpression/CoExpressionViz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
} from 'mobx';
import LoadingIndicator from 'shared/components/loadingIndicator/LoadingIndicator';
import { SimpleGetterLazyMobXTableApplicationDataStore } from '../../../shared/lib/ILazyMobXTableApplicationDataStore';
import { logScalePossibleForProfile } from '../plots/PlotsTabUtils';
import { logScalePossibleForProfile } from 'shared/components/plots/PlotsTabUtils';
import CoExpressionPlot, { ICoExpressionPlotProps } from './CoExpressionPlot';
import { MobxPromise, remoteData } from 'cbioportal-frontend-commons';
import { computePlotData, requestAllDataMessage } from './CoExpressionVizUtils';
Expand Down
33 changes: 30 additions & 3 deletions src/pages/resultsView/comparison/ComparisonTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -327,11 +327,38 @@ export default class ComparisonTab extends React.Component<
>
<OqlStatusBanner
className="comparison-oql-status-banner"
store={this.props.store}
queryContainsOql={this.props.store.queryContainsOql}
tabReflectsOql={true}
/>
<AlterationFilterWarning store={this.props.store} />
<CaseFilterWarning store={this.props.store} />
<AlterationFilterWarning
driverAnnotationSettings={
this.props.store.driverAnnotationSettings
}
includeGermlineMutations={
this.props.store.includeGermlineMutations
}
mutationsReportByGene={
this.props.store.mutationsReportByGene
}
oqlFilteredMutationsReport={
this.props.store.oqlFilteredMutationsReport
}
oqlFilteredMolecularDataReport={
this.props.store.oqlFilteredMolecularDataReport
}
oqlFilteredStructuralVariantsReport={
this.props.store.oqlFilteredStructuralVariantsReport
}
/>
<CaseFilterWarning
samples={this.props.store.samples}
filteredSamples={this.props.store.filteredSamples}
patients={this.props.store.patients}
filteredPatients={this.props.store.filteredPatients}
hideUnprofiledSamples={
this.props.store.hideUnprofiledSamples
}
/>
</div>
<div
style={{
Expand Down
Loading
Loading