scverse / scverse/spatialdata-plot
Q: How to render xenium morphology image with original colors?
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 86
- Fork
- 21
- Merge trung bình
- 14 giờ 50 phút
- Pull request đã merge (30 ngày)
- 3
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với lời gọi render_images trên morphology_focus và theo dõi cách các đối số màu của nó ảnh hưởng đến hình ảnh được vẽ. So sánh các màu được hiển thị với các giá trị tham chiếu của Xenium Explorer, đồng thời kiểm tra riêng cách bounding_box_query sử dụng hệ tọa độ toàn cục cho các tọa độ vật lý được cung cấp. Hoàn thành khi hành vi màu sắc và phép chuyển đổi tọa độ được ghi lại hoặc sửa với một ví dụ có thể tái hiện.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- data-visualization
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100