`sq.pl.spatial_segment`: wrong cells selected by `groups` parameter
Open
@michalk8 is already working on this.
Since Nov 10, 2023.
plot :hibiscus:
- Dominant language
- Python
- Stars
- 598
- Forks
- 121
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 3
Description
Description
When the groupsparameter is specified in sq.pl.spatial_segment the cells that are plotted are not the cells where adata.obs[color].isin(groups). For example with the mibitof dataset below, when groups = ["Epithelial","Tcell_CD4"] mostly cells on the left side of the image are plotted and these are not the location of these cell types when groups = None.
...
Minimal reproducible example
import squidpy as sq
import anndata as ad
adata = sq.datasets.mibitof()
sq.pl.spatial_segment(adata,seg_cell_id = "cell_id",library_key = "library_id",
color = "Cluster",library_id = "point23")
sq.pl.spatial_segment(adata,seg_cell_id = "cell_id",library_key = "library_id",
color = "Cluster",library_id = "point23",
groups = ["Epithelial","Tcell_CD4"])
Traceback
No errors raised
Version
1.3.1
...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.