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

Feature to visualize mutational counts for mutational signatures #4540

Merged
merged 1 commit into from
Aug 1, 2023
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
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 1 addition & 15 deletions end-to-end-test/local/specs/core/oncoprint.screenshot.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,7 @@ const studyes0_oncoprintTabUrl =

const genericArrayUrl =
CBIOPORTAL_URL +
'/results/oncoprint' +
'?genetic_profile_ids_PROFILE_MUTATION_EXTENDED=lgg_ucsf_2014_test_generic_assay_mutations' +
'&cancer_study_list=lgg_ucsf_2014_test_generic_assay' +
'&Z_SCORE_THRESHOLD=2.0' +
'&RPPA_SCORE_THRESHOLD=2.0' +
'&data_priority=0' +
'&profileFilter=0' +
'&case_set_id=lgg_ucsf_2014_test_generic_assay_sequenced' +
'&gene_list=IDH1' +
'&geneset_list=%20' +
'&tab_index=tab_visualize' +
'&Action=Submit' +
'&show_samples=true' +
'&generic_assay_groups=lgg_ucsf_2014_test_generic_assay_mutational_signature_binary_v2%2Cmutational_signature_binary_2%2Cmutational_signature_binary_1%3Blgg_ucsf_2014_test_generic_assay_mutational_signature_category_v2%2Cmutational_signature_category_6%2Cmutational_signature_category_8%2Cmutational_signature_category_9';

'/results?cancer_study_list=lgg_ucsf_2014_test_generic_assay&tab_index=tab_visualize&case_set_id=lgg_ucsf_2014_test_generic_assay_all&Action=Submit&gene_list=IDH1%250ATP53&generic_assay_groups=lgg_ucsf_2014_test_generic_assay_mutational_signature_binary_SBS%2Cmutational_signature_binary_SBS1%2Cmutational_signature_binary_SBS9%3Blgg_ucsf_2014_test_generic_assay_mutational_signature_category_SBS%2Cmutational_signature_category_SBS1%2Cmutational_signature_category_SBS9';
const SERVER_CLINICAL_TRACK_CONFIG = [
{
stableId: 'SUBTYPE',
Expand Down
107 changes: 91 additions & 16 deletions end-to-end-test/local/specs/core/patientview.screenshot.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ var waitForPatientView = require('../../../shared/specUtils')
var { setDropdownOpen } = require('../../../shared/specUtils');
var assertScreenShotMatch = require('../../../shared/lib/testUtils')
.assertScreenShotMatch;

const { getElementByTestHandle } = require('../../../shared/specUtils');
const CBIOPORTAL_URL = process.env.CBIOPORTAL_URL.replace(/\/$/, '');
const patientViewUrl =
CBIOPORTAL_URL + '/patient?studyId=teststudy_genepanels&caseId=patientA';
const ascnPatientViewUrl =
CBIOPORTAL_URL + '/patient?studyId=ascn_test_study&caseId=FAKE_P001';
const genericAssayPatientViewUrl =
CBIOPORTAL_URL +
'/patient/mutationalSignatures?studyId=lgg_ucsf_2014_test_generic_assay&sampleId=P01_Pri';
'/patient/mutationalSignatures?studyId=lgg_ucsf_2014_test_generic_assay&caseId=P01';

describe('patient view page', function() {
describe('mutation table for study with ASCN data', () => {
Expand Down Expand Up @@ -94,39 +94,57 @@ describe('patient view page', function() {
});
});

it('show stacked bar chart for patient who has significant v3 significant signatures', () => {
it('show stacked bar chart for patient who has significant SBS signatures', () => {
$('div.patientSamples').waitForDisplayed({ timeout: 20000 });
var res = browser.checkElement('div.patientSamples');
assertScreenShotMatch(res);
});

it('show tooltip for patient who has significant v3 significant signatures', () => {
it('show tooltip for patient who has significant SBS signatures', () => {
$('div.progress').waitForDisplayed({ timeout: 20000 });
$('div.progress').moveTo({ xOffset: 0, yOffset: 0 });
assertScreenShotMatch(browser.checkElement('div.patientViewPage'));
});

it('show mutational signatures table for patient who has significant v2 significant signatures', () => {
selectMutationalSignaturesVersion2();
it('show mutational signatures table for patient who has significant SBS signatures', () => {
var res = browser.checkElement(
'div[data-test="MutationalSignaturesContainer"]'
);
assertScreenShotMatch(res);
});

it('show stacked bar chart for patient who has significant v2 significant signatures', () => {
selectMutationalSignaturesVersion2();
it('show stacked bar chart for patient who has significant ID signatures', () => {
selectMutationalSignaturesVersionID();
$('div.patientSamples').waitForDisplayed({ timeout: 20000 });

// bar chart does an animation we have to wait for
browser.pause(5000);
var res = browser.checkElement('div.patientSamples');
assertScreenShotMatch(res);
});

it('show tooltip for patient who has significant ID signatures', () => {
selectMutationalSignaturesVersionID();
$('div.progress').waitForDisplayed({ timeout: 20000 });
$('div.progress').moveTo({ xOffset: 0, yOffset: 0 });

$(
'div[data-test="SignificantMutationalSignaturesTooltip"]'
).waitForDisplayed();

assertScreenShotMatch(browser.checkElement('div.patientViewPage'));
});

it('show stacked bar chart for patient who has significant DBS signatures', () => {
selectMutationalSignaturesVersionDBS();
$('div.patientSamples').waitForDisplayed({ timeout: 20000 });
// bar chart does an animation we have to wait for
browser.pause(5000);
var res = browser.checkElement('div.patientSamples');
assertScreenShotMatch(res);
});

it('show tooltip for patient who has significant v2 significant signatures', () => {
selectMutationalSignaturesVersion2();
it('show tooltip for patient who has significant DBS signatures', () => {
selectMutationalSignaturesVersionDBS();
$('div.progress').waitForDisplayed({ timeout: 20000 });
$('div.progress').moveTo({ xOffset: 0, yOffset: 0 });

Expand All @@ -137,14 +155,50 @@ describe('patient view page', function() {
assertScreenShotMatch(browser.checkElement('div.patientViewPage'));
});

it('show mutational signatures table for patient who has significant v2 significant signatures', () => {
selectMutationalSignaturesVersion2();
it('show mutational signatures table for patient who has significant ID signatures', () => {
selectMutationalSignaturesVersionID();
var res = browser.checkElement(
'div[data-test="MutationalSignaturesContainer"]'
);
assertScreenShotMatch(res);
});
});
describe('test the mutational bar chart', () => {
it('show mutational bar chart sbs', () => {
var res = browser.checkElement(
'div[data-test=MutationalSignaturesContainer]'
);
assertScreenShotMatch(res);
});
it('show mutational bar chart id', () => {
selectMutationalSignaturesVersionID();
var res = browser.checkElement(
'div[data-test=MutationalSignaturesContainer]'
);
assertScreenShotMatch(res);
});
it('show mutational bar chart dbs', () => {
selectMutationalSignaturesVersionDBS();
var res = browser.checkElement(
'div[data-test=MutationalSignaturesContainer]'
);
assertScreenShotMatch(res);
});
it('show the bar chart with percentage on y axis', () => {
selectPercentageYAxis();
var res = browser.checkElement(
'div[data-test=MutationalSignaturesContainer]'
);
assertScreenShotMatch(res);
});
it('switch between samples to update mutational bar chart', () => {
selectSampleMutationalSignature();
var res = browser.checkElement(
'div[data-test=MutationalSignaturesContainer]'
);
assertScreenShotMatch(res);
});
});
});

const switchGeneFilter = selectedOption => {
Expand Down Expand Up @@ -177,11 +231,32 @@ const doVafPlotScreenshotTest = () => {
assertScreenShotMatch(res);
};

const selectMutationalSignaturesVersion2 = () => {
const selectMutationalSignaturesVersionID = () => {
$('div.mutationalSignaturesVersionSelector__indicators').waitForDisplayed({
timeout: 10000,
});
$('div.mutationalSignaturesVersionSelector__indicators').click();
$('div=Mutational Signature ID').waitForDisplayed({ timeout: 10000 });
$('div=Mutational Signature ID').click();
};

const selectMutationalSignaturesVersionDBS = () => {
$('div.mutationalSignaturesVersionSelector__indicators').waitForDisplayed({
timeout: 10000,
});
$('div.mutationalSignaturesVersionSelector__indicators').click();
$('div=Mutational Signature V2').waitForDisplayed({ timeout: 10000 });
$('div=Mutational Signature V2').click();
$('div=Mutational Signature DBS').waitForDisplayed({ timeout: 10000 });
$('div=Mutational Signature DBS').click();
};
const selectPercentageYAxis = () => {
getElementByTestHandle('AxisScaleSwitch%').click();
};

const selectSampleMutationalSignature = () => {
$('div.mutationalSignatureSampleSelector__indicators').waitForDisplayed({
timeout: 10000,
});
$('div.mutationalSignatureSampleSelector__indicators').click();
$('div=Sample P01_Rec').waitForDisplayed({ timeout: 10000 });
$('div=Sample P01_Rec').click();
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ENTITY_STABLE_ID NAME DESCRIPTION URL P01_Pri P01_Rec P02_Pri P02_Rec P04_Pri P04_Rec1 P04_Rec2 P04_Rec3 P05_Pri P05_Rec P06_Pri P06_Rec P07_Pri P07_Rec P08_Pri P08_Rec P09_Pri P09_Rec P10_Pri P10_Rec P11_Pri P11_Rec P12_Pri P12_Rec P13_Pri P13_Rec P15_Pri P15_Rec P16_Pri P16_Rec P17_Pri_A P17_Pri_B P17_Pri_C P17_Rec1_A P17_Rec1_B P17_Rec1_C P17_Rec1_D P18_Pri_A P18_Pri_B P18_Pri_C P18_Pri_D P18_Rec P21_Pri P21_Rec P24_Pri P24_Rec1 P24_Rec2 P25_Pri P25_Rec P26_Pri_A P26_Pri_B P26_Rec1_A P26_Rec1_B P27_Pri_A P27_Pri_B P27_Rec1_A P27_Rec1_B P28_Pri P28_Rec P29_Pri P29_Rec
mutational_signature_binary_DBS1 DBS1 (UV) Exposure to ultraviolet light https://cancer.sanger.ac.uk/signatures/dbs/dbs1 true true true true true true true true true true true true true true true true true true true false true true true true true true true true true true true true true true true true true false true true false true true true true true false true true true true true true true true true true true true true true
mutational_signature_binary_DBS2 DBS2 (Smoking) Exposure to tobacco smoking as well as other endogenous and/or exogenous mutagens (e.g. https://cancer.sanger.ac.uk/signatures/dbs/dbs2 false false false false false false false false false false false false true false false true false false false false false false false false false false false false false false false false false false false false false true false true true false false true false false false false false false false false false true false false false false false false false
mutational_signature_binary_DBS3 DBS3 (POLE) Polymerase epsilon exonuclease domain mutations https://cancer.sanger.ac.uk/signatures/dbs/dbs3 false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false
mutational_signature_binary_DBS4 DBS4 (Unknown) Unknown etiology https://cancer.sanger.ac.uk/signatures/dbs/dbs4 false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false
mutational_signature_binary_DBS5 DBS5 (Platinum) Prior chemotherapy treatment with platinum drugs https://cancer.sanger.ac.uk/signatures/dbs/dbs5 false false false false false false false false false false false true false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false
mutational_signature_binary_DBS6 DBS6 (Unknown) Unknown etiology https://cancer.sanger.ac.uk/signatures/dbs/dbs6 false true false false false false true false false true false false false false false false false false false true false true false false true false false false false false false false false false false false false true false true false true false false false false true false false true true true true false false false false false false false false
mutational_signature_binary_DBS7 DBS7 (MMR) Defective DNA mismatch repair (MMR) https://cancer.sanger.ac.uk/signatures/dbs/dbs7 false true false false false false false false false true false false false false false false false true false true false false false false false false false false false false false false false false false false false false false false false true false false false false true true true false false false false false false false false false false false false
mutational_signature_binary_DBS8 DBS8 (Unknown) Unknown https://cancer.sanger.ac.uk/signatures/dbs/dbs8 false false false false false false false false false true false false false false false false false false false false false false true false false false false false false false false false false false true false true false false false false true false true false false true false false false false false false false true false true false false false false
mutational_signature_binary_DBS9 DBS9 (Unknown) Unknown etiology https://cancer.sanger.ac.uk/signatures/dbs/dbs9 false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false
mutational_signature_binary_DBS10 DBS10 (MMR) Defective DNA mismatch repair (MMR) https://cancer.sanger.ac.uk/signatures/dbs/dbs10 false false false false false false false false false false false false false false false false false false true false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false true false false false false false false
mutational_signature_binary_DBS11 DBS11 (Unknown) Unknown https://cancer.sanger.ac.uk/signatures/dbs/dbs11 false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false false
Loading