diff macs2_bdgdiff.xml @ 5:beb902da6e5f draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/macs2 commit e10f301c7f8c54a7d12df4e631527197baccf70b
author iuc
date Sat, 08 Apr 2017 08:28:57 -0400
parents 56e104999978
children acbd3fb47f90
line wrap: on
line diff
--- a/macs2_bdgdiff.xml	Mon Feb 06 02:30:37 2017 -0500
+++ b/macs2_bdgdiff.xml	Sat Apr 08 08:28:57 2017 -0400
@@ -3,81 +3,83 @@
     <macros>
         <import>macs2_macros.xml</import>
     </macros>
-    <expand macro="requirements" />
+    <expand macro="requirements">
+        <requirement type="package" version="4.1.3">gawk</requirement>
+    </expand>
     <expand macro="stdio" />
     <expand macro="version_command" />
     <command>
+        <![CDATA[
         macs2 bdgdiff
-            --t1 "${ infile_pileup_cond1 }"
-            --t2 "${ infile_pileup_cond2 }"
-            --c1 "${ infile_control_cond1 }"
-            --c2 "${ infile_control_cond2 }"
-            --cutoff "${ cutoff }"
-            --min-len "${ minlen }"
-            --depth1 "${ depth1 }"
-            --depth2 "${ depth2 }"
-            --max-gap "${ maxgap }"
-            --o-prefix MACS2
+            --t1 '${ t1 }'
+            --t2 '${ t2 }'
+            --c1 '${ c1 }'
+            --c2 '${ c2 }'
+            --cutoff '${ cutoff }'
+            --min-len '${ minlen }'
+            --depth1 '${ depth.depth1 }'
+            --depth2 '${ depth.depth2 }'
+            --max-gap '${ maxgap }'
+            -o c1.bed c2.bed both.bed &&
 
+            awk '!/^track name/' "c1.bed" > '${ output_cond1 }' &&
+            awk '!/^track name/' "c2.bed" > '${ output_cond1 }' &&
+            awk '!/^track name/' "both.bed" > '${ output_both }'
+
+        ]]>
     </command>
     <inputs>
-        <param name="infile_pileup_cond1" type="data" format="bedgraph" label="MACS pileup bedGraph for condition 1" />
-        <param name="infile_pileup_cond2" type="data" format="bedgraph" label="MACS pileup bedGraph for condition 2" />
+        <param name="t1" type="data" format="bedgraph" label="BedGraph for Treatment experiment 1" />
+        <param name="t2" type="data" format="bedgraph" label="BedGraph for Treatment experiment 2" />
 
-        <param name="infile_control_cond1" type="data" format="bedgraph" label="MACS control lambda bedGraph for condition 1" />
-        <param name="infile_control_cond2" type="data" format="bedgraph" label="MACS control lambda bedGraph for condition 2" />
+        <param name="c1" type="data" format="bedgraph" label="BedGraph for Control experiment 1" />
+        <param name="c2" type="data" format="bedgraph" label="Bedgraph for Control experiment 2" />
 
-        <param name="cutoff" type="float" label="Cutoff of log10 likelihood ratio cutoff" value="1.0" help="Default: 1.0 (likelihood ratio=10) (--cutoff)"/>
-        <param name="minlen" type="integer" label="Minimum length of differential region" value="200"/>
-        <param name="depth1" type="integer" value="1" label="Sequence depth of condition 1 in million reads" help="default: 1 (--depth1)" />
-        <param name="depth2" type="integer" value="1" label="Sequence depth of condition 2 in million reads" help="default: 1 (--depth2)" />
-        <param name="maxgap" type="integer" value="100" label="Maximum gap to merge nearby differential regions" help="Consider a wider gap for broad marks. Maximum gap should be smaller than minimum length. Default: 100 (-g)." />
+        <param name="cutoff" type="float" label="Cutoff of log10 likelihood ratio cutoff" value="1.0" help="Default=1.0 correspoinding to likelihood ratio of 1,000 (--cutoff)"/>
+        <param name="minlen" type="integer" label="Minimum length of differential region" value="200" help=" Try bigger value to remove small regions. Default=200 (--min-len)"/>
 
