-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5750 from Delphine-L/merqury
Creation of wrapper for merqury histogram plot
- Loading branch information
Showing
3 changed files
with
2,823 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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<name>.+)\.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<name>.+)\.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> | ||
|
2 changes: 2 additions & 0 deletions
2
tools/merqury/test-data/output_merqury.assembly_01.only.tabular
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1 0 59 | ||
2 0 0 |
Oops, something went wrong.