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

Remove cbioportal and cosmic annotation threshholds in oncoprint controls #4227

Merged
merged 2 commits into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 0 additions & 57 deletions end-to-end-test/remote/specs/core/oncoprint.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,63 +296,6 @@ describe('oncoprint', function() {
resultsPageSettingsDropdown +
' input[data-test="annotateCOSMICCount"]';
});
it('annotates all types of mutations with cbioportal count and cosmic', () => {
setSettingsMenuOpen(true);
// select only mutation coloring by cbioportal count
$(cbioportalCheckbox).click();
waitForOncoprint(ONCOPRINT_TIMEOUT);
$(oncoKbCheckbox).click();
waitForOncoprint(ONCOPRINT_TIMEOUT);
$(hotspotsCheckbox).click();
waitForOncoprint(ONCOPRINT_TIMEOUT);
// set threshold 1
browser.execute(function() {
resultsViewOncoprint.setAnnotateCBioPortalInputValue('1');
});
browser.pause(100); // give time to take effect
waitForOncoprint(ONCOPRINT_TIMEOUT);
let legendText = getTextInOncoprintLegend();
assert(
legendText.indexOf('Inframe Mutation (putative driver)') > -1,
'cbio count annotates inframe mutations'
);
assert(
legendText.indexOf('Missense Mutation (putative driver)') > -1,
'cbio count annotates missense mutations'
);
assert(
legendText.indexOf('Truncating Mutation (putative driver)') >
-1,
'cbio count annotates truncating mutations'
);

// select only mutation coloring by cosmic count
setSettingsMenuOpen(true);
$(cosmicCheckbox).click();
waitForOncoprint(ONCOPRINT_TIMEOUT);
$(cbioportalCheckbox).click();
waitForOncoprint(ONCOPRINT_TIMEOUT);
// set threshold 1
browser.execute(function() {
resultsViewOncoprint.setAnnotateCOSMICInputValue('1');
});
browser.pause(100); // give time to take effect
waitForOncoprint(ONCOPRINT_TIMEOUT);
legendText = getTextInOncoprintLegend();
assert(
legendText.indexOf('Inframe Mutation (putative driver)') > -1,
'cosmic count annotates inframe mutations'
);
assert(
legendText.indexOf('Missense Mutation (putative driver)') > -1,
'cosmic count annotates missense mutations'
);
assert(
legendText.indexOf('Truncating Mutation (putative driver)') >
-1,
'cosmic count annotates truncating mutations'
);
});
});

describe('germline mutation', () => {
Expand Down
3 changes: 0 additions & 3 deletions end-to-end-test/remote/specs/core/oncoprinter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ describe('oncoprinter tests', function() {

setOncoprintMutationsMenuOpen(true);
assert(!$('input[data-test="annotateOncoKb"]').isSelected());
assert(
!$('input[data-test="annotateCBioPortalCount"]').isSelected()
);
assert($('input[data-test="annotateCustomBinary"]').isSelected());
}

Expand Down
20 changes: 0 additions & 20 deletions src/pages/staticPages/tools/oncoprinter/Oncoprinter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,6 @@ export default class Oncoprinter extends React.Component<
this.mouseInsideBounds = false;
}

@action
public setAnnotateCBioPortalInputValue(value: string) {
this.controlsHandlers.onChangeAnnotateCBioPortalInputValue &&
this.controlsHandlers.onChangeAnnotateCBioPortalInputValue(value);
}

private buildControlsHandlers() {
return {
onSelectShowUnalteredColumns: (show: boolean) => {
Expand Down Expand Up @@ -205,20 +199,6 @@ export default class Oncoprinter extends React.Component<
onSelectAnnotateOncoKb: action((s: boolean) => {
this.props.store.driverAnnotationSettings.oncoKb = s;
}),
onSelectAnnotateCBioPortal: action((s: boolean) => {
this.props.store.driverAnnotationSettings.cbioportalCount = s;
}),
/*onSelectAnnotateHotspots:action((s:boolean)=>{
this.props.store.driverAnnotationSettings.hotspots = s;
}),*/
onChangeAnnotateCBioPortalInputValue: action((s: string) => {
this.props.store.driverAnnotationSettings.cbioportalCountThreshold = parseInt(
s,
10
);
this.controlsHandlers.onSelectAnnotateCBioPortal &&
this.controlsHandlers.onSelectAnnotateCBioPortal(true);
}),
onSelectCustomDriverAnnotationBinary: action((s: boolean) => {
this.props.store.driverAnnotationSettings.customBinary = s;
}),
Expand Down
32 changes: 0 additions & 32 deletions src/shared/alterationFiltering/AnnotationFilteringSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ export interface IDriverAnnotationControlsState {
annotateDriversHotspotsError?: boolean;
annotateDriversHotspots?: boolean;

annotateDriversCBioPortal: boolean;
annotateCBioPortalInputValue: string;

annotateDriversCOSMIC?: boolean;
annotateCOSMICInputValue?: string;

customDriverAnnotationBinaryMenuLabel?: string;
customDriverAnnotationTiersMenuLabel?: string;
customDriverAnnotationTiers?: string[];
Expand All @@ -66,10 +60,6 @@ export interface IDriverAnnotationControlsHandlers {
onSelectDistinguishDrivers: (distinguish: boolean) => void;
onSelectAnnotateOncoKb: (annotate: boolean) => void;
onSelectAnnotateHotspots?: (annotate: boolean) => void;
onSelectAnnotateCBioPortal: (annotate: boolean) => void;
onSelectAnnotateCOSMIC?: (annotate: boolean) => void;
onChangeAnnotateCBioPortalInputValue?: (value: string) => void;
onChangeAnnotateCOSMICInputValue?: (value: string) => void;
onSelectCustomDriverAnnotationBinary?: (s: boolean) => void;
onSelectCustomDriverAnnotationTier?: (value: string, s: boolean) => void;
}
Expand Down Expand Up @@ -212,22 +202,6 @@ export function buildDriverAnnotationControlsHandlers(
onSelectAnnotateHotspots: action((s: boolean) => {
driverAnnotationSettings.hotspots = s;
}),
onSelectAnnotateCBioPortal: action((s: boolean) => {
driverAnnotationSettings.cbioportalCount = s;
}),
onSelectAnnotateCOSMIC: action((s: boolean) => {
driverAnnotationSettings.cosmicCount = s;
}),
onChangeAnnotateCBioPortalInputValue: action((s: string) => {
driverAnnotationSettings.cbioportalCountThreshold = parseInt(s, 10);
handlers.onSelectAnnotateCBioPortal &&
handlers.onSelectAnnotateCBioPortal(true);
}),
onChangeAnnotateCOSMICInputValue: action((s: string) => {
driverAnnotationSettings.cosmicCountThreshold = parseInt(s, 10);
handlers.onSelectAnnotateCOSMIC &&
handlers.onSelectAnnotateCOSMIC(true);
}),
onSelectCustomDriverAnnotationBinary: action((s: boolean) => {
driverAnnotationSettings.customBinary = s;
}),
Expand Down Expand Up @@ -281,12 +255,6 @@ export function buildDriverAnnotationControlsState(
get annotateDriversHotspotsError() {
return !!didHotspotFailInOncoprint;
},
get annotateDriversCBioPortal() {
return driverAnnotationSettings.cbioportalCount;
},
get annotateDriversCOSMIC() {
return driverAnnotationSettings.cosmicCount;
},
get includePutativeDrivers() {
return driverAnnotationSettings.includeDriver;
},
Expand Down
137 changes: 63 additions & 74 deletions src/shared/components/driverAnnotations/DriverAnnotationControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,6 @@ export default class DriverAnnotationControls extends React.Component<
!this.props.state.annotateDriversHotspots
);
break;
case EVENT_KEY.annotateCBioPortal:
this.props.handlers.onSelectAnnotateCBioPortal(
!this.props.state.annotateDriversCBioPortal
);
break;
case EVENT_KEY.annotateCOSMIC:
this.props.handlers.onSelectAnnotateCOSMIC &&
this.props.handlers.onSelectAnnotateCOSMIC(
!this.props.state.annotateDriversCOSMIC
);
break;
case EVENT_KEY.customDriverBinaryAnnotation:
this.props.handlers.onSelectCustomDriverAnnotationBinary &&
this.props.handlers.onSelectCustomDriverAnnotationBinary(
Expand Down Expand Up @@ -244,69 +233,69 @@ export default class DriverAnnotationControls extends React.Component<
</label>
</div>
)}
{this.props.handlers
.onChangeAnnotateCBioPortalInputValue && (
<div className="checkbox">
<label>
<input
type="checkbox"
value={EVENT_KEY.annotateCBioPortal}
checked={
this.props.state
.annotateDriversCBioPortal
}
onClick={this.onInputClick}
data-test="annotateCBioPortalCount"
/>
cBioPortal {'>'}=
</label>
<EditableSpan
value={
this.props.state
.annotateCBioPortalInputValue ||
''
}
setValue={
this.props.handlers
.onChangeAnnotateCBioPortalInputValue
}
numericOnly={true}
textFieldAppearance={true}
maxChars={10}
/>
</div>
)}
{this.props.handlers
.onChangeAnnotateCOSMICInputValue && (
<div className="checkbox">
<label>
<input
type="checkbox"
value={EVENT_KEY.annotateCOSMIC}
checked={
this.props.state
.annotateDriversCOSMIC
}
onClick={this.onInputClick}
data-test="annotateCOSMICCount"
/>
COSMIC {'>'}=
</label>
<EditableSpan
value={
this.props.state
.annotateCOSMICInputValue || ''
}
setValue={
this.props.handlers
.onChangeAnnotateCOSMICInputValue
}
numericOnly={true}
textFieldAppearance={true}
maxChars={10}
/>
</div>
)}
{/*{this.props.handlers*/}
{/* .onChangeAnnotateCBioPortalInputValue && (*/}
{/* <div className="checkbox">*/}
{/* <label>*/}
{/* <input*/}
{/* type="checkbox"*/}
{/* value={EVENT_KEY.annotateCBioPortal}*/}
{/* checked={*/}
{/* this.props.state*/}
{/* .annotateDriversCBioPortal*/}
{/* }*/}
{/* onClick={this.onInputClick}*/}
{/* data-test="annotateCBioPortalCount"*/}
{/* />*/}
{/* cBioPortal {'>'}=*/}
{/* </label>*/}
{/* <EditableSpan*/}
{/* value={*/}
{/* this.props.state*/}
{/* .annotateCBioPortalInputValue ||*/}
{/* ''*/}
{/* }*/}
{/* setValue={*/}
{/* this.props.handlers*/}
{/* .onChangeAnnotateCBioPortalInputValue*/}
{/* }*/}
{/* numericOnly={true}*/}
{/* textFieldAppearance={true}*/}
{/* maxChars={10}*/}
{/* />*/}
{/* </div>*/}
{/*)}*/}
{/*{this.props.handlers*/}
{/* .onChangeAnnotateCOSMICInputValue && (*/}
{/* <div className="checkbox">*/}
{/* <label>*/}
{/* <input*/}
{/* type="checkbox"*/}
{/* value={EVENT_KEY.annotateCOSMIC}*/}
{/* checked={*/}
{/* this.props.state*/}
{/* .annotateDriversCOSMIC*/}
{/* }*/}
{/* onClick={this.onInputClick}*/}
{/* data-test="annotateCOSMICCount"*/}
{/* />*/}
{/* COSMIC {'>'}=*/}
{/* </label>*/}
{/* <EditableSpan*/}
{/* value={*/}
{/* this.props.state*/}
{/* .annotateCOSMICInputValue || ''*/}
{/* }*/}
{/* setValue={*/}
{/* this.props.handlers*/}
{/* .onChangeAnnotateCOSMICInputValue*/}
{/* }*/}
{/* numericOnly={true}*/}
{/* textFieldAppearance={true}*/}
{/* maxChars={10}*/}
{/* />*/}
{/* </div>*/}
{/*)}*/}
</span>
)}
{!!this.props.state
Expand Down
34 changes: 0 additions & 34 deletions src/shared/components/oncoprint/ResultsViewOncoprint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -625,18 +625,6 @@ export default class ResultsViewOncoprint extends React.Component<
this.mouseInsideBounds = false;
}

@action
public setAnnotateCBioPortalInputValue(value: string) {
this.controlsHandlers.onChangeAnnotateCBioPortalInputValue &&
this.controlsHandlers.onChangeAnnotateCBioPortalInputValue(value);
}

@action
public setAnnotateCOSMICInputValue(value: string) {
this.controlsHandlers.onChangeAnnotateCOSMICInputValue &&
this.controlsHandlers.onChangeAnnotateCOSMICInputValue(value);
}

private buildControlsHandlers() {
return {
onSelectColumnType: (type: OncoprintAnalysisCaseType) => {
Expand Down Expand Up @@ -714,28 +702,6 @@ export default class ResultsViewOncoprint extends React.Component<
onSelectAnnotateHotspots: action((s: boolean) => {
this.props.store.driverAnnotationSettings.hotspots = s;
}),
onSelectAnnotateCBioPortal: action((s: boolean) => {
this.props.store.driverAnnotationSettings.cbioportalCount = s;
}),
onSelectAnnotateCOSMIC: action((s: boolean) => {
this.props.store.driverAnnotationSettings.cosmicCount = s;
}),
onChangeAnnotateCBioPortalInputValue: action((s: string) => {
this.props.store.driverAnnotationSettings.cbioportalCountThreshold = parseInt(
s,
10
);
this.controlsHandlers.onSelectAnnotateCBioPortal &&
this.controlsHandlers.onSelectAnnotateCBioPortal(true);
}),
onChangeAnnotateCOSMICInputValue: action((s: string) => {
this.props.store.driverAnnotationSettings.cosmicCountThreshold = parseInt(
s,
10
);
this.controlsHandlers.onSelectAnnotateCOSMIC &&
this.controlsHandlers.onSelectAnnotateCOSMIC(true);
}),
onSelectCustomDriverAnnotationBinary: action((s: boolean) => {
this.props.store.driverAnnotationSettings.customBinary = s;
}),
Expand Down
Loading