-        <param name="outputs" type="select" display="checkboxes" multiple="True" optional="false" label="Outputs">
-            <option value="--ofile-cond1">Unique regions in condition 1</option>
-            <option value="--ofile-cond2">Unique regions in condition 2</option>
-            <option value="--ofile-both-conditions" selected="true">Common regions in both conditions</option>
-        </param>
+        <section name="depth" title="Sequencing depth" expanded="True" help="Sequencing depths will be used to calculate scaling factor for each sample, to down-scale larger sample to the level of smaller one. For example, while comparing condition 1 (10 Million reads) and condition 2 (20 million reads), use --depth1 10 --depth2 20, then pileup value in bedGraph for condition 2 will be divided by 2.">
+            <param name="depth1" type="integer" value="1" label="Sequence depth of condition 1 in million reads" help="Default=1 (--depth1)" />
+            <param name="depth2" type="integer" value="1" label="Sequence depth of condition 2 in million reads" help="Default=1 (--depth2)" />
+        </section>
+        <param name="maxgap" type="integer" value="100" label="Maximum gap to merge nearby differential regions" help="Consider a wider gap for broad marks. Maximum gap should be smaller than minimum length. Default=100 (--max-gap)." />
+
+
     </inputs>
     <outputs>
-        <data name="output_cond1" format="bed" from_work_dir="MACS2_cond1.bed" label="${tool.name} on ${on_string} (cond 1)">
-            <filter>'--ofile-cond1' in outputs</filter>
-        </data>
-        <data name="output_cond2" format="bed" from_work_dir="MACS2_cond1.bed" label="${tool.name} on ${on_string} (cond 2)">
-            <filter>'--ofile-cond2' in outputs</filter>
-        </data>
-        <data name="output_both" format="bed" from_work_dir="MACS2_common.bed" label="${tool.name} on ${on_string} (both)">
-            <filter>'--ofile-both-conditions' in outputs</filter>
-        </data>
+        <data name="output_cond1" format="bed" label="${tool.name} on ${on_string} (Condition 1)"/>
+        <data name="output_cond2" format="bed" label="${tool.name} on ${on_string} (Condition 2)"/>
+        <data name="output_both"  format="bed" label="${tool.name} on ${on_string} (Common)"/>
     </outputs>
     <tests>
-            <!-- we need a second condition here -->
-            <!--
         <test>
 
-            <param name="infile_control_cond1" value="Control_200K.bed" ftype="bed"/>
-            <param name="infile_control_cond2" value="Control_200K.bed" ftype="bed"/>
-            <param name="infile_pileup_cond1" value="ChIP_200K.bed" ftype="bed"/>
-            <param name="infile_pileup_cond2" value="ChIP_200K.bed" ftype="bed"/>
+            <param name="t1" value="bdgdiff_t1.bdg" ftype="bedgraph"/>
+            <param name="t2" value="bdgdiff_t2.bdg" ftype="bedgraph"/>
+            <param name="c1" value="bdgdiff_c1.bdg" ftype="bedgraph"/>
+            <param name="c2" value="bdgdiff_c2.bdg" ftype="bedgraph"/>
             <param name="cutoff" value="1.0"/>
             <param name="minlen" value="200"/>
-            <param name="depth1" value="1"/>
+            <param name="depth1" value="10"/>
             <param name="depth2" value="1"/>
             <param name="maxgap" value="100"/>
-            <param name="outputs" value="-ofile-cond1,-ofile-cond2,-ofile-both-conditions"/>
-            <output name="output_cond1" file=""/>
-            <output name="output_cond2" file=""/>
-            <output name="output_both" file=""/>
+            <output name="output_cond1">
+                <assert_contents>
+                    <has_text text="c2.bed1" />
+                </assert_contents>
+            </output>
         </test>
-            -->
     </tests>
     <help>
+    <![CDATA[
 **What it does**
 
-bdgdiff from macs2
+This is **bdgdiff** utility from the MACS2_ Package. It performs differential peak detection based on paired four bedgraph files.
 
+.. _MACS2: https://github.com/taoliu/MACS
 
 @citation@
+    ]]>
     </help>
     <expand macro="citations" />
 </tool>