Back to skills
SKILL.md
003 Name Skill Beb58feb
ASecurityStatistical testing for differentially abundant proteins between conditions. Covers limma and MSstats workflows with multiple testing correction. Use when identifying proteins with significant abundance changes between experimental groups.
- 11 stars
- 0 votes
- 0 copies
- 0 views
- Added November 10, 2026
Security analysis
100/100Pro scans all 2 files and shows the line behind each finding
npx -y skills add tools-only/X-Skills --skill 003-name-skill_beb58feb --agent claude-codeAre you the author of 003 Name Skill Beb58feb?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/tools-only-003-name-skill-beb58feb)---
name: bio-proteomics-differential-abundance
description: Statistical testing for differentially abundant proteins between conditions. Covers limma and MSstats workflows with multiple testing correction. Use when identifying proteins with significant abundance changes between experimental groups.
tool_type: mixed
primary_tool: MSstats
---
# Differential Protein Abundance
## MSstats Group Comparison
```r
library(MSstats)
# After dataProcess()
comparison_matrix <- matrix(c(1, -1, 0, 0,
1, 0, -1, 0,
0, 1, -1, 0),
nrow = 3, byrow = TRUE)
rownames(comparison_matrix) <- c('Treatment1-Control', 'Treatment2-Control', 'Treatment1-Treatment2')
colnames(comparison_matrix) <- c('Control', 'Treatment1', 'Treatment2', 'Treatment3')
results <- groupComparison(contrast.matrix = comparison_matrix, data = processed)
# Significant proteins
sig_proteins <- results$ComparisonResult[results$ComparisonResult$adj.pvalue < 0.05 &
abs(results$ComparisonResult$log2FC) > 1, ]
```
## limma for Proteomics
```r
library(limma)
# Log2 intensities matrix (proteins x samples)
design <- model.matrix(~ 0 + condition, data = sample_info)
colnames(design) <- levels(sample_info$condition)
fit <- lmFit(protein_matrix, design)
contrast_matrix <- makeContrasts(Treatment - Control, levels = design)
fit2 <- contrasts.fit(fit, contrast_matrix)
fit2 <- eBayes(fit2)
results <- topTable(fit2, number = Inf, adjust.method = 'BH')
sig_results <- results[results$adj.P.Val < 0.05 & abs(results$logFC) > 1, ]
```
## QFeatures/proDA (Modern Alternative)
```r
library(QFeatures)
library(proDA)
# proDA handles missing values probabilistically
fit <- proDA(protein_matrix, design = ~ condition, data = sample_info)
# Test differential abundance
results <- test_diff(fit, contrast = 'conditionTreatment')
results$adj_pval <- p.adjust(results$pval, method = 'BH')
sig_results <- results[results$adj_pval < 0.05 & abs(results$diff) > 1, ]
```
## Python: scipy/statsmodels
```python
import pandas as pd
import numpy as np
from scipy import stats
from statsmodels.stats.multitest import multipletests
def differential_test(intensities, group1_cols, group2_cols):
results = []
for protein in intensities.index:
g1 = intensities.loc[protein, group1_cols].dropna()
g2 = intensities.loc[protein, group2_cols].dropna()
if len(g1) >= 2 and len(g2) >= 2:
stat, pval = stats.ttest_ind(g1, g2)
log2fc = g2.mean() - g1.mean()
results.append({'protein': protein, 'log2FC': log2fc, 'pvalue': pval})
df = pd.DataFrame(results)
df['adj_pvalue'] = multipletests(df['pvalue'], method='fdr_bh')[1]
return df
# Significance thresholds
sig = results[(results['adj_pvalue'] < 0.05) & (abs(results['log2FC']) > 1)]
```
## Visualization
```r
# Volcano plot
library(ggplot2)
ggplot(results, aes(x = log2FC, y = -log10(adj.P.Val))) +
geom_point(aes(color = significant), alpha = 0.6) +
geom_hline(yintercept = -log10(0.05), linetype = 'dashed') +
geom_vline(xintercept = c(-1, 1), linetype = 'dashed') +
scale_color_manual(values = c('grey', 'red')) +
theme_minimal()
```
## Related Skills
- quantification - Prepare normalized data for testing
- differential-expression/deseq2-basics - Similar concepts for RNA-seq
- data-visualization/specialized-omics-plots - Volcano plots, MA plots
Files in this skill
- README.md
- skill.md
Attribution
Related skills
View all in data →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.