changeset 1:d202e3d663bb draft

Uploaded
author iuc
date Thu, 16 Jan 2014 15:44:43 -0500
parents 9c157b556c33
children 1bb575b6c07c
files macs2_bdgbroadcall.xml macs2_bdgcmp.xml macs2_bdgdiff.xml macs2_bdgpeakcall.xml macs2_callpeak.xml macs2_filterdup.xml macs2_macros.xml macs2_predict.xml macs2_randsample.xml macs2_refinepeak.xml tool_dependencies.xml
diffstat 11 files changed, 173 insertions(+), 79 deletions(-) [+]
line wrap: on
line diff
--- a/macs2_bdgbroadcall.xml	Thu Jan 16 13:31:17 2014 -0500
+++ b/macs2_bdgbroadcall.xml	Thu Jan 16 15:44:43 2014 -0500
@@ -1,11 +1,10 @@
 <tool id="macs2_bdgbroadcall" name="Call broad peaks" version="2.0.10.0">
     <description>from bedGraph</description>
-    <requirements>
-        <requirement type="python-module">macs2</requirement>
-        <requirement type="python-module">numpy</requirement>
-        <requirement type="package" version="2.0.10.2">macs2</requirement>
-        <requirement type="package" version="1.7.1">numpy</requirement>
-    </requirements>
+    <expand macro="requirements" />
+    <expand macro="version_command" />
+    <macros>
+        <import>macs2_macros.xml</import>
+    </macros>
     <command>
 
         macs2 bdgbroadcall
--- a/macs2_bdgcmp.xml	Thu Jan 16 13:31:17 2014 -0500
+++ b/macs2_bdgcmp.xml	Thu Jan 16 15:44:43 2014 -0500
@@ -1,11 +1,10 @@
 <tool id="macs2_bdgcmp" name="Deduct noise" version="2.0.10.0">
     <description>by comparing two signal tracks in bedGraph (bdgcmp)</description>
-    <requirements>
-        <requirement type="python-module">macs2</requirement>
-        <requirement type="python-module">numpy</requirement>
-        <requirement type="package" version="2.0.10.2">macs2</requirement>
-        <requirement type="package" version="1.7.1">numpy</requirement>
-    </requirements>
+    <expand macro="requirements" />
+    <expand macro="version_command" />
+    <macros>
+        <import>macs2_macros.xml</import>
+    </macros>
     <command>
         macs2 bdgcmp
             -t $input_treatment_file
--- a/macs2_bdgdiff.xml	Thu Jan 16 13:31:17 2014 -0500
+++ b/macs2_bdgdiff.xml	Thu Jan 16 15:44:43 2014 -0500
@@ -1,13 +1,11 @@
 <tool id="macs2_bdgdiff" name="Differential peak detection" version="2.0.10.0">
     <description>based on paired four bedgraph files</description>
-    <requirements>
-        <requirement type="python-module">macs2</requirement>
-        <requirement type="python-module">numpy</requirement>
-        <requirement type="package" version="2.0.10.2">macs2</requirement>
-        <requirement type="package" version="1.7.1">numpy</requirement>
-    </requirements>
+    <expand macro="requirements" />
+    <expand macro="version_command" />
+    <macros>
+        <import>macs2_macros.xml</import>
+    </macros>
     <command>
-
         macs2 bdgdiff
             --t1 $infile_pileup_cond1
             --t2 $infile_pileup_cond2
@@ -30,7 +28,6 @@
             #if '--ofile-both-conditions' in str($outputs).split(','):
                 --ofile-both-conditions $output_both
             #end if
-
     </command>
     <inputs>
         <param name="infile_pileup_cond1" type="data" format="bedgraph" label="MACS pileup bedGraph for condition 1" />
@@ -39,7 +36,7 @@
         <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="cutoff" type="float" label="Cutoff of log10 likelihood ratio cutoff" value="1.0" help="DEFAULT: 1.0 (likelihood ratio=10) (--cutoff)"/>
+        <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)" />
--- a/macs2_bdgpeakcall.xml	Thu Jan 16 13:31:17 2014 -0500
+++ b/macs2_bdgpeakcall.xml	Thu Jan 16 15:44:43 2014 -0500
@@ -1,11 +1,10 @@
 <tool id="macs2_bdgpeakcall" name="Call peaks" version="2.0.10.0">
     <description>from bedGraph output</description>
-    <requirements>
-        <requirement type="python-module">macs2</requirement>
-        <requirement type="python-module">numpy</requirement>
-        <requirement type="package" version="2.0.10.2">macs2</requirement>
-        <requirement type="package" version="1.7.1">numpy</requirement>
-    </requirements>
+    <expand macro="requirements" />
+    <expand macro="version_command" />
+    <macros>
+        <import>macs2_macros.xml</import>
+    </macros>
     <command>
 
         macs2 bdgpeakcall
