You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which should show segmentation masks, colored by the leiden clustering. This works for individual samples (when using .filter_by_coordinate_system(), and it also work when all clusters are present in every coordinate system. It fails when the number of categories per coordinate systems differs, with:
What seems to be happening is that colors = adata.uns[f"{cluster_key}_colors"] is correctly subsetted, but categories = color_source_vector.categories.tolist() + ["NaN"] is not. Eventually, these two differ in length. It's easy to fix this, by removing unused categories from the color_source_vector, i.e. changing that one line to:
Hi there, I'm trying to show a leiden clustering in space for an
sdata
object with many coordinate systems. I'm callingwhich should show segmentation masks, colored by the leiden clustering. This works for individual samples (when using
.filter_by_coordinate_system()
, and it also work when all clusters are present in every coordinate system. It fails when the number of categories per coordinate systems differs, with:What seems to be happening is that
colors = adata.uns[f"{cluster_key}_colors"]
is correctly subsetted, butcategories = color_source_vector.categories.tolist() + ["NaN"]
is not. Eventually, these two differ in length. It's easy to fix this, by removing unused categories from thecolor_source_vector
, i.e. changing that one line to:The text was updated successfully, but these errors were encountered: