Skip to content

Commit

Permalink
Fusion sv migration (#3358)
Browse files Browse the repository at this point in the history
Frontend changes to use structure_variant able over mutations table for fusions

### Impacted pages
#### Query page
- Structural variant/Fusion profile is shown if the study has it
- For multi-study selection: new molecular profile checkbox for structural variants

#### Study view page
- Rename fusion table to structural variant table

#### Results page
- Oncoprint tab
    - Rename fusion to structural variant
    - New track for fusion/structural variant profiled cases
- Plots tab
    - Structural variants are shown as a new Data Type/selector
- Comparison tab/alterations
    - no visual changes
- Downloads tab

#### Patient view page
- All fusions in mutation table should be in new structural variants table

Commits:

* Migrate from fusions to sv in study-view
* Add structural variant table in patient page
* Migrate fusion to structural variant in oncoprint
* Support structural variants in cancer summary and download tabs
* Support structural variant profile in result page plots tab
* Add structural variant enrichments analysis tab
* Structural variant coloring in plots tab
* update expression tab to use new code
* plots tab refactoring
* Fix sort order - structural variant goes on top of CNA, and show message indicating that
* Update molecular profile filter parameter in query and results page
* Fix error from merging master and failing e2e
* Fix how unprofiled cna and unprofiled sv are handled in plots tab scatter plot annotation
* Fix plots bug causing too-thick stroke width
* Fix plots bug with cna and sv in legend when there is no cna or sv data
* Fix issues in plots tab relating to structural variant migration
* Fix bug in plots tab and fix e2e tests
* SV: do not invoke api's if all samples are filtered out
* Fix issues arising from mobx upgrade
* Fix plots tab opacity issue
* Use same color for stroke and fill in waterfall plot
* Fix error selecting geneset profile and other e2e local tests
* Alteration Enrichments: avoid sending duplicate sample during api query
* SV table: show profiled samples count
* Incude structural variants in VUS
* Study page: fix SV table column width
* Add tumor type to sv objects while invoking oncokb api
* Update failing e2e tests
* Regenerate api client files
* Fix appearance of not-profiled-for-cna-and-sv
* Fix bug in plots relating to not-profiled-for-cna-and-sv
* Update failing e2e tests
* Change color for not-profiled-for-cna-and-sv to match current production
* Update localdb e2e tests
* Fix condition for invoking alteration enrichment api
* Set mutationType to fusion for structural variants
* Fix group size in mini-oncoprint in alterations enrichment tab
* Fix oncokb lookup issue for structural variants
* Support old FUSION_GENES_TABLE from user settings
* Update failing e2e test image
* Update protein display name in mutation-mapper

Co-authored-by: Adam Abeshouse <[email protected]>
Co-authored-by: Adam Abeshouse <[email protected]>
Former-commit-id: eefd23507ca721c863409dd8e8d43dedbec55ca6
  • Loading branch information
3 people authored Apr 20, 2021
1 parent eb447ae commit ac0ea38
Show file tree
Hide file tree
Showing 98 changed files with 5,074 additions and 2,441 deletions.
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ yarn.lock
*properties
*.seg
end-to-end-test/local/studies/**
*.screenshottest
*.screenshottest
*.jks
10 changes: 5 additions & 5 deletions end-to-end-test/local/specs/core/plotstab.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ describe('plots tab', function() {
assert($('div.coloring-menu').isExisting());
assert(
$('div.coloring-menu').$$('input[type="checkbox"]')
.length === 2
.length === 3
);
});

it('shows mutation and copy number by default', () => {
loadPlotsTab(
`${CBIOPORTAL_URL}/results/plots?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=study_es_0&case_set_id=study_es_0_all&clinicallist=NUM_SAMPLES_PER_PATIENT%2CPROFILED_IN_study_es_0_mutations%2CPROFILED_IN_study_es_0_gistic%2CPROFILED_IN_study_es_0_mrna_median_Zscores&data_priority=0&gene_list=RPS11&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=study_es_0_gistic&genetic_profile_ids_PROFILE_MRNA_EXPRESSION=study_es_0_mrna_median_Zscores&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=study_es_0_mutations&heatmap_track_groups=study_es_0_treatment_ic50%2CErlotinib&show_samples=false&tab_index=tab_visualize&treatment_list=Erlotinib`
`${CBIOPORTAL_URL}/results/plots?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=study_es_0&case_set_id=study_es_0_all&clinicallist=NUM_SAMPLES_PER_PATIENT%2CPROFILED_IN_study_es_0_mutations%2CPROFILED_IN_study_es_0_gistic%2CPROFILED_IN_study_es_0_mrna_median_Zscores&data_priority=0&gene_list=RPS11&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=study_es_0_gistic&genetic_profile_ids_PROFILE_MRNA_EXPRESSION=study_es_0_mrna_median_Zscores&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=study_es_0_mutations&heatmap_track_groups=study_es_0_treatment_ic50%2CErlotinib&show_samples=false&tab_index=tab_visualize&treatment_list=Erlotinib&plots_horz_selection=%7B"dataType"%3A"clinical_attribute"%7D&plots_vert_selection=%7B"selectedGeneOption"%3A6205%2C"dataType"%3A"TREATMENT_RESPONSE"%7D&plots_coloring_selection=%7B%7D&profileFilter=0`
);
selectTreatmentProfile();
const res = browser.checkElement('[id=plots-tab-plot-svg]');
Expand All @@ -53,7 +53,7 @@ describe('plots tab', function() {

it('shows only mutation types when copy number is de-selected', () => {
loadPlotsTab(
`${CBIOPORTAL_URL}/results/plots?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=study_es_0&case_set_id=study_es_0_all&clinicallist=NUM_SAMPLES_PER_PATIENT%2CPROFILED_IN_study_es_0_mutations%2CPROFILED_IN_study_es_0_gistic%2CPROFILED_IN_study_es_0_mrna_median_Zscores&data_priority=0&gene_list=RPS11&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=study_es_0_gistic&genetic_profile_ids_PROFILE_MRNA_EXPRESSION=study_es_0_mrna_median_Zscores&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=study_es_0_mutations&heatmap_track_groups=study_es_0_treatment_ic50%2CErlotinib&show_samples=false&tab_index=tab_visualize&treatment_list=Erlotinib`
`${CBIOPORTAL_URL}/results/plots?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=study_es_0&case_set_id=study_es_0_all&clinicallist=NUM_SAMPLES_PER_PATIENT%2CPROFILED_IN_study_es_0_mutations%2CPROFILED_IN_study_es_0_gistic%2CPROFILED_IN_study_es_0_mrna_median_Zscores&data_priority=0&gene_list=RPS11&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=study_es_0_gistic&genetic_profile_ids_PROFILE_MRNA_EXPRESSION=study_es_0_mrna_median_Zscores&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=study_es_0_mutations&heatmap_track_groups=study_es_0_treatment_ic50%2CErlotinib&show_samples=false&tab_index=tab_visualize&treatment_list=Erlotinib&plots_horz_selection=%7B"dataType"%3A"clinical_attribute"%7D&plots_vert_selection=%7B"selectedGeneOption"%3A6205%2C"dataType"%3A"TREATMENT_RESPONSE"%7D&plots_coloring_selection=%7B"colorByCopyNumber"%3A"false"%2C"colorBySv"%3A"false"%7D&profileFilter=0`
);
selectTreatmentProfile();
$('input[data-test="ViewCopyNumber"]').click();
Expand All @@ -63,7 +63,7 @@ describe('plots tab', function() {

it('shows only CNA types when mutation checkbox is deselected', () => {
loadPlotsTab(
`${CBIOPORTAL_URL}/results/plots?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=study_es_0&case_set_id=study_es_0_all&clinicallist=NUM_SAMPLES_PER_PATIENT%2CPROFILED_IN_study_es_0_mutations%2CPROFILED_IN_study_es_0_gistic%2CPROFILED_IN_study_es_0_mrna_median_Zscores&data_priority=0&gene_list=RPS11&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=study_es_0_gistic&genetic_profile_ids_PROFILE_MRNA_EXPRESSION=study_es_0_mrna_median_Zscores&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=study_es_0_mutations&heatmap_track_groups=study_es_0_treatment_ic50%2CErlotinib&show_samples=false&tab_index=tab_visualize&treatment_list=Erlotinib`
`${CBIOPORTAL_URL}/results/plots?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=study_es_0&case_set_id=study_es_0_all&clinicallist=NUM_SAMPLES_PER_PATIENT%2CPROFILED_IN_study_es_0_mutations%2CPROFILED_IN_study_es_0_gistic%2CPROFILED_IN_study_es_0_mrna_median_Zscores&data_priority=0&gene_list=RPS11&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=study_es_0_gistic&genetic_profile_ids_PROFILE_MRNA_EXPRESSION=study_es_0_mrna_median_Zscores&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=study_es_0_mutations&heatmap_track_groups=study_es_0_treatment_ic50%2CErlotinib&show_samples=false&tab_index=tab_visualize&treatment_list=Erlotinib&plots_horz_selection=%7B"dataType"%3A"clinical_attribute"%7D&plots_vert_selection=%7B"selectedGeneOption"%3A6205%2C"dataType"%3A"TREATMENT_RESPONSE"%7D&plots_coloring_selection=%7B"colorByMutationType"%3A"false"%2C"colorBySv"%3A"false"%7D&profileFilter=0`
);
selectTreatmentProfile();
$('input[data-test="ViewMutationType"]').click();
Expand All @@ -73,7 +73,7 @@ describe('plots tab', function() {

it('removes sample stylings when selecting None in gene selection box', () => {
loadPlotsTab(
`${CBIOPORTAL_URL}/results/plots?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=study_es_0&case_set_id=study_es_0_all&clinicallist=NUM_SAMPLES_PER_PATIENT%2CPROFILED_IN_study_es_0_mutations%2CPROFILED_IN_study_es_0_gistic%2CPROFILED_IN_study_es_0_mrna_median_Zscores&data_priority=0&gene_list=RPS11&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=study_es_0_gistic&genetic_profile_ids_PROFILE_MRNA_EXPRESSION=study_es_0_mrna_median_Zscores&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=study_es_0_mutations&heatmap_track_groups=study_es_0_treatment_ic50%2CErlotinib&show_samples=false&tab_index=tab_visualize&treatment_list=Erlotinib`
`${CBIOPORTAL_URL}/results/plots?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=study_es_0&case_set_id=study_es_0_all&clinicallist=NUM_SAMPLES_PER_PATIENT%2CPROFILED_IN_study_es_0_mutations%2CPROFILED_IN_study_es_0_gistic%2CPROFILED_IN_study_es_0_mrna_median_Zscores&data_priority=0&gene_list=RPS11&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=study_es_0_gistic&genetic_profile_ids_PROFILE_MRNA_EXPRESSION=study_es_0_mrna_median_Zscores&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=study_es_0_mutations&heatmap_track_groups=study_es_0_treatment_ic50%2CErlotinib&show_samples=false&tab_index=tab_visualize&treatment_list=Erlotinib&plots_horz_selection=%7B"dataType"%3A"clinical_attribute"%7D&plots_vert_selection=%7B"dataType"%3A"TREATMENT_RESPONSE"%7D&plots_coloring_selection=%7B"selectedOption"%3A"6205_undefined"%7D&profileFilter=0`
);
selectTreatmentProfile();
$('.gene-select').click();
Expand Down
2 changes: 2 additions & 0 deletions end-to-end-test/local/specs/treatment.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ describe('treatment feature', function() {
})
);

$('[data-test=ViewLimitValues]').waitForExist();
assert($('[data-test=ViewLimitValues]').isVisible());
});

Expand All @@ -436,6 +437,7 @@ describe('treatment feature', function() {
})
);

$('[data-test=ViewLimitValues]').waitForExist();
assert($('[data-test=ViewLimitValues]').isVisible());
});

Expand Down
71 changes: 32 additions & 39 deletions end-to-end-test/remote/specs/core/home.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ describe('case set selection in front page query form', function() {
clickQueryByGeneButton();

browser.waitForExist(
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="M"]',
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="mutations"]',
10000
);

Expand Down Expand Up @@ -356,11 +356,11 @@ describe('case set selection in front page query form', function() {
clickQueryByGeneButton();

browser.waitForExist(
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="M"]',
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="mutations"]',
10000
);
browser.waitForExist(
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="C"]',
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="cna-gistic-cna_rae-cna_consensus"]',
10000
);
browser.waitForExist(selectedCaseSet_sel, 10000);
Expand Down Expand Up @@ -388,11 +388,11 @@ describe('case set selection in front page query form', function() {
clickQueryByGeneButton();

browser.waitForExist(
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="M"]',
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="mutations"]',
10000
);
browser.waitForExist(
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="C"]',
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="gistic"]',
10000
);
browser.waitForExist(selectedCaseSet_sel, 10000);
Expand Down Expand Up @@ -485,22 +485,22 @@ describe('genetic profile selection in front page query form', () => {

// wait for data type priority selector to load
browser.waitForExist(
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="M"]',
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="mutations"]',
10000
);
browser.waitForExist(
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="C"]',
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="gistic"]',
10000
);
assert(
browser.isSelected(
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="M"]'
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="mutations"]'
),
"'Mutation' should be selected"
);
assert(
browser.isSelected(
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="C"]'
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="gistic"]'
),
"'Copy number alterations' should be selected"
);
Expand Down Expand Up @@ -551,22 +551,22 @@ describe('genetic profile selection in front page query form', () => {

// wait for data type priority selector to load
browser.waitForExist(
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="M"]',
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="mutations"]',
10000
);
browser.waitForExist(
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="C"]',
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="gistic"]',
10000
);
assert(
browser.isSelected(
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="M"]'
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="mutations"]'
),
"'Mutation' should be selected"
);
assert(
browser.isSelected(
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="C"]'
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="gistic"]'
),
"'Copy number alterations' should be selected"
);
Expand Down Expand Up @@ -669,21 +669,17 @@ describe('auto-selecting needed profiles for oql in query form', () => {
// wait for query to load
waitForOncoprint(20000);

const query = browser.execute(function() {
return urlWrapper.query;
}).value;
const profileFilter = (
browser.execute(function() {
return urlWrapper.query;
}).value.profileFilter || ''
).split(',');
// mutation, cna, mrna profiles are there
assert.equal(profileFilter.includes('mutations'), true);
assert.equal(profileFilter.includes('gistic'), true);
assert.equal(
query.genetic_profile_ids_PROFILE_MUTATION_EXTENDED,
'prad_tcga_pub_mutations'
);
assert.equal(
query.genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION,
'prad_tcga_pub_gistic'
);
assert.equal(
query.genetic_profile_ids_PROFILE_MRNA_EXPRESSION,
'prad_tcga_pub_rna_seq_v2_mrna_median_Zscores'
profileFilter.includes('rna_seq_v2_mrna_median_Zscores'),
true
);
});
});
Expand Down Expand Up @@ -760,20 +756,17 @@ describe('results page quick oql edit', () => {
waitForOncoprint(20000);

// mutation, cna, mrna profiles are there
query = browser.execute(function() {
return urlWrapper.query;
}).value;
assert.equal(
query.genetic_profile_ids_PROFILE_MUTATION_EXTENDED,
'prad_tcga_pub_mutations'
);
assert.equal(
query.genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION,
'prad_tcga_pub_gistic'
);
let profileFilter = (
browser.execute(function() {
return urlWrapper.query;
}).value.profileFilter || ''
).split(',');
// mutation, cna, mrna profiles are there
assert.equal(profileFilter.includes('mutations'), true);
assert.equal(profileFilter.includes('gistic'), true);
assert.equal(
query.genetic_profile_ids_PROFILE_MRNA_EXPRESSION,
'prad_tcga_pub_rna_seq_v2_mrna_median_Zscores'
profileFilter.includes('rna_seq_v2_mrna_median_Zscores'),
true
);
});
});
4 changes: 2 additions & 2 deletions end-to-end-test/remote/specs/core/oncoprint.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,11 +556,11 @@ describe('oncoprint', function() {
clickQueryByGeneButton();

browser.waitForExist(
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="M"]',
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="mutations"]',
10000
);
browser.waitForExist(
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="C"]',
'[data-test="dataTypePrioritySelector"] input[type="checkbox"][data-test="gistic"]',
10000
);

Expand Down
6 changes: 6 additions & 0 deletions end-to-end-test/remote/specs/core/plots.screenshot.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,12 @@ describe('plots tab screenshot tests', function() {
browser.click('.coloringLogScale');
waitForAndCheckPlotsTab();
});
it('plots tab with structural variant coloring', () => {
goToUrlAndSetLocalStorage(
`${CBIOPORTAL_URL}/results/plots?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=prad_mich&case_set_id=prad_mich_cna_seq&data_priority=0&gene_list=ERG&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=prad_mich_cna&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=prad_mich_mutations&genetic_profile_ids_PROFILE_STRUCTURAL_VARIANT=prad_mich_fusion&plots_coloring_selection=%7B"colorByCopyNumber"%3A"true"%2C"colorBySv"%3A"true"%7D&plots_horz_selection=%7B"dataType"%3A"clinical_attribute"%7D&plots_vert_selection=%7B"selectedGeneOption"%3A2078%2C"dataType"%3A"COPY_NUMBER_ALTERATION"%7D&profileFilter=0&tab_index=tab_visualize`
);
waitForAndCheckPlotsTab();
});
});

describe('plots tab multiple studies screenshot tests', function() {
Expand Down
Loading

0 comments on commit ac0ea38

Please sign in to comment.