Install any skill in seconds. Free to start, no credit card required.
Get Started Free →End-to-end bisulfite sequencing workflow from FASTQ to differentially methylated regions. Covers Bismark alignment, methylation calling, and DMR detection with methylKit. Use when analyzing bisulfite sequencing data.
.claude/skills/bio-workflows-methylation-pipeline/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 105% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 43% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 107% | 0% |
| case-21 | ✓→✓ | = Same ✓ | 121% | 0% |
| case-22 | ✓→✓ | = Same ✓ | 373% | 0% |
<!--
#
#
-->
Complete workflow from bisulfite sequencing FASTQ to differentially methylated regions.
FASTQ files
|
v
[1. QC & Trimming] -----> fastp/Trim Galore
|
v
[2. Alignment] ---------> Bismark
|
v
[3. Deduplication] -----> deduplicate_bismark
|
v
[4. Methylation Calling] -> bismark_methylation_extractor
|
v
[5. Analysis] -----------> methylKit (R)
|
v
[6. DMR Detection] ------> methylKit/DSS
|
v
Differentially methylated regionsbash# Trim Galore recommended for bisulfite data (handles adapter bias) trim_galore --paired --fastqc \ -o trimmed/ \ sample_R1.fastq.gz sample_R2.fastq.gz # Or fastp with conservative settings fastp -i sample_R1.fastq.gz -I sample_R2.fastq.gz \ -o trimmed/sample_R1.fq.gz -O trimmed/sample_R2.fq.gz \ --detect_adapter_for_pe \ --qualified_quality_phred 20 \ --length_required 35 \ --html qc/sample_fastp.html
bash# Prepare genome (once) bismark_genome_preparation --bowtie2 genome/ # Align bismark --genome genome/ \ -1 trimmed/sample_R1_val_1.fq.gz \ -2 trimmed/sample_R2_val_2.fq.gz \ -o aligned/ \ --parallel 4 \ --temp_dir tmp/ # Output: sample_R1_val_1_bismark_bt2_pe.bam
QC Checkpoint: Check Bismark report
bashdeduplicate_bismark \ --bam \ -p \ -o deduplicated/ \ aligned/sample_R1_val_1_bismark_bt2_pe.bam
bashbismark_methylation_extractor \ --paired-end \ --comprehensive \ --bedGraph \ --cytosine_report \ --genome_folder genome/ \ -o methylation/ \ deduplicated/sample_R1_val_1_bismark_bt2_pe.deduplicated.bam # Generate summary report bismark2report bismark2summary
rlibrary(methylKit) # Read methylation calls files <- list( 'methylation/control_1.CpG_report.txt', 'methylation/control_2.CpG_report.txt', 'methylation/treated_1.CpG_report.txt', 'methylation/treated_2.CpG_report.txt' ) sample_ids <- c('control_1', 'control_2', 'treated_1', 'treated_2') treatment <- c(0, 0, 1, 1) # Read cytosine reports meth_obj <- methRead( location = as.list(files), sample.id = as.list(sample_ids), assembly = 'hg38', treatment = treatment, context = 'CpG', pipeline = 'bismarkCytosineReport' ) # Filter by coverage meth_filtered <- filterByCoverage(meth_obj, lo.count = 10, hi.perc = 99.9) # Normalize coverage meth_norm <- normalizeCoverage(meth_filtered) # Merge samples (keep sites covered in all) meth_merged <- unite(meth_norm, destrand = TRUE) # Sample statistics getMethylationStats(meth_obj[[1]], plot = TRUE) getCoverageStats(meth_obj[[1]], plot = TRUE)
r# Calculate differential methylation (per CpG) diff_meth <- calculateDiffMeth(meth_merged) # Get significant DMCs dmc <- getMethylDiff(diff_meth, difference = 25, qvalue = 0.01) # Tile into regions (DMRs) tiles <- tileMethylCounts(meth_merged, win.size = 1000, step.size = 1000) diff_tiles <- calculateDiffMeth(tiles) dmr <- getMethylDiff(diff_tiles, difference = 25, qvalue = 0.01) # Export write.csv(as.data.frame(dmc), 'dmc_results.csv') write.csv(as.data.frame(dmr), 'dmr_results.csv') # Annotate with genomic features library(genomation) gene_obj <- readTranscriptFeatures('genes.bed') annotateWithGeneParts(as(dmr, 'GRanges'), gene_obj)
| Step | Parameter | Value | |------|-----------|-------| | Trim Galore | default | Recommended for BS-seq | | Bismark | --parallel | 4 (per sample parallelization) | | methylKit | lo.count | 10 (minimum coverage) | | methylKit | difference | 25 (% methylation difference) | | methylKit | qvalue | 0.01 | | DMR tiles | win.size | 500-1000 bp |
| Issue | Likely Cause | Solution | |-------|--------------|----------| | Low mapping rate | Normal for BS-seq | Expect 40-70% | | Low conversion | Failed bisulfite treatment | Check spike-in controls | | Few DMRs | Low coverage, small differences | Increase sequencing, relax thresholds | | Biased positions | M-bias | Trim 10bp from read ends |
bash#!/bin/bash set -e THREADS=4 GENOME="genome/" SAMPLES="control_1 control_2 treated_1 treated_2" OUTDIR="methylation_results" mkdir -p ${OUTDIR}/{trimmed,aligned,deduplicated,methylation,qc} # Step 1: QC for sample in $SAMPLES; do trim_galore --paired --fastqc -o ${OUTDIR}/trimmed/ \ ${sample}_R1.fastq.gz ${sample}_R2.fastq.gz done # Step 2: Alignment for sample in $SAMPLES; do bismark --genome ${GENOME} \ -1 ${OUTDIR}/trimmed/${sample}_R1_val_1.fq.gz \ -2 ${OUTDIR}/trimmed/${sample}_R2_val_2.fq.gz \ -o ${OUTDIR}/aligned/ \ --parallel ${THREADS} --temp_dir tmp/ done # Step 3: Deduplication for sample in $SAMPLES; do deduplicate_bismark --bam -p \ -o ${OUTDIR}/deduplicated/ \ ${OUTDIR}/aligned/${sample}_R1_val_1_bismark_bt2_pe.bam done # Step 4: Methylation calling for sample in $SAMPLES; do bismark_methylation_extractor --paired-end --comprehensive \ --bedGraph --cytosine_report \ --genome_folder ${GENOME} \ -o ${OUTDIR}/methylation/ \ ${OUTDIR}/deduplicated/${sample}_R1_val_1_bismark_bt2_pe.deduplicated.bam done bismark2report echo "Pipeline complete. Run R script for DMR analysis."
<!-- AUTHOR_SIGNATURE: 9a7f3c2e-MD-BABU-MIA-2026-MSSM-SECURE -->
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-21 | pass→pass | 11,435 | 13,323 | +17% | 1 | 1 | 0% | 2,044 | 4,518 | +121% | 0 | 0 | — |
case-22 | pass→pass | 3,643 | 3,346 | -8% | 1 | 1 | 0% | 565 | 2,671 | +373% | 0 | 0 | — |
case-19 | pass→pass | 11,596 | 7,794 | -33% | 1 | 1 | 0% | 1,895 | 3,518 | +86% | 0 | 0 | — |
case-20 | pass→pass | 14,325 | 10,597 | -26% | 1 | 1 | 0% | 2,626 | 4,004 | +52% | 0 | 0 | — |
case-14 | pass→pass | 3,344 | 2,214 | -34% | 1 | 1 | 0% | 562 | 2,447 | +335% | 0 | 0 | — |
case-01 | pass→pass | 16,830 | 12,438 | -26% | 1 | 1 | 0% | 3,767 | 4,859 | +29% | 0 | 0 | — |
case-02 | pass→pass | 16,518 | 13,720 | -17% | 1 | 1 | 0% | 2,885 | 4,483 | +55% | 0 | 0 | — |
case-03 | fail→pass | 6,878 | 3,136 | -54% | 1 | 1 | 0% | 1,328 | 2,720 | +105% | 0 | 0 | — |
case-04 | fail→fail | 14,527 | 8,268 | -43% | 1 | 1 | 0% | 2,485 | 3,504 | +41% | 0 | 0 | — |
case-05 | pass→pass | 8,107 | 3,620 | -55% | 1 | 1 | 0% | 1,495 | 2,704 | +81% | 0 | 0 | — |
case-06 | pass→pass | 5,710 | 4,068 | -29% | 1 | 1 | 0% | 1,100 | 2,883 | +162% | 0 | 0 | — |
case-07 | pass→pass | 6,531 | 3,782 | -42% | 1 | 1 | 0% | 1,259 | 2,761 | +119% | 0 | 0 | — |
case-08 | pass→pass | 10,721 | 6,462 | -40% | 1 | 1 | 0% | 2,027 | 3,249 | +60% | 0 | 0 | — |
case-09 | pass→pass | 8,469 | 4,920 | -42% | 1 | 1 | 0% | 1,400 | 2,928 | +109% | 0 | 0 | — |
case-10 | pass→pass | 12,468 | 7,063 | -43% | 1 | 1 | 0% | 2,384 | 3,431 | +44% | 0 | 0 | — |
case-11 | fail→pass | 11,434 | 4,868 | -57% | 1 | 1 | 0% | 2,120 | 3,027 | +43% | 0 | 0 | — |
case-12 | pass→pass | 7,569 | 6,462 | -15% | 1 | 1 | 0% | 1,532 | 3,359 | +119% | 0 | 0 | — |
case-13 | pass→pass | 11,975 | 9,753 | -19% | 1 | 1 | 0% | 2,023 | 3,768 | +86% | 0 | 0 | — |
case-15 | pass→pass | 7,709 | 4,982 | -35% | 1 | 1 | 0% | 1,400 | 2,958 | +111% | 0 | 0 | — |
case-16 | fail→pass | 11,268 | 9,608 | -15% | 1 | 1 | 0% | 1,797 | 3,716 | +107% | 0 | 0 | — |
case-17 | pass→pass | 4,552 | 3,052 | -33% | 1 | 1 | 0% | 797 | 2,684 | +237% | 0 | 0 | — |
case-18 | pass→pass | 17,126 | 6,639 | -61% | 1 | 1 | 0% | 3,016 | 3,375 | +12% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +14 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 7/24/2026 | +23% |
Other measured skills in the registry, with their headline benchmark lift.