Mercurial > repos > iuc > cnvkit_heatmap
diff heatmap.xml @ 0:ff6b3f5a7ffb draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/cnvkit commit c35b83e4b65b211377c9f616c77d7306da48a984
author | iuc |
---|---|
date | Sun, 14 May 2023 20:11:11 +0000 |
parents | |
children | d8c45afa221c |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/heatmap.xml Sun May 14 20:11:11 2023 +0000 @@ -0,0 +1,79 @@ +<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="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 + '_' + str(x) + #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="cns sample file" 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="by_bin" value="1" /> + <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="yes" /> + </conditional> + <param name="filenames" ftype="tabular" value="tumor.cns,sample.cns" /> + <param name="by_bin" value="1" /> + <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>