Skip to content

Commit

Permalink
Merge pull request #5750 from Delphine-L/merqury
Browse files Browse the repository at this point in the history
Creation of wrapper for merqury histogram plot
  • Loading branch information
bgruening authored Feb 16, 2024
2 parents 47be73f + 8fddca6 commit 72d058b
Show file tree
Hide file tree
Showing 3 changed files with 2,823 additions and 0 deletions.
105 changes: 105 additions & 0 deletions tools/merqury/merqury_plot_CN.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<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/ &&
\$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>

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1 0 59
2 0 0
Loading

0 comments on commit 72d058b

Please sign in to comment.