scverse / scverse/spatialdata-plot
Q: How to render xenium morphology image with original colors?
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 86
- Forks
- 21
- Merge moyen
- 14 h 50 min
- PR mergées (30 j)
- 3
Description
Hello @LucaMarconato!
Thank you very much for this tool. I want to plot a part of morphology image acquired with xenium + multimodal segmentation kit. It is loaded into spatialdata and plotted without errors, but the colors are dim and they are different from what I'd expected (DAPI - #0F73E6, Boundary - #F300A5, Interior RNA - #A4A400, interior protein - #008A00, reference values from Xenium Explorer). I tried passing a list of colors like this:
crop = lambda sdata: spatialdata.bounding_box_query(
sdata,
min_coordinate=[17_500, 55_000],
max_coordinate=[19_500, 57_000],
axes=("x", "y"),
target_coordinate_system="global",
)
crop(sdata).pl.render_images("morphology_focus", ["#0F73E6", "#F300A5", "#A4A400", "#008A00"]).pl.show(
ax=axes[0], title="Morphology image", coordinate_systems="global"
)
The code does not produce an error, it works twice as long, and it results in the same image with colors unchanged.
The key question is how to adjust the colors and saturation of the plot, so that it looked closer to what I see in Xenium Explorer?
Secondary question is how to translate physical coordinates into spatialdata's global coordinate system? Am I supposed to get transformation and then apply transformation to a single or a couple points to get min and max for cropping above? I can make a separate issue with this question, if necessary.
Best,
Vasily
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par l’appel à render_images sur morphology_focus et retracez comment ses arguments de couleur influencent l’image tracée. Comparez les couleurs rendues avec les valeurs de référence de Xenium Explorer, puis examinez séparément comment bounding_box_query utilise le système de coordonnées global pour les coordonnées physiques fournies. C’est terminé lorsque le comportement des couleurs et la conversion des coordonnées sont documentés ou corrigés avec un exemple reproductible.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- data-visualization
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100