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

bioconductor-escher

The creation of effective visualizations is a fundamental component of data analysis. In biomedical research, new challenges are emerging to visualize multi-dimensional data in a 2D space, but current data visualization tools have limited capabilities. To address this problem, we leverage Gestalt principles to improve the design and interpretability of multi-dimensional data in 2D data visualizations, layering aesthetics to display multiple variables. The proposed visualization can be applied to

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

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md6.6 KB

SKILL.md(원문)

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

escheR

Workflows

Standard Workflow

Visualize multi-dimensional spatial transcriptomics data from a SpatialExperiment or SingleCellExperiment object by adding layered fill, ground, and symbol aesthetics.

library(escheR)
library(STexampleData)

# 1. Read the input SpatialExperiment object
spe <- Visium_humanDLPFC()
spe <- spe[, spe$in_tissue == 1]
spe <- spe[, !is.na(spe$ground_truth)]

# 2. Create plot and add layered aesthetics
p <- make_escheR(spe) |>
  add_fill(var = "cell_count") |>
  add_ground(var = "ground_truth") |>
  add_symbol(var = "ground_truth", size = 0.2)

# 3. Save the generated plots to the working directory
ggplot2::ggsave(filename = "standard_plot.pdf", plot = p)

Input: A SpatialExperiment object spe. Output: A saved PDF plot showing layered spatial aesthetics.

Binned Spatial Visualization

Visualize high-density spatial transcriptomics data using point binning to avoid overplotting.

library(escheR)
library(STexampleData)

# 1. Read the user input file
spe <- Visium_humanDLPFC()
spe <- spe[, spe$in_tissue == 1]
spe <- spe[, !is.na(spe$ground_truth)]

# 2. Ensure the SpatialExperiment object has the required columns and factor types
spe$counts_MOBP <- counts(spe)[which(rowData(spe)$gene_name == "MOBP"), ]
spe$ground_truth <- factor(spe$ground_truth)

# 3. Create binned plot and save to a PDF file
p <- make_escheR(spe, dimred = "PCA") |>
  add_ground_bin(var = "ground_truth") |>
  add_fill_bin(var = "counts_MOBP") +
  scale_fill_gradient(low = "white", high = "black", name = "MOBP Count") +
  scale_color_discrete(name = "Spatial Domains")

ggplot2::ggsave(filename = "binned_plot.pdf", plot = p)

Input: A SpatialExperiment object spe with PCA reduced dimensions. Output: A saved PDF plot with binned spatial points.

Dataframe Visualization

Visualize multi-dimensional data from a generic R data.frame (e.g., exported from Seurat) using custom x and y coordinates.

library(escheR)

# Create a generic data.frame with coordinates and metadata
df <- data.frame(
  x = c(1, 2, 3),
  y = c(4, 5, 6),
  groups = c("A", "B", "A")
)

# Call generic function for make_escheR.data.frame
p <- make_escheR(object = df, .x = df$x, .y = df$y) |>
  add_fill(var = "groups")

Input: A standard R data.frame with coordinate columns. Output: A ggplot object.

When to Use

  • Visualizing multi-dimensional spatial transcriptomics data (e.g., from 10x Visium, seqFISH, or Slide-seq V2) by layering aesthetics.
  • Plotting dimensionality reduced embeddings (e.g., PCA) from a SpatialExperiment or SingleCellExperiment using make_escheR(spe, dimred = "PCA").
  • Visualizing high-density spatial data using point binning with add_ground_bin() and add_fill_bin().
  • Visualizing spatial or embedding data from a generic R data.frame using make_escheR(object, .x, .y).

When NOT to Use

  • For complex multi-sample joint analysis or alignment, use packages like Seurat or Giotto because escheR operates on single samples by design.
  • For advanced cell-cell communication or spatial ligand-receptor analysis, use specialized packages as escheR is strictly a visualization tool.

Data Requirements

  • Input can be a SpatialExperiment, SingleCellExperiment, or a base R data.frame.
  • For SpatialExperiment, spatial coordinates must be present (e.g., accessed via spatialCoords(spe)).
  • For data.frame input, explicit numeric vectors for x and y coordinates must be provided to .x and .y.

Key Parameters

  • object: The input data object (SpatialExperiment, SingleCellExperiment, or data.frame).
  • dimred (NULL): Name of the reduced dimension slot to use for coordinates instead of spatial coordinates.
  • .x: Numeric vector of x coordinates (for data.frame input).
  • .y: Numeric vector of y coordinates (for data.frame input).
  • var: Character string specifying the column name in colData or data.frame to map to an aesthetic layer.
  • stroke (0.5): Border stroke size for the ground layer.
  • size (0.2): Size of the symbols in the symbol layer.

Best Practices

  • Always apply add_fill() as the first layer before other add_* functions to achieve the best visual effect due to the layering mechanism.
  • When using binning to avoid overplotting, apply add_fill_bin() after add_ground_bin() for a better visualization outcome.
  • Trim down colData(spe) before piping into make_escheR() to reduce computation time, especially when it contains a large number of irrelevant columns.
  • Use minimally overlapping color palettes (e.g., a white-to-black gradient for continuous gene expression and qualitative colors for spatial domains) to avoid visual confusion.

Common Pitfalls

  • Overlapping color spaces: Using default viridis for both fill and ground makes them indistinguishable; fix by using a white-to-black gradient for continuous variables via scale_fill_gradient(low = "white", high = "black").
  • Large number of categories: Visualizing too many categorical levels creates clutter; fix by subsetting levels (setting unwanted to NA) or using add_symbol() to annotate specific levels.
  • Binning membership mixing: Point binning can lead to intermixing of cluster memberships; interpret carefully as the majority membership is selected as the bin label.

Alternatives

  • Seurat for comprehensive single-cell and spatial transcriptomics workflows.
  • scater for single-cell visualization and quality control.
  • scran for single-cell data analysis and variance modeling.

Citations

  • Boyi Guo and Stephanie C. Hicks (2024). escheR: unified multi-dimensional spatial visualizations. Bioinformatics Advances.

References

  • Homepage: bioconductor.org/packages/escheR
  • Vignette: bioconductor.org/packages/release/bioc/vignettes/escheR/inst/doc/escheR.html

리뷰

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

댓글

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

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

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. 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-kb7932026년 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-kb7932026년 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-kb7932026년 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-kb7932026년 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-kb7932026년 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-kb7932026년 6월 21일 업데이트

bioMate-AI의 스킬 모두 보기

이 스킬의 문제 신고