Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Add `dataset_id` prefix to tables in Visium HD

未关闭
#273 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
data

调研方向

首先定位创建 Tables 条目的 Visium HD reader 代码,并将其命名方式与 issue 中显示的 Images 和 Shapes 进行比较。完成的标准是:Visium HD 的 Tables 名称包含 dataset_id 前缀,与其他元素保持一致,并在拼接 SpatialData 对象时避免重复的 Table 名称。

由索引模型根据 Issue 内容生成。

描述

visium-hd

Thanks for the clarification. That makes sense.

One small detail. Should not the elements in Tables be renamed as well? Right now they are not (see above). If I try to concatenate two visium_hd SpatialData objects I get a warning about identical names and they are given unique names which are not ideal because do not follow the original patterns, making it harder to know which ones came from where.

>> sdata1
SpatialData object
├── Images
│     ├── 'HM_hires_image': DataArray[cyx] (3, 5057, 6000)
│     └── 'HM_lowres_image': DataArray[cyx] (3, 506, 600)
├── Shapes
│     ├── 'HM_square_002um': GeoDataFrame shape: (2942291, 1) (2D shapes)
│     ├── 'HM_square_008um': GeoDataFrame shape: (187571, 1) (2D shapes)
│     └── 'HM_square_016um': GeoDataFrame shape: (48206, 1) (2D shapes)
└── Tables
      ├── 'square_002um': AnnData (2942291, 18085)
      ├── 'square_008um': AnnData (187571, 18085)
      └── 'square_016um': AnnData (48206, 18085)
with coordinate systems:
    ▸ 'downscaled_hires', with elements:
        HM_hires_image (Images), HM_square_002um (Shapes), HM_square_008um (Shapes), HM_square_016um (Shapes)
    ▸ 'downscaled_lowres', with elements:
        HM_lowres_image (Images), HM_square_002um (Shapes), HM_square_008um (Shapes), HM_square_016um (Shapes)
    ▸ 'global', with elements:
        HM_hires_image (Images), HM_lowres_image (Images), HM_square_002um (Shapes), HM_square_008um (Shapes), HM_square_016um (Shapes)
>> sdata2
SpatialData object
├── Images
│     ├── 'RS_hires_image': DataArray[cyx] (3, 6000, 5163)
│     └── 'RS_lowres_image': DataArray[cyx] (3, 600, 517)
├── Shapes
│     ├── 'RS_square_002um': GeoDataFrame shape: (2493008, 1) (2D shapes)
│     ├── 'RS_square_008um': GeoDataFrame shape: (160049, 1) (2D shapes)
│     └── 'RS_square_016um': GeoDataFrame shape: (41439, 1) (2D shapes)
└── Tables
      ├── 'square_002um': AnnData (2493008, 18085)
      ├── 'square_008um': AnnData (160049, 18085)
      └── 'square_016um': AnnData (41439, 18085)
with coordinate systems:
    ▸ 'downscaled_hires', with elements:
        RS_hires_image (Images), RS_square_002um (Shapes), RS_square_008um (Shapes), RS_square_016um (Shapes)
    ▸ 'downscaled_lowres', with elements:
        RS_lowres_image (Images), RS_square_002um (Shapes), RS_square_008um (Shapes), RS_square_016um (Shapes)
    ▸ 'global', with elements:
        RS_hires_image (Images), RS_lowres_image (Images), RS_square_002um (Shapes), RS_square_008um (Shapes), RS_square_016um (Shapes)
>> sd.concatenate([sdata1, sdata2])
<stdin>:1: UserWarning: Duplicate table names found. Tables will be added with integer suffix. Set `concatenate_tables` to `True` if concatenation is wished for instead.
SpatialData object
├── Images
│     ├── 'HM_hires_image': DataArray[cyx] (3, 5057, 6000)
│     ├── 'HM_lowres_image': DataArray[cyx] (3, 506, 600)
│     ├── 'RS_hires_image': DataArray[cyx] (3, 6000, 5163)
│     └── 'RS_lowres_image': DataArray[cyx] (3, 600, 517)
├── Shapes
│     ├── 'HM_square_002um': GeoDataFrame shape: (2942291, 1) (2D shapes)
│     ├── 'HM_square_008um': GeoDataFrame shape: (187571, 1) (2D shapes)
│     ├── 'HM_square_016um': GeoDataFrame shape: (48206, 1) (2D shapes)
│     ├── 'RS_square_002um': GeoDataFrame shape: (2493008, 1) (2D shapes)
│     ├── 'RS_square_008um': GeoDataFrame shape: (160049, 1) (2D shapes)
│     └── 'RS_square_016um': GeoDataFrame shape: (41439, 1) (2D shapes)
└── Tables
      ├── 'square_002um_0': AnnData (2942291, 18085)
      ├── 'square_002um_1': AnnData (2493008, 18085)
      ├── 'square_008um_0': AnnData (187571, 18085)
      ├── 'square_008um_1': AnnData (160049, 18085)
      ├── 'square_016um_0': AnnData (48206, 18085)
      └── 'square_016um_1': AnnData (41439, 18085)
with coordinate systems:
    ▸ 'downscaled_hires', with elements:
        HM_hires_image (Images), RS_hires_image (Images), HM_square_002um (Shapes), HM_square_008um (Shapes), HM_square_016um (Shapes), RS_square_002um (Shapes), RS_square_008um (Shapes), RS_square_016um (Shapes)
    ▸ 'downscaled_lowres', with elements:
        HM_lowres_image (Images), RS_lowres_image (Images), HM_square_002um (Shapes), HM_square_008um (Shapes), HM_square_016um (Shapes), RS_square_002um (Shapes), RS_square_008um (Shapes), RS_square_016um (Shapes)
    ▸ 'global', with elements:
        HM_hires_image (Images), HM_lowres_image (Images), RS_hires_image (Images), RS_lowres_image (Images), HM_square_002um (Shapes), HM_square_008um (Shapes), HM_square_016um (Shapes), RS_square_002um (Shapes), RS_square_008um (Shapes), RS_square_016um (Shapes)

Originally posted by @ddiez in #212

主要语言
Python
星标
103
派生
64
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

scverse/spatialdata-io 的其他 Issue

查看 scverse/spatialdata-io 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。