feat: new holoviz plotting#4188
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## aggregate-dim #4188 +/- ##
=================================================
- Coverage 80.03% 78.58% -1.46%
=================================================
Files 121 128 +7
Lines 13030 13282 +252
=================================================
+ Hits 10429 10438 +9
- Misses 2601 2844 +243
Flags with carried forward coverage won't be shown. Click here to find out more.
|
| kdims: Collection[AdDim], | ||
| vdims: Collection[AdDim] = (), | ||
| *, | ||
| color: AdDim | None = None, |
There was a problem hiding this comment.
What would the complexity be in allowing this to be a list so we can lay out a grid?
sc.pl.scatter(adata, x="CD79A", y="CD3D", color=["bulk_labels", "n_genes"])current does side-by-side plotting.
Even with bokeh, I'd think something like
sc.pl.scatter(adata, A.X[:, ["C1QA", "PSAP"]], color=[A.obs["bulk_labels"], A.obs["n_genes"]])would be possible, given the richness holoviz supports: https://hv-anndata.readthedocs.io/en/latest/#manifoldmap-app-to-explore-all-dimensionality-reduction-results allows choosing between labels dynamically but perhaps https://hv-anndata.readthedocs.io/en/latest/examples/Violin.html's example at the bottom of layouts is more what we'd be going for here
If this is an "open question," happy to discuss!
There was a problem hiding this comment.
shorter would be color=A.obs[["bulk_labels", "n_genes"]] btw.
faceting in holoviz is pretty simple, I’ll add an example.
| diffmap = _embedding("diffmap", "diffusion map") | ||
|
|
||
|
|
||
| def heatmap( |
There was a problem hiding this comment.
oof yeah definitely addressing this before releasing
| return hm | ||
|
|
||
|
|
||
| def tracksplot( |
There was a problem hiding this comment.
yep, known issues, e.g. holoviz/holoviews#6658
| vdims: AdDim, | ||
| *, | ||
| kdims: Collection[AdDim] = (), | ||
| color: AdDim | None = None, |
There was a problem hiding this comment.
Seems clear that a Collection of color should be supported given its an example on the hv-anndata site
There was a problem hiding this comment.
you mean matplotlib.typing.ColorLike or so?
There was a problem hiding this comment.
No just reshashing #4188 (comment) but for violin
| sc.pl.dotplot(adata[:, markers], A.obs["bulk_labels"]) | ||
|
|
||
| """ | ||
| stats_wide = sc.get.aggregate(adata, group_by, funcs.values()) |
There was a problem hiding this comment.
oh my gosh, this is so simple :))))
There was a problem hiding this comment.
ahaha I know! I was so happy when this came together!
Probably something for the blog post!
| ) | ||
|
|
||
|
|
||
| def dotplot( |
There was a problem hiding this comment.
I spent a lot of time on these dot sizes, they weren’t perfect when I stopped but they should definitely be recognizably different. Hmm.



TODO
dot_sizeA = sc.pl.hv_init())