diff macs2_callpeak.xml @ 2:bfe57d6e0c4c draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/macs2 commit 63955994af5090ec444c03c221df0012d5ae4e74
author iuc
date Mon, 12 Oct 2015 11:24:39 -0400
parents fe62ba547975
children 6d4babad010f
line wrap: on
line diff
--- a/macs2_callpeak.xml	Thu Feb 12 10:40:25 2015 -0500
+++ b/macs2_callpeak.xml	Mon Oct 12 11:24:39 2015 -0400
@@ -1,14 +1,15 @@
 <tool id="macs2_callpeak" name="MACS2 callpeak" version="@VERSION_STRING@.0">
     <description>Call peaks from alignment results</description>
+    <macros>
+        <import>macs2_macros.xml</import>
+    </macros>
     <expand macro="requirements">
         <requirement type="package" version="3.0.1">R_3_0_1</requirement>
         <requirement type="package" version="4.1.0">gnu_awk</requirement>
         <requirement type="set_environment">MACS2_SCRIPT_PATH</requirement>
     </expand>
+    <expand macro="stdio" />
     <expand macro="version_command" />
-    <macros>
-        <import>macs2_macros.xml</import>
-    </macros>
     <command>
         #set $temp_stderr = 'macs2_stderr'
         (macs2 callpeak
@@ -84,7 +85,7 @@
         #end if
 
         ## run R to create pdf from model script
-        #if 'pdf' in str($outputs).split(','):
+        #if $nomodel_type.nomodel_type_selector == 'create_model' and 'pdf' in str($outputs).split(','):
             &amp;&amp;
             Rscript MACS2_model.r > MACS2_model.r.log
         #end if
@@ -95,7 +96,7 @@
             (
             count=`ls -1 MACS2* 2>/dev/null | wc -l`;
             if [ \$count != 0 ];
-            then 
+            then
                 mkdir "${ output_extra_files.files_path }";
                 cp MACS2* "${ output_extra_files.files_path }";
                 python "\$MACS2_SCRIPT_PATH/dir2html.py" "${ output_extra_files.files_path }" $temp_stderr > "${ output_extra_files }";
@@ -107,7 +108,6 @@
         cat $temp_stderr 2&gt;&amp;1;
         (exit \$exit_code_for_galaxy)
     </command>
-    <expand macro="stdio" />
     <inputs>
         <param name="input_treatment_file" type="data" format="bam,sam,bed" multiple="True" label="ChIP-Seq Treatment File" />
         <param name="input_control_file" type="data" format="bam,sam,bed" multiple="True" optional="True" label="ChIP-Seq Control File" />
@@ -146,12 +146,12 @@
             <when value="create_model"/>
             <when value="nomodel">
                 <!--<param name="shiftsize" type="integer" label="Arbitrary shift size in bp" value="100" help="(shiftsize)"/>-->
-                <param name="extsize" type="integer" value="100" label="The arbitrary extension size in bp" 
+                <param name="extsize" type="integer" value="100" label="The arbitrary extension size in bp"
                     help="MACS will use this value as fragment size to extend each read towards 3' end, then pile them up. It's exactly twice the number of legacy shiftsize. In previous language, each read is moved 3' direction to middle of fragment by 1/2 d, then extended to both direction with 1/2 d. This is equivalent to say each read is extended towards 3' into a d size fragment. DEFAULT: 200 (--extsize)"/>
             </when>
         </conditional>
 
-        <param name="outputs" type="select" display="checkboxes" multiple="True" label="Outputs">
+        <param name="outputs" type="select" display="checkboxes" multiple="True" label="Outputs" help="PDF only created when model is build">
             <option value="peaks_bed" selected="True">Peaks as BED file</option>
             <!--<option value="narrow">narrow Peaks</option>-->
             <option value="summits" selected="true">summits</option>
@@ -167,10 +167,10 @@
                 <option value="on">Display advanced options</option>
             </param>
             <when value="on">
-                <param name="to_large" type="boolean" truevalue="--to-large" falsevalue="" checked="False" 
+                <param name="to_large" type="boolean" truevalue="--to-large" falsevalue="" checked="False"
                     label="When set, scale the small sample up to the bigger sample"
                     help="By default, the bigger dataset will be scaled down towards the smaller dataset, which will lead to smaller p/qvalues and more specific results. Keep in mind that scaling down will bring down background noise more. (--to-large)"/>
-                <param name="nolambda" type="boolean" truevalue="--nolambda" falsevalue="" checked="False" 
+                <param name="nolambda" type="boolean" truevalue="--nolambda" falsevalue="" checked="False"
                     label="Use fixed background lambda as local lambda for every peak region" help="up to 9X more time consuming (--nolambda)"/>
                 <param name="ratio" type="float" value="1.0"
                     label="When set, use a custom scaling ratio of ChIP/control (e.g. calculated using NCIS) for linear scaling"
@@ -186,12 +186,12 @@
                         <option value="broad">broad regions</option>
                     </param>
                     <when value="broad">
-                        <param name="broad_cutoff" type="float" label="Cutoff for broad region" value="0.1" 
+                        <param name="broad_cutoff" type="float" label="Cutoff for broad region" value="0.1"
                             help="value is either p-value or q-value as specified above (--broad-cutoff)"/>
                     </when>
                     <when value="nobroad">
-                        <param name="call_summits" type="boolean" truevalue="--call-summits" falsevalue="" checked="False" 
-                            label="Use a more sophisticated signal processing approach to find subpeak summits in each enriched peak region" 
+                        <param name="call_summits" type="boolean" truevalue="--call-summits" falsevalue="" checked="False"
+                            label="Use a more sophisticated signal processing approach to find subpeak summits in each enriched peak region"
                             help="(--call-summits)"/>
                     </when>
                 </conditional>
@@ -235,7 +235,12 @@
             <filter>'summits' in outputs</filter>
         </data>
         <data name="output_plot" format="pdf" from_work_dir="MACS2_model.pdf" label="${tool.name} on ${on_string} (plot)">
-            <filter>'pdf' in outputs</filter>
+            <filter>
+            ((
+              'pdf' in outputs and
+              nomodel_type['nomodel_type_selector'] == "create_model"
+            ))
+            </filter>
         </data>
         <data name="output_treat_pileup" format="bedgraph" from_work_dir="MACS2_treat_pileup.bdg" label="${tool.name} on ${on_string} (Bedgraph Treatment)">
             <filter>'bdg' in outputs</filter>
@@ -262,6 +267,17 @@
             <output name="output_bed" compare="contains" file="callpeak_part.bed"/>
             <output name="output_summits" compare="contains" file="callpeak_summits_part.bed"/>
         </test>
+        <test>
+            <param name="input_control_file" value="Control_200K.bed" ftype="bed"/>
+            <param name="input_treatment_file" value="ChIP_200K.bed" ftype="bed"/>
+            <param name="cutoff_options_selector" value="qvalue"/>
+            <param name="qvalue" value="0.05"/>
+            <param name="band_width" value="300"/>
+            <param name="outputs" value="pdf"/>
+            <param name="effective_genome_size_options_selector" value="user_defined" />
+            <param name="gsize" value="3300000000" />
+            <output name="output_plot" file="magic.pdf" ftype="pdf" compare="contains" />
+        </test>
     </tests>
     <help>
 **What it does**