@@ -31,7 +30,6 @@
         <param name="notrackline" type="boolean" truevalue="" falsevalue="--no-trackline" checked="False" 
             label="Include trackline into bedGraph output"
             help="required by USCS (--no-trackline)"/>
-
     </inputs>
     <outputs>
         <data name="ofile" format="tabular" label="${tool.name} on ${on_string}" />
--- a/macs2_callpeak.xml	Thu Jan 16 13:31:17 2014 -0500
+++ b/macs2_callpeak.xml	Thu Jan 16 15:44:43 2014 -0500
@@ -1,12 +1,13 @@
 <tool id="macs2_callpeak" name="Call peaks" version="2.0.10.0">
     <description>from alignment results</description>
-    <requirements>
-        <requirement type="python-module">macs2</requirement>
-        <requirement type="python-module">numpy</requirement>
-        <requirement type="package" version="2.0.10.2">macs2</requirement>
-        <requirement type="package" version="1.7.1">numpy</requirement>
+    <expand macro="requirements">
+        <requirement type="package" version="3.0.1">R_3_0_1</requirement>
         <!-- awk and R is missing -->
-    </requirements>
+    </expand>
+    <expand macro="version_command" />
+    <macros>
+        <import>macs2_macros.xml</import>
+    </macros>
     <command>
         #set $temp_stderr = 'macs2_stderr'
         macs2 callpeak
@@ -21,14 +22,10 @@
         #for $ifile in $input_treatment_file:
             --format='$ifile.ext.upper()'
         #end for
-        
-        #if $effective_genome_size_options.effective_genome_size_options_selector == 'user_defined':
-            --gsize $effective_genome_size_options.gsize
-        #else:
-            --gsize $effective_genome_size_options.effective_genome_size_options_selector
-        #end if
 
-        --bw='$bw'
+        @effective_genome_size@
+
+        --bw='$band_width'
 
         ##advanced options
         #if str( $advanced_options.advanced_options_selector ) == 'on':
@@ -116,26 +113,15 @@
         #end if
 
         cat $temp_stderr 2>&#38;1
-
     </command>
     <inputs>
         <param name="input_control_file" type="data" format="bam,sam,bed" multiple="True" optional="True" label="ChIP-Seq Control File" />
         <param name="input_treatment_file" type="data" format="bam,sam,bed" multiple="True" label="ChIP-Seq Treatment File" />
 
-        <conditional name="effective_genome_size_options">
-            <param name="effective_genome_size_options_selector" type="select" label="Effective genome size" help="--gsize">
-                <option value="3300000000">Human (3.300.000.000)</option>
-                <option value="3000000000">Mouse (3.000.000.000)</option>
-                <option value="190000000">Fly (190.000.000)</option>
-                <option value="130000000">Worm (130.000.000)</option>
-                <option value="user_defined">User defined</option>
-            </param>
-            <when value="user_defined">
-                <param name="gsize" type="integer" size="12" label="Effective genome size" value=""/>
-            </when>
-        </conditional>
+        <expand macro="conditional_effective_genome_size" />
 
-        <param name="bw" type="integer" label="Band width" value="300" help="(--bw)"/>
+        <param name="band_width" type="integer" value="300" label="Band width for picking regions to compute fragment size"
+            help="This value is only used while building the shifting model." />
         <param name="bdg" type="boolean" truevalue="-B" falsevalue="" checked="False" label="Save fragment pileup, control lambda, -log10pvalue/qvalue in bedGraph" help="Files are located in the html report."/>
 
         <conditional name="pq_options">
--- a/macs2_filterdup.xml	Thu Jan 16 13:31:17 2014 -0500
+++ b/macs2_filterdup.xml	Thu Jan 16 15:44:43 2014 -0500
@@ -1,11 +1,10 @@
 <tool id="macs2_filterdup" name="Remove duplicate reads" version="2.0.10.0">
     <description>at the same position</description>
-    <requirements>
-        <requirement type="python-module">macs2</requirement>
-        <requirement type="python-module">numpy</requirement>
-        <requirement type="package" version="2.0.10.2">macs2</requirement>
-        <requirement type="package" version="1.7.1">numpy</requirement>
-    </requirements>
+    <expand macro="requirements" />
+    <expand macro="version_command" />
+    <macros>
+        <import>macs2_macros.xml</import>
+    </macros>
     <command>
         macs2 filterdup
             -t $infile
@@ -26,7 +25,7 @@
         <!--may need to add a few more formats at later time-->
         <param name="infile" type="data" format="sam,bam,bed" label="Sequencing alignment file" />
         <param name="gsize" type="float" label="Effective genome size" value="2.7e+9" help="Human: 3.3e+9, Mouse: 3.0e+9, Fly: 1.9e+8, Worm: 1.3e+8 (--gsize)" />
