| name | signac |
| domain | compbio |
| description | R package for chromatin analysis. Use for single-cell ATAC-seq analysis, chromatin accessibility, and integration with Seurat. |
| license | MIT license |
| metadata | {"skill-author":"Eric Yiru"} |
Signac: Chromatin Analysis in R
Overview
Signac is an R package for analyzing single-cell chromatin data, particularly scATAC-seq. It integrates seamlessly with Seurat for combined analysis of gene expression and chromatin accessibility.
When to Use This Skill
This skill should be used when:
- Analyzing single-cell ATAC-seq data
- Performing chromatin accessibility analysis
- Creating gene activity matrices from ATAC
- Integrating with Seurat for multi-modal analysis
- Finding cell type-specific regulatory elements
Quick Start
Installation
install.packages("Signac")
devtools::install_github("satijalab/Signac")
Basic Setup
library(Signac)
library(Seurat)
library(GenomeInfoDb)
library(ggplot2)
Creating Objects
From Fragments
counts <- Read10X_h5(filename = "filtered_peak_bc_matrix.h5")
fragfile <- "atac_v1_pbmc_10k.fragments.tsv.gz"
chrom_assay <- CreateChromatinAssay(
counts = counts,
fragments = fragfile,
min.cells = 10,
min.features = 200
)
pbmc <- CreateSeuratObject(
counts = chrom_assay,
assay = "ATAC"
)
Analysis Workflow
Peak Information
Annotation(pbmc) <- annotations
pbmc <- NucleosomeSignal(pbmc)
pbmc <- TSSEnrichment(pbmc, fast = FALSE)
Dimensionality Reduction
pbmc <- FindTopFeatures(pbmc, min.cells = 10)
pbmc <- RunTFIDF(pbmc)
pbmc <- FindSVD(pbmc, assay = "ATAC")
Clustering
pbmc <- FindNeighbors(pbmc, reduction = "lsi", dims = 2:50)
pbmc <- FindClusters(pbmc, resolution = 0.4)
pbmc <- RunUMAP(pbmc, reduction = "lsi", dims = 2:50)
DimPlot(pbmc, label = TRUE)
Gene Activity
Create Gene Activity Matrix
pbmc <- GeneActivity(
pbmc,
assay = "ATAC"
)
pbmc[["RNA"]] <- CreateAssayObject(counts = pbmc@assays$GeneActivity)
pbmc <- NormalizeData(pbmc, assay = "RNA")
Visualization
FeaturePlot(
pbmc,
features = c("MS4A1", "CD3D"),
assay = "RNA"
)
Integration with RNA
Multi-Modal Integration
rna <- CreateSeuratObject(counts = rna_counts, assay = "RNA")
anchors <- FindIntegrationAnchors(
object.list = list(rna = rna, atac = pbmc),
assay = c("RNA", "ATAC"),
reduction = "cca"
)
combined <- IntegrateData(
anchorset = anchors,
assay = c("RNA", "ATAC")
)
DefaultAssay(combined) <- "integrated"
combined <- ScaleData(combined)
combined <- RunPCA(combined)
combined <- RunUMAP(combined)
Peak Analysis
Find Markers
da_peaks <- FindAllMarkers(
pbmc,
assay = "ATAC",
test.use = "chisq"
)
Coverage Plots
CoveragePlot(
pbmc,
region = "CD4",
extend.upstream = 1000,
extend.downstream = 1000
)
Key Parameters
CreateChromatinAssay
counts: Peak-by-cell matrix
fragments: Fragment file path
min.cells: Minimum cells per peak
min.features: Minimum peaks per cell
Best Practices
- Filter quality cells: Check nucleosome signal and TSS enrichment
- Use correct genome: Ensure annotation matches
- Peak calling: Use appropriate peak caller first (MACS2)
Additional Resources