SSkilltecabyclaudinhocode
Enviar skill
← Voltar para o catálogo

seurat-skill

Automação

Comprehensive Seurat v5 (R) guide for single-cell RNA-seq and multimodal analysis. Covers installation, standard workflows (Normalize/SCTransform), clustering, integration (CCA/RPCA/Harmony), differential expression (FindMarkers/FindAllMarkers), visualization (DimPlot/FeaturePlot/VlnPlot/DoHeatmap), spatial transcriptomics (Visium/Visium HD/MERFISH/Slide-seq), CITE-seq, ATAC-seq, WNN, cell cycle r

3estrelas
Ver no GitHub ↗Autor: Agents365-aiLicença: MIT

Seurat v5 Skill

Guide for single-cell and multimodal data analysis with Seurat v5 in R. This SKILL.md contains the essential quick reference. Detailed workflows are in references/ files, read the relevant one when you need step-by-step code for a specific analysis.

Update check

Throttle to one check per 24 hours per installation; never mutate the skill directory without explicit user consent.

  1. If <this-skill-dir>/.last_update exists and is less than 24 hours old, skip this step entirely.

  2. Otherwise, fetch the latest tag from upstream:

    git -C <this-skill-dir> ls-remote --tags origin 'v*' 2>/dev/null \
      | awk '{print $2}' | sed 's|refs/tags/||' \
      | sort -V | tail -1
    
  3. Compare with this skill's metadata.version from the frontmatter. If the upstream tag is strictly newer (semver), tell the user one line and ask:

    "A newer version of this skill is available: vX.Y.Z → vA.B.C. Want me to git pull?"

    If they say yes, run git -C <this-skill-dir> pull --ff-only. Refresh .last_update either way so the prompt doesn't repeat for 24 hours.

  4. If upstream is the same or older, refresh .last_update silently and continue.

  5. On any failure (offline, not a git checkout — e.g. ClawHub-installed copy, read-only path, no permission), swallow the error silently and continue with the user's task. Do not mention the failure.

Reference Files

Read the relevant reference file when the user's task matches a topic:

TopicFileWhen to read
Installationreferences/install.mdInstalling Seurat, dependencies, Docker
PBMC 3K Tutorialreferences/pbmc3k-tutorial.mdStandard scRNA-seq workflow end-to-end
Getting Startedreferences/get-started.mdSeurat v5 new features, BPCells
Essential Commandsreferences/essential-commands.mdObject access, metadata, identity, layers
Visualizationreferences/visualization.mdPlotting: DimPlot, FeaturePlot, VlnPlot, DoHeatmap
Advanced Plotsreferences/plotting-advanced.mdInteractive, linked, polygon, spatial image, cluster tree plots
Differential Expressionreferences/de-vignette.mdFindMarkers, FindAllMarkers, DE tests
Integration Introreferences/integration-introduction.mdWhen and why to integrate
Integrationreferences/integration.mdCCA, RPCA, Harmony, scVI integration
Integration RPCAreferences/integration-rpca.mdReciprocal PCA integration
Integration Mappingreferences/integration-mapping.mdLabel transfer, reference mapping
Integration Largereferences/integration-large-datasets.mdScalable integration, sketch-based
SCTransformreferences/sctransform.mdSCTransform normalization workflow
SCTransform v2references/sctransform-v2.mdImproved SCTransform (v2 regularization)
SCTransform Integrationreferences/sctransform-integration.mdIntegration with SCTransform
Merge and Splitreferences/merge.mdMerging/splitting objects and layers
Cell Cyclereferences/cell-cycle.mdCell cycle scoring and regression
Multimodal (CITE-seq)references/multimodal.mdWeighted nearest neighbor, CITE-seq
Multimodal Mappingreferences/multimodal-reference-mapping.mdReference mapping multimodal data
WNNreferences/wnn.mdWeighted nearest neighbor analysis
Hashingreferences/hashing.mdCell hashing, HTODemux, demultiplexing
Mixscapereferences/mixscape.mdPerturb-seq, CRISPR screen analysis
Spatial (Visium)references/spatial.md10x Visium spatial transcriptomics
Spatial (Other)references/spatial-2.mdSlide-seq, MERFISH, STARmap
Visium HDreferences/visiumhd.mdVisium HD high-resolution spatial
ATAC-seqreferences/atacseq-integration.mdscATAC-seq and RNA+ATAC integration
Bridge Integrationreferences/integration-bridge.mdCross-modality bridge integration
Sketch Analysisreferences/sketch-analysis.mdSketch-based analysis for large data
Advanced Clusteringreferences/advanced-clustering.mdLeiden, sub-clustering, spatial stats, identity management
BPCellsreferences/bpcells.mdOn-disk matrices with BPCells
Data Loadingreferences/data-loading.mdRead10X, ReadMtx, Load10X_Spatial, ReadXenium, all Read*/Load*
Dim Reductionreferences/dim-reduction.mdPCA, tSNE, UMAP, CCA, ICA, LDA, SPCA, projection methods
Interactionreferences/interaction.mdInteractive data exploration
Conversionreferences/conversion.mdConvert between Seurat/AnnData/loom/SCE
Parallelizationreferences/parallelization.mdfuture-based parallel processing
COVID Mappingreferences/covid-sctmapping.mdSCTransform mapping example
ParseBio Sketchreferences/parsebio-sketch.mdParseBio data with sketch integration
Extensionsreferences/extensions.mdSignac, SeuratData, SeuratWrappers, Azimuth ecosystem
v4 to v5 Migrationreferences/v4-to-v5-migration.mdAPI changes, parameter renames, removed functions

Quick Reference

Standard Workflow

obj = CreateSeuratObject(counts = counts, project = "my_project", min.cells = 3, min.features = 200)
obj[["percent.mt"]] = PercentageFeatureSet(obj, pattern = "^MT-")
obj = subset(obj, subset = nFeature_RNA > 200 & nFeature_RNA < 2500 & percent.mt < 5)

# Option A: Log-normalize
obj = NormalizeData(obj)
obj = FindVariableFeatures(obj)
obj = ScaleData(obj)

# Option B: SCTransform (replaces the 3 steps above)
obj = SCTransform(obj)

obj = RunPCA(obj)
obj = FindNeighbors(obj, dims = 1:30)
obj = FindClusters(obj, resolution = 0.5)
obj = RunUMAP(obj, dims = 1:30)
DimPlot(obj, reduction = "umap", label = TRUE)

Differential Expression

markers = FindAllMarkers(obj, only.pos = TRUE, min.pct = 0.25, logfc.threshold = 0.25)
markers = FindMarkers(obj, ident.1 = "cluster1", ident.2 = "cluster2")
markers = FindMarkers(obj, ident.1 = "cluster1", test.use = "DESeq2", slot = "counts")

Integration

# v5 layer-based integration
obj[["RNA"]] = split(obj[["RNA"]], f = obj$batch)
obj = NormalizeData(obj)
obj = FindVariableFeatures(obj)
obj = ScaleData(obj)
obj = RunPCA(obj)
obj = IntegrateLayers(obj, method = CCAIntegration, orig.reduction = "pca",
  new.reduction = "integrated.cca")
# Also: RPCAIntegration, HarmonyIntegration, FastMNNIntegration, scVIIntegration
obj = FindNeighbors(obj, reduction = "integrated.cca", dims = 1:30)
obj = FindClusters(obj, resolution = 0.5)
obj = RunUMAP(obj, reduction = "integrated.cca", dims = 1:30)
obj[["RNA"]] = JoinLayers(obj[["RNA"]])

Subsetting

subset(obj, idents = "B")                              # by cluster identity
subset(obj, idents = c("B", "NK"), invert = TRUE)      # exclude clusters
subset(obj, subset = MS4A1 > 2.5)                      # by expression
subset(obj, subset = condition == "treated")            # by metadata
subset(obj, downsample = 100)                           # downsample per cluster

Key Visualization

DimPlot(obj, reduction = "umap", group.by = "celltype", label = TRUE)
FeaturePlot(obj, features = c("CD3D", "MS4A1", "CD8A"))
VlnPlot(obj, features = c("CD3D", "MS4A1"), group.by = "celltype")
DotPlot(obj, features = c("CD3D", "MS4A1", "CD14"), group.by = "celltype")
DoHeatmap(obj, features = top_markers) + NoLegend()
FeatureScatter(obj, feature1 = "nCount_RNA", feature2 = "nFeature_RNA")

Object Access

Cells(obj)                    # cell barcodes
Features(obj)                 # gene names
Idents(obj)                   # active identities
obj[[]]                       # metadata data.frame
obj$nCount_RNA                # single metadata column
Embeddings(obj, "pca")        # PCA embeddings
obj[["RNA"]]$counts           # raw counts (v5 layer)
DefaultAssay(obj)             # current default assay
Layers(obj)                   # list layers
Varia

Como adicionar

/plugin marketplace add Agents365-ai/seurat-skill

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Comentários · Nenhum comentário

Entre para comentar. Entrar

  • Ainda não há comentários. Seja o primeiro.