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

Fix incorrect oncokb data and cancer type label used in mutations table #4758

Merged

Conversation

gblaih
Copy link
Contributor

@gblaih gblaih commented Oct 18, 2023

Fixes cBioPortal/cbioportal#10421

Currently, when CANCER_TYPE_DETAILED is the same for all mutations of a row in the table, it uses this to fetch the oncoKb data; otherwise, it uses "Cancer of Unknown Primary".

This fixes it so that if there are multiple CANCER_TYPE_DETAILED for mutations of a row, it checks if CANCER_TYPE is the same and if so, uses that to fetch the oncoKb data. If there are multiple CANCER_TYPE as well, then it uses "Cancer of Unknown Primary".

Comment on lines +115 to +120
if (this.getSameTumorTypeAttribute(data) === 'CANCER_TYPE_DETAILED') {
return this.resolveTumorType;
}
if (this.getSameTumorTypeAttribute(data) === 'CANCER_TYPE') {
return this.resolveCancerType;
}
Copy link
Member

Choose a reason for hiding this comment

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

this resolveTumorType vs resolveCancerType naming feels a little weird, tho i guess it was already there. Not super clear what the difference between those is

Copy link
Contributor Author

@gblaih gblaih Oct 19, 2023

Choose a reason for hiding this comment

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

yea, I wasn't sure what to name it but resolveTumorType already exists and typically gets the Cancer Type Detailed from a mutation while the newly added resolveCancerType will retrieve the Cancer Type. any ideas on name changes? throughout the codebase, the term Tumor Type is used but mostly just for Cancer Type Detailed and I didn't want to change that.

Copy link
Member

Choose a reason for hiding this comment

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

I see - yeah as long as it is consistent that's fine by me. If we were to change it throughout the code I'd prolly be explicit and just say resolveCancerType vs resolveCancerTypeDetailed

Comment on lines 1156 to 1161
// // first priority is CANCER_TYPE_DETAILED in clinical data
// _.each(clinicalDataForSamples.result, (clinicalData: ClinicalData) => {
// if (clinicalData.clinicalAttributeId === 'CANCER_TYPE_DETAILED') {
// map[clinicalData.uniqueSampleKey] = clinicalData.value;
// }
// });
Copy link
Member

Choose a reason for hiding this comment

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

maybe good to remove commented out code?

Copy link
Member

@inodb inodb left a comment

Choose a reason for hiding this comment

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

Looks great! Functionality seems to work from product perspective. Made a few minor comments on the code

@alisman
Copy link
Collaborator

alisman commented Nov 1, 2023

@gblaih did you respond to Ino's comments?

@alisman alisman self-requested a review November 2, 2023 14:35
@inodb inodb merged commit eec4050 into cBioPortal:master Nov 3, 2023
haynescd pushed a commit that referenced this pull request Nov 15, 2023
…le (#4758)

* fix incorrect cancer type and oncokb levels in mutations table

---------

Co-authored-by: Bryan Lai <laib1@mskcc.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OncoKB levels not getting properly picked on mutations comparison page
3 participants