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

generic assay data download on download tab #3284

Merged
merged 4 commits into from
Jul 1, 2020

Conversation

@dippindots dippindots self-assigned this Jun 17, 2020
@dippindots dippindots marked this pull request as ready for review June 18, 2020 18:29
src/pages/resultsView/ResultsViewPageStore.ts Outdated Show resolved Hide resolved
src/pages/resultsView/ResultsViewPageStore.ts Outdated Show resolved Hide resolved
src/pages/resultsView/ResultsViewPageStore.ts Outdated Show resolved Hide resolved
src/pages/resultsView/download/DownloadTab.tsx Outdated Show resolved Hide resolved
src/pages/resultsView/download/DownloadTab.tsx Outdated Show resolved Hide resolved
src/pages/resultsView/download/DownloadUtils.ts Outdated Show resolved Hide resolved
src/pages/resultsView/download/DownloadUtils.ts Outdated Show resolved Hide resolved
src/pages/resultsView/download/DownloadUtils.ts Outdated Show resolved Hide resolved
src/pages/resultsView/download/DownloadUtils.ts Outdated Show resolved Hide resolved
@dippindots
Copy link
Member Author

Thanks @kalletlak , all comments addressed!

@inodb inodb assigned alisman and unassigned dippindots Jun 29, 2020
this.genericAssayProfilesGroupByProfileIdSuffix.result,
profiles => {
const stableIds: string[] = [];
_.forEach(profiles, profile => {
Copy link
Collaborator

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

Copy link
Member Author

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(
Copy link
Collaborator

Choose a reason for hiding this comment

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

lets call this rowsByUniqueSampleKey

Copy link
Member Author

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';
Copy link
Collaborator

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.

Copy link
Member Author

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.

@inodb inodb assigned dippindots and unassigned alisman Jun 30, 2020
@alisman alisman merged commit c336c72 into cBioPortal:master Jul 1, 2020
@inodb inodb added the feature label Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants