view heatmap.xml @ 5:41a25bd96ec6 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:07:09 +0000
parents 26554a14f841
children
line wrap: on
line source

<tool id="cnvkit_heatmap" name="CNVkit Heatmap" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
    <description>Plot copy number for multiple samples as a heatmap</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="xrefs"/>
    <expand macro="creators"/>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[  
        #import re
        #set $names = []
        #set $x=1
        #for $x, $file in enumerate($filenames):
            #set $name_base = re.sub('[^\w\-_\.]', '_', $file.element_identifier)
            #set $name = $name_base
            #silent $names.append( $name )
            ln -s '$file' ${name}.cns  &&
        #end for
        cnvkit.py heatmap
            #for $name in $names:
                ${name}.cns
            #end for
            --output sample-heatmap.png
            $advanced_settings.by_bin
            #if $advanced_settings.chromosome
                --chromosome '$advanced_settings.chromosome'
            #end if
            $advanced_settings.desaturate
            $advanced_settings.male_reference
            #if str($advanced_settings.Sample_sex.sex) == "yes":
                #if '$advanced_settings.Sample_sex.sample_sex' == "Male"
                    #set $sample_sex_val = "Male"
                    --sample-sex '$segment_method_val'
                #else
                    --sample-sex '$advanced_settings.Sample_sex.sample_sex'
                #end if
            #end if
            $advanced_settings.no_shift_xy
            $advanced_settings.vertical
            $advanced_settings.delimit_samples
            #if $advanced_settings.title
                --title '$advanced_settings.title'
            #end if
    ]]></command>
    <inputs>
        <param name="filenames" multiple="true" type="data" format="cns" label="CN segmentation calls cns file/s" help="Sample coverages as raw probes cnr or segments cns" />
        <section name="advanced_settings" title="Advanced settings" expanded="false">
            <expand macro="heatmap_optional" />
            <expand macro="sample_sex_condition" />
        </section>  
    </inputs>
    <outputs>
        <data name="out_heatmap_png" format="png" label="${tool.name} on ${on_string}: Heatmap png file" from_work_dir="sample-heatmap.png" />
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="filenames" ftype="cns" value="tumor.cns,sample.cns" />
            <section name="advanced_settings">
                <param name="desaturate" value="1" />
            </section>
            <output name="out_heatmap_png" file="sample-heatmap.png" ftype="png" compare="sim_size" >
                <assert_contents><has_size value="9000" delta="5000" /></assert_contents>
            </output> 
        </test>
        <test expect_num_outputs="1">
            <param name="filenames" ftype="cns" value="tumor.cns,sample.cns" />
            <section name="advanced_settings">
                <param name="desaturate" value="1" />
                <conditional name="Sample_sex">
                    <param name="sex" value="no" />
                </conditional>
            </section>
            <output name="out_heatmap_png" file="sample-heatmap.png" ftype="png" compare="sim_size" >
                <assert_contents><has_size value="9000" delta="5000" /></assert_contents>
            </output> 
        </test>
    </tests>
    <help><![CDATA[
        Draw copy number (either bins (.cnn, .cnr) or segments (.cns)) for multiple samples as a heatmap
    
-----

**Segmented log2 ratios (.cns)**

Tabular file with smoothed, merged segments of stable copy number, derived from the .cnr file. Represents final CNV calls.

.. csv-table::
   :header-rows: 0

    "chromosome","start, end: Genomic coordinates of the segment"
    "gene","Gene(s) overlapping the segment."
    "log2","Mean log2 ratio of the segment."
    "probes","Mean log2 ratio of the segment."
    "depth","Average read depth."
    "weight","Reliability weight."
    "p_value","Statistical confidence (lower = more significant)."

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