tooluniverse-spatial-transcriptomics by mims-harvard/tooluniverse
npx skills add https://github.com/mims-harvard/tooluniverse --skill tooluniverse-spatial-transcriptomics对空间分辨转录组学数据进行综合分析,以理解组织架构背景下的基因表达模式。结合表达谱与空间坐标,揭示组织组织结构、细胞间相互作用以及空间可变基因。
触发条件 :
示例问题 :
| 能力 | 描述 |
|---|---|
| 数据导入 | 10x Visium、MERFISH、seqFISH、Slide-seq、STARmap、Xenium 格式 |
| 质量控制 | 点/细胞质量控制、空间对齐验证、组织覆盖度 |
| 标准化 | 考虑组织异质性的空间感知标准化 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 识别具有相似表达谱的空间区域 |
| 空间可变基因 | 寻找具有非随机空间模式的基因 |
| 邻域分析 | 细胞间邻近性、空间邻域、生态位识别 |
| 空间模式 | 梯度、边界、热点、表达波 |
| 整合 | 与 scRNA-seq 合并以进行细胞类型映射 |
| 配体-受体空间分析 | 在组织背景下绘制细胞通讯图 |
| 可视化 | 空间图、组织热图、三维重建 |
| 平台 | 分辨率 | 基因数 | 备注 |
|---|---|---|---|
| 10x Visium | 55微米点(约50个细胞/点) | 全基因组 | 最常见,包含 H&E 图像 |
| MERFISH/seqFISH | 单细胞 | 100-10,000(靶向) | 基于成像,绝对坐标 |
| Slide-seq/V2 | 10微米珠子 | 全基因组 | 分辨率高于 Visium |
| Xenium | 单细胞,亚细胞 | 300+(靶向) | 10x 单细胞空间 |
Input: Spatial Transcriptomics Data + Tissue Image
|
v
Phase 1: Data Import & QC
|-- Load spatial coordinates + expression matrix
|-- Load tissue histology image
|-- Quality control per spot/cell (min 200 genes, 500 UMI, <20% MT)
|-- Align spatial coordinates to tissue
|
v
Phase 2: Preprocessing
|-- Normalization (spatial-aware methods)
|-- Highly variable gene selection (top 2000)
|-- Dimensionality reduction (PCA)
|-- Spatial lag smoothing (optional)
|
v
Phase 3: Spatial Clustering
|-- Build spatial neighbor graph (squidpy)
|-- Graph-based clustering with spatial constraints (Leiden)
|-- Annotate domains with marker genes (Wilcoxon)
|-- Visualize domains on tissue
|
v
Phase 4: Spatial Variable Genes
|-- Test spatial autocorrelation (Moran's I, Geary's C)
|-- Filter significant spatial genes (FDR < 0.05)
|-- Classify pattern types (gradient, hotspot, boundary, periodic)
|
v
Phase 5: Neighborhood Analysis
|-- Define spatial neighborhoods (k-NN, radius)
|-- Calculate neighborhood composition (squidpy nhood_enrichment)
|-- Identify interaction zones between domains
|
v
Phase 6: Integration with scRNA-seq
|-- Cell type deconvolution (Cell2location, Tangram, SPOTlight)
|-- Map cell types to spatial locations
|-- Validate with marker genes
|
v
Phase 7: Spatial Cell Communication
|-- Identify proximal cell type pairs
|-- Query ligand-receptor database (OmniPath)
|-- Score spatial interactions (squidpy ligrec)
|-- Map communication hotspots
|
v
Phase 8: Generate Spatial Report
|-- Tissue overview with domains
|-- Spatially variable genes
|-- Cell type spatial maps
|-- Interaction networks in tissue context
加载平台特定数据(Visium 使用 scanpy read_visium)。应用质量控制过滤器:每个点至少 200 个基因、至少 500 个 UMI、线粒体基因比例最高 20%。通过组织图像叠加验证空间对齐。
标准化至中位总计数,对数转换,选择前 2000 个高变基因。可选通过邻域平均进行空间平滑(对噪声数据有用但会模糊边界)。
PCA(50 个成分)后构建空间邻域图(squidpy)。使用空间约束的 Leiden 聚类产生空间区域。通过 Wilcoxon 秩和检验寻找区域标记基因。
Moran's I 统计量检验空间自相关:I > 0 = 聚集,I ~ 0 = 随机,I < 0 = 棋盘状。按 FDR < 0.05 过滤。将模式分类为梯度、热点、边界或周期性。
邻域富集分析(squidpy)检验细胞类型/区域是否超出随机预期共定位。使用 k-NN 空间图在区域边界识别相互作用区。
细胞类型反卷积将单细胞注释映射到空间点。方法:Cell2location(推荐用于 Visium)、Tangram、SPOTlight。产生每个点的细胞类型比例估计。
结合空间邻近性与配体-受体数据库(OmniPath)。通过近端细胞中 L-R 对的共表达对相互作用评分。绘制相互作用得分峰值的热点图。
完整示例输出请参见 report_template.md。
| 技能 | 用途 | 阶段 |
|---|---|---|
tooluniverse-single-cell | 用于反卷积的 scRNA-seq 参考 | 阶段 6 |
tooluniverse-single-cell (Phase 10) | 用于通讯的 L-R 数据库 | 阶段 7 |
tooluniverse-gene-enrichment | 空间区域的通路富集 | 阶段 3 |
tooluniverse-multi-omics-integration | 与其他组学整合 | 阶段 8 |
使用 HuBMAP 工具发现已发表的空间生物学数据集,用于参考、验证或跨研究比较。
可用性说明 :
HuBMAP_search_datasets、HuBMAP_list_organs和HuBMAP_get_dataset可能未在您的 ToolUniverse 实例中注册。使用前请用tu.list_tools()验证。如果不可用,请使用 OmicsDI (OmicsDI_search_datasets(query="spatial transcriptomics kidney")) 或 CELLxGENE (CELLxGENE_get_cell_metadata) 作为空间数据集发现的可靠替代方案。
| 工具 | 目的 | 关键参数 |
|---|---|---|
HuBMAP_search_datasets | 按器官、检测方法或关键词搜索 HuBMAP 已发表数据集 | organ(代码,例如 "LK"="左肾", "BR"="脑"),dataset_type(例如 "RNAseq", "CODEX", "MALDI"),query(自由文本),limit(默认 10) |
HuBMAP_list_organs | 列出所有器官及其代码和 UBERON ID | (无必需参数) |
HuBMAP_get_dataset | 获取特定数据集的详细元数据 | hubmap_id(例如 "HBM626.FHJD.938") |
器官代码 : LK=左肾, RK=右肾, LI=大肠, SI=小肠, HT=心脏, LV=肝脏, LU=肺, SP=脾脏, TH=胸腺, LY=淋巴结, BL=膀胱, PA=胰腺, SK=皮肤, BR=脑, BM=骨髓, MU=肌肉。
检测类型 : RNAseq, CODEX, MALDI, snATACseq, LC-MS, scRNAseq-10xGenomics-v3, 等。
何时使用 :
如果 HuBMAP 工具不可用时的备用方案 :
# 使用 OmicsDI 进行空间数据集发现
result = tu.tools.OmicsDI_search_datasets(query="spatial transcriptomics kidney Visium")
# 使用 CELLxGENE 获取细胞水平表达背景
result = tu.tools.CELLxGENE_get_cell_metadata(tissue="kidney")
# 示例:查找肾脏的空间数据集(如果 HuBMAP 工具可用)
result = tu.tools.HuBMAP_search_datasets(organ="LK", limit=5)
# 返回: {data: {total, returned, datasets: [{hubmap_id, title, dataset_type, organ, doi_url, ...}]}}
# 示例:获取所有可用器官
organs = tu.tools.HuBMAP_list_organs()
# 返回: {data: {total, organs: [{code, term, organ_uberon, rui_supported}]}}
问题 : "绘制肿瘤、免疫和基质细胞的空间组织图" 工作流程 : 加载 Visium -> 质量控制 -> 空间聚类 -> 反卷积 -> 相互作用区 -> L-R 分析 -> 报告
问题 : "识别发育组织中的空间基因表达梯度" 工作流程 : 加载空间数据 -> SVG 分析 -> 分类梯度模式 -> 映射形态发生素 -> 与细胞命运关联 -> 报告
问题 : "自动将脑组织分割成解剖区域" 工作流程 : 加载 Visium 脑数据 -> 高分辨率聚类 -> 与已知区域匹配 -> 使用 Allen 脑图谱验证 -> 报告
| 组件 | 要求 |
|---|---|
| 点/细胞 | 至少 500 个空间位置 |
| 质量控制 | 过滤低质量点,验证对齐 |
| 空间聚类 | 至少一种方法(基于图或空间) |
| 空间基因 | Moran's I 或类似空间检验 |
| 可视化 | 组织图像上的空间图 |
| 报告 | 区域、空间基因、可视化 |
方法 :
平台 :
每周安装次数
129
代码仓库
GitHub 星标数
1.2K
首次出现
2026年2月19日
安全审计
安装于
codex126
gemini-cli125
opencode125
github-copilot124
cursor122
kimi-cli121
Comprehensive analysis of spatially-resolved transcriptomics data to understand gene expression patterns in tissue architecture context. Combines expression profiling with spatial coordinates to reveal tissue organization, cell-cell interactions, and spatially variable genes.
Triggers :
Example Questions :
| Capability | Description |
|---|---|
| Data Import | 10x Visium, MERFISH, seqFISH, Slide-seq, STARmap, Xenium formats |
| Quality Control | Spot/cell QC, spatial alignment verification, tissue coverage |
| Normalization | Spatial-aware normalization accounting for tissue heterogeneity |
| Spatial Clustering | Identify spatial domains with similar expression profiles |
| Spatial Variable Genes | Find genes with non-random spatial patterns |
| Neighborhood Analysis | Cell-cell proximity, spatial neighborhoods, niche identification |
| Spatial Patterns | Gradients, boundaries, hotspots, expression waves |
| Integration | Merge with scRNA-seq for cell type mapping |
| Ligand-Receptor Spatial | Map cell communication in tissue context |
| Visualization | Spatial plots, heatmaps on tissue, 3D reconstruction |
| Platform | Resolution | Genes | Notes |
|---|---|---|---|
| 10x Visium | 55um spots (~50 cells/spot) | Genome-wide | Most common, includes H&E image |
| MERFISH/seqFISH | Single-cell | 100-10,000 (targeted) | Imaging-based, absolute coordinates |
| Slide-seq/V2 | 10um beads | Genome-wide | Higher resolution than Visium |
| Xenium | Single-cell, subcellular | 300+ (targeted) | 10x single-cell spatial |
Input: Spatial Transcriptomics Data + Tissue Image
|
v
Phase 1: Data Import & QC
|-- Load spatial coordinates + expression matrix
|-- Load tissue histology image
|-- Quality control per spot/cell (min 200 genes, 500 UMI, <20% MT)
|-- Align spatial coordinates to tissue
|
v
Phase 2: Preprocessing
|-- Normalization (spatial-aware methods)
|-- Highly variable gene selection (top 2000)
|-- Dimensionality reduction (PCA)
|-- Spatial lag smoothing (optional)
|
v
Phase 3: Spatial Clustering
|-- Build spatial neighbor graph (squidpy)
|-- Graph-based clustering with spatial constraints (Leiden)
|-- Annotate domains with marker genes (Wilcoxon)
|-- Visualize domains on tissue
|
v
Phase 4: Spatial Variable Genes
|-- Test spatial autocorrelation (Moran's I, Geary's C)
|-- Filter significant spatial genes (FDR < 0.05)
|-- Classify pattern types (gradient, hotspot, boundary, periodic)
|
v
Phase 5: Neighborhood Analysis
|-- Define spatial neighborhoods (k-NN, radius)
|-- Calculate neighborhood composition (squidpy nhood_enrichment)
|-- Identify interaction zones between domains
|
v
Phase 6: Integration with scRNA-seq
|-- Cell type deconvolution (Cell2location, Tangram, SPOTlight)
|-- Map cell types to spatial locations
|-- Validate with marker genes
|
v
Phase 7: Spatial Cell Communication
|-- Identify proximal cell type pairs
|-- Query ligand-receptor database (OmniPath)
|-- Score spatial interactions (squidpy ligrec)
|-- Map communication hotspots
|
v
Phase 8: Generate Spatial Report
|-- Tissue overview with domains
|-- Spatially variable genes
|-- Cell type spatial maps
|-- Interaction networks in tissue context
Load platform-specific data (scanpy read_visium for Visium). Apply QC filters: min 200 genes/spot, min 500 UMI/spot, max 20% mitochondrial. Verify spatial alignment with tissue image overlay.
Normalize to median total counts, log-transform, select top 2000 HVGs. Optional spatial smoothing via neighbor averaging (useful for noisy data but blurs boundaries).
PCA (50 components) followed by spatial neighbor graph construction (squidpy). Leiden clustering with spatial constraints yields spatial domains. Find domain markers via Wilcoxon rank-sum test.
Moran's I statistic tests spatial autocorrelation: I > 0 = clustering, I ~ 0 = random, I < 0 = checkerboard. Filter by FDR < 0.05. Classify patterns as gradient, hotspot, boundary, or periodic.
Neighborhood enrichment analysis (squidpy) tests whether cell types/domains are co-localized beyond random expectation. Identify interaction zones at domain boundaries using k-NN spatial graphs.
Cell type deconvolution maps single-cell annotations to spatial spots. Methods: Cell2location (recommended for Visium), Tangram, SPOTlight. Produces cell type fraction estimates per spot.
Combine spatial proximity with ligand-receptor databases (OmniPath). Score interactions by co-expression of L-R pairs in proximal cells. Map hotspots where interaction scores peak.
See report_template.md for full example output.
| Skill | Used For | Phase |
|---|---|---|
tooluniverse-single-cell | scRNA-seq reference for deconvolution | Phase 6 |
tooluniverse-single-cell (Phase 10) | L-R database for communication | Phase 7 |
tooluniverse-gene-enrichment | Pathway enrichment for spatial domains | Phase 3 |
tooluniverse-multi-omics-integration | Integrate with other omics | Phase 8 |
Use HuBMAP tools to discover published spatial biology datasets for reference, validation, or cross-study comparison.
Availability Note :
HuBMAP_search_datasets,HuBMAP_list_organs, andHuBMAP_get_datasetmay not be registered in your ToolUniverse instance. Verify withtu.list_tools()before use. If unavailable, use OmicsDI (OmicsDI_search_datasets(query="spatial transcriptomics kidney")) or CELLxGENE (CELLxGENE_get_cell_metadata) as reliable alternatives for spatial dataset discovery.
| Tool | Purpose | Key Parameters |
|---|---|---|
HuBMAP_search_datasets | Search HuBMAP published datasets by organ, assay, or keyword | organ (code, e.g. "LK"="Left Kidney", "BR"="Brain"), dataset_type (e.g. "RNAseq", "CODEX", "MALDI"), query (free text), limit (default 10) |
HuBMAP_list_organs | List all organs with codes and UBERON IDs | (no required params) |
HuBMAP_get_dataset |
Organ codes : LK=Left Kidney, RK=Right Kidney, LI=Large Intestine, SI=Small Intestine, HT=Heart, LV=Liver, LU=Lung, SP=Spleen, TH=Thymus, LY=Lymph Node, BL=Bladder, PA=Pancreas, SK=Skin, BR=Brain, BM=Bone Marrow, MU=Muscle.
Assay types : RNAseq, CODEX, MALDI, snATACseq, LC-MS, scRNAseq-10xGenomics-v3, and more.
When to use :
Fallback if HuBMAP tools unavailable :
# Use OmicsDI for spatial dataset discovery
result = tu.tools.OmicsDI_search_datasets(query="spatial transcriptomics kidney Visium")
# Use CELLxGENE for cell-level expression context
result = tu.tools.CELLxGENE_get_cell_metadata(tissue="kidney")
# Example: Find spatial datasets for kidney (if HuBMAP tools available)
result = tu.tools.HuBMAP_search_datasets(organ="LK", limit=5)
# Returns: {data: {total, returned, datasets: [{hubmap_id, title, dataset_type, organ, doi_url, ...}]}}
# Example: Get all available organs
organs = tu.tools.HuBMAP_list_organs()
# Returns: {data: {total, organs: [{code, term, organ_uberon, rui_supported}]}}
Question : "Map the spatial organization of tumor, immune, and stromal cells" Workflow : Load Visium -> QC -> Spatial clustering -> Deconvolution -> Interaction zones -> L-R analysis -> Report
Question : "Identify spatial gene expression gradients in developing tissue" Workflow : Load spatial data -> SVG analysis -> Classify gradient patterns -> Map morphogens -> Correlate with cell fate -> Report
Question : "Automatically segment brain tissue into anatomical regions" Workflow : Load Visium brain -> High-resolution clustering -> Match to known regions -> Validate with Allen Brain Atlas -> Report
| Component | Requirement |
|---|---|
| Spots/cells | At least 500 spatial locations |
| QC | Filter low-quality spots, verify alignment |
| Spatial clustering | At least one method (graph-based or spatial) |
| Spatial genes | Moran's I or similar spatial test |
| Visualization | Spatial plots on tissue images |
| Report | Domains, spatial genes, visualizations |
Methods :
Platforms :
Weekly Installs
129
Repository
GitHub Stars
1.2K
First Seen
Feb 19, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex126
gemini-cli125
opencode125
github-copilot124
cursor122
kimi-cli121
Excel财务建模规范与xlsx文件处理指南:专业格式、零错误公式与数据分析
45,000 周安装
Google 表单回复收集技能 - 快速查看和管理表单回复数据
7,300 周安装
Google Drive 大文件查找工具 - 快速识别占用存储空间的文件并优化云端硬盘管理
7,400 周安装
Google Workspace CLI 安排周期性会议教程 - 自动化创建Google日历重复事件
7,400 周安装
Rust最佳实践指南:Apollo GraphQL官方代码审查与性能优化手册
7,400 周安装
Gmail邮件保存到Google文档教程 - Google Workspace CLI自动化存档方案
7,500 周安装
Azure可观测性服务指南:监控、日志、追踪与性能分析工具详解
7,400 周安装
| Get detailed metadata for a specific dataset |
hubmap_id (e.g. "HBM626.FHJD.938") |