diff --git a/end-to-end-test/local/runtime-config/portal.properties b/end-to-end-test/local/runtime-config/portal.properties index 553e632ba7f..f60e14e863c 100644 --- a/end-to-end-test/local/runtime-config/portal.properties +++ b/end-to-end-test/local/runtime-config/portal.properties @@ -263,10 +263,10 @@ ucsc.build=hg19 oncoprint.defaultview=patient # OncoPrint driver mutation annotations - oncoprint.custom_driver_annotation.binary.menu_label=Custom driver annotation - oncoprint.custom_driver_annotation.tiers.menu_label=Custom driver tiers - oncoprint.custom_driver_annotation.binary.default=true - oncoprint.custom_driver_annotation.tiers.default=true +oncoprint.custom_driver_annotation.binary.menu_label=Custom driver annotations +oncoprint.custom_driver_annotation.tiers.menu_label=Driver tiers +oncoprint.custom_driver_annotation.binary.default=true +oncoprint.custom_driver_annotation.tiers.default=true oncoprint.oncokb.default=true oncoprint.hotspots.default=true # oncoprint.hide_vus.default=true diff --git a/end-to-end-test/local/specs/custom-driver-annotations-in-result-view.spec.js b/end-to-end-test/local/specs/custom-driver-annotations-in-result-view.spec.js index 61f85bf612c..5467b7e6834 100644 --- a/end-to-end-test/local/specs/custom-driver-annotations-in-result-view.spec.js +++ b/end-to-end-test/local/specs/custom-driver-annotations-in-result-view.spec.js @@ -74,25 +74,6 @@ describe('custom driver annotations feature in result view', function() { waitForOncoprint(); assert(!$('div.alert-info').isExisting()); }); - - it('(de-)selects custom driver checkboxes with main annotation select option', () => { - $('input[data-test=ColorByDriver]').click(); - waitForOncoprint(); - - $('input[data-test=annotateCustomBinary]').waitForExist(); - var topCheckBox = $('input[data-test=annotateCustomBinary]'); - var tiersCheckboxes = $('span[data-test=annotateCustomTiers]').$$( - 'input' - ); - assert(!topCheckBox.isSelected()); - assert(!tiersCheckboxes[0].isSelected()); - assert(!tiersCheckboxes[1].isSelected()); - - $('input[data-test=ColorByDriver]').click(); - assert(topCheckBox.isSelected()); - assert(tiersCheckboxes[0].isSelected()); - assert(tiersCheckboxes[1].isSelected()); - }); }); describe('oncoprint tab - discrete CNA', () => { @@ -157,23 +138,6 @@ describe('custom driver annotations feature in result view', function() { $('div.alert-info*=16 copy number alterations').isExisting() ); }); - - it('(de-)selects custom driver checkboxes with main annotation select option', () => { - $('input[data-test=ColorByDriver]').click(); - waitForOncoprint(); - var topCheckBox = $('input[data-test=annotateCustomBinary]'); - var tiersCheckboxes = $('span[data-test=annotateCustomTiers]').$$( - 'input' - ); - assert(!topCheckBox.isSelected()); - assert(!tiersCheckboxes[0].isSelected()); - assert(!tiersCheckboxes[1].isSelected()); - - $('input[data-test=ColorByDriver]').click(); - assert(topCheckBox.isSelected()); - assert(tiersCheckboxes[0].isSelected()); - assert(tiersCheckboxes[1].isSelected()); - }); }); describe('oncoprint tab - structural variants', () => { @@ -213,20 +177,5 @@ describe('custom driver annotations feature in result view', function() { waitForOncoprint(); assert($('div.alert-info*=2 structural variants').isExisting()); }); - - it('(de-)selects custom driver checkboxes with main annotation select option', () => { - $('input[data-test=ColorByDriver]').click(); - waitForOncoprint(); - var topCheckBox = $('input[data-test=annotateCustomBinary]'); - var tiersCheckboxes = $('span[data-test=annotateCustomTiers]').$$( - 'input' - ); - assert(!topCheckBox.isSelected()); - assert(!tiersCheckboxes[0].isSelected()); - - $('input[data-test=ColorByDriver]').click(); - assert(topCheckBox.isSelected()); - assert(tiersCheckboxes[0].isSelected()); - }); }); }); diff --git a/end-to-end-test/remote/specs/core/oncoprinter.screenshot.spec.js b/end-to-end-test/remote/specs/core/oncoprinter.screenshot.spec.js index 61f3cdb7f06..a6aa1302622 100644 --- a/end-to-end-test/remote/specs/core/oncoprinter.screenshot.spec.js +++ b/end-to-end-test/remote/specs/core/oncoprinter.screenshot.spec.js @@ -266,24 +266,7 @@ describe('oncoprinter screenshot tests', function() { var res = checkOncoprintElement(); assertScreenShotMatch(res); }); - it('oncoprinter example data, dont color by driver vs VUS', function() { - goToUrlAndSetLocalStorage(`${CBIOPORTAL_URL}/oncoprinter`); - $('.oncoprinterGeneticExampleData').waitForExist(); - $('.oncoprinterClinicalExampleData').waitForExist(); - $('.oncoprinterHeatmapExampleData').waitForExist(); - $('.oncoprinterGeneticExampleData').click(); - $('.oncoprinterClinicalExampleData').click(); - $('.oncoprinterHeatmapExampleData').click(); - $('.oncoprinterSubmit').click(); - waitForOncoprint(TIMEOUT); - setOncoprintMutationsMenuOpen(true); - $('input[data-test="ColorByDriver"]').click(); - waitForOncoprint(TIMEOUT); - setOncoprintMutationsMenuOpen(false); // get it out of the way for screenshot - var res = checkOncoprintElement(); - assertScreenShotMatch(res); - }); it('oncoprinter example data, hide VUS', function() { goToUrlAndSetLocalStorage(`${CBIOPORTAL_URL}/oncoprinter`); $('.oncoprinterGeneticExampleData').waitForExist(); diff --git a/src/config/serverConfigDefaults.ts b/src/config/serverConfigDefaults.ts index 24c05fd034b..c92fd419ccc 100644 --- a/src/config/serverConfigDefaults.ts +++ b/src/config/serverConfigDefaults.ts @@ -28,8 +28,8 @@ export const ServerConfigDefaults: Partial = { 'https://mygene.info/v3/gene/<%= entrezGeneId %>?fields=uniprot', oncoprint_custom_driver_annotation_binary_menu_label: - 'Custom driver annotation', - oncoprint_custom_driver_annotation_tiers_menu_label: 'Custom driver tiers', + 'Custom driver annotations', + oncoprint_custom_driver_annotation_tiers_menu_label: 'Driver tiers', oncoprint_custom_driver_annotation_binary_default: true, oncoprint_custom_driver_annotation_tiers_default: true, oncoprint_oncokb_default: true, diff --git a/src/shared/alterationFiltering/AnnotationFilteringSettings.ts b/src/shared/alterationFiltering/AnnotationFilteringSettings.ts index d2f4e36d46e..8965c7c4d02 100644 --- a/src/shared/alterationFiltering/AnnotationFilteringSettings.ts +++ b/src/shared/alterationFiltering/AnnotationFilteringSettings.ts @@ -108,7 +108,7 @@ export function buildDriverAnnotationSettings( this._includeDriver = val; }, get includeVUS() { - return this._includeVUS; + return this._includeVUS || !this.driversAnnotated; }, set includeVUS(val: boolean) { this._includeVUS = val; @@ -124,7 +124,7 @@ export function buildDriverAnnotationSettings( this.oncoKb || this.hotspots || this.customBinary || - _.some(this.driverTiers.entries(), entry => entry[1]); + _.some([...this.driverTiers.entries()], entry => entry[1]); return anySelected; }, diff --git a/src/shared/alterationFiltering/SettingsMenu.tsx b/src/shared/alterationFiltering/SettingsMenu.tsx index 369e98df920..1ee1204f90a 100644 --- a/src/shared/alterationFiltering/SettingsMenu.tsx +++ b/src/shared/alterationFiltering/SettingsMenu.tsx @@ -12,6 +12,7 @@ import { buildDriverAnnotationControlsHandlers, } from './AnnotationFilteringSettings'; import styles from 'shared/components/driverAnnotations/styles.module.scss'; +import InfoIcon from 'shared/components/InfoIcon'; enum EVENT_KEY { hidePutativePassengers = '0', @@ -110,22 +111,20 @@ export default class SettingsMenu extends React.Component< style={{ padding: 5 }} > {this.props.annotationTitleComponent} -
- -
+ {this.props.showFilterControls && ( <>
Filter Data
-
+
@@ -160,11 +170,21 @@ export default class SettingsMenu extends React.Component< } onClick={this.onInputClick} />{' '} - Exclude germline mutations + Show only somatic + Exclude germline mutations + } + />
{this.props.showExcludeUnprofiledSamplesControl && ( -
+ <>
-
+
-
+ )}
diff --git a/src/shared/components/driverAnnotations/DriverAnnotationControls.tsx b/src/shared/components/driverAnnotations/DriverAnnotationControls.tsx index 112245fdebd..d8beb85c73e 100644 --- a/src/shared/components/driverAnnotations/DriverAnnotationControls.tsx +++ b/src/shared/components/driverAnnotations/DriverAnnotationControls.tsx @@ -6,12 +6,10 @@ import { IDriverAnnotationControlsState, IDriverAnnotationControlsHandlers, } from '../../alterationFiltering/AnnotationFilteringSettings'; -import { - EditableSpan, - DefaultTooltip, - getNCBIlink, -} from 'cbioportal-frontend-commons'; +import { DefaultTooltip, getNCBIlink } from 'cbioportal-frontend-commons'; import 'rc-tooltip/assets/bootstrap_white.css'; +import styles from './styles.module.scss'; +import InfoIcon from 'shared/components/InfoIcon'; enum EVENT_KEY { distinguishDrivers = '0', @@ -79,250 +77,274 @@ export default class DriverAnnotationControls extends React.Component< render() { return ( -
-
- +
+ )} +
+
+ {!!this.props.state.customDriverAnnotationTiersMenuLabel && ( + +

+ { + this.props.state + .customDriverAnnotationTiersMenuLabel + } + : + + Consider these annotation tiers as + driver + + } /> -

- {( - this.props.state - .customDriverAnnotationTiers || [] - ).map(tier => ( -
-
-
+ ) + } + onClick={ + this + .onCustomDriverTierCheckboxClick + } + />{' '} + {tier} + +
+ ))} + + + )} + ); } } diff --git a/src/shared/components/driverAnnotations/SettingsMenuButton.tsx b/src/shared/components/driverAnnotations/SettingsMenuButton.tsx index 58e9606b1e9..bfb4cdfffba 100644 --- a/src/shared/components/driverAnnotations/SettingsMenuButton.tsx +++ b/src/shared/components/driverAnnotations/SettingsMenuButton.tsx @@ -67,8 +67,10 @@ export default class SettingsMenuButton extends React.Component< style={{ color: 'rgb(54, 134, 194)' }} tooltip={ - Putative driver vs VUS setings apply to every - tab except{' '} + This section defines which sources are + considered to annotate driver variants in your + data. Putative driver vs VUS setings apply to + every tab except{' '} diff --git a/src/shared/components/driverAnnotations/styles.module.scss b/src/shared/components/driverAnnotations/styles.module.scss index 262269e254a..945699a5d90 100644 --- a/src/shared/components/driverAnnotations/styles.module.scss +++ b/src/shared/components/driverAnnotations/styles.module.scss @@ -34,3 +34,9 @@ margin-top: 15px; } } + +p.headerSubsection { + font-size: 1.2em; + margin-top: 15px; + line-height: 7px; +} diff --git a/src/shared/components/driverAnnotations/styles.module.scss.d.ts b/src/shared/components/driverAnnotations/styles.module.scss.d.ts index 08e2ebf20d7..58ebc76f7bd 100644 --- a/src/shared/components/driverAnnotations/styles.module.scss.d.ts +++ b/src/shared/components/driverAnnotations/styles.module.scss.d.ts @@ -4,6 +4,7 @@ declare const styles: { readonly "fa-info-circle": string; readonly "globalSettingsDropdown": string; readonly "headerSection": string; + readonly "headerSubsection": string; }; export = styles;