Token导航 LogoToken导航

Agent Skill · 效率

cnv-caller-plotter(cnv 调用绘图仪)

cnv-caller-plotter 用于补充效率相关能力,适合在 OpenClaw 中需要让 Agent 承接效率相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

cnv-caller-plotter 是效率类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为只读;许可证为 MIT-0,第三方扫描有提醒项,按安装量在效率类的 21,003 个 Skill 里排第 9,346。

总安装 6,120周安装 250GitHub Stars 公开资料未说明下载 1,980核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
0.1.0

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cnv-caller-plotter(cnv 调用绘图仪)
来源仓库:https://github.com/aipoch-ai/cnv-caller-plotter
安装命令:
openclaw skills install cnv-caller-plotter
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install cnv-caller-plotter

这个 Skill 是做什么的

效率类 Skill 把重复的整理、汇总、转换工作交给助手完成,减少手工复制粘贴。

cnv-caller-plotter 从全基因组测序数据中检测拷贝数变异并生成出版级图表。适用于生物信息学家、遗传学研究者或临床检验实验室分析基因表达。支持 BAM 文件输入与染色体坐标标注,输出 PNG/SVG 格式图像。需配置参考基因组路径与比对工具参数方可运行分析流程。

结果仅供科研参考,临床诊断请结合金标准方法复核。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install cnv-caller-plotter;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

cnv-caller-plotter 怎么安装?

在终端执行 openclaw skills install cnv-caller-plotter。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

cnv-caller-plotter 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

cnv-caller-plotter 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

cnv-caller-plotter 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

cnv-caller-plotter 用的人多吗?

公开数据是累计安装 6,120 次,近一周安装 250 次,下载 1,980 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

cnv-caller-plotter 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理效率类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

效率类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
github

GitHub 代码协作 · OpenClaw

7,632,918545需要联网MIT-0通过
nano-pdf

Nano PDF 文档 · OpenClaw

4,249,476231需要联网MIT-0通过
auto-updater

自动更新程序 · OpenClaw

2,964,063386操作浏览器MIT-0通过
video-frames

视频帧 · OpenClaw

2,621,304112需要联网MIT-0通过
gemini

Gemini 助手 · OpenClaw

2,547,39648需要联网MIT-0有提醒
cnv-caller-plotter

cnv 调用绘图仪 · 本页

6,120—只读MIT-0有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
cnv-caller-plotter
description
Detect copy number variations from whole genome sequencing data and generate publication-quality genome-wide CNV plots. Supports CNV calling, segmentation, and visualization for cancer genomics and rare disease analysis.
allowed-tools
[Read, Write, Bash, Edit, Grep]
license
MIT
metadata
skill-author
AIPOCH

CNV Caller & Plotter

Detect copy number variations (CNVs) from whole genome sequencing (WGS) data and generate genome-wide visualization plots for cancer genomics, rare disease analysis, and population genetics studies. Provides CNV calling, segmentation analysis, and publication-ready visualization.

Key Capabilities:

  • CNV Detection from WGS: Identify copy number gains and losses from aligned sequencing data
  • Genomic Segmentation: Divide genome into bins/windows for copy number estimation
  • Flexible Input Support: Process BAM, VCF, and other standard genomics formats
  • Publication-Quality Plots: Generate genome-wide CNV profiles in PNG, PDF, or SVG formats
  • Standard Output Formats: Export CNV calls in BED format for downstream analysis

When to Use

✅ Use this skill when:

  • Analyzing cancer genomes to identify somatic copy number alterations (SCNAs)
  • Studying rare diseases with suspected copy number variation etiology
  • Performing population genetics studies comparing CNV frequencies across groups
  • Generating genome-wide CNV visualizations for publications or reports
  • Creating BED format CNV calls for integration with other analysis pipelines
  • Performing comparative CNV analysis between tumor and normal samples
  • Validating CNV calls from SNP arrays with sequencing data

❌ Do NOT use when:

  • Working with targeted sequencing panels (exome/targeted capture) → Use specialized tools like CNVkit or ExomeDepth
  • Detecting structural variations involving translocations or inversions → Use structural-variant-caller
  • Analyzing single-cell RNA-seq data → Use single-cell specific CNV tools (e.g., inferCNV)
  • Detecting small indels (<50bp) → Use variant-caller for small variant detection
  • Requiring clinical-grade CNV detection for diagnostic purposes → Use validated clinical pipelines with proper QC
  • Working with low-coverage data (<10x) → Results may be unreliable; consider SNP array-based methods

Related Skills:

  • 上游 (Upstream): fastqc-report-interpreter, alignment-quality-checker, variant-caller
  • 下游 (Downstream): circos-plot-generator, go-kegg-enrichment, heatmap-beautifier

Integration with Other Skills

Upstream Skills:

  • fastqc-report-interpreter: Assess sequencing quality before CNV calling; low quality data may produce unreliable CNVs
  • alignment-quality-checker: Verify BAM file quality and coverage uniformity; uneven coverage causes CNV artifacts
  • variant-caller: Generate SNV/indel calls for combined CNV-SNV analysis in cancer samples

Downstream Skills:

  • circos-plot-generator: Create circular genome plots integrating CNVs with other genomic features
  • go-kegg-enrichment: Perform pathway enrichment on genes within CNV regions
  • heatmap-beautifier: Visualize CNV profiles across multiple samples

Complete Workflow:

Raw WGS Data → fastqc-report-interpreter → alignment-quality-checker → cnv-caller-plotter → circos-plot-generator → Publication Figures

Core Capabilities

1. Copy Number Variation Detection

Identify genomic regions with copy number gains (amplifications) or losses (deletions) from WGS data by analyzing read depth patterns.

from scripts.main import CNVCaller

# Initialize CNV caller with bin size
caller = CNVCaller(bin_size=1000)

# Call CNVs from BAM file
cnv_calls = caller.call_cnvs(
    input_file="sample.bam",
    reference="hg38.fa"
)

# Review detected CNVs
for cnv in cnv_calls:
    print(f"{cnv['chrom']}:{cnv['start']}-{cnv['end']}")
    print(f"  Copy Number: {cnv['cn']}")
    if cnv['cn'] > 2:
        print(f"  Type: Amplification (gain)")
    elif cnv['cn'] < 2:
        print(f"  Type: Deletion (loss)")

Parameters:

ParameterTypeRequiredDescriptionDefault
input_filestrYesPath to input BAM or VCF fileNone
referencestrYesPath to reference genome FASTANone
bin_sizeintNoSize of genomic bins for segmentation (bp)1000

CNV Calling Strategy:

ApproachBest ForSensitivitySpecificity
Read Depth AnalysisLarge CNVs (>10kb)HighMedium
Paired-end MappingMedium CNVs (1-10kb)MediumHigh
Split-read AnalysisSmall CNVs (<1kb)MediumHigh
Combined ApproachComprehensive detectionHighHigh

Best Practices:

  • ✅ Use appropriate bin size: 1000bp for WGS, smaller for targeted analysis
  • ✅ Ensure sufficient coverage: Minimum 15-20x for reliable CNV detection
  • ✅ Match reference genome: Use same reference as alignment (hg19 vs hg38)
  • ✅ Check coverage uniformity: GC bias can cause false positive CNVs

Common Issues and Solutions:

Issue: False positive CNVs in repetitive regions

  • Symptom: Many CNV calls in centromeres, telomeres, or segmental duplications
  • Solution: Filter CNVs overlapping known problematic regions; use mappability filters

Issue: Low sensitivity for small CNVs

  • Symptom: Missing CNVs <5kb despite adequate coverage
  • Solution: Reduce bin size; use split-read or paired-end signals in addition to depth

2. Genomic Segmentation and Binning

Divide the genome into windows/bins for copy number estimation, enabling systematic analysis of the entire genome.

from scripts.main import CNVCaller

# Different bin sizes for different applications
bin_configs = {
    "high_resolution": 100,    # For small CNV detection
    "standard": 1000,          # Default for WGS
    "low_resolution": 10000    # For large-scale alterations
}

for config_name, bin_size in bin_configs.items():
    caller = CNVCaller(bin_size=bin_size)
    print(f"\
{config_name} (bin_size={bin_size}bp):")
    
    # Calculate approximate number of bins for human genome
    genome_size = 3_000_000_000  # 3 Gb
    num_bins = genome_size // bin_size
    print(f"  Estimated bins: ~{num_bins:,}")
    print(f"  Resolution: {bin_size}bp")

Bin Size Selection Guide:

Bin SizeResolutionUse CaseCoverage Required
100 bpHighSmall CNVs (<5kb)>30x
1000 bpStandardGeneral WGS analysis>15x
10000 bpLowLarge chromosomal alterations>5x
VariableAdaptiveMixed resolution>20x

Best Practices:

  • ✅ Match bin size to expected CNV size: Use smaller bins for detecting small CNVs
  • ✅ Consider coverage depth: Higher coverage enables smaller bins
  • ✅ Exclude unmappable regions: Filter bins with zero or very low mappability
  • ✅ Normalize for GC content: GC-rich regions have different coverage patterns

Common Issues and Solutions:

Issue: Noisy segmentation due to small bins

  • Symptom: Erratic copy number estimates with high variance
  • Solution: Increase bin size; apply smoothing algorithms; use larger bins for baseline

Issue: Missing large CNVs with large bins

  • Symptom: Large deletions/amplifications not called when spanning multiple bins
  • Solution: Use statistical segmentation (CBS, PSCBS) to join adjacent altered bins

3. Genome-Wide Visualization

Generate publication-quality plots showing copy number profiles across all chromosomes for visual interpretation and presentation.

from scripts.main import CNVCaller

caller = CNVCaller(bin_size=1000)

# Example CNV calls for plotting
cnv_calls = [
    {"chrom": "chr1", "start": 1000000, "end": 2000000, "cn": 3},   # Gain
    {"chrom": "chr7", "start": 50000000, "end": 55000000, "cn": 1}, # Loss
    {"chrom": "chr17", "start": 35000000, "end": 36000000, "cn": 4} # High-level amplification
]

# Generate plots in different formats
output_dir = "./cnv_results"

for fmt in ["png", "pdf", "svg"]:
    plot_file = caller.plot_genome_wide(
        cnv_calls=cnv_calls,
        output_path=output_dir,
        fmt=fmt
    )
    print(f"Generated: {plot_file}")

# Plot features:
# - Genome-wide view with all chromosomes
# - Copy number on Y-axis (0-6 typical range)
# - Chromosomal position on X-axis
# - Color coding: red=loss, blue=gain, black=neutral

Output Formats:

FormatExtensionBest ForFile Size
PNG.pngWeb, presentations, quick viewingMedium
PDF.pdfPublications, high-quality printingLarge
SVG.svgVector editing, scalable graphicsSmall

Best Practices:

  • ✅ Use PDF for publications: Vector format maintains quality at any zoom
  • ✅ Include baseline (CN=2): Reference line helps interpret gains/losses
  • ✅ Color-blind friendly palette: Use distinct colors for gains vs losses
  • ✅ Annotate key regions: Mark known cancer genes or regions of interest

Common Issues and Solutions:

Issue: Plot too crowded with many CNVs

  • Symptom: Overlapping points make plot unreadable
  • Solution: Use segmentation to merge adjacent calls; adjust point size/alpha

Issue: ChrY not displayed for female samples

  • Symptom: Missing chromosome in plot for female subjects
  • Solution: Dynamically detect sex from coverage; adjust plot accordingly

4. BED Format Export

Export CNV calls in standard BED format for compatibility with genome browsers and downstream analysis tools.

from scripts.main import CNVCaller

caller = CNVCaller()

# Example CNV calls
cnv_calls = [
    {"chrom": "chr1", "start": 1000000, "end": 2000000, "cn": 3},
    {"chrom": "chr7", "start": 50000000, "end": 55000000, "cn": 1},
]

# Export to BED format
bed_file = caller.save_bed(cnv_calls, "./output")

# BED format structure:
# chrom  start    end       name      score  strand
# chr1   1000000  2000000   CN=3      .      .
# chr7   50000000 55000000  CN=1      .      .

print(f"BED file saved: {bed_file}")

# Read and display BED content
with open(bed_file, 'r') as f:
    print("\
BED file content:")
    for line in f:
        print(line.strip())

BED Format Specification:

ColumnFieldDescriptionExample
1chromChromosome namechr1, chrX
2startStart position (0-based)1000000
3endEnd position (1-based)2000000
4nameCNV annotationCN=3
5scoreOptional quality score.
6strandStrand info (usually .).

Best Practices:

  • ✅ Use 0-based coordinates: Standard BED format uses 0-based start, 1-based end
  • ✅ Include copy number in name: Makes CNV status immediately visible
  • ✅ Sort by chromosome and position: Required for many tools (bedtools, IGV)
  • ✅ Validate format: Check with bedtools or genome browser before distribution

Common Issues and Solutions:

Issue: BED file rejected by genome browser

  • Symptom: IGV or UCSC Genome Browser shows error loading BED
  • Solution: Ensure proper chromosome naming (chr1 vs 1); sort file; check for tabs vs spaces

Issue: Coordinate system confusion

  • Symptom: CNVs appear shifted by 1bp in different tools
  • Solution: BED is 0-based, GFF/VCF are 1-based; convert if necessary

5. Tumor-Normal Comparison

Compare CNV profiles between tumor and matched normal samples to identify somatic copy number alterations (SCNAs).

from scripts.main import CNVCaller

caller = CNVCaller(bin_size=1000)

# Call CNVs in tumor and normal samples
tumor_cnvs = caller.call_cnvs("tumor.bam", "hg38.fa")
normal_cnvs = caller.call_cnvs("normal.bam", "hg38.fa")

# Identify somatic CNVs (present in tumor, not in normal)
def find_somatic_cnvs(tumor_calls, normal_calls):
    """Identify CNVs present in tumor but not normal."""
    somatic_cnvs = []
    
    for t_cnv in tumor_calls:
        is_somatic = True
        
        # Check if similar CNV exists in normal
        for n_cnv in normal_calls:
            if (t_cnv['chrom'] == n_cnv['chrom'] and
                abs(t_cnv['start'] - n_cnv['start']) < 10000 and
                abs(t_cnv['end'] - n_cnv['end']) < 10000 and
                t_cnv['cn'] == n_cnv['cn']):
                is_somatic = False
                break
        
        if is_somatic:
            somatic_cnvs.append(t_cnv)
    
    return somatic_cnvs

somatic_cnvs = find_somatic_cnvs(tumor_cnvs, normal_cnvs)

print(f"Total tumor CNVs: {len(tumor_cnvs)}")
print(f"Somatic CNVs: {len(somatic_cnvs)}")

# Categorize somatic alterations
amplifications = [c for c in somatic_cnvs if c['cn'] > 2]
deletions = [c for c in somatic_cnvs if c['cn'] < 2]

print(f"  Amplifications: {len(amplifications)}")
print(f"  Deletions: {len(deletions)}")

Somatic vs Germline Classification:

CategoryTumor CNNormal CNInterpretation
Somatic Amplification>22Tumor-specific gain
Somatic Deletion<22Tumor-specific loss
Germline CNV≠2≠2Inherited CNV
LOH12Loss of heterozygosity

Best Practices:

  • ✅ Use matched normal when available: Essential for distinguishing somatic vs germline
  • ✅ Consider tumor purity: Low purity samples have attenuated CNV signals
  • ✅ Validate key findings: Use orthogonal methods (FISH, qPCR) for important CNVs
  • ✅ Account for clonality: Subclonal CNVs may be present at lower frequencies

Common Issues and Solutions:

Issue: Normal sample contamination in tumor

  • Symptom: CNV signals weaker than expected; fractional copy numbers
  • Solution: Estimate tumor purity; use purity-corrected CNV calling

Issue: Germline CNVs misclassified as somatic

  • Symptom: Many "somatic" CNVs that look like common polymorphisms
  • Solution: Filter against population CNV databases (DGV, gnomAD-SV)

6. Quality Control and Filtering

Apply quality filters to remove artifactual CNV calls and improve result reliability.

from scripts.main import CNVCaller

caller = CNVCaller()

# Example raw CNV calls with QC metrics
cnv_calls = [
    {
        "chrom": "chr1", "start": 1000000, "end": 2000000, "cn": 3,
        "quality_score": 50, "supporting_reads": 150
    },
    {
        "chrom": "chr7", "start": 50000000, "end": 50001000, "cn": 0,
        "quality_score": 10, "supporting_reads": 5  # Likely artifact
    },
]

# Apply quality filters
def filter_cnvs(cnv_list, min_quality=20, min_size=1000, min_support=20):
    """Filter CNVs based on quality metrics."""
    filtered = []
    
    for cnv in cnv_list:
        size = cnv['end'] - cnv['start']
        quality = cnv.get('quality_score', 0)
        support = cnv.get('supporting_reads', 0)
        
        # Apply filters
        if quality < min_quality:
            continue
        if size < min_size:
            continue
        if support < min_support:
            continue
            
        filtered.append(cnv)
    
    return filtered

# Filter with different stringencies
for min_q in [10, 20, 30]:
    filtered = filter_cnvs(cnv_calls, min_quality=min_q)
    print(f"Quality >= {min_q}: {len(filtered)} CNVs retained")

# Additional filters to consider:
# - Exclude segmental duplications
# - Exclude centromeres and telomeres
# - Minimum number of supporting bins
# - Concordance with paired-end or split-read signals

Quality Metrics:

MetricThresholdPurpose
Quality Score>20Overall confidence in CNV call
Size>1kbRemove small artifactual calls
Supporting Reads>20Sufficient evidence depth
Log2 Ratio0.3Significant deviation from diploid
Mappability>0.8Reliable unique mapping

Best Practices:

  • ✅ Apply size filters: Remove CNVs <1kb (often artifacts)
  • ✅ Filter repetitive regions: Exclude known problematic regions
  • ✅ Use multiple evidence types: Combine depth, paired-end, and split-read signals
  • ✅ Validate high-impact CNVs: Use orthogonal methods for therapeutic targets

Common Issues and Solutions:

Issue: Too many low-quality CNV calls

  • Symptom: Hundreds or thousands of CNVs called
  • Solution: Increase quality thresholds; apply population frequency filters

Issue: True CNVs filtered out

  • Symptom: Known cancer driver CNVs missing from results
  • Solution: Use gene-specific filters; manually review regions of interest

Complete Workflow Example

From WGS data to CNV visualization:

# Step 1: Call CNVs from tumor sample
python scripts/main.py \
  --input tumor_sample.bam \
  --reference hg38.fa \
  --output tumor_cnv/ \
  --bin-size 1000 \
  --plot-format pdf

# Step 2: Call CNVs from matched normal
python scripts/main.py \
  --input normal_sample.bam \
  --reference hg38.fa \
  --output normal_cnv/ \
  --bin-size 1000

# Step 3: Compare and identify somatic CNVs
# (Use Python API for comparison logic)

# Step 4: Generate final plots
python scripts/main.py \
  --input tumor_sample.bam \
  --reference hg38.fa \
  --output final_results/ \
  --plot-format pdf

Python API Usage:

from scripts.main import CNVCaller
from pathlib import Path

def analyze_cancer_genome(
    tumor_bam: str,
    normal_bam: str,
    reference: str,
    output_dir: str
) -> dict:
    """
    Complete cancer genome CNV analysis workflow.
    """
    caller = CNVCaller(bin_size=1000)
    
    # Create output directory
    Path(output_dir).mkdir(parents=True, exist_ok=True)
    
    # Call CNVs in both samples
    print("Calling CNVs in tumor sample...")
    tumor_cnvs = caller.call_cnvs(tumor_bam, reference)
    
    print("Calling CNVs in normal sample...")
    normal_cnvs = caller.call_cnvs(normal_bam, reference)
    
    # Identify somatic alterations
    somatic_cnvs = identify_somatic(tumor_cnvs, normal_cnvs)
    
    # Generate outputs
    tumor_bed = caller.save_bed(tumor_cnvs, output_dir)
    somatic_bed = caller.save_bed(somatic_cnvs, f"{output_dir}/somatic")
    plot_file = caller.plot_genome_wide(tumor_cnvs, output_dir, "pdf")
    
    # Calculate statistics
    stats = {
        "total_tumor_cnvs": len(tumor_cnvs),
        "somatic_cnvs": len(somatic_cnvs),
        "amplifications": len([c for c in somatic_cnvs if c['cn'] > 2]),
        "deletions": len([c for c in somatic_cnvs if c['cn'] < 2]),
        "output_files": {
            "tumor_bed": tumor_bed,
            "somatic_bed": somatic_bed,
            "genome_plot": plot_file
        }
    }
    
    return stats

# Execute workflow
results = analyze_cancer_genome(
    tumor_bam="tumor.bam",
    normal_bam="normal.bam",
    reference="hg38.fa",
    output_dir="./cnv_analysis"
)

print(f"\
Analysis complete!")
print(f"Total tumor CNVs: {results['total_tumor_cnvs']}")
print(f"Somatic CNVs: {results['somatic_cnvs']}")
print(f"  Amplifications: {results['amplifications']}")
print(f"  Deletions: {results['deletions']}")

Expected Output Files:

cnv_analysis/
├── cnv_calls.bed              # All CNV calls in BED format
├── somatic/
│   └── cnv_calls.bed         # Somatic CNVs only
├── cnv_plot.pdf              # Genome-wide visualization
└── analysis_summary.json     # Statistics and metadata

Common Patterns

Pattern 1: Cancer Genome Analysis (Tumor-Normal Pair)

Scenario: Identify somatic copy number alterations in a cancer sample compared to matched normal tissue.

{
  "analysis_type": "cancer_genome",
  "samples": {
    "tumor": "tumor_wgs.bam",
    "normal": "blood_normal.bam"
  },
  "reference": "hg38.fa",
  "parameters": {
    "bin_size": 1000,
    "min_cnv_size": 10000,
    "plot_format": "pdf"
  },
  "expected_outputs": [
    "Somatic CNV calls (BED format)",
    "Genome-wide CNV profile plot",
    "CNV statistics and summary"
  ]
}

Workflow:

  1. Process both tumor and normal BAM files
  2. Call CNVs in each sample independently
  3. Compare to identify somatic alterations
  4. Filter germline polymorphisms against population databases
  5. Annotate cancer genes within CNV regions
  6. Generate publication-quality visualization
  7. Validate key driver alterations with orthogonal methods

Output Example:

Somatic CNV Summary:
  Total alterations: 47
  Amplifications: 12 (including MYC, EGFR)
  Deletions: 35 (including TP53, PTEN)
  
High-impact alterations:
  chr8:128000000-129000000 CN=8 (MYC amplification)
  chr17:7000000-8000000 CN=0 (TP53 deletion)

Pattern 2: Rare Disease CNV Detection

Scenario: Detect pathogenic CNVs in a patient with suspected genomic disorder.

{
  "analysis_type": "rare_disease",
  "sample": "patient.bam",
  "reference": "hg38.fa",
  "parameters": {
    "bin_size": 500,
    "min_cnv_size": 1000,
    "max_frequency": 0.01
  },
  "annotation": [
    "OMIM genes",
    "ClinVar pathogenic variants",
    "Decipher syndromes"
  ]
}

Workflow:

  1. Call CNVs with high sensitivity settings
  2. Filter against common population CNVs (DGV, gnomAD)
  3. Prioritize rare CNVs (<1% frequency)
  4. Annotate with disease-associated genes
  5. Assess inheritance pattern (if parental data available)
  6. Cross-reference with phenotype/HPO terms
  7. Generate clinical report with prioritized findings

Output Example:

Rare CNV Findings:
  chr22:19000000-21000000 CN=1 (22q11.2 deletion syndrome)
    Size: 2.0 Mb
    Genes: TBX1, COMT, etc.
    Frequency: <0.1% in population
    Phenotype match: Cardiac, thymic, facial anomalies
    Classification: Pathogenic

Pattern 3: Population CNV Analysis

Scenario: Compare CNV profiles across multiple samples to identify recurrent alterations.

{
  "analysis_type": "population",
  "samples": [
    "sample1.bam", "sample2.bam", "sample3.bam",
    ...
  ],
  "cohorts": {
    "cases": 50,
    "controls": 50
  },
  "parameters": {
    "bin_size": 1000,
    "plot_format": "png"
  },
  "analysis": [
    "Recurrent CNV detection",
    "Burden analysis",
    "Association testing"
  ]
}

Workflow:

  1. Call CNVs in all samples with consistent parameters
  2. Merge and harmonize CNV calls across samples
  3. Identify recurrent CNV regions
  4. Perform burden analysis (total CNV load)
  5. Test association with phenotype/status
  6. Correct for multiple testing
  7. Visualize CNV landscape across cohort

Output Example:

Population CNV Analysis:
  Samples analyzed: 100
  Total CNVs detected: 2,847
  
Recurrent alterations:
  chr1:1000000-2000000: 23% frequency
  chr16:15000000-16000000: 18% frequency
  
Case vs Control association:
  Significant enrichment: 3 CNV regions
  Most significant: chr8:128000000-129000000 (p=0.001)

Pattern 4: Cell Line Characterization

Scenario: Characterize CNV profile of a cancer cell line for research or quality control.

{
  "analysis_type": "cell_line",
  "sample": "mcf7_cell_line.bam",
  "reference": "hg38.fa",
  "parameters": {
    "bin_size": 1000,
    "plot_format": "pdf"
  },
  "comparison": {
    "reference_profile": "mcf7_ccle_cnvs.bed",
    "expected_alterations": ["chr8_MYC_amp", "chr20_ZNF217_amp"]
  }
}

Workflow:

  1. Generate high-quality CNV profile from WGS
  2. Compare to reference profiles (CCLE, COSMIC)
  3. Verify expected cancer driver alterations
  4. Identify subclonal populations
  5. Assess genome stability metrics
  6. Generate QC report for cell line authentication
  7. Document for reproducibility

Output Example:

Cell Line: MCF-7
Identity confirmed: Yes (99.2% match to reference)

Expected alterations detected:
  chr8:128000000-129000000: CN=8 (MYC) ✓
  chr20:50000000-52000000: CN=6 (ZNF217) ✓

Additional alterations:
  chr17:35000000-37000000: CN=3 (ERBB2) ✓
  
Ploidy: 2.8 (aneuploid)
Genome instability score: High

Quality Checklist

Pre-analysis Checks:

  • [ ] CRITICAL: Verify input BAM file is properly aligned and indexed
  • [ ] Confirm reference genome version matches alignment (hg19 vs hg38)
  • [ ] Check sequencing coverage is sufficient (>15x for WGS, >30x for high resolution)
  • [ ] Assess coverage uniformity (low uniformity causes CNV artifacts)
  • [ ] Review FASTQC reports for quality issues
  • [ ] Ensure matched normal sample is available for cancer analysis
  • [ ] Verify sample identity (check sex chromosomes match metadata)
  • [ ] Confirm no sample swaps or contamination

During Analysis:

  • [ ] Select appropriate bin size for expected CNV size and coverage
  • [ ] Apply GC content normalization if necessary
  • [ ] Check for batch effects if analyzing multiple samples
  • [ ] Monitor for high false positive rates in repetitive regions
  • [ ] Validate sex chromosome calls against known sex
  • [ ] Assess mitochondrial CNVs as quality control metric
  • [ ] Review coverage plots for technical artifacts
  • [ ] Check concordance with SNP array data if available

Post-analysis Verification:

  • [ ] CRITICAL: Filter CNVs in known problematic regions (centromeres, telomeres)
  • [ ] Remove common germline CNVs using population databases (DGV, gnomAD)
  • [ ] Validate cancer driver alterations in known genes
  • [ ] Check for CNV calls that disrupt single exons (often artifacts)
  • [ ] Review very large CNVs (>50Mb) for technical artifacts
  • [ ] Assess CNV burden against population norms
  • [ ] Verify BED file format compliance
  • [ ] Generate and review genome-wide plots

Before Clinical or Publication Use:

  • [ ] CRITICAL: Have results reviewed by experienced analyst
  • [ ] Validate pathogenic CNVs with orthogonal methods (FISH, qPCR, MLPA)
  • [ ] Cross-reference with clinical databases (ClinVar, OMIM, Decipher)
  • [ ] Document all parameters and filters applied
  • [ ] Assess reproducibility by re-running with different parameters
  • [ ] Check for batch effects in multi-sample analyses
  • [ ] Confirm CNV coordinates with latest genome build
  • [ ] Archive raw data and analysis scripts for reproducibility

Common Pitfalls

Input Data Issues:

  • ❌ Using low coverage data → Noisy CNV calls with many false positives

- ✅ Minimum 15-20x coverage for reliable WGS CNV calling

  • ❌ Mismatched reference genomes → CNVs called in wrong coordinates

- ✅ Verify BAM uses same reference as CNV caller (hg19 vs hg38)

  • ❌ Not using matched normal for tumors → Cannot distinguish somatic vs germline

- ✅ Always use matched normal when available; use population controls otherwise

  • ❌ Poor coverage uniformity → GC bias causes false CNVs

- ✅ Check coverage plots; apply GC correction algorithms

Analysis Parameter Issues:

  • ❌ Bin size too large → Miss small CNVs (<10kb)

- ✅ Use 100-500bp bins for high-resolution analysis; 1000bp for standard WGS

  • ❌ Bin size too small → Excessive noise in low coverage regions

- ✅ Balance resolution with coverage; use adaptive binning if available

  • ❌ Inadequate quality filtering → Too many false positive CNVs

- ✅ Apply minimum quality scores; filter by size and read support

  • ❌ Not filtering common CNVs → Report common polymorphisms as pathogenic

- ✅ Filter against DGV, gnomAD, and other population databases

Interpretation Issues:

  • ❌ Ignoring tumor purity → Misinterpret subclonal CNVs

- ✅ Estimate tumor purity; adjust CNV calling thresholds accordingly

  • ❌ Not validating key findings → Report false positive driver alterations

- ✅ Validate cancer-relevant CNVs with orthogonal methods

  • ❌ Over-interpreting small CNVs → Single-exon deletions are often artifacts

- ✅ Focus on larger CNVs (>10kb) unless supported by multiple evidence types

  • ❌ Ignoring parental data → Cannot determine inheritance in rare disease

- ✅ Include parental samples for de novo vs inherited classification

Output and Reporting Issues:

  • ❌ Unclear coordinate system → Confusion between 0-based and 1-based

- ✅ Clearly document coordinate system used; BED is 0-based, VCF is 1-based

  • ❌ Missing quality metrics → Cannot assess confidence in CNV calls

- ✅ Include quality scores, supporting reads, and log2 ratios

  • ❌ Not archiving raw data → Results cannot be reproduced

- ✅ Save BAM files, parameter settings, and analysis scripts

  • ❌ Inadequate documentation → Others cannot interpret results

- ✅ Document all filters, thresholds, and databases used


Troubleshooting

Problem: No CNVs detected

  • Symptoms: Empty or nearly empty CNV call set
  • Causes:

- Coverage too low (<10x) - Bin size too large for small CNVs - Quality thresholds too stringent - Sample is actually diploid with no CNVs

  • Solutions:

- Verify coverage depth from BAM file - Reduce bin size for higher resolution - Relax quality filters temporarily - Check coverage uniformity across genome

Problem: Too many CNV calls (hundreds or thousands)

  • Symptoms: Excessive number of CNV calls, many small or low-quality
  • Causes:

- Low coverage or high noise - Bin size too small - No quality filtering applied - Sample from highly polymorphic population

  • Solutions:

- Apply minimum quality score filter (Q>20) - Filter by minimum size (>1kb) - Remove calls in segmental duplications - Filter against population CNV databases

Problem: False positives in repetitive regions

  • Symptoms: CNVs concentrated in centromeres, telomeres, or SDs
  • Causes:

- Low mappability in repetitive regions - Uneven coverage due to alignment issues - Reference genome gaps

  • Solutions:

- Filter CNVs overlapping known problematic regions - Use mappability filters (require mappability >0.8) - Exclude centromeres and telomeres from analysis - Use high-mappability reads only

Problem: CNV signals too weak in tumor samples

  • Symptoms: Known cancer alterations not detected or weak signal
  • Causes:

- Low tumor purity (<20%) - Normal cell contamination - Subclonal alterations at low frequency

  • Solutions:

- Estimate tumor purity from VAF distribution - Use purity-corrected CNV calling - Lower thresholds for detection - Consider single-cell sequencing for subclonal analysis

Problem: Sex chromosomes have unexpected copy numbers

  • Symptoms: XX sample showing CN=1 for X, or XY showing CN=2
  • Causes:

- Sex chromosome aneuploidy (e.g., Klinefelter, Turner syndromes) - Mislabeled sample sex - Pseudoautosomal region miscalls

  • Solutions:

- Verify sample sex from coverage ratios (X/Y) - Check clinical records for known sex chromosome abnormalities - Exclude pseudoautosomal regions from analysis - Analyze autosomes and sex chromosomes separately

Problem: Batch effects in multi-sample analysis

  • Symptoms: CNV patterns correlate with sequencing batch rather than biology
  • Causes:

- Different sequencing platforms or chemistries - Coverage differences between batches - Different alignment parameters

  • Solutions:

- Normalize coverage across batches - Use same alignment and processing pipeline for all samples - Include batch as covariate in association testing - Perform batch correction algorithms

Problem: Cannot install or run tool

  • Symptoms: Import errors, missing dependencies, execution failures
  • Causes:

- Missing Python packages (pysam, numpy, matplotlib) - Incompatible Python version - Missing reference genome index files

  • Solutions:

- Install required packages: pip install pysam numpy matplotlib pandas - Use Python 3.8 or higher - Create reference genome index: samtools faidx reference.fa - Check BAM file index exists: sample.bam.bai


References

Available in references/ directory:

  • (No reference files currently available for this skill)

External Resources:

  • Database of Genomic Variants (DGV): http://dgv.tcag.ca
  • gnomAD Structural Variants: https://gnomad.broadinstitute.org
  • ClinVar: https://www.ncbi.nlm.nih.gov/clinvar
  • DECIPHER: https://www.deciphergenomics.org
  • COSMIC: https://cancer.sanger.ac.uk

Scripts

Located in scripts/ directory:

  • main.py - Main CNV calling and plotting engine

CNV Detection Methods Comparison

MethodInputSensitivityResolutionBest For
Read Depth (this tool)BAMMedium1-10 kbLarge CNVs, WGS
Paired-end MappingBAMMedium100bp-10kbDeletions, insertions
Split-read AnalysisBAMHigh1bp-1kbBreakpoint detection
SNP ArrayCEL/IDATHigh5-25kbCost-effective screening
Optical MappingBionanoHigh500bp+Very large SVs

Parameters

ParameterTypeDefaultRequiredDescription
--input, -istring-YesInput BAM/VCF file
--reference, -rstring-YesReference genome FASTA
--output, -ostring./cnv_outputNoOutput directory
--bin-sizeint1000NoBin size for analysis
--plot-formatstringpngNoPlot format (png, pdf, svg)

Usage

Basic Usage

# Call CNVs from BAM file
python scripts/main.py --input sample.bam --reference hg38.fa

# Custom output directory and bin size
python scripts/main.py --input sample.bam --reference hg38.fa --output ./results --bin-size 500

# Generate PDF plots
python scripts/main.py --input sample.bam --reference hg38.fa --plot-format pdf

Risk Assessment

Risk IndicatorAssessmentLevel
Code ExecutionPython script executed locallyLow
Network AccessNo external API callsLow
File System AccessRead BAM/VCF, write resultsLow
Data ExposureProcesses genomic dataMedium
PHI RiskMay process patient genetic dataHigh

Security Checklist

  • [x] No hardcoded credentials or API keys
  • [x] No unauthorized file system access
  • [x] Input validation for file paths
  • [x] Output directory restricted
  • [x] Error messages sanitized
  • [x] CRITICAL: HIPAA compliance required for patient data

Prerequisites

# Python 3.7+
# No additional packages required (uses standard library)

Evaluation Criteria

Success Metrics

  • [x] Successfully processes BAM/VCF files
  • [x] Detects copy number variations
  • [x] Generates visualization plots
  • [x] Outputs results in BED format

Test Cases

  1. Basic Calling: BAM input → CNV calls with coordinates
  2. Plot Generation: CNV calls → Genome-wide plot
  3. Custom Bin Size: Different bin sizes → Appropriate resolution

Lifecycle Status

  • Current Stage: Active
  • Next Review Date: 2026-03-09
  • Known Issues: Placeholder CNV calling logic
  • Planned Improvements:

- Implement actual CNV calling algorithm - Add tumor/normal comparison - Enhance visualization options


Last Updated: 2026-02-09 Skill ID: 162 Version: 2.0 (K-Dense Standard)

平台分布

OpenClaw

85.61%
按下载量换算1,695

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills