-
Notifications
You must be signed in to change notification settings - Fork 233
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
generic assay data download on download tab #3284
Conversation
114c0fb
to
850b09f
Compare
Thanks @kalletlak , all comments addressed! |
this.genericAssayProfilesGroupByProfileIdSuffix.result, | ||
profiles => { | ||
const stableIds: string[] = []; | ||
_.forEach(profiles, profile => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not important but i believe this is a mapping operation, so better to use map
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not very clear to just use a map function, I will try to use the _.chain() function instead.
const sampleKeys = samples.map(sample => sample.uniqueSampleKey); | ||
|
||
// generate row data (keyed by uniqueSampleKey) | ||
const rows = generateGenericAssayDownloadFileRows( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets call this rowsByUniqueSampleKey
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alisman Do you think generateGenericAssayRowsByUniqueSampleKey
is good? There are some parameters in this function are specific to generic assay data
stableIds.forEach(stableId => { | ||
// format: space delimited join | ||
const formattedValue = | ||
rowData.alterationData[stableId].join(' ') || 'NA'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think you mean to catch the condition where stableId doesn't exist in alterationData, and instead return NA. but this will error because of call to join on undefefined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alisman The alterationData[stableId]
will never be undefined since we will put an empty list there, please see logic at here: https://github.com/cBioPortal/cbioportal-frontend/pull/3284/files#diff-fc7a2c223844f7cba7399ed39f7813adR482. I can put a comment here if that will make this more clear.
850b09f
to
6de3391
Compare
Fix cBioPortal/cbioportal#7363
implement generic assay data download on download tab.
Example for study (Cancer Cell Line Encyclopedia (Broad, 2019)):
https://deploy-preview-3284--cbioportalfrontend.netlify.app/results/download?Action=Submit&RPPA_SCORE_THRESHOLD=2.0&Z_SCORE_THRESHOLD=2.0&cancer_study_list=ccle_broad_2019&case_set_id=ccle_broad_2019_cnaseq&data_priority=0&gene_list=TP53&geneset_list=%20&genetic_profile_ids_PROFILE_COPY_NUMBER_ALTERATION=ccle_broad_2019_cna&genetic_profile_ids_PROFILE_MUTATION_EXTENDED=ccle_broad_2019_mutations&profileFilter=0&tab_index=tab_visualize