Start a fresh conversation. Replace the highlighted placeholders.
Use bioconductor-nnsvg to filter low-expression and mitochondrial genes, recalculate library factors and logcounts, and rank spatially variable genes for [SpatialExperiment sample with raw counts and spatial coordinates].
Required inputs
[SpatialExperiment sample with raw counts and spatial coordinates]
User-approved starter prompt based on a pinned source version; check current skill requirements before running. Task evidence ↗
SKILL.md
name: bioconductor-nnsvgdescription: Method for scalable identification of spatially variable genes (SVGs) in spatially-resolved transcriptomics data. The method is based on nearest-neighbor Gaussian processes and uses the BRISC algorithm for model fitting and parameter estimation. Allows identification and ranking of SVGs with flexible length scales across a tissue slide or within spatial domains defined by covariates. Scales linearly with the number of spatial locations and can be applied to datasets containing thousands or morewhen_to_use: Use when: Method for scalable identification of spatially variable genes (SVGs) in spatially-resolved transcriptomics data; Single-cell RNA-seq analysis (nnSVG). Not for: Requires R ≥ 4.2 and Bioconductor ≥ 3.16user-invocable: false
nnSVG
Workflows
Standard Workflow
library(SpatialExperiment)
library(nnSVG)
# Filter low-expressed and mitochondrial genes
spe <- filter_genes(spe)
# Calculate logcounts using library size factors
spe <- computeLibraryFactors(spe)
spe <- logNormCounts(spe)
# Run nnSVG to identify spatially variable genes
spe <- nnSVG(spe)
Input: A SpatialExperiment object containing raw counts and spatial coordinates.
Output: A SpatialExperiment object with SVG ranking and statistics stored in rowData.