scverse / scverse/spatialdata-plot

Q: How to render xenium morphology image with original colors?

オープン
#370 コメント 15 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

images :framed_picture: needs info priority: low
主要言語
Python
スター
86
フォーク
21
平均マージ
14時間 50分
マージ済み PR(30日)
3

説明

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

morphology_focus に対する render_images 呼び出しから始め、color 引数が描画画像にどのような影響を与えるかを追跡します。描画された色を Xenium Explorer の参照値と比較し、別途、bounding_box_query が指定された物理座標に対してグローバル座標系をどのように使用するかを調べます。完了の基準は、色の挙動と座標変換が再現可能な例とともに文書化されるか、修正されることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
data-visualization
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。