bio-metabolomics-targeted-analysis
Targeted metabolomics analysis using MRM/SRM with standard curves. Covers absolute quantification, method validation, and quality assessment. Use when quantifying specific metabolites using calibration curves and internal standards.
Best use case
bio-metabolomics-targeted-analysis is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Targeted metabolomics analysis using MRM/SRM with standard curves. Covers absolute quantification, method validation, and quality assessment. Use when quantifying specific metabolites using calibration curves and internal standards.
Teams using bio-metabolomics-targeted-analysis should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/bio-metabolomics-targeted-analysis/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How bio-metabolomics-targeted-analysis Compares
| Feature / Agent | bio-metabolomics-targeted-analysis | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Targeted metabolomics analysis using MRM/SRM with standard curves. Covers absolute quantification, method validation, and quality assessment. Use when quantifying specific metabolites using calibration curves and internal standards.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agent for Product Research
Browse AI agent skills for product research, competitive analysis, customer discovery, and structured product decision support.
AI Agent for SaaS Idea Validation
Use AI agent skills for SaaS idea validation, market research, customer discovery, competitor analysis, and documenting startup hypotheses.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
SKILL.md Source
## Version Compatibility
Reference examples tested with: ggplot2 3.5+, matplotlib 3.8+, numpy 1.26+, pandas 2.2+, scikit-learn 1.4+, scipy 1.12+, xcms 4.0+
Before using code patterns, verify installed versions match. If versions differ:
- Python: `pip show <package>` then `help(module.function)` to check signatures
- R: `packageVersion('<pkg>')` then `?function_name` to verify parameters
If code throws ImportError, AttributeError, or TypeError, introspect the installed
package and adapt the example to match the actual API rather than retrying.
# Targeted Metabolomics Analysis
**"Quantify specific metabolites from my MRM data"** → Perform absolute quantification using calibration curves, internal standards, and quality assessment for targeted metabolomics.
- CLI: Skyline for peak integration and export
- Python/R: calibration curve fitting and sample quantification
## Skyline Data Export Processing
```r
library(tidyverse)
# Load Skyline export
skyline_data <- read.csv('skyline_export.csv')
# Expected columns: Replicate, Peptide/Molecule, Area, Concentration (for standards)
colnames(skyline_data)
# Filter to quantifier transitions
quant_data <- skyline_data %>%
filter(Quantitative == TRUE | is.na(Quantitative))
# Pivot to matrix format
intensity_matrix <- quant_data %>%
select(Replicate, Molecule, Area) %>%
pivot_wider(names_from = Replicate, values_from = Area)
```
## Standard Curve Fitting
```r
# Standard curve data
standards <- data.frame(
concentration = c(0, 1, 5, 10, 50, 100, 500, 1000), # nM
area = c(100, 5000, 25000, 50000, 240000, 480000, 2300000, 4500000)
)
# Linear regression (log-log for wide range)
fit_linear <- lm(area ~ concentration, data = standards)
fit_loglog <- lm(log10(area) ~ log10(concentration + 1), data = standards)
# Weighted linear regression (1/x^2 weighting)
fit_weighted <- lm(area ~ concentration, data = standards,
weights = 1 / (standards$concentration + 1)^2)
# R-squared
summary(fit_linear)$r.squared
summary(fit_weighted)$r.squared
# Plot standard curve
ggplot(standards, aes(x = concentration, y = area)) +
geom_point(size = 3) +
geom_smooth(method = 'lm', se = TRUE) +
scale_x_log10() +
scale_y_log10() +
theme_bw() +
labs(title = 'Standard Curve', x = 'Concentration (nM)', y = 'Peak Area')
```
## Calculate Concentrations
```r
calculate_concentration <- function(area, fit, method = 'linear') {
if (method == 'linear') {
coef <- coef(fit)
conc <- (area - coef[1]) / coef[2]
} else if (method == 'loglog') {
coef <- coef(fit)
conc <- 10^((log10(area) - coef[1]) / coef[2]) - 1
}
return(pmax(conc, 0)) # No negative concentrations
}
# Apply to samples
samples <- data.frame(
sample = paste0('Sample', 1:10),
area = c(12000, 45000, 8000, 120000, 35000, 78000, 22000, 95000, 41000, 63000)
)
samples$concentration <- calculate_concentration(samples$area, fit_weighted)
# Account for dilution factor
dilution_factor <- 10
samples$concentration_original <- samples$concentration * dilution_factor
```
## Internal Standard Normalization
```r
# Data with internal standard
data_with_istd <- data.frame(
sample = paste0('Sample', 1:10),
analyte_area = c(12000, 45000, 8000, 120000, 35000, 78000, 22000, 95000, 41000, 63000),
istd_area = c(50000, 52000, 48000, 51000, 49000, 53000, 47000, 50000, 51000, 49000)
)
# Calculate response ratio
data_with_istd$response_ratio <- data_with_istd$analyte_area / data_with_istd$istd_area
# IS-normalized concentration (using IS-corrected standard curve)
istd_conc <- 100 # nM - known ISTD concentration
data_with_istd$concentration <- calculate_concentration(
data_with_istd$response_ratio * istd_conc,
fit_weighted
)
```
## Method Validation Metrics
```r
# Accuracy and precision from QC samples
qc_data <- data.frame(
level = rep(c('Low', 'Medium', 'High'), each = 6),
nominal = rep(c(10, 100, 500), each = 6),
measured = c(
c(9.5, 10.2, 11.1, 9.8, 10.5, 10.0),
c(98, 102, 95, 105, 99, 101),
c(485, 510, 495, 520, 490, 505)
)
)
# Calculate metrics
validation_metrics <- qc_data %>%
group_by(level, nominal) %>%
summarise(
mean = mean(measured),
sd = sd(measured),
cv_percent = sd(measured) / mean(measured) * 100,
accuracy_percent = mean(measured) / nominal * 100,
bias_percent = (mean(measured) - nominal) / nominal * 100,
.groups = 'drop'
)
print(validation_metrics)
# Acceptance criteria
# CV < 15% (< 20% at LLOQ)
# Accuracy 85-115% (80-120% at LLOQ)
```
## Limit of Detection/Quantification
```r
# LOD/LOQ from standard curve
# LOD = 3.3 * (SD of response / slope)
# LOQ = 10 * (SD of response / slope)
# Residual standard deviation
residuals_sd <- sd(residuals(fit_weighted))
slope <- coef(fit_weighted)[2]
LOD <- 3.3 * residuals_sd / slope
LOQ <- 10 * residuals_sd / slope
cat('LOD:', round(LOD, 2), 'nM\n')
cat('LOQ:', round(LOQ, 2), 'nM\n')
# Signal-to-noise based LOD (from blank samples)
blank_areas <- c(100, 120, 95, 110, 105)
LOD_SN <- mean(blank_areas) + 3 * sd(blank_areas)
```
## Multi-Compound Analysis
```r
# Multiple analytes with individual standard curves
analytes <- c('Glucose', 'Lactate', 'Pyruvate', 'Citrate', 'Succinate')
# Store calibration curves
calibrations <- list()
for (analyte in analytes) {
std_data <- standards_all[standards_all$analyte == analyte, ]
calibrations[[analyte]] <- lm(area ~ concentration, data = std_data,
weights = 1 / (std_data$concentration + 1)^2)
}
# Quantify all samples
quantify_sample <- function(sample_data, calibrations) {
results <- data.frame(analyte = names(calibrations))
results$concentration <- sapply(names(calibrations), function(a) {
area <- sample_data$area[sample_data$analyte == a]
calculate_concentration(area, calibrations[[a]])
})
return(results)
}
```
## Python Workflow
**Goal:** Perform absolute quantification of targeted metabolites from LC-MS/MRM data using weighted calibration curves and validation metrics.
**Approach:** Fit weighted linear regression to standard curve data, back-calculate sample concentrations, compute CV and accuracy metrics, and visualize results.
```python
import pandas as pd
import numpy as np
from scipy import stats
from sklearn.linear_model import LinearRegression
import matplotlib.pyplot as plt
# Load data
data = pd.read_csv('targeted_data.csv')
# Standard curve fitting
def fit_standard_curve(concentrations, areas, weighted=True):
X = np.array(concentrations).reshape(-1, 1)
y = np.array(areas)
if weighted:
weights = 1 / (np.array(concentrations) + 1)**2
model = LinearRegression()
model.fit(X, y, sample_weight=weights)
else:
model = LinearRegression()
model.fit(X, y)
r2 = model.score(X, y)
return model, r2
model, r2 = fit_standard_curve(standards['concentration'], standards['area'])
print(f'R² = {r2:.4f}')
# Calculate concentrations
def calculate_conc(areas, model):
return (np.array(areas) - model.intercept_) / model.coef_[0]
samples['concentration'] = calculate_conc(samples['area'], model)
# Validation metrics
def calc_cv(values):
return np.std(values) / np.mean(values) * 100
def calc_accuracy(measured, nominal):
return np.mean(measured) / nominal * 100
# Plot results
fig, axes = plt.subplots(1, 2, figsize=(12, 5))
# Standard curve
axes[0].scatter(standards['concentration'], standards['area'])
x_line = np.linspace(0, max(standards['concentration']), 100)
axes[0].plot(x_line, model.predict(x_line.reshape(-1, 1)), 'r-')
axes[0].set_xlabel('Concentration')
axes[0].set_ylabel('Area')
axes[0].set_title(f'Standard Curve (R² = {r2:.4f})')
# Sample concentrations
axes[1].bar(samples['sample'], samples['concentration'])
axes[1].set_xlabel('Sample')
axes[1].set_ylabel('Concentration')
axes[1].set_title('Sample Quantification')
plt.tight_layout()
plt.savefig('targeted_results.png', dpi=150)
```
## Quality Control
```r
# QC sample tracking
qc_chart <- function(qc_values, target, warning_sd = 2, action_sd = 3) {
mean_val <- mean(qc_values)
sd_val <- sd(qc_values)
ggplot(data.frame(run = 1:length(qc_values), value = qc_values)) +
geom_point(aes(x = run, y = value), size = 3) +
geom_line(aes(x = run, y = value)) +
geom_hline(yintercept = target, color = 'green', linetype = 'solid') +
geom_hline(yintercept = target + warning_sd * sd_val, color = 'orange', linetype = 'dashed') +
geom_hline(yintercept = target - warning_sd * sd_val, color = 'orange', linetype = 'dashed') +
geom_hline(yintercept = target + action_sd * sd_val, color = 'red', linetype = 'dashed') +
geom_hline(yintercept = target - action_sd * sd_val, color = 'red', linetype = 'dashed') +
theme_bw() +
labs(title = 'QC Levey-Jennings Chart', x = 'Run', y = 'Measured Concentration')
}
```
## Export Results
```r
# Final results table
results_final <- data.frame(
sample = samples$sample,
concentration_nM = round(samples$concentration, 2),
concentration_uM = round(samples$concentration / 1000, 4),
cv_percent = round(samples$cv, 1),
qc_flag = ifelse(samples$cv > 20, 'FAIL', 'PASS')
)
write.csv(results_final, 'targeted_results.csv', row.names = FALSE)
```
## Related Skills
- xcms-preprocessing - Peak detection for targeted features
- normalization-qc - QC-based normalization
- statistical-analysis - Group comparisonsRelated Skills
tooluniverse-variant-analysis
Production-ready VCF processing, variant annotation, mutation analysis, and structural variant (SV/CNV) interpretation for bioinformatics questions. Parses VCF files (streaming, large files), classifies mutation types (missense, nonsense, synonymous, frameshift, splice, intronic, intergenic) and structural variants (deletions, duplications, inversions, translocations), applies VAF/depth/quality/consequence filters, annotates with ClinVar/dbSNP/gnomAD/CADD via ToolUniverse, interprets SV/CNV clinical significance using ClinGen dosage sensitivity scores, computes variant statistics, and generates reports. Solves questions like "What fraction of variants with VAF < 0.3 are missense?", "How many non-reference variants remain after filtering intronic/intergenic?", "What is the pathogenicity of this deletion affecting BRCA1?", or "Which dosage-sensitive genes overlap this CNV?". Use when processing VCF files, annotating variants, filtering by VAF/depth/consequence, classifying mutations, interpreting structural variants, assessing CNV pathogenicity, comparing cohorts, or answering variant analysis questions.
tooluniverse-structural-variant-analysis
Comprehensive structural variant (SV) analysis skill for clinical genomics. Classifies SVs (deletions, duplications, inversions, translocations), assesses pathogenicity using ACMG-adapted criteria, evaluates gene disruption and dosage sensitivity, and provides clinical interpretation with evidence grading. Use when analyzing CNVs, large deletions/duplications, chromosomal rearrangements, or any structural variants requiring clinical interpretation.
tooluniverse-spatial-omics-analysis
Computational analysis framework for spatial multi-omics data integration. Given spatially variable genes (SVGs), spatial domain annotations, tissue type, and disease context from spatial transcriptomics/proteomics experiments (10x Visium, MERFISH, DBiTplus, SLIDE-seq, etc.), performs comprehensive biological interpretation including pathway enrichment, cell-cell interaction inference, druggable target identification, immune microenvironment characterization, and multi-modal integration. Produces a detailed markdown report with Spatial Omics Integration Score (0-100), domain-by-domain characterization, and validation recommendations. Uses 70+ ToolUniverse tools across 9 analysis phases. Use when users ask about spatial transcriptomics analysis, spatial omics interpretation, tissue heterogeneity, spatial gene expression patterns, tumor microenvironment mapping, tissue zonation, or cell-cell communication from spatial data.
tooluniverse-proteomics-analysis
Analyze mass spectrometry proteomics data including protein quantification, differential expression, post-translational modifications (PTMs), and protein-protein interactions. Processes MaxQuant, Spectronaut, DIA-NN, and other MS platform outputs. Performs normalization, statistical analysis, pathway enrichment, and integration with transcriptomics. Use when analyzing proteomics data, comparing protein abundance between conditions, identifying PTM changes, studying protein complexes, integrating protein and RNA data, discovering protein biomarkers, or conducting quantitative proteomics experiments.
protein-interaction-network-analysis
Analyze protein-protein interaction networks using STRING, BioGRID, and SASBDB databases. Maps protein identifiers, retrieves interaction networks with confidence scores, performs functional enrichment analysis (GO/KEGG/Reactome), and optionally includes structural data. No API key required for core functionality (STRING). Use when analyzing protein networks, discovering interaction partners, identifying functional modules, or studying protein complexes.
tooluniverse-metabolomics
Comprehensive metabolomics research skill for identifying metabolites, analyzing studies, and searching metabolomics databases. Integrates HMDB (220k+ metabolites), MetaboLights, Metabolomics Workbench, and PubChem. Use when asked to identify or annotate metabolites (HMDB IDs, chemical properties, pathways), retrieve metabolomics study information from MetaboLights (MTBLS*) or Metabolomics Workbench (ST*), search for studies by keywords or disease, or generate comprehensive metabolomics research reports.
tooluniverse-metabolomics-analysis
Analyze metabolomics data including metabolite identification, quantification, pathway analysis, and metabolic flux. Processes LC-MS, GC-MS, NMR data from targeted and untargeted experiments. Performs normalization, statistical analysis, pathway enrichment, metabolite-enzyme integration, and biomarker discovery. Use when analyzing metabolomics datasets, identifying differential metabolites, studying metabolic pathways, integrating with transcriptomics/proteomics, discovering metabolic biomarkers, performing flux balance analysis, or characterizing metabolic phenotypes in disease, drug response, or physiological conditions.
tooluniverse-immune-repertoire-analysis
Comprehensive immune repertoire analysis for T-cell and B-cell receptor sequencing data. Analyze TCR/BCR repertoires to assess clonality, diversity, V(D)J gene usage, CDR3 characteristics, convergence, and predict epitope specificity. Integrate with single-cell data for clonotype-phenotype associations. Use for adaptive immune response profiling, cancer immunotherapy research, vaccine response assessment, autoimmune disease studies, or repertoire diversity analysis in immunology research.
tooluniverse-image-analysis
Production-ready microscopy image analysis and quantitative imaging data skill for colony morphometry, cell counting, fluorescence quantification, and statistical analysis of imaging-derived measurements. Processes ImageJ/CellProfiler output (area, circularity, intensity, cell counts), performs Dunnett's test, Cohen's d effect size, power analysis, Shapiro-Wilk normality tests, two-way ANOVA, polynomial regression, natural spline regression with confidence intervals, and comparative morphometry. Supports CSV/TSV measurement tables, multi-channel fluorescence data, colony swarming assays, and neuron counting datasets. Use when analyzing microscopy measurement data, colony area/circularity, cell count statistics, swarming assays, co-culture ratio optimization, or answering questions about imaging-derived quantitative data.
tooluniverse-crispr-screen-analysis
Comprehensive CRISPR screen analysis for functional genomics. Analyze pooled or arrayed CRISPR screens (knockout, activation, interference) to identify essential genes, synthetic lethal interactions, and drug targets. Perform sgRNA count processing, gene-level scoring (MAGeCK, BAGEL), quality control, pathway enrichment, and drug target prioritization. Use for CRISPR screen analysis, gene essentiality studies, synthetic lethality detection, functional genomics, drug target validation, or identifying genetic vulnerabilities.
statistical-analysis
Statistical analysis toolkit. Hypothesis tests (t-test, ANOVA, chi-square), regression, correlation, Bayesian stats, power analysis, assumption checks, APA reporting, for academic research.
single-trajectory-analysis
Guide to reproducing OmicVerse trajectory workflows spanning PAGA, Palantir, VIA, velocity coupling, and fate scoring notebooks.