The goal of SpatialArtifacts is to detect interior and edge artifacts,
such as dry spots caused by incomplete reagent coverage or tissue
handling, in spatial transcriptomics data. The package currently
supports the 10x Genomics Visium and VisiumHD platforms.
If you experience any issues using the package or would like to make a suggestion, please open an issue on the GitHub repository.
To find more information, please visit the documentation website.
terra R package for
handling large datasetsYou can install the latest version of SpatialArtifacts from
Bioconductor with the following code:
if (!requireNamespace("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
BiocManager::install("SpatialArtifacts")
You can install the development version of SpatialArtifacts from GitHub with:
# install.packages("pak")
pak::pak("CambridgeCat13/SpatialArtifacts")
This is a basic example which shows you how to solve a common problem:
library(SpatialArtifacts)
library(SpatialExperiment)
# 1. Detect artifacts
# Option A: Standard Visium (Hexagonal Grid)
# Just specify platform = "visium"
spe <- detectEdgeArtifacts(spe, platform = "visium", qc_metric = "sum_umi")
# Option B: Visium HD (Square Grid)
# Specify platform = "visiumhd" AND the required resolution ("8um" or "16um")
# spe <- detectEdgeArtifacts(spe, platform = "visiumhd", resolution = "8um")
# 2. Classify results (Platform independent)
# Note: For Visium HD, remember to increase min_spots (e.g., min_spots = 400)
spe <- classifyEdgeArtifacts(spe)
# 3. View classification
table(spe$edge_artifact_classification)
A detailed tutorial is available in the package vignette from Bioconductor. A direct link to the tutorial / package vignette is available here.
BiocStyle::CRANpkg('pkgdown').BiocStyle::CRANpkg('devtools') and BiocStyle::CRANpkg('roxygen2').BiocStyle::Biocpkg('biocthis').