본문으로 건너뛰기
cccskills
무료GitHub에 공개

bioconductor-hoodscanr

hoodscanR is an user-friendly R package providing functions to assist cellular neighborhood analysis of any spatial transcriptomics data with single-cell resolution. All functions in the package are built based on the SpatialExperiment object, allowing integration into various spatial transcriptomics-related packages from Bioconductor. The package can result in cell-level neighborhood annotation output, along with funtions to perform neighborhood colocalization analysis and neighborhood-based ce

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

hoodscanR

Workflows

Standard Workflow

Perform cellular neighborhood scanning, colocalization analysis, and neighborhood-based clustering on single-cell spatial transcriptomics data.

library(hoodscanR)
library(SpatialExperiment)
library(scico)

# 1. Read the input SpatialExperiment object
data("spe_test")
spe <- readHoodData(spe, anno_col = "celltypes")

# 2. Visualize cell positions and annotations
plotTissue(spe, color = cell_annotation, size = 1.5, alpha = 0.8)

# 3. Identify nearest neighbor cells
fnc <- findNearCells(spe, k = 100)

# 4. Calculate neighborhood association probabilities
pm <- scanHoods(fnc$distance)

# 5. Merge probabilities by cell type groups
hoods <- mergeByGroup(pm, fnc$cells)

# 6. Visualize neighborhood probabilities
plotHoodMat(hoods, n = 10, hm_height = 5)

# 7. Merge neighborhood results back into the SpatialExperiment object
spe <- mergeHoodSpe(spe, hoods)

# 8. Calculate neighborhood entropy and perplexity and visualize
spe <- calcMetrics(spe, pm_cols = colnames(hoods))
plotTissue(spe, size = 1.5, color = perplexity) + scale_color_scico(palette = "tokyo")

# 9. Perform neighborhood colocalization analysis
plotColocal(spe, pm_cols = colnames(hoods))

# 10. Cluster cells by neighborhood probability distribution
spe <- clustByHood(spe, pm_cols = colnames(hoods), k = 10)

# 11. Visualize cluster probability distributions and spatial clusters
plotProbDist(spe, pm_cols = colnames(hoods), by_cluster = TRUE, plot_all = TRUE, show_clusters = as.character(seq(10)))
plotTissue(spe, color = clusters)

Input/Output Note: Inputs a SpatialExperiment object with cell-type annotations; outputs an updated SpatialExperiment containing neighborhood probabilities, entropy, perplexity, and neighborhood-based cluster assignments.

When to Use

  • To perform cellular neighborhood analysis on single-cell resolution spatial transcriptomics data using SpatialExperiment objects.
  • To calculate the probability of each cell associating with its spatial neighbors using scanHoods().
  • To analyze and visualize cell-type colocalization patterns across a tissue slide using plotColocal().
  • To cluster cells based on their local neighborhood composition using clustByHood().

When NOT to Use

  • For spot-based spatial transcriptomics data (e.g., 10x Visium) without single-cell resolution; use standard SpatialExperiment workflows because hoodscanR is designed for single-cell resolution data.
  • For standard non-spatial single-cell RNA-seq analysis; use scran or Seurat because hoodscanR requires spatial coordinates (x and y).
  • For cell-type deconvolution of spatial spots; use RCTD because hoodscanR assumes cells are already annotated with cell types.

Data Requirements

  • Input format: A SpatialExperiment object.
  • Structure: Must contain spatial coordinates (accessible via spatialCoords) and cell-type annotations in colData (specified via anno_col in readHoodData()).

Key Parameters

  • anno_col (NULL): Character string specifying the column name in colData containing cell-type annotations.
  • k (100): The number of nearest neighbor cells to identify in findNearCells().
  • n (10): Number of random cells to plot in plotHoodMat().
  • targetCells (NULL): Vector of specific cell IDs to plot in plotHoodMat().
  • pm_cols (NULL): Column names of the probability matrix to use for metric calculation or clustering.

Best Practices

  • Format the input SpatialExperiment object using readHoodData() to ensure compatibility with all package functions.
  • Use perplexity rather than entropy for a more intuitive measure of neighborhood mixture (e.g., perplexity of 2 indicates a 50/50 mix of two neighborhoods).
  • Set k = 100 in findNearCells() as a robust starting point for capturing local cellular neighborhoods.
  • Visualize neighborhood probability distributions within each cluster using plotProbDist() to interpret the biological meaning of the clusters.

Common Pitfalls

  • Mismatched cell-type annotation column: Occurs if anno_col is not correctly specified in readHoodData(). Fix: Verify the column name in colData(spe) and pass it exactly to readHoodData(spe, anno_col = "your_column").
  • Slow neighbor search on large datasets: Occurs when searching for very large values of k. Fix: Keep k at a reasonable size (e.g., 50 to 100) since the underlying search uses the fast Approximate Near Neighbor (ANN) algorithm.

Alternatives

  • Seurat: For spatial data visualization and clustering, though lacking the specific softmax-based neighborhood probability modeling.
  • Giotto: For comprehensive spatial analysis, including neighborhood enrichment and cell-to-cell interaction.
  • squidpy: For spatial neighbor graph analysis (Python-based).

Citations

  • Liu, N. and Davis, M. (2026), hoodscanR.

References

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

The package contains functions for exploratory oligonucleotide array analysis. The dependence on tkWidgets only concerns few convenience functions. 'affy' is fully functional without it.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

bioMate-AI/biomate-bioconductor-kb7972026년 6월 21일 업데이트

This tool uses the label-tree function from HyPhy to annotate a phylogenetic tree. It allows users to select a subset of leaves using either a regular expression or a list of sequence names, and then apply a specified label to these selecte

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

bioMate-AI/biomate-bioconductor-kb7972026년 6월 21일 업데이트

This package provides a client for the Bioconductor AnnotationHub web resource. The AnnotationHub web resource provides a central location where genomic files (e.g., VCF, bed, wig) and other resources from standard locations (e.g., UCSC, En

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

bioMate-AI/biomate-bioconductor-kb7972026년 6월 21일 업데이트

apeglm provides Bayesian shrinkage estimators for effect sizes for a variety of GLM models, using approximation of the posterior for individual coefficients.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

bioMate-AI/biomate-bioconductor-kb7972026년 6월 21일 업데이트

ASURAT is a software for single-cell data analysis. Using ASURAT, one can simultaneously perform unsupervised clustering and biological interpretation in terms of cell type, disease, biological process, and signaling pathway activity. Inputting a single-cell RNA-seq data and knowledge-based databases, such as Cell Ontology, Gene Ontology, KEGG, etc., ASURAT transforms gene expression tables into original multivariate tables, termed sign-by-sample matrices (SSMs).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

bioMate-AI/biomate-bioconductor-kb7972026년 6월 21일 업데이트

AUCell allows to identify cells with active gene sets (e.g. signatures, gene modules...) in single-cell RNA-seq data. AUCell uses the "Area Under the Curve" (AUC) to calculate whether a critical subset of the input gene set is enriched with

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

bioMate-AI/biomate-bioconductor-kb7972026년 6월 21일 업데이트

bioMate-AI의 스킬 모두 보기

이 스킬의 문제 신고