deeptools by davila7/claude-code-templates
npx skills add https://github.com/davila7/claude-code-templates --skill deeptoolsdeepTools 是一套全面的 Python 命令行工具集,专为处理和分析高通量测序数据而设计。使用 deepTools 可以执行质量控制、数据标准化、样本比较,并为 ChIP-seq、RNA-seq、ATAC-seq、MNase-seq 及其他 NGS 实验生成可用于发表的图表。
核心功能:
在以下情况应使用此技能:
对于 deepTools 的新用户,请从文件验证和常见工作流程开始:
在运行任何分析之前,使用验证脚本验证 BAM、bigWig 和 BED 文件:
python scripts/validate_files.py --bam sample1.bam sample2.bam --bed regions.bed
这将检查文件是否存在、BAM 索引以及格式正确性。
对于标准分析,使用工作流程生成器创建自定义脚本:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# 列出可用工作流程
python scripts/workflow_generator.py --list
# 生成 ChIP-seq QC 工作流程
python scripts/workflow_generator.py chipseq_qc -o qc_workflow.sh \
--input-bam Input.bam --chip-bams "ChIP1.bam ChIP2.bam" \
--genome-size 2913022398
# 使其可执行并运行
chmod +x qc_workflow.sh
./qc_workflow.sh
查看 assets/quick_reference.md 获取常用命令和参数。
uv pip install deeptools
deepTools 工作流程通常遵循以下模式:QC → 标准化 → 比较/可视化
当用户请求 ChIP-seq QC 或质量评估时:
scripts/workflow_generator.py chipseq_qc结果解读:
完整工作流程详情见 references/workflows.md → "ChIP-seq 质量控制工作流程"
用于从 BAM 到可视化的完整 ChIP-seq 分析:
使用 scripts/workflow_generator.py chipseq_analysis 生成模板。
完整命令序列见 references/workflows.md → "ChIP-seq 分析工作流程"
用于链特异性 RNA-seq 覆盖度轨迹:
使用 bamCoverage 配合 --filterRNAstrand 来分离正链和反链。
重要提示: 对于 RNA-seq,切勿使用 --extendReads(会延伸跨越剪接连接点)。
使用标准化:固定 bin 使用 CPM,基因水平分析使用 RPKM。
可用模板:scripts/workflow_generator.py rnaseq_coverage
详情见 references/workflows.md → "RNA-seq 覆盖度工作流程"
ATAC-seq 需要 Tn5 偏移校正:
--ATACshift模板:scripts/workflow_generator.py atacseq
完整工作流程见 references/workflows.md → "ATAC-seq 工作流程"
将 BAM 转换为标准化覆盖度:
bamCoverage --bam input.bam --outFileName output.bw \
--normalizeUsing RPGC --effectiveGenomeSize 2913022398 \
--binSize 10 --numberOfProcessors 8
比较两个样本(log2 比值):
bamCompare -b1 treatment.bam -b2 control.bam -o ratio.bw \
--operation log2 --scaleFactorsMethod readCount
关键工具: bamCoverage, bamCompare, multiBamSummary, multiBigwigSummary, correctGCBias, alignmentSieve
完整参考:references/tools_reference.md → "BAM 和 bigWig 文件处理工具"
检查 ChIP 富集:
plotFingerprint -b input.bam chip.bam -o fingerprint.png \
--extendReads 200 --ignoreDuplicates
样本相关性:
multiBamSummary bins --bamfiles *.bam -o counts.npz
plotCorrelation -in counts.npz --corMethod pearson \
--whatToShow heatmap -o correlation.png
关键工具: plotFingerprint, plotCoverage, plotCorrelation, plotPCA, bamPEFragmentSize
完整参考:references/tools_reference.md → "质量控制工具"
在 TSS 周围创建热图:
# 计算矩阵
computeMatrix reference-point -S signal.bw -R genes.bed \
-b 3000 -a 3000 --referencePoint TSS -o matrix.gz
# 生成热图
plotHeatmap -m matrix.gz -o heatmap.png \
--colorMap RdBu --kmeans 3
创建谱线图:
plotProfile -m matrix.gz -o profile.png \
--plotType lines --colors blue red
关键工具: computeMatrix, plotHeatmap, plotProfile, plotEnrichment
完整参考:references/tools_reference.md → "可视化工具"
选择正确的标准化方法对于有效的比较至关重要。请查阅 references/normalization_methods.md 获取全面指导。
快速选择指南:
标准化方法:
完整解释:references/normalization_methods.md
RPGC 标准化需要有效基因组大小。常用值:
| 生物体 | 组装版本 | 大小 | 用法 |
|---|---|---|---|
| 人类 | GRCh38/hg38 | 2,913,022,398 | --effectiveGenomeSize 2913022398 |
| 小鼠 | GRCm38/mm10 | 2,652,783,500 | --effectiveGenomeSize 2652783500 |
| 斑马鱼 | GRCz11 | 1,368,780,147 | --effectiveGenomeSize 1368780147 |
| 果蝇 | dm6 | 142,573,017 | --effectiveGenomeSize 142573017 |
| 秀丽隐杆线虫 | ce10/ce11 | 100,286,401 | --effectiveGenomeSize 100286401 |
包含读长特异性值的完整表格:references/effective_genome_sizes.md
许多 deepTools 命令共享这些选项:
性能:
--numberOfProcessors, -p:启用并行处理(始终使用可用核心)--region:处理特定区域进行测试(例如 chr1:1-1000000)读取过滤:
--ignoreDuplicates:移除 PCR 重复(建议用于大多数分析)--minMappingQuality:按比对质量过滤(例如 --minMappingQuality 10)--minFragmentLength / --maxFragmentLength:片段长度边界--samFlagInclude / --samFlagExclude:SAM 标志过滤读取处理:
--extendReads:延伸至片段长度(ChIP-seq:是,RNA-seq:否)--centerReads:在片段中点居中,以获得更清晰的信号始终首先验证文件 使用 scripts/validate_files.py 检查:
--region chr1:1-10000000 进行参数测试--extendReads 200--ignoreDuplicates--ignoreDuplicates--filterRNAstrand forward/reverse--ATACshift--numberOfProcessors 8(或可用核心)BAM 索引缺失:
samtools index input.bam
内存不足: 使用 --region 单独处理染色体:
bamCoverage --bam input.bam -o chr1.bw --region chr1
处理速度慢: 增加 --numberOfProcessors 和/或增加 --binSize
bigWig 文件过大: 增加 bin 大小:--binSize 50 或更大
运行验证脚本以识别问题:
python scripts/validate_files.py --bam *.bam --bed regions.bed
脚本输出中解释了常见错误和解决方案。
此技能包含全面的参考文档:
按类别组织的所有 deepTools 命令的完整文档:
每个工具包括:
何时使用此参考: 用户询问特定工具、参数或详细用法时。
常见分析的完整工作流程示例:
何时使用此参考: 用户需要完整的分析流程或工作流程示例时。
标准化方法的全面指南:
何时使用此参考: 用户询问标准化、比较样本或使用哪种方法时。
有效基因组大小值及用法:
何时使用此参考: 用户需要用于 RPGC 标准化或 GC 偏差校正的基因组大小时。
验证用于 deepTools 分析的 BAM、bigWig 和 BED 文件。检查文件存在性、索引和格式。
用法:
python scripts/validate_files.py --bam sample1.bam sample2.bam \
--bed peaks.bed --bigwig signal.bw
何时使用: 在开始任何分析之前,或在故障排除错误时。
为常见的 deepTools 工作流程生成可定制的 bash 脚本模板。
可用工作流程:
chipseq_qc:ChIP-seq 质量控制chipseq_analysis:完整的 ChIP-seq 分析rnaseq_coverage:链特异性 RNA-seq 覆盖度atacseq:带 Tn5 校正的 ATAC-seq用法:
# 列出工作流程
python scripts/workflow_generator.py --list
# 生成工作流程
python scripts/workflow_generator.py chipseq_qc -o qc.sh \
--input-bam Input.bam --chip-bams "ChIP1.bam ChIP2.bam" \
--genome-size 2913022398 --threads 8
# 运行生成的工作流程
chmod +x qc.sh
./qc.sh
何时使用: 用户请求标准工作流程或需要模板脚本进行自定义时。
快速参考卡,包含最常用的命令、有效基因组大小和典型工作流程模式。
何时使用: 用户需要快速命令示例而无需详细文档时。
scripts/validate_files.py 验证输入文件scripts/workflow_generator.py 生成工作流程模板references/tools_reference.md 中的适当部分"将 BAM 转换为 bigWig":
"检查 ChIP 质量":
"创建热图":
"比较样本":
当用户需要详细信息时:
references/tools_reference.md 中的特定部分references/workflows.md 获取完整的分析流程references/normalization_methods.md 进行方法选择references/effective_genome_sizes.md使用 grep 模式搜索参考:
# 查找工具文档
grep -A 20 "^### toolname" references/tools_reference.md
# 查找工作流程
grep -A 50 "^## Workflow Name" references/workflows.md
# 查找标准化方法
grep -A 15 "^### Method Name" references/normalization_methods.md
用户:"我需要分析我的 ChIP-seq 数据"
响应方法:
用户:"我应该使用哪种标准化?"
响应方法:
references/normalization_methods.md 选择指南用户:"在 TSS 周围创建热图"
响应方法:
--numberOfProcessors 设置为可用核心数--region 进行参数测试每周安装数
117
仓库
GitHub 星标数
22.6K
首次出现
2026 年 1 月 21 日
安全审计
安装于
claude-code101
opencode92
gemini-cli85
cursor85
antigravity81
codex76
deepTools is a comprehensive suite of Python command-line tools designed for processing and analyzing high-throughput sequencing data. Use deepTools to perform quality control, normalize data, compare samples, and generate publication-quality visualizations for ChIP-seq, RNA-seq, ATAC-seq, MNase-seq, and other NGS experiments.
Core capabilities:
This skill should be used when:
For users new to deepTools, start with file validation and common workflows:
Before running any analysis, validate BAM, bigWig, and BED files using the validation script:
python scripts/validate_files.py --bam sample1.bam sample2.bam --bed regions.bed
This checks file existence, BAM indices, and format correctness.
For standard analyses, use the workflow generator to create customized scripts:
# List available workflows
python scripts/workflow_generator.py --list
# Generate ChIP-seq QC workflow
python scripts/workflow_generator.py chipseq_qc -o qc_workflow.sh \
--input-bam Input.bam --chip-bams "ChIP1.bam ChIP2.bam" \
--genome-size 2913022398
# Make executable and run
chmod +x qc_workflow.sh
./qc_workflow.sh
See assets/quick_reference.md for frequently used commands and parameters.
uv pip install deeptools
deepTools workflows typically follow this pattern: QC → Normalization → Comparison/Visualization
When users request ChIP-seq QC or quality assessment:
scripts/workflow_generator.py chipseq_qcInterpreting results:
Full workflow details in references/workflows.md → "ChIP-seq Quality Control Workflow"
For full ChIP-seq analysis from BAM to visualizations:
Use scripts/workflow_generator.py chipseq_analysis to generate template.
Complete command sequences in references/workflows.md → "ChIP-seq Analysis Workflow"
For strand-specific RNA-seq coverage tracks:
Use bamCoverage with --filterRNAstrand to separate forward and reverse strands.
Important: NEVER use --extendReads for RNA-seq (would extend over splice junctions).
Use normalization: CPM for fixed bins, RPKM for gene-level analysis.
Template available: scripts/workflow_generator.py rnaseq_coverage
Details in references/workflows.md → "RNA-seq Coverage Workflow"
ATAC-seq requires Tn5 offset correction:
--ATACshiftTemplate: scripts/workflow_generator.py atacseq
Full workflow in references/workflows.md → "ATAC-seq Workflow"
Convert BAM to normalized coverage:
bamCoverage --bam input.bam --outFileName output.bw \
--normalizeUsing RPGC --effectiveGenomeSize 2913022398 \
--binSize 10 --numberOfProcessors 8
Compare two samples (log2 ratio):
bamCompare -b1 treatment.bam -b2 control.bam -o ratio.bw \
--operation log2 --scaleFactorsMethod readCount
Key tools: bamCoverage, bamCompare, multiBamSummary, multiBigwigSummary, correctGCBias, alignmentSieve
Complete reference: references/tools_reference.md → "BAM and bigWig File Processing Tools"
Check ChIP enrichment:
plotFingerprint -b input.bam chip.bam -o fingerprint.png \
--extendReads 200 --ignoreDuplicates
Sample correlation:
multiBamSummary bins --bamfiles *.bam -o counts.npz
plotCorrelation -in counts.npz --corMethod pearson \
--whatToShow heatmap -o correlation.png
Key tools: plotFingerprint, plotCoverage, plotCorrelation, plotPCA, bamPEFragmentSize
Complete reference: references/tools_reference.md → "Quality Control Tools"
Create heatmap around TSS:
# Compute matrix
computeMatrix reference-point -S signal.bw -R genes.bed \
-b 3000 -a 3000 --referencePoint TSS -o matrix.gz
# Generate heatmap
plotHeatmap -m matrix.gz -o heatmap.png \
--colorMap RdBu --kmeans 3
Create profile plot:
plotProfile -m matrix.gz -o profile.png \
--plotType lines --colors blue red
Key tools: computeMatrix, plotHeatmap, plotProfile, plotEnrichment
Complete reference: references/tools_reference.md → "Visualization Tools"
Choosing the correct normalization is critical for valid comparisons. Consult references/normalization_methods.md for comprehensive guidance.
Quick selection guide:
Normalization methods:
Full explanation: references/normalization_methods.md
RPGC normalization requires effective genome size. Common values:
| Organism | Assembly | Size | Usage |
|---|---|---|---|
| Human | GRCh38/hg38 | 2,913,022,398 | --effectiveGenomeSize 2913022398 |
| Mouse | GRCm38/mm10 | 2,652,783,500 | --effectiveGenomeSize 2652783500 |
| Zebrafish | GRCz11 | 1,368,780,147 | --effectiveGenomeSize 1368780147 |
| Drosophila | dm6 | 142,573,017 | --effectiveGenomeSize 142573017 |
Complete table with read-length-specific values: references/effective_genome_sizes.md
Many deepTools commands share these options:
Performance:
--numberOfProcessors, -p: Enable parallel processing (always use available cores)--region: Process specific regions for testing (e.g., chr1:1-1000000)Read Filtering:
--ignoreDuplicates: Remove PCR duplicates (recommended for most analyses)--minMappingQuality: Filter by alignment quality (e.g., --minMappingQuality 10)--minFragmentLength / --maxFragmentLength: Fragment length bounds--samFlagInclude / --samFlagExclude: SAM flag filteringRead Processing:
--extendReads: Extend to fragment length (ChIP-seq: YES, RNA-seq: NO)--centerReads: Center at fragment midpoint for sharper signalsAlways validate files first using scripts/validate_files.py to check:
--region chr1:1-10000000 for parameter testing--extendReads 200--ignoreDuplicates in most cases--ignoreDuplicates after GC correction--filterRNAstrand forward/reverse for stranded libraries--ATACshift--numberOfProcessors 8 (or available cores)BAM index missing:
samtools index input.bam
Out of memory: Process chromosomes individually using --region:
bamCoverage --bam input.bam -o chr1.bw --region chr1
Slow processing: Increase --numberOfProcessors and/or increase --binSize
bigWig files too large: Increase bin size: --binSize 50 or larger
Run validation script to identify issues:
python scripts/validate_files.py --bam *.bam --bed regions.bed
Common errors and solutions explained in script output.
This skill includes comprehensive reference documentation:
Complete documentation of all deepTools commands organized by category:
Each tool includes:
Use this reference when: Users ask about specific tools, parameters, or detailed usage.
Complete workflow examples for common analyses:
Use this reference when: Users need complete analysis pipelines or workflow examples.
Comprehensive guide to normalization methods:
Use this reference when: Users ask about normalization, comparing samples, or which method to use.
Effective genome size values and usage:
Use this reference when: Users need genome size for RPGC normalization or GC bias correction.
Validates BAM, bigWig, and BED files for deepTools analysis. Checks file existence, indices, and format.
Usage:
python scripts/validate_files.py --bam sample1.bam sample2.bam \
--bed peaks.bed --bigwig signal.bw
When to use: Before starting any analysis, or when troubleshooting errors.
Generates customizable bash script templates for common deepTools workflows.
Available workflows:
chipseq_qc: ChIP-seq quality controlchipseq_analysis: Complete ChIP-seq analysisrnaseq_coverage: Strand-specific RNA-seq coverageatacseq: ATAC-seq with Tn5 correctionUsage:
# List workflows
python scripts/workflow_generator.py --list
# Generate workflow
python scripts/workflow_generator.py chipseq_qc -o qc.sh \
--input-bam Input.bam --chip-bams "ChIP1.bam ChIP2.bam" \
--genome-size 2913022398 --threads 8
# Run generated workflow
chmod +x qc.sh
./qc.sh
When to use: Users request standard workflows or need template scripts to customize.
Quick reference card with most common commands, effective genome sizes, and typical workflow pattern.
When to use: Users need quick command examples without detailed documentation.
scripts/validate_files.pyscripts/workflow_generator.pyreferences/tools_reference.md"Convert BAM to bigWig":
"Check ChIP quality":
"Create heatmap":
"Compare samples":
When users need detailed information:
references/tools_reference.mdreferences/workflows.md for complete analysis pipelinesreferences/normalization_methods.md for method selectionreferences/effective_genome_sizes.mdSearch references using grep patterns:
# Find tool documentation
grep -A 20 "^### toolname" references/tools_reference.md
# Find workflow
grep -A 50 "^## Workflow Name" references/workflows.md
# Find normalization method
grep -A 15 "^### Method Name" references/normalization_methods.md
User: "I need to analyze my ChIP-seq data"
Response approach:
User: "Which normalization should I use?"
Response approach:
references/normalization_methods.md selection guideUser: "Create a heatmap around TSS"
Response approach:
--numberOfProcessors to available cores--region for parameter testingWeekly Installs
117
Repository
GitHub Stars
22.6K
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code101
opencode92
gemini-cli85
cursor85
antigravity81
codex76
Excel财务建模规范与xlsx文件处理指南:专业格式、零错误公式与数据分析
45,000 周安装
Swift Testing异步代码测试指南:axiom-testing-async使用模式与迁移教程
156 周安装
iOS Apple Intelligence 路由器使用指南 - Foundation Models 与 AI 方法分流
157 周安装
ByteRover CLI - 上下文工程平台,为AI编码智能体自动管理项目知识库
154 周安装
嵌入式系统开发指南:RTOS、裸机固件、嵌入式Linux与微控制器编程实战
155 周安装
Markdown转EPUB转换器 - 专业电子书制作工具,支持代码高亮与表格样式
158 周安装
化学品安全与毒理学评估工具 | AI预测毒理学、ADMET分析、基因互作与监管安全数据整合
156 周安装
| C. elegans | ce10/ce11 | 100,286,401 | --effectiveGenomeSize 100286401 |