view heatmap.xml @ 1:d8c45afa221c draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cnvkit commit e927b17a345b18c1b51dc1b112db5129278dcd22
author iuc
date Fri, 29 Sep 2023 15:43:22 +0000
parents ff6b3f5a7ffb
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="tabular" 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="tabular" value="tumor.cns,sample.cns" />
            <param name="desaturate" value="1" />
            <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">
            <conditional name="Sample_sex">
                <param name="sex" value="no" />
            </conditional>
            <param name="filenames" ftype="tabular" value="tumor.cns,sample.cns" />
            <param name="desaturate" value="1" />
            <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
    ]]></help>
    <expand macro="citations" />
</tool>