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

Independent display logic for sample treatments chart #3455

Merged

Conversation

Luke-Sikina
Copy link
Member

@Luke-Sikina Luke-Sikina commented Oct 13, 2020

Backend changes here: cBioPortal/cbioportal#7960

Fix cBioPortal/cbioportal#7928

Describe changes proposed in this pull request:

  • Sample treatments sometimes should not be shown when patient treatments
    are shown
  • This PR uses a new API endpoint to determine when sample treatments should be shown
  • Also, unknown treatments are no longer shows on the frontend

@Luke-Sikina Luke-Sikina changed the title Independant display logic for sample treatments chart Independent display logic for sample treatments chart Oct 13, 2020
@@ -6924,6 +6926,17 @@ export class StudyViewPageStore {
});
}

@computed
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 put these in computed (instead of treating them like patientTreatments below as an instance property)? @Luke-Sikina you might just have copied an existing thing, but i'm curious.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not going to resolve this comment just in case it's still relevant, but I think these do need to be computed now, as this.studyIds is an observable.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes but they would be computed either way. i'm just curious why it is we treat these different than we normally treate remoteData, at least in other stores. probably there isn't an answer.
normal way (note that this will have same computed behavior):

readonly localPro = remotedata(...)

return remoteData({
invoke: () => {
return defaultClient.getContainsSampleTreatmentDataUsingPOST({
studyViewFilter: this.initialFilters,
Copy link
Member

Choose a reason for hiding this comment

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

Question, isn't studyIds not enough to check they have treatments data or not? do we need studyViewFilter?

@Luke-Sikina Luke-Sikina force-pushed the sample-treatments-display-logic branch 3 times, most recently from 584810d to e874082 Compare October 19, 2020 17:55
- Sample treatments sometimes should not be shown when patient treatments
are shown
- This PR uses a new API endpoint to determine when sample treatments should be shown
- Also, unknown treatments are no longer shows on the frontend
- Switched from passing a filter object to passing a list a study ids to the display
treatment endpoints
@Luke-Sikina Luke-Sikina force-pushed the sample-treatments-display-logic branch from e874082 to 47b18f4 Compare October 20, 2020 13:33
@inodb inodb merged commit 607bb30 into cBioPortal:master Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants