Skip to content

Conversation

@asizemore
Copy link
Member

@asizemore asizemore commented Oct 28, 2025

For the differential expression notebook.

This PR works with PR 75 in service-eda. Can use qa mbio to test and see example requests in that PR.

Tasks

  • Create computation
  • Create visualization

Notes:
Can't use the scatterplot straight up because the dim red plot needs to set its own x/y axes with the computed variable (in beta div, the client doesn't set x/y. it just gets only that stuff from the backend). So I used the Options feature to have the new compute dimensionalityReduction tell ScatterplotVisualization that it wants to use these computed variables and that these computed vars need to be used in the request to the backend. We could have done it more simply with some hard coding but this will make it easier for us to add the ability to choose which principle coordinate the user wants for each axis. The backend is already prepped for this new feature, so the frontend might as well be, too.

Testing (updated 11/04/25)

  • Backend merged on 11/03 so please use with ablevins mbio dev site backend with the local eda workspace frontend (yarn ... /eda).

IMPORTANT - do not merge with index.ts still including this compute. The backend has mbio approved for this compute because we need it for data testing. We can merge all this work but we must take it out of index.ts first so that it doesn't accidentally show up on the mbio live site someday on accident 😬

@asizemore asizemore marked this pull request as ready for review November 4, 2025 22:17
@asizemore asizemore requested a review from Copilot November 4, 2025 23:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new dimensionality reduction computation plugin and enhances the scatterplot visualization to support computed variables in backend requests. The implementation follows the pattern of similar plugins like beta diversity.

  • Adds a dimensionalityReduction computation plugin with PCA axis support
  • Introduces sendComputedVariablesInRequest option to control whether computed variable descriptors are sent to the backend
  • Registers the new plugin in the computation plugins index

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
packages/libs/eda/src/lib/core/components/visualizations/implementations/ScatterplotVisualization.tsx Adds sendComputedVariablesInRequest option and uses it to conditionally send computed X/Y axis descriptors to backend
packages/libs/eda/src/lib/core/components/computations/plugins/index.ts Registers the new dimensionalityreduction plugin
packages/libs/eda/src/lib/core/components/computations/plugins/dimensionalityReduction.tsx New computation plugin for dimensionality reduction (PCA) with configuration UI and computed axis details

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@asizemore asizemore requested a review from bobular November 5, 2025 15:24
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