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

Gene coverage filter in Patient View mutation and CNA tables #2717

Merged
merged 11 commits into from
Nov 4, 2019

Conversation

pvannierop
Copy link
Contributor

@pvannierop pvannierop commented Sep 19, 2019

Note: this branch builds on top of branch patientview_genepanel_table_integration and the PR is to this branch for the reason of reviewing the code. This PR is therefore in draft mode.

What? Why?

As defined in RFC45 information on gene panels will be integrated in the PatientView component. Central problem with gene panels in patient view is the ambiguous interpretation of missing mutations in the mutation and copynumber tables. In these tables mutations in samples are represented as numbered sample icons in respective rows of each table. Absense of mutations and CNA's in the tables is indicated by:

  1. a '?' icon when the gene was not profiled for the respective sample
  2. no icon when the gene was profile in the sample

There is a use case where the user is only interested in investigating only those mutations that were profiled in all samples of a patient (has no '?' icons). At the moment the user has to idenitfy these mutations by eye among the other mutation rows in the table.

Fix

  • We have implemented a filter that allows the user to toggle between display of mutation present in ANY SAMPLE (default behavior) or ALL SAMPLES.
  • Filtering is performed independently for the mutation and CNA tables. Selection of ALL SAMPLES will filter the rows of the corresponding table and show only mutations for genes that were profiled in all samples of the patient.
  • The filter option is accessed via a filter icon in the header of the the Genes column. Clicking this icon will open a tooltip menu where the used can select the filter option in a radio menu. The menu is closed when the user again clicks the filter icon.
  • After filtering there is no visual cue presented to the user because the user is assumed to have selected the filter option consciously and because the default option is the display of all mutation rows.

Note: mutation and CNA genomic tracks will be updated depending on the gene filter setting. This feature will be implemented in a followup PR.

Preview

Peek 2019-09-19 12-13

@pvannierop pvannierop added feature hyve RFC45 PatientView: gene panel integration labels Sep 19, 2019
@pvannierop pvannierop self-assigned this Sep 19, 2019
@pvannierop pvannierop changed the title Patientview gene coverage filter Gene coverage filter in Patient View mutation and CNA tables Sep 19, 2019
@pvannierop pvannierop force-pushed the patientview_gene_coverage_filter branch from f2ded70 to a696a43 Compare September 19, 2019 10:29
@pvannierop pvannierop force-pushed the patientview_genepanel_table_integration branch from 9f519af to 900f8ef Compare September 19, 2019 12:20
@pvannierop pvannierop force-pushed the patientview_gene_coverage_filter branch from a696a43 to 273f5cd Compare September 23, 2019 09:30
Copy link
Contributor

@adamabeshouse adamabeshouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@pvannierop pvannierop force-pushed the patientview_genepanel_table_integration branch from 2231201 to d539713 Compare October 1, 2019 09:16
@pvannierop pvannierop force-pushed the patientview_gene_coverage_filter branch from 273f5cd to b8c5b84 Compare October 1, 2019 09:23
@pvannierop pvannierop force-pushed the patientview_genepanel_table_integration branch from d539713 to f237ced Compare October 2, 2019 15:54
@pvannierop pvannierop force-pushed the patientview_gene_coverage_filter branch 2 times, most recently from 814b10f to 9b10cea Compare October 8, 2019 10:30
@pvannierop
Copy link
Contributor Author

As discussed in PR #2746 I added the conditional rendering of the filter menu icon.

  1. In the mutation and CNA tables the filter icon only appears when:
  • there are samples that have not been profiled for a listed gene/mutation
  • there are more than one samples.

@@ -0,0 +1,19 @@
import SampleManager from "./SampleManager";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like these first two imports are not used

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused imports removed.

sampleToGenePanelId:{[sampleId:string]:string},
genePanelIdToEntrezGeneIds:{[genePanelId:string]:number[]}
):boolean {
return !! _.find(entrezGeneIds, entrezGeneId => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_.some is a little easier to read and returns boolean

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Updated code.

@pvannierop pvannierop force-pushed the patientview_genepanel_table_integration branch from 1bd1a9d to 3ee4a3c Compare October 21, 2019 06:05
@pvannierop pvannierop force-pushed the patientview_gene_coverage_filter branch 3 times, most recently from df1ec87 to c36136d Compare October 23, 2019 08:03
@jjgao jjgao temporarily deployed to cbioportal-f-patientvie-bqi5m4 October 23, 2019 18:58 Inactive
@pvannierop pvannierop force-pushed the patientview_gene_coverage_filter branch from c36136d to 5ebb68e Compare October 30, 2019 08:33
@jjgao jjgao temporarily deployed to cbioportal-f-patientvie-bqi5m4 October 30, 2019 08:33 Inactive
@pvannierop pvannierop force-pushed the patientview_gene_coverage_filter branch from 5ebb68e to 110051c Compare November 1, 2019 15:40
@jjgao jjgao temporarily deployed to cbioportal-f-patientvie-bqi5m4 November 1, 2019 15:41 Inactive
@pvannierop pvannierop changed the base branch from patientview_genepanel_table_integration to master November 1, 2019 15:41
@pvannierop pvannierop force-pushed the patientview_gene_coverage_filter branch from 110051c to 665c28e Compare November 4, 2019 07:09
@jjgao jjgao temporarily deployed to cbioportal-f-patientvie-bqi5m4 November 4, 2019 07:09 Inactive
@jjgao jjgao temporarily deployed to cbioportal-f-patientvie-bqi5m4 November 4, 2019 10:00 Inactive
@pvannierop pvannierop force-pushed the patientview_gene_coverage_filter branch from 85122e6 to 14cb671 Compare November 4, 2019 10:27
@jjgao jjgao temporarily deployed to cbioportal-f-patientvie-bqi5m4 November 4, 2019 10:27 Inactive
@jjgao jjgao temporarily deployed to cbioportal-f-patientvie-bqi5m4 November 4, 2019 11:31 Inactive
@@ -0,0 +1,5 @@
div.lazy-mobx-table {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we do this?

@@ -226,6 +227,34 @@ export default class PatientViewPage extends React.Component<IPatientViewPagePro
}
});

@autobind
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be tagged @action since it mutates

@@ -226,6 +227,34 @@ export default class PatientViewPage extends React.Component<IPatientViewPagePro
}
});

@autobind
private onFilterGenesMutationTable(option:GeneFilterOption):void {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

@autobind
private onFilterGenesCopyNumberTable(option:GeneFilterOption):void {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -843,6 +853,24 @@ export class PatientViewPageStore {
return mergeMutationsIncludingUncalled(this.mutationData, this.uncalledMutationData);
}

@computed get mergedMutationDataIncludingUncalledFilteredByGene():Mutation[][] {
if (this.mutationTableGeneFilterOption === GeneFilterOption.ALL_SAMPLES) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could use a comment

@alisman alisman merged commit 2359c85 into cBioPortal:master Nov 4, 2019
@alisman alisman deleted the patientview_gene_coverage_filter branch November 4, 2019 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature hyve RFC45 PatientView: gene panel integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants