scomatic-analysis

Detect somatic mutations in single-cell RNA-seq and ATAC-seq data using the SComatic pipeline.

Updated May 28, 2026
One-click install
npx skills add https://github.com/cpanse/skills --skill scomatic-analysis-cpanse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scomatic-analysis
Source: https://github.com/cpanse/skills/tree/main/single-cell-spatial-general/skills/scomatic-analysis
Command: npx skills add https://github.com/cpanse/skills --skill scomatic-analysis-cpanse

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Detecting somatic mutations in single-cell sequencing data requires a complex multi-step pipeline (BAM splitting, base counting, variant calling, annotation) that is error-prone to configure manually, especially on HPC clusters with SLURM scheduling. ## Core Features & Use Cases - Complete SComatic Pipeline: Runs all four SComatic steps (SplitBam, BaseCellCounter, MergeCounts, BaseCellCalling) plus optional Annovar annotation via SLURM job arrays with dependency chaining. - Downstream Analysis: Calculate tumor mutational burden (TMB) per cell type, fit COSMIC mutation signatures with MutationalPatterns, analyze clonal evolution via VAF distributions, and integrate results into Seurat objects. - FGCZ Integration: Provides SBATCH templates, directory conventions (/srv/GT/analysis/pXXXXX), and delivery commands for FGCZ infrastructure. - Use Case: Given a 10x BAM file and a Seurat object with cell type annotations, submit the full pipeline to SLURM, then compute TMB per cell type and visualize mutation burden on a UMAP. ## Quick Start Ask the agent to run the SComatic pipeline on your BAM file using the cell type assignments exported from your Seurat object, then calculate TMB per cell type.

Frequently Asked Questions about scomatic-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect somatic mutations in single-cell RNA-seq data?

Use the SComatic pipeline: split your BAM by cell type using metadata from a Seurat object, count bases per position, merge counts, then call variants with minimum allele count and VAF filters. Optional Annovar annotation adds gene and clinical context.

How to calculate tumor mutational burden per cell type?

Load the SComatic variant calls (calling.step2.tsv) into R, group by cell type, and divide mutation counts by the callable genome size in megabases. The skill provides tidyverse code to compute and visualize TMB per cell type as a bar chart.

Does SComatic work with scATAC-seq data?

Yes, SComatic supports both scRNA-seq and scATAC-seq data as long as BAM files contain cell barcode (CB) tags. The same four-step pipeline applies, with cell type metadata supplied from your annotation source.

Why does SComatic SplitBam find no cells matching metadata?

This usually means a barcode format mismatch between the BAM CB tags and your metadata file. Check whether barcodes have a -1 suffix, verify the BAM contains CB:Z tags with samtools view, and ensure the metadata TSV has Index and Cell_type columns.

What reference genome and software versions does SComatic require?

SComatic requires Python 3.7+, R 4.5+, samtools 1.10+, bedtools 2.29+, and a reference genome FASTA matching your BAM alignment build (e.g., hg38). R analyses need Seurat 5+, MutationalPatterns, and BSgenome.Hsapiens.UCSC.hg38.

How do I run SComatic on a SLURM cluster?

Use the provided run_scomatic_complete.sh script with a config file defining project ID, BAM path, metadata, reference genome, and cell types. It submits chained SBATCH jobs with dependencies, using array jobs to process cell types in parallel.