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

NickAkhmetov/CAT-1010 Integrate Cellpop into organ page #3674

Merged
merged 19 commits into from
Jan 28, 2025

Conversation

NickAkhmetov
Copy link
Collaborator

@NickAkhmetov NickAkhmetov commented Jan 23, 2025

Summary

This PR adds cellpop visualizations to the organ page. This is best observed on the kidney page.

Current limitations

  • Visualizations are currently limited to only include datasets which are known to be labeled. Once we enhance the search API to include annotation information, the query that fetches UUIDs should be revised to use that field and the predefined UUID list should be dropped.
  • The tutorial link is currently hidden, as we do not have a tutorial available yet; I've added the implementation for it and it will be easy to integrate once ready.
  • Selection controls look a little wonky for the Heart page, since there are only 3 rows. We can clamp the max size of the checkboxes as an interim fix.

Remaining todos

  • Minor visual improvements to match the designs more closely
  • Track down and resolve accordion margin regression
  • Add test coverage
  • Add analytics

Design Documentation/Original Tickets

https://hms-dbmi.atlassian.net/browse/CAT-1010

Testing

Manually tested on:

Screenshots/Video

Kidney page

image

Heart Page

image

Checklist

  • Code follows the project's coding standards
    • Lint checks pass locally
    • New CHANGELOG-your-feature-name-here.md is present in the root directory, describing the change(s) in full sentences.
  • Unit tests covering the new feature have been added
  • All existing tests pass
  • Any relevant documentation in JIRA/Confluence has been updated to reflect the new feature
  • Any new functionalities have appropriate analytics functionalities added

Additional Notes

Other minor changes in this PR:

  • I started building out a dark theme to make the cellpop visualization look okay in the context of the portal UI.
  • I updated React from 18.2.0 to 18.3.1. This update does not introduce any differences in functionality, but does add warning logs to highlight what needs to be updated in order to prepare for React 19's update.
  • I did some slight reorganization of the main organ page to move the lookup queries into their own hooks.
  • The visualization store is slightly updated to handle expanding non-Vitessce visualizations. Maybe worthwhile to add "expand" functionalities to the EUI components?
  • Most of the tracking implementation is here: Add tracking functionalities to most state changes hms-dbmi/cellpop#56

@NickAkhmetov NickAkhmetov marked this pull request as ready for review January 24, 2025 18:56
Copy link
Collaborator

@john-conroy john-conroy left a comment

Choose a reason for hiding this comment

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

Looks good to me. Just a couple of questions.

Comment on lines +51 to +62
filter: {
bool: {
must: [
{
term: {
'entity_type.keyword': 'Dataset',
},
},
mustHaveOrganClause(searchItems),
],
},
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe it's less expensive to perform a filter/query outside of the aggregations. Looking for supporting documentation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can definitely revise this as needed; with that said, this is a direct port of the existing query logic.

context/app/static/js/pages/Organ/hooks.ts Outdated Show resolved Hide resolved
// TODO: This is a placeholder for the actual implementation.
// We do not currently have a programmatic way to tell
// whether a dataset actually has labels yet.
export const DATASETS_WITH_LABELS = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

These are specific datasets within different dataset types, right? There are no underlying patterns?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These are all of the publicly accessible datasets with complete Azimuth annotations. They are all rna-seq and either kidney or heart; there are also unannotated datasets that fall into those categories, however.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we include that information in the comment?

context/app/static/js/pages/Organ/hooks.ts Outdated Show resolved Hide resolved
context/app/static/js/pages/Organ/hooks.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@john-conroy john-conroy left a comment

Choose a reason for hiding this comment

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

Looks good to me. Let's wait for the current release candidate to hit PROD before merging.

@NickAkhmetov NickAkhmetov merged commit db2867e into main Jan 28, 2025
8 checks passed
@NickAkhmetov NickAkhmetov deleted the nickakhmetov/cat-1010-cellpop-integration branch January 28, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants