view coverage.xml @ 5:9410f163f2e7 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cnvkit commit fc1282ec68b346988203ead860e9b9d6a47e9efb
author iuc
date Sat, 01 Mar 2025 12:04:00 +0000 (12 days ago)
parents 5602cbf1153b
children
line wrap: on
line source
<tool id="cnvkit_coverage" name="CNVkit Coverage" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
    <description>Calculate coverage in the given regions from BAM read depths</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="xrefs"/>
    <expand macro="creators"/>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[  
        ln -s '$input_bam_file' ./tumor.bam &&
        ln -s '$input_interval_bed' ./capture.split.bed &&
        #if $reference_source.fasta
            #if str($reference_source.ref_selector) == 'history':
                ln -s '$reference_source.fasta' ./genome.fa &&
                samtools faidx ./genome.fa 2>&1 || echo 'Error running samtools faidx for indexing fasta reference for CNVkit' >&2 &&
            #else
                ln -s '$reference_source.fasta.fields.path' ./genome.fa &&
                ln -s '${reference_source.fasta.fields.path}.fai' ./genome.fa.fai &&
            #end if
        #end if
        #import os
        cnvkit.py coverage
            ./tumor.bam
            ./capture.split.bed
            --output sample.targetcoverage.cnn
            --processes \${GALAXY_SLOTS:-4}
            $count
            #if str($min_mapq)
                --min-mapq $min_mapq
            #end if
    ]]></command>
    <inputs>
        <param name="input_bam_file" type="data" format="bam" label="Sample BAM file" help="" />
        <param name="input_interval_bed" type="data" format="bed" label="Interval BED file" help="" />
        <expand macro="reference_interface"/>
        <param argument="--count" type="boolean" checked="false" truevalue="--count" falsevalue="" label="Get read depths by counting read midpoints within each bin" help="" />
        <param argument="--min-mapq" optional="true" type="integer" label="Minimum mapping quality score to count a read for coverage depth" min="0" max="60" value="0" help="" />
    </inputs>
    <outputs>
        <data name="out_capture_target_coverage" format="cnn" label="${tool.name} on ${on_string}: Sample Target coverage" from_work_dir="sample.targetcoverage.cnn" />
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <conditional name="reference_source">
                <param name="ref_selector" value="history"/>
                <param name="fasta" ftype="fasta" value="genome.fasta" />
            </conditional>
            <param name="input_bam_file" ftype="bam" value="tumor.bam" />
            <param name="input_interval_bed" ftype="bed" value="capture.split.bed" />
            <output name="out_capture_target_coverage" file="sample.targetcoverage.cnn" /> 
        </test>
        <test expect_num_outputs="1">
            <conditional name="reference_source">
                <param name="ref_selector" value="cached"/>
                <param name="fasta" value="test_buildid"/>
            </conditional>
            <param name="input_bam_file" ftype="bam" value="tumor.bam" />
            <param name="input_interval_bed" ftype="bed" value="capture.split.bed" />
            <output name="out_capture_target_coverage" file="sample.targetcoverage.cnn" /> 
        </test>
    </tests>
    <help><![CDATA[
         Summary statistics of read counts and their binning are printed to standard error
         when CNVkit finishes calculating the coverage of each sample (through either the
         batch or coverage commands)
         
         Target and antitarget bin-level coverages (.cnn) output file contains those columns
          chromosome, Start, end, gene, log2 and depth

-----

**Target Coverage File (e.g., sample.targetcoverage.cnn):**

- **Columns:** chromosome, start, end, gene, reads (raw read count), depth (reads normalized by bin size).

- **Purpose:** Captures on-target sequencing depth.

    ]]></help>
    <expand macro="citations" />
</tool>