Skip to content

Feature/transparency#1

Open
songgo1 wants to merge 3 commits into
CahanLab:mainfrom
songgo1:feature/transparency
Open

Feature/transparency#1
songgo1 wants to merge 3 commits into
CahanLab:mainfrom
songgo1:feature/transparency

Conversation

@songgo1
Copy link
Copy Markdown
Collaborator

@songgo1 songgo1 commented Jun 1, 2026

Description

Added a transparent_below parameter to embed_bivariate_genes and embed_geneset functions that allows users to hide cells below a specified percentile threshold based on expression values.

Motivation

The Contours function allows users to define anatomical landmarks, but embed_bivariate_genes and embed_geneset cannot overlay onto these plots because low-expressing cells obscure the background. The transparent_below parameter hides cells below a specified percentile, enabling contour overlays and clearer visualization of spatial expression patterns.

Changes

  • Added transparent_below parameter to embed_bivariate_genes()
  • Added transparent_below parameter to embed_geneset()
  • Updated docstrings with parameter documentation
  • Updated quickstart notebook with examples of transparency thresholds.

Usage

Example

# Hide the lowest 25% of cells by combined expression
uf.pl.embed_bivariate_genes(adata, genes1=['GeneA'], genes2=['GeneB'], transparent_below=25)

Notes

  • Backward compatible: defaults to None (existing behavior unchanged)
  • Also, get_version(package_name) is causing installation errors for me. Commenting out version=get_version('stuf') resolves installation issues.

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.

1 participant