-        <param name="tsize" type="float" label="Tag size" value="-1.0" help="This will overide the auto detected tag size. DEFAULT: Not set (-1.0)  (--tsize)" />
+        <expand macro="tag_size" />
         <param name="pvalue" type="float" label="Pvalue cutoff for binomial distribution test" value="1e-5" help="default: 1e-5 (--pvalue)" />
 
         <conditional name="keep_dup_options">
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macs2_macros.xml	Thu Jan 16 15:44:43 2014 -0500
@@ -0,0 +1,49 @@
+<macros>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="python-module">macs2</requirement>
+            <requirement type="python-module">numpy</requirement>
+            <requirement type="package" version="2.0.10.2">macs2</requirement>
+            <requirement type="package" version="1.7.1">numpy</requirement>
+            <yield />
+        </requirements>
+    </xml>
+
+    <xml name="conditional_effective_genome_size">
+        <conditional name="effective_genome_size_options">
+            <param name="effective_genome_size_options_selector" type="select" label="Effective genome size" help="--gsize">
+                <option value="3300000000">Human (3.300.000.000)</option>
+                <option value="3000000000">Mouse (3.000.000.000)</option>
+                <option value="190000000">Fly (190.000.000)</option>
+                <option value="130000000">Worm (130.000.000)</option>
+                <option value="user_defined">User defined</option>
+            </param>
+            <when value="user_defined">
+                <param name="gsize" type="integer" size="12" label="Effective genome size" value=""/>
+            </when>
+        </conditional>
+    </xml>
+
+    <token name="@effective_genome_size@">
+        #if $effective_genome_size_options.effective_genome_size_options_selector == 'user_defined':
+            --gsize $effective_genome_size_options.gsize
+        #else:
+            --gsize $effective_genome_size_options.effective_genome_size_options_selector
+        #end if
+    </token>
+
+    <xml name="version_command">
+        <version_command>macs2 --version</version_command>
+    </xml>
+
+    <xml name="tag_size">
+        <param name="tsize" type="float" label="Tag size" value="-1.0" help="This will overide the auto detected tag size. DEFAULT: Not set (-1.0)  (--tsize)" />
+    </xml>
+
+    <xml name="stdio">
+        <stdio>
+            <regex match="Error:" />
+            <regex match="EXception:" />
+        </stdio>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macs2_predict.xml	Thu Jan 16 15:44:43 2014 -0500
@@ -0,0 +1,66 @@
+<tool id="macs2_predict" name="Predict" version="2.0.10.0">
+    <description>d or fragment size from alignment results</description>
+    <expand macro="requirements">
+        <requirement type="package" version="3.0.1">R_3_0_1</requirement>
+    </expand>
+    <expand macro="version_command" />
+    <macros>
+        <import>macs2_macros.xml</import>
+    </macros>
+    <command>
+        macs2 predict
+            -i #echo ','.join($infiles)#
+            --tsize $tsize
+            @effective_genome_size@
+            --bw $band_width
+            --mfold $advanced_options.mfoldlo $advanced_options.mfoldhi
+            &gt; $outfile;
+
+        Rscript predicted_model.R &gt; $outfile_image
+    </command>
+        <expand macro="stdio" />
+    <inputs>
+        <repeat name="infiles" title="ChIP-seq alignment files" min="1" 
+            help="If multiple files are given, then they will all be read and combined. Note that pair-end data is not supposed to work with this command.">
+
+            <param name="infile" type="data" format="bam,sam,bed" multiple="True" optional="True" label="ChIP-seq alignment file" help="-i" />
+        </repeat>
+
+        <expand macro="conditional_effective_genome_size" />
+        <expand macro="tag_size" />
+
+        <param name="band_width" type="integer" value="300" label="Band width for picking regions to compute fragment size"
+            help="This value is only used while building the shifting model. (--bw)" />
+
+        <param name="mfoldlo" type="integer" label="Fold-enrichment lower limit" value="5"
+            help="Select the regions with MFOLD high-confidence enrichment ratio against background to build model (--mfold)"/>
+        <param name="mfoldhi" type="integer" label="Fold-enrichment upper-limit" value="50"
+            help="Select the regions with MFOLD high-confidence enrichment ratio against background to build model (--mfold)"/>
+
+    </inputs>
+
+    <outputs>
+        <data name="outfile" format="txt" label="${tool.name} on ${on_string} - d value" />
+        <data name="outfile_image" format="png" label="${tool.name} on ${on_string} - X-correlation image" />
+    </outputs>
+    <tests>
+        <!--none yet for macs2-->
+    </tests>
+    <help>
+**What it does**
+
+bdgdiff from macs2
+
+
+Note that pair-end data is not supposed to work with this command.
+
+
+------
+
+**Citation**
+
+For the underlying tool, please cite Zhang Y, Liu T, Meyer CA, Eeckhoute J, Johnson DS, Bernstein BE, Nusbaum C, Myers RM, Brown M, Li W, Liu XS. Model-based analysis of ChIP-Seq (MACS). Genome Biol. 2008;9(9):R137.
+
+Integration of MACS2 with Galaxy performed by Ziru Zhou ( ziruzhou@gmail.com ). Please send your comments/questions to modENCODE DCC at help@modencode.org.
+    </help>
+</tool>
--- a/macs2_randsample.xml	Thu Jan 16 13:31:17 2014 -0500
+++ b/macs2_randsample.xml	Thu Jan 16 15:44:43 2014 -0500
@@ -1,11 +1,10 @@
 <tool id="macs2_randsamoke" name="Randomly sample number or percentage" version="2.0.10.0">
     <description>of total reads</description>
-    <requirements>
-        <requirement type="python-module">macs2</requirement>
-        <requirement type="python-module">numpy</requirement>
-        <requirement type="package" version="2.0.10.2">macs2</requirement>
-        <requirement type="package" version="1.7.1">numpy</requirement>
-    </requirements>
+    <expand macro="requirements" />
+    <expand macro="version_command" />
+    <macros>
+        <import>macs2_macros.xml</import>
+    </macros>
     <command>
         macs2 randsample
             -t $infile
@@ -25,7 +24,7 @@
 
         <!--may need to add a few more formats at later time-->
         <param name="infile" type="data" format="sam,bam,bed" label="Sequencing alignment file" />
-        <param name="tsize" type="float" label="Tag size" value="-1.0" help="This will overide the auto detected tag size. DEFAULT: Not set (-1.0)  (--tsize)" />
+        <expand macro="tag_size" />
 
         <conditional name="method_options">
             <param name="method_options_selector" type="select" label="Select action to be performed">
--- a/macs2_refinepeak.xml	Thu Jan 16 13:31:17 2014 -0500
+++ b/macs2_refinepeak.xml	Thu Jan 16 15:44:43 2014 -0500
@@ -1,11 +1,10 @@
 <tool id="macs2_refinepeak" name="Refine peak summits" version="2.0.10.0">
     <description></description>
-    <requirements>
-        <requirement type="python-module">macs2</requirement>
-        <requirement type="python-module">numpy</requirement>
-        <requirement type="package" version="2.0.10.2">macs2</requirement>
-        <requirement type="package" version="1.7.1">numpy</requirement>
-    </requirements>
+    <expand macro="requirements" />
+    <expand macro="version_command" />
+    <macros>
+        <import>macs2_macros.xml</import>
+    </macros>
     <command>
 
         macs2 refinepeak
@@ -21,7 +20,7 @@
         <param name="infile" type="data" format="sam,bam,bed" label="Sequencing alignment file" />
         <param name="bed_infile" type="data" format="bed" label="Candidate peak file in BED format" />
         <param name="cutoff" type="float" label="Cutoff" value="5.0" help="DEFAULT: 5.0 (--cutoff)"/>
-        <param name="winsize" type="integer" value="200" label="Scan window size on both side of the summit" help="DEFAULT: 200bp (--window-size)" />
+        <param name="winsize" type="integer" value="200" label="Scan window size on both side of the summit" help="default: 200bp (--window-size)" />
     </inputs>
 
     <outputs>
--- a/tool_dependencies.xml	Thu Jan 16 13:31:17 2014 -0500
+++ b/tool_dependencies.xml	Thu Jan 16 15:44:43 2014 -0500
@@ -1,10 +1,13 @@
 <?xml version="1.0"?>
 <tool_dependency>
-    <package name="numpy" version="1.7.1">
-       <repository changeset_revision="84125ffacb90" name="package_numpy_1_7" owner="iuc" toolshed="http://testtoolshed.g2.bx.psu.edu" />
+    <!--<package name="numpy" version="1.7.1">
+       <repository name="package_numpy_1_7" owner="iuc"/>
     </package>
     <package name="scipy" version="0.12">
-       <repository changeset_revision="3c1bf479158c" name="package_scipy_0_12" owner="iuc" toolshed="http://testtoolshed.g2.bx.psu.edu" />
+       <repository name="package_scipy_0_12" owner="iuc"/>
+    </package>-->
+    <package name="R_3_0_1" version="3.0.1">
+        <repository changeset_revision="0a395bcd7efd" name="package_r_3_0_1" owner="iuc" prior_installation_required="True" toolshed="http://testtoolshed.g2.bx.psu.edu" />
     </package>
     <package name="macs2" version="2.0.10.2">
         <install version="1.0">