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

Add profile filtering when adding Generic Entity IDs in Oncoprint #4596

Merged

Conversation

oplantalech
Copy link
Contributor

@oplantalech oplantalech requested a review from dippindots April 25, 2023 11:07
@oplantalech oplantalech force-pushed the fix_oncoprint_generic_assay_bug branch from 914e782 to a225a6c Compare May 1, 2023 10:23
@oplantalech oplantalech requested a review from alisman May 1, 2023 14:12
Copy link
Member

@dippindots dippindots left a comment

Choose a reason for hiding this comment

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

@oplantalech Thanks again for fixing this issue, it looks good to me, just had some minor comments.

profileId
);
}

@computed
private get genericAssayTabs() {
let tabs = [];
if (this.isGenericAssayDataComplete && this.showGenericAssayTabs) {
Copy link
Member

Choose a reason for hiding this comment

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

This is my fault, it looks like I forgot to add necessary checks in isGenericAssayDataComplete function.
Could you add this.props.store.genericAssayEntitiesGroupByMolecularProfileId.isComplete and this.selectedGenericAssayProfileIdByType.size > 0 into isGenericAssayDataComplete function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Somehow adding this.selectedGenericAssayProfileIdByType.size > 0 does not show any Generic Assays, so I've only added the condition this.props.store.genericAssayEntitiesGroupByMolecularProfileId.isComplete

@inodb inodb added the bug label May 3, 2023
@oplantalech oplantalech changed the title Add filtering for profiles for Generic Entity IDs in Oncoprint Add profile filtering when adding Generic Entity IDs in Oncoprint May 3, 2023
@oplantalech
Copy link
Contributor Author

@dippindots Thank you for your review! I've implemented all your suggestions except one small thing (see comment). When it's all ready let me know and I'll squash all the commits before merging

constructor(props: IAddTrackProps) {
super(props);
makeObservable(this);
// Using the first profile as default profile option to initialize selectedGenericAssayProfileIdByType
this.genericAssayEntityOptionsReaction = when(
Copy link
Collaborator

Choose a reason for hiding this comment

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

not sure why this reaction is necessary

Copy link
Collaborator

Choose a reason for hiding this comment

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

i would think that you can accomplish default by checking for the selected type as part of the getter and if it is undefined, just selecting the first type

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alisman Thanks for this comment. I've simplified the code deleting the reaction

Copy link
Collaborator

@alisman alisman left a comment

Choose a reason for hiding this comment

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

@oplantalech see my comment regarding the reaction

Copy link
Collaborator

@alisman alisman left a comment

Choose a reason for hiding this comment

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

@oplantalech see my comment regarding the reaction

Copy link
Collaborator

@alisman alisman left a comment

Choose a reason for hiding this comment

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

@oplantalech see my comment regarding the reaction

@@ -60,6 +67,13 @@ export const COUNT_PADDING_WIDTH = 17;
export default class TracksMenu extends React.Component<IAddTrackProps, {}> {
@observable tabId: Tab | string = Tab.CLINICAL;

private genericAssayEntityOptionsReaction: IReactionDisposer;

private selectedGenericAssayProfileIdByType = observable.map<
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it possible to have multiple profiles selected?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You always have one profile selected per Generic Assay Type:
Screenshot from 2023-05-10 12-15-53

So in this example there are three Generic Assay Types (Generic Assay Patient Test, Treatment Response and Mutational Signature) and both have one profile selected. You cannot have more than one profile selected per Generic Assay Type.

@oplantalech oplantalech force-pushed the fix_oncoprint_generic_assay_bug branch from 0d891a6 to a546714 Compare May 19, 2023 09:58
@oplantalech
Copy link
Contributor Author

@alisman Can we merge?

@dippindots dippindots merged commit 51a24a9 into cBioPortal:master May 19, 2023
@dippindots
Copy link
Member

@oplantalech Merged! Really appreciate you fixing this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug when selecting generic assay stable IDs in the Oncoprint
4 participants