view scatter.xml @ 0:ec9731970f8b 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:10:25 +0000
parents
children 3323a7867128
line wrap: on
line source

<tool id="cnvkit_scatter" name="CNVkit Scatter" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
    <description>Plot bin-level log2 coverages and segmentation calls together</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="xrefs"/>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[  
        ln -s '$input_cnr_file' ./tumor.cnr &&
        #if $advanced_settings.segment
        ln -s '$advanced_settings.segment' ./segment.cns &&
        #end if
        #if $advanced_settings.range_list
            ln -s '$advanced_settings.range_list' ./list.bed &&
        #end if
        #if $advanced_settings.additional_SNP_allelic_process.vcf
            ln -s '$advanced_settings.additional_SNP_allelic_process.vcf' ./vcf_file.vcf &&
        #end if
        cnvkit.py scatter
            ./tumor.cnr
            --output sample-scatter.png
            #if $advanced_settings.segment
                --segment ./segment.cns
            #end if
            #if $advanced_settings.chromosome
                --chromosome '$advanced_settings.chromosome'
            #end if
            #if $advanced_settings.gene
                --gene '$advanced_settings.gene'
            #end if
            #if $advanced_settings.range_list
                --range-list ./list.bed
            #end if
            #if str($advanced_settings.width)
                --width  $advanced_settings.width
            #end if
            #if $advanced_settings.plot_aesthetics.antitarget_marker
                --antitarget-marker '$advanced_settings.plot_aesthetics.antitarget_marker'
            #end if
            $advanced_settings.plot_aesthetics.by_bin
            #if $advanced_settings.plot_aesthetics.segment_color
                --segment-color '$advanced_settings.plot_aesthetics.segment_color'
            #end if
            #if $advanced_settings.plot_aesthetics.title
                --title '$advanced_settings.plot_aesthetics.title'
            #end if
            $advanced_settings.plot_aesthetics.trend
            #if str($advanced_settings.plot_aesthetics.y_max)
                --y-max $advanced_settings.plot_aesthetics.y_max
            #end if
            #if str($advanced_settings.plot_aesthetics.y_min)
                --y-min $advanced_settings.plot_aesthetics.y_min
            #end if
            #if str($advanced_settings.plot_aesthetics.fig_size)
                --fig-size $advanced_settings.plot_aesthetics.fig_size
            #end if
            #if $advanced_settings.additional_SNP_allelic_process.vcf
                --vcf ./vcf_file.vcf
            #end if
            #if $advanced_settings.additional_SNP_allelic_process.sample_id
                --sample-id '$advanced_settings.additional_SNP_allelic_process.sample_id'
            #end if
            #if $advanced_settings.additional_SNP_allelic_process.normal_id
                --normal-id '$advanced_settings.additional_SNP_allelic_process.normal_id'
            #end if
            #if str($advanced_settings.additional_SNP_allelic_process.min_variant_depth)
                --min-variant-depth $advanced_settings.additional_SNP_allelic_process.min_variant_depth
            #end if
            #if str($advanced_settings.additional_SNP_allelic_process.zygosity_freq)
                --zygosity-freq $advanced_settings.additional_SNP_allelic_process.zygosity_freq
            #end if
    ]]></command>
    <inputs>
        <param name="input_cnr_file" type="data" format="tabular" label="cnn file" help="" />
        <section name="advanced_settings" title="Advanced settings" expanded="false">
            <expand macro="scatter_optional" />
            <section name="plot_aesthetics" title="Plot aesthetics" expanded="false">
              <expand macro="scatter_plot" />
            </section>
            <section name="additional_SNP_allelic_process" title="Plot aesthetics" expanded="false">
              <expand macro="additionally_SNP_process" />
            </section>
        </section>   
    </inputs>
    <outputs>
        <data name="out_scatter_file" format="png" label="${tool.name} on ${on_string}: diagram pdf file" from_work_dir="sample-scatter.png" />
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="input_cnr_file" ftype="tabular" value="tumor.cnr" />
            <param name="zygosity_freq" value="0.25" />
            <param name="by_bin" value="1" />
            <output name="out_scatter_file" file="sample-scatter.png" ftype="png" compare="sim_size">
                <assert_contents><has_size value="12000" delta="5000" /></assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
        Plot bin-level log2 coverages and segmentation calls together. Without any further arguments,
        this plots the genome-wide copy number in a form familiar to those who have used array CGH.
    ]]></help>
    <expand macro="citations" />
</tool>