view merqury_plot_CN.xml @ 6:eb7b00ec347d draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/merqury commit 9aec17d26f63629419228ef07e76e789e5244891
author iuc
date Sat, 13 Apr 2024 19:17:55 +0000
parents d7edbc9c3a07
children
line wrap: on
line source

<tool id="merquryplot" name="Merqury histogram plot" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01">
    <description>evaluate the assembly quality</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="bio_tools"/>
    <expand macro="requirements"/>
    <version_command>merqury --version</version_command>
    <command detect_errors="exit_code"><![CDATA[
        mkdir -p output_files/ &&
        export MERQURY="\$(dirname \$(which merqury.sh))/../share/merqury" &&
        \$MERQURY/plot/plot_spectra_cn.R 
        -f '$input1' 
        -o output_files/merqury_plot
        #if $z
            --zero-hist '$z' 
        #end if
        #if $cutoff
             --cutoff '$cutoff' 
        #end if 
        --xdim $xdim
        --ydim $ydim
        #if $xmax>0
            --xmax $xmax
        #end if 
        #if $ymax>0
            --ymax $ymax
        #end if
        --type $type
        #if $output_selector=='pdf'
            -p
        #end if 

    ]]>    </command>
    <inputs>
        <param argument="-f" type="data" name="input1" format="tabular" />
        <param argument="--xdim" type="integer" label="Width of plot"  value="6" min="0" />
        <param argument="--ydim" type="integer" label="Height of plot"  value="5" min="0" />
        <param argument="--xmax" type="float" label="Maximum limit for k-mer multiplicity (leave 0 for default)"  value="0" min="0" help="default: (x where y=peak) * 2.1" />
        <param argument="--ymax" type="float" label="Maximum limit for k-mer count (leave 0 for default)"  value="0" min="0"  help="default: (y where y=peak) * 1.1" />
        <param argument="-z" type="data" label="Assembly only counts" format="tabular" help=".only.hist file " optional="true" />
        <param argument="--cutoff" type="data" label="Solid k-mer cutoffs" format="txt" help="cutoff.txt file" optional="true" />
        <param name="output_selector" type="select" label="Output format" argument="-p">
            <option value="png" selected="true">PNG</option>
            <option value="pdf">PDF</option>
        </param>
        <param argument="--type" type="select" label="Type of plot (default all)">
            <option value="all" selected="true">All</option>
            <option value="line">Line</option>
            <option value="fill">Fill</option>
            <option value="stack">Stack</option>
        </param>
    </inputs>
    <outputs>
        <collection name="png_files" type="list" label="${tool.name} on ${on_string}: png plots">
            <discover_datasets pattern="(?P&lt;name&gt;.+)\.png" format="png" directory="output_files"/>
            <filter>"png" in output_selector</filter>
        </collection>
        <collection name="pdf_files" type="list" label="${tool.name} on ${on_string}: pdf plots">
            <discover_datasets pattern="(?P&lt;name&gt;.+)\.pdf" format="pdf" directory="output_files"/>
            <filter>"pdf" in output_selector</filter>
        </collection>
    </outputs>
    <tests>
        <test  expect_num_outputs="1">
            <param name="input1" value="output_merqury.assembly_01.spectra-cn.tabular"/>
            <param name="xdim"  value="6" />
            <param name="ydim"  value="5" />
            <param name="xmax"  value="0" />
            <param name="ymax"  value="0" />
            <param name="z" value="output_merqury.assembly_01.only.tabular"/>
            <param name="type" value="all" />
            <param name="output_selector"  value="png" />
            <output_collection name="png_files" type="list" count="3">
                <element name="merqury_plot.fl">
                    <assert_contents>
                        <has_size value="99000" delta="5000"/>
                    </assert_contents>
                </element>
                <element name="merqury_plot.ln">
                    <assert_contents>
                        <has_size value="99000" delta="5000"/>
                    </assert_contents>
                </element>
                <element name="merqury_plot.st">
                    <assert_contents>
                        <has_size value="124000" delta="20000"/>
                    </assert_contents>
                </element>
            </output_collection>
        </test>
    </tests>

   <help><![CDATA[

.. class:: infomark

**Purpose**
Make spectra-cn plots. Line, filled, and stacked spectra-cn plots will be
generated. Inputs : Histogram files generated by merqury.

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