changeset 27:16545befe8b5 draft

Uploaded
author iuc
date Thu, 08 Jan 2015 13:39:36 -0500
parents 59845dc3331f
children a503a132720e
files macs2_bdgbroadcall.xml macs2_bdgcmp.xml macs2_bdgdiff.xml macs2_bdgpeakcall.xml macs2_callpeak.xml macs2_filterdup.xml macs2_macros.xml macs2_predictd.xml macs2_randsample.xml macs2_refinepeak.xml test-data/predictd_on_ChIP_200K_and_Control_200K.txt tool_dependencies.xml
diffstat 12 files changed, 56 insertions(+), 74 deletions(-) [+]
line wrap: on
line diff
--- a/macs2_bdgbroadcall.xml	Fri Sep 19 13:43:11 2014 -0400
+++ b/macs2_bdgbroadcall.xml	Thu Jan 08 13:39:36 2015 -0500
@@ -1,4 +1,4 @@
-<tool id="macs2_bdgbroadcall" name="MACS2 bdgbroadcall" version="2.0.10.0">
+<tool id="macs2_bdgbroadcall" name="MACS2 bdgbroadcall" version="@VERSION_STRING@.0">
     <description>Call broad peaks from bedGraph output</description>
     <expand macro="requirements">
         <requirement type="package" version="4.1.0">gnu_awk</requirement>
--- a/macs2_bdgcmp.xml	Fri Sep 19 13:43:11 2014 -0400
+++ b/macs2_bdgcmp.xml	Thu Jan 08 13:39:36 2015 -0500
@@ -1,4 +1,4 @@
-<tool id="macs2_bdgcmp" name="MACS2 bdgcmp" version="2.0.10.0">
+<tool id="macs2_bdgcmp" name="MACS2 bdgcmp" version="@VERSION_STRING@.0">
     <description>Deduct noise by comparing two signal tracks in bedGraph</description>
     <expand macro="requirements" />
     <expand macro="version_command" />
--- a/macs2_bdgdiff.xml	Fri Sep 19 13:43:11 2014 -0400
+++ b/macs2_bdgdiff.xml	Thu Jan 08 13:39:36 2015 -0500
@@ -1,4 +1,4 @@
-<tool id="macs2_bdgdiff" name="MACS2 bdgdiff" version="2.0.10.0">
+<tool id="macs2_bdgdiff" name="MACS2 bdgdiff" version="@VERSION_STRING@.0">
     <description>Differential peak detection based on paired four bedgraph files</description>
     <expand macro="requirements" />
     <expand macro="version_command" />
--- a/macs2_bdgpeakcall.xml	Fri Sep 19 13:43:11 2014 -0400
+++ b/macs2_bdgpeakcall.xml	Thu Jan 08 13:39:36 2015 -0500
@@ -1,4 +1,4 @@
-<tool id="macs2_bdgpeakcall" name="MACS2 bdgpeakcall" version="2.0.10.0">
+<tool id="macs2_bdgpeakcall" name="MACS2 bdgpeakcall" version="@VERSION_STRING@.0">
     <description>Call peaks from bedGraph output</description>
     <expand macro="requirements">
         <requirement type="package" version="4.1.0">gnu_awk</requirement>
--- a/macs2_callpeak.xml	Fri Sep 19 13:43:11 2014 -0400
+++ b/macs2_callpeak.xml	Thu Jan 08 13:39:36 2015 -0500
@@ -1,4 +1,4 @@
-<tool id="macs2_callpeak" name="MACS2 callpeak" version="2.0.10.0">
+<tool id="macs2_callpeak" name="MACS2 callpeak" version="@VERSION_STRING@.0">
     <description>Call peaks from alignment results</description>
     <expand macro="requirements">
         <requirement type="package" version="3.0.1">R_3_0_1</requirement>
@@ -35,6 +35,10 @@
         ## advanced options
         #if $advanced_options.advanced_options_selector == 'on':
             $advanced_options.nolambda
+            $advanced_options.to_large
+            --ratio $advanced_options.ratio
+            --slocal $advanced_options.slocal
+            --llocal $advanced_options.llocal
             #if $advanced_options.broad_options.broad_options_selector == 'broad':
                 --broad
                 --broad-cutoff='${ advanced_options.broad_options.broad_cutoff }'
@@ -150,7 +154,7 @@
         <param name="outputs" type="select" display="checkboxes" multiple="True" label="Outputs">
             <option value="peaks_bed" selected="True">Peaks as BED file</option>
             <!--<option value="narrow">narrow Peaks</option>-->
-            <!--<option value="summits" selected="true">summits</option>-->
+            <option value="summits" selected="true">summits</option>
             <option value="bdg" selected="true">Scores in bedGraph files (--bdg)</option>
             <option value="html">Summary page (html)</option>
             <option value="pdf">Plot in PDF</option>
@@ -163,8 +167,18 @@
                 <option value="on">Display advanced options</option>
             </param>
             <when value="on">
+                <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" 
                     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"
+                    help="(--ratio)"/>
+                <param name="slocal" value="1000" type="integer" label="The small nearby region in basepairs to calculate dynamic lambda"
+                    help="This is used to capture the bias near the peak summit region. Invalid if there is no control data. If you set this to 0, MACS will skip slocal lambda calculation. *Note* that MACS will always perform a d-size local lambda calculation. The final local bias should be the maximum of the lambda value from d, slocal, and llocal size windows. (--slocal)"/>
+                <param name="llocal" value="10000" type="integer" label="The large nearby region in basepairs to calculate dynamic lambda"
+                    help="This is used to capture the surround bias. If you set this to 0, MACS will skip llocal lambda calculation. *Note* that MACS will always perform a d-size local lambda calculation. The final local bias should be the maximum of the lambda value from d, slocal, and llocal size windows. (--llocal)"/>
                 <conditional name="broad_options">
                     <param name="broad_options_selector" type="select"
                         label="Composite broad regions" help="by putting nearby highly enriched regions into a broad region with loose cutoff (--broad)">
@@ -191,7 +205,7 @@
         <data name="output_bed" format="bed" label="${tool.name} on ${on_string} (Peaks in BED format)">
             <filter>'peaks_bed' in outputs</filter>
         </data>
-        <data name="output_broadpeaks" format="bed" from_work_dir="MACS2_broad_peaks.bed" label="${tool.name} on ${on_string} (broad Peaks)">
+        <data name="output_broadpeaks" format="bed" from_work_dir="MACS2_peaks.broadPeak" label="${tool.name} on ${on_string} (broad Peaks)">
             <filter>
             ((
               advanced_options['advanced_options_selector'] == "on" and
@@ -209,19 +223,16 @@
         </data>
         <data name="output_narrowpeaks" format="tabular" from_work_dir="MACS2_peaks.narrowPeak" label="${tool.name} on ${on_string} (narrow Peaks)">
             <filter>
-            ((
+            (
+              advanced_options['advanced_options_selector'] == "off" or
+            (
               advanced_options['advanced_options_selector'] == "on" and
               advanced_options['broad_options']['broad_options_selector'] == "nobroad"
             ))
             </filter>
         </data>
         <data name="output_summits" format="bed" from_work_dir="MACS2_summits.bed" label="${tool.name} on ${on_string} (summits in BED)">
-            <filter>
-            ((
-              advanced_options['advanced_options_selector'] == "on" and
-              advanced_options['broad_options']['broad_options_selector'] == "nobroad"
-            ))
-            </filter>
+            <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>
@@ -243,8 +254,9 @@
             <param name="cutoff_options_selector" value="qvalue"/>
             <param name="qvalue" value="0.05"/>
             <param name="band_width" value="300"/>
-            <param name="outputs" value="peaks_bed,bdg,summits"/>
-            <param name="effective_genome_size_options_selector" value="3300000000"/>
+            <param name="outputs" value="peaks_bed,bdg"/>
+            <param name="effective_genome_size_options_selector" value="user_defined" />
+            <param name="gsize" value="3300000000" />
             <output name="output_control_lambda" compare="contains" file="callpeak_control_part.bdg"/>
             <output name="output_treat_pileup" compare="contains" file="callpeak_treatment_part.bdg"/>
             <output name="output_bed" compare="contains" file="callpeak_part.bed"/>
--- a/macs2_filterdup.xml	Fri Sep 19 13:43:11 2014 -0400
+++ b/macs2_filterdup.xml	Thu Jan 08 13:39:36 2015 -0500
@@ -1,4 +1,4 @@
-<tool id="macs2_filterdup" name="MACS2 filterdup" version="2.0.10.0">
+<tool id="macs2_filterdup" name="MACS2 filterdup" version="@VERSION_STRING@.0">
     <description>Remove duplicate reads at the same position</description>
     <expand macro="requirements" />
     <expand macro="version_command" />
@@ -40,7 +40,8 @@
             <param name="infile" value="ChIP_200K_w_dups.bed" ftype="bed"/>
             <param name="pvalue" value="1e-5"/>
             <param name="keep_dup_options_selector" value="auto"/>
-            <param name="effective_genome_size_options_selector" value="3300000000"/>
+            <param name="effective_genome_size_options_selector" value="user_defined" />
+            <param name="gsize" value="3300000000" />
             <output name="outfile" file="filterdup_on_ChIP_200K_w_dups.bed"/>
         </test>
     </tests>
--- a/macs2_macros.xml	Fri Sep 19 13:43:11 2014 -0400
+++ b/macs2_macros.xml	Thu Jan 08 13:39:36 2015 -0500
@@ -1,23 +1,25 @@
 <macros>
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="2.0.10.3">macs2</requirement>
+            <requirement type="package" version="2.1.0">macs2</requirement>
             <requirement type="package" version="1.7.1">numpy</requirement>
             <requirement type="package" version="0.12.0">scipy</requirement>
             <yield />
         </requirements>
     </xml>
 
+    <token name="@VERSION_STRING@">2.1.0.20140616</token>
+
     <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="The effective genome size is the portion of the genome that is mappable. Large fractions of the genome are stretches of NNNN that should be discarded.
                     Also, if repetitive regions were not included in the mapping of reads, the effective genome size needs to be adjusted accordingly.
                     See Table 2 of http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0030377 or http://www.nature.com/nbt/journal/v27/n1/fig_tab/nbt.1518_T1.html for several effective genome sizes. (--gsize)">
-                <option value="2451960000">Human (2.451.960.000)</option>
-                <option value="2150570000">Mouse (2.150.570.000)</option>
-                <option value="121400000">Fly (121.400.000)</option>
-                <option value="93260000">Worm (93.260.000)</option>
+                <option value="2451960000">Human (2,451,960,000)</option>
+                <option value="2150570000">Mouse (2,150,570,000)</option>
+                <option value="121400000">Fly (121,400,000)</option>
+                <option value="93260000">Worm (93,260,000)</option>
                 <option value="user_defined">User defined</option>
             </param>
             <when value="user_defined">
@@ -29,7 +31,7 @@
     <xml name="keep_duplicates">
         <conditional name="keep_dup_options">
             <param name="keep_dup_options_selector" type="select" label="How many duplicate tags at the exact same location are allowed?"
-                help="The default 'auto' option calculates the maximum tags at the exact same location based on binomal distribution using 1e-5 as pvalue cutoff. The 'all' option keeps every tags. If an integer is given, at most this number of tags will be kept at the same location. The default is to keep one tag at the same location. (--keep-dup 1)">
+                help="The default 'auto' option calculates the maximum tags at the exact same location based on binomial distribution using 1e-5 as pvalue cutoff. The 'all' option keeps every tags. If an integer is given, at most this number of tags will be kept at the same location. The default is to keep one tag at the same location. (--keep-dup 1)">
                 <option value="1" selected="true">1</option>
                 <option value="all">all</option>
                 <option value="auto">auto</option>
@@ -58,7 +60,7 @@
     </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. Per default that option is deactivated: -1.0 (--tsize)" />
+        <param name="tsize" type="float" label="Tag size" value="-1.0" help="This will override the auto detected tag size. Per default that option is deactivated: -1.0 (--tsize)" />
     </xml>
     <xml name="band_width">
         <param name="band_width" type="integer" value="300" label="Band width for picking regions to compute fragment size"
--- a/macs2_predictd.xml	Fri Sep 19 13:43:11 2014 -0400
+++ b/macs2_predictd.xml	Thu Jan 08 13:39:36 2015 -0500
@@ -1,4 +1,4 @@
-<tool id="macs2_predictd" name="MACS2 predictd" version="2.0.10.0">
+<tool id="macs2_predictd" name="MACS2 predictd" version="@VERSION_STRING@.0">
     <description>Predict 'd' or fragment size from alignment results</description>
     <expand macro="requirements">
         <requirement type="package" version="3.0.1">R_3_0_1</requirement>
@@ -46,13 +46,14 @@
     <tests>
         <test>
             <param name="infiles" value="Control_200K.bed,ChIP_200K.bed" ftype="bed" />
-            <param name="effective_genome_size_options_selector" value="3300000000" />
+            <param name="effective_genome_size_options_selector" value="user_defined" />
+            <param name="gsize" value="3300000000" />
             <param name="tsize" value="-1.0"/>
             <param name="band_width" value="300"/>
             <param name="mfoldlo" value="5"/>
             <param name="mfoldhi" value="50"/>
             <output name="outfile" file="predictd_on_ChIP_200K_and_Control_200K.txt"/>
-            <output name="outfile_image" file="predictd_on_ChIP_200K_and_Control_200K.pdf" lines_diff="5"/>
+            <output name="outfile_image" file="predictd_on_ChIP_200K_and_Control_200K.pdf" compare="sim_size"/>
         </test>
     </tests>
     <help>
--- a/macs2_randsample.xml	Fri Sep 19 13:43:11 2014 -0400
+++ b/macs2_randsample.xml	Thu Jan 08 13:39:36 2015 -0500
@@ -1,4 +1,4 @@
-<tool id="macs2_randsample" name="MACS2 randsample" version="2.0.10.0">
+<tool id="macs2_randsample" name="MACS2 randsample" version="@VERSION_STRING@.0">
     <description>Randomly sample number or percentage of total reads</description>
     <expand macro="requirements" />
     <expand macro="version_command" />
--- a/macs2_refinepeak.xml	Fri Sep 19 13:43:11 2014 -0400
+++ b/macs2_refinepeak.xml	Thu Jan 08 13:39:36 2015 -0500
@@ -1,4 +1,4 @@
-<tool id="macs2_refinepeak" name="MACS2 refinepeak" version="2.0.10.0">
+<tool id="macs2_refinepeak" name="MACS2 refinepeak" version="@VERSION_STRING@.0">
     <description>Refine peak summits and give scores measuring balance of forward- backward tags (Experimental)</description>
     <expand macro="requirements" />
     <expand macro="version_command" />
--- a/test-data/predictd_on_ChIP_200K_and_Control_200K.txt	Fri Sep 19 13:43:11 2014 -0400
+++ b/test-data/predictd_on_ChIP_200K_and_Control_200K.txt	Thu Jan 08 13:39:36 2015 -0500
@@ -12,5 +12,5 @@
 end of X-cor
 # finished!
 # predicted fragment length is 284 bps
-# alternative fragment length(s) may be -246,-230,284 bps
+# alternative fragment length(s) may be 284 bps
 # Generate R script for model
--- a/tool_dependencies.xml	Fri Sep 19 13:43:11 2014 -0400
+++ b/tool_dependencies.xml	Thu Jan 08 13:39:36 2015 -0500
@@ -1,55 +1,21 @@
 <?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="https://testtoolshed.g2.bx.psu.edu" />
+  <package name="numpy" version="1.7.1">
+      <repository changeset_revision="84125ffacb90" name="package_numpy_1_7" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
     </package>
     <package name="scipy" version="0.12.0">
-       <repository changeset_revision="a983dc7c8103" name="package_scipy_0_12" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+      <repository changeset_revision="a983dc7c8103" name="package_scipy_0_12" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
     </package>
     <package name="R_3_0_1" version="3.0.1">
-        <repository changeset_revision="1c0e86a44f73" name="package_r_3_0_1" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+      <repository changeset_revision="1c0e86a44f73" name="package_r_3_0_1" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
     </package>
     <package name="gnu_awk" version="4.1.0">
-       <repository changeset_revision="cbe9f1c8c98b" name="package_gnu_awk_4_1_0" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+      <repository changeset_revision="cbe9f1c8c98b" name="package_gnu_awk_4_1_0" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+    </package>
+    <package name="macs2" version="2.1.0">
+      <repository changeset_revision="6d85350ae428" name="package_macs2_2_1_0" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
     </package>
     <set_environment version="1.0">
-        <environment_variable action="set_to" name="MACS2_SCRIPT_PATH">$REPOSITORY_INSTALL_DIR</environment_variable>
+      <environment_variable action="set_to" name="MACS2_SCRIPT_PATH">$REPOSITORY_INSTALL_DIR</environment_variable>
     </set_environment>
-    <!-- 2.0.10 12162013 -->
-    <package name="macs2" version="2.0.10.3">
-        <install version="1.0">
-            <actions>
-                <action type="shell_command">git clone --recursive https://github.com/taoliu/MACS.git</action>
-                <!-- Galaxy tries to change automatically to the directory "macs2" (name of the package). 
-                But we need to change to MACS. Go one level back and enter MACS -->
-                <action type="change_directory">../MACS</action>
-                <action type="shell_command">git checkout 7ccb571d2f2dcb5be1d75f323b1d17a59b926deb</action>
-                <action type="shell_command">git submodule update --recursive</action>
-
-                <action type="set_environment_for_install">
-                    <repository changeset_revision="84125ffacb90" name="package_numpy_1_7" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu">
-                        <package name="numpy" version="1.7.1" />
-                    </repository>
-                    <repository changeset_revision="a983dc7c8103" name="package_scipy_0_12" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu">
-                        <package name="scipy" version="0.12.0" />
-                    </repository>
-                </action>
-                <action type="make_directory">$INSTALL_DIR/lib/python</action>
-                <!-- exporting the CFLAGS and CPPFLAGS are due to http://stackoverflow.com/questions/22313407/clang-error-unknown-argument-mno-fused-madd-python-package-installation-fa -->
-                <action type="shell_command">
-                    export PYTHONPATH=$PYTHONPATH:$INSTALL_DIR/lib/python &amp;&amp;
-                    python setup.py install --install-lib $INSTALL_DIR/lib/python --install-scripts $INSTALL_DIR/bin
-                </action>
-                <action type="set_environment">
-                    <environment_variable action="append_to" name="PYTHONPATH">$INSTALL_DIR/lib/python</environment_variable>
-                    <environment_variable action="append_to" name="PYTHONPATH">$ENV[PYTHONPATH_NUMPY]</environment_variable>
-                    <environment_variable action="prepend_to" name="PATH">$ENV[PATH_NUMPY]</environment_variable>
-                    <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable>
-                    <environment_variable action="append_to" name="PYTHONPATH">$ENV[PYTHONPATH_SCIPY]</environment_variable>
-                    <environment_variable action="set_to" name="PYTHONPATH_MACS2">$INSTALL_DIR/lib/python</environment_variable>
-                    </action>
-            </actions>
-        </install>
-        <readme>Macs2 installation instructions. MACS2 can be found at https://github.com/taoliu/MACS</readme>
-    </package>
 </tool_dependency>