Skip to content
Back to skills

Limma

ASecurity

R limma package for microarray and RNA-seq. Use for linear models in differential expression.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 4, 2026
dataexpress

Security analysis

A100/100

Scanned June 4, 2026

npx -y skills add LeoLin990405/r-analytics-skill --skill limma --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Limma?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Limma
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/leolin990405-limma/badge)](https://www.skillsdirectory.com/skills/leolin990405-limma)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: limma
description: R limma package for microarray and RNA-seq. Use for linear models in differential expression.
---

# limma Package

Linear models for microarray and RNA-seq data.

## Microarray Workflow

```r
library(limma)

# Read data
targets <- readTargets("targets.txt")
eset <- read.maimages(targets, source = "agilent")

# Background correction
eset <- backgroundCorrect(eset, method = "normexp")

# Normalize
eset <- normalizeBetweenArrays(eset, method = "quantile")

# Average duplicates
eset <- avereps(eset, ID = eset$genes$ProbeName)
```

## RNA-seq with voom

```r
library(limma)
library(edgeR)

# Create DGEList
dge <- DGEList(counts = counts)
dge <- calcNormFactors(dge)

# Design matrix
design <- model.matrix(~0 + group)

# voom transformation
v <- voom(dge, design, plot = TRUE)

# Fit linear model
fit <- lmFit(v, design)

# Contrasts
contrast <- makeContrasts(Treatment - Control, levels = design)
fit2 <- contrasts.fit(fit, contrast)
fit2 <- eBayes(fit2)

# Results
topTable(fit2, coef = 1, n = Inf)
```

## Results

```r
# Top genes
results <- topTable(fit2, coef = 1, n = Inf)

# Significant genes
sig <- results[results$adj.P.Val < 0.05, ]

# Decide tests
dt <- decideTests(fit2)
summary(dt)
```

## Visualization

```r
# Volcano plot
volcanoplot(fit2, coef = 1, highlight = 10)

# MA plot
plotMA(fit2)

# Venn diagram
vennDiagram(dt)

# Heatmap of top genes
heatmap(v$E[rownames(sig)[1:50], ])
```

## Multiple Comparisons

```r
contrast <- makeContrasts(
  TrtA_vs_Ctrl = TreatmentA - Control,
  TrtB_vs_Ctrl = TreatmentB - Control,
  TrtA_vs_TrtB = TreatmentA - TreatmentB,
  levels = design
)

fit2 <- contrasts.fit(fit, contrast)
fit2 <- eBayes(fit2)

# Results for each contrast
topTable(fit2, coef = "TrtA_vs_Ctrl")
topTable(fit2, coef = "TrtB_vs_Ctrl")
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…