Repository 'macs2'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/macs2

Changeset 9:acbd3fb47f90 (2018-01-25)
Previous changeset 8:e8a060164e11 (2017-12-27) Next changeset 10:f0b351e734b8 (2018-01-31)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/macs2 commit 586ecaebf9e6020fac2674fbda368e293d1c9bc2
modified:
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
added:
test-data/bwa-mem-test1.bam
test-data/callpeak_bampe_narrow.bed
b
diff -r e8a060164e11 -r acbd3fb47f90 macs2_bdgbroadcall.xml
--- a/macs2_bdgbroadcall.xml Wed Dec 27 10:18:03 2017 -0500
+++ b/macs2_bdgbroadcall.xml Thu Jan 25 02:11:52 2018 -0500
[
@@ -8,8 +8,8 @@
     </expand>
     <expand macro="stdio" />
     <expand macro="version_command" />
-    <command>
-         <![CDATA[
+    <command><![CDATA[
+        @home_dir@
         macs2 bdgbroadcall
             --ifile '${ infile }'
             --cutoff-peak '${ cutoffpeak }'
@@ -20,8 +20,7 @@
             --ofile "macs2_bdgbroadcall.bdg"
         &&
         awk '!/^track name/' "macs2_bdgbroadcall.bdg" > '${ outfile }'
-        ]]>
-    </command>
+    ]]></command>
     <inputs>
         <param name="infile" type="data" format="bedgraph" label="bedGraph generated MACS" />
         <param name="cutoffpeak" type="float" label="Cutoff for peaks" value="2.0"
b
diff -r e8a060164e11 -r acbd3fb47f90 macs2_bdgcmp.xml
--- a/macs2_bdgcmp.xml Wed Dec 27 10:18:03 2017 -0500
+++ b/macs2_bdgcmp.xml Thu Jan 25 02:11:52 2018 -0500
[
@@ -6,8 +6,8 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <expand macro="version_command" />
-    <command>
-        <![CDATA[
+    <command><![CDATA[
+        @home_dir@
         macs2 bdgcmp
             -t '${ infile_treatment }'
             -c '${ infile_control }'
@@ -17,8 +17,7 @@
                 -p '${ bdgcmp_options.pseudocount }'
             #end if
             -o '${ outfile }'
-        ]]>
-    </command>
+    ]]></command>
     <inputs>
         <param name="infile_treatment" type="data" format="bedgraph" label="Treatment bedGraph file" />
         <param name="infile_control" type="data" format="bedgraph" label="Control bedGraph file" />
b
diff -r e8a060164e11 -r acbd3fb47f90 macs2_bdgdiff.xml
--- a/macs2_bdgdiff.xml Wed Dec 27 10:18:03 2017 -0500
+++ b/macs2_bdgdiff.xml Thu Jan 25 02:11:52 2018 -0500
[
@@ -8,8 +8,8 @@
     </expand>
     <expand macro="stdio" />
     <expand macro="version_command" />
-    <command>
-        <![CDATA[
+    <command><![CDATA[
+        @home_dir@
         macs2 bdgdiff
             --t1 '${ t1 }'
             --t2 '${ t2 }'
@@ -25,9 +25,7 @@
             awk '!/^track name/' "c1.bed" > '${ output_cond1 }' &&
             awk '!/^track name/' "c2.bed" > '${ output_cond1 }' &&
             awk '!/^track name/' "both.bed" > '${ output_both }'
-
-        ]]>
-    </command>
+    ]]></command>
     <inputs>
         <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" />
b
diff -r e8a060164e11 -r acbd3fb47f90 macs2_bdgpeakcall.xml
--- a/macs2_bdgpeakcall.xml Wed Dec 27 10:18:03 2017 -0500
+++ b/macs2_bdgpeakcall.xml Thu Jan 25 02:11:52 2018 -0500
[
@@ -6,9 +6,8 @@
     <expand macro="requirements"/>
     <expand macro="stdio" />
     <expand macro="version_command" />
-    <command>
-        <![CDATA[
-
+    <command><![CDATA[
+        @home_dir@
         macs2 bdgpeakcall
         --ifile '${ infile }'
         --cutoff '${ cutoff }'
@@ -17,9 +16,7 @@
         ${ cutoff_analysis } 
         ${ notrackline }
         --ofile '${ outfile }'
-
-        ]]>
-    </command>
+    ]]></command>
     <inputs>
         <param name="infile" type="data" format="bedgraph" label="MACS score in bedGraph" />
         <param name="cutoff" type="float" label="Cutoff for peaks" value="5.0"
b
diff -r e8a060164e11 -r acbd3fb47f90 macs2_callpeak.xml
--- a/macs2_callpeak.xml Wed Dec 27 10:18:03 2017 -0500
+++ b/macs2_callpeak.xml Thu Jan 25 02:11:52 2018 -0500
[
b'@@ -1,4 +1,4 @@\n-<tool id="macs2_callpeak" name="MACS2 callpeak" version="@VERSION_STRING@.1">\n+<tool id="macs2_callpeak" name="MACS2 callpeak" version="@VERSION_STRING@.2">\n     <description>Call peaks from alignment results</description>\n     <macros>\n         <import>macs2_macros.xml</import>\n@@ -8,6 +8,8 @@\n     <expand macro="stdio" />\n     <expand macro="version_command" />\n     <command><![CDATA[\n+        @home_dir@\n+\n         #set $temp_stderr = \'macs2_stderr\'\n         (macs2 callpeak\n \n@@ -17,21 +19,8 @@\n \n             #if str($treatment.t_multi_select) == "Yes":\n                 -t ${ \' \'.join( map( lambda x:\'"%s"\' % ( x ), \'$treatment.input_treatment_file\' ) ) }\n-\n-                #if \'$treatment.input_treatment_file[0].ext.upper()\' == "BAM" and $bampe:\n-                    --format BAMPE\n-                #else\n-                    --format=\'$treatment.input_treatment_file[0].ext.upper()\'\n-                #end if\n-\n             #else\n                 -t \'$treatment.input_treatment_file\'\n-\n-                #if \'$treatment.input_treatment_file.ext.upper()\' == "BAM" and $bampe:\n-                    --format BAMPE\n-                #else\n-                    --format=\'$treatment.input_treatment_file.ext.upper()\'\n-                #end if\n             #end if\n \n             ## Control File(s)\n@@ -44,33 +33,41 @@\n                 #end if\n             #end if\n \n-        @effective_genome_size@\n+            --format $format\n \n-        --bw \'${band_width}\'\n-        @mfold_command@\n+        @effective_genome_size@\n \n         ## advanced options\n-        #if $advanced_options.advanced_options_selector == "on":\n-            $advanced_options.nolambda\n-            $advanced_options.to_large\n+\n+        $advanced_options.nolambda\n+        $advanced_options.to_large\n+\n+        #if $advanced_options.ratio:\n             --ratio $advanced_options.ratio\n+        #end if\n+\n+        #if $advanced_options.slocal:\n             --slocal $advanced_options.slocal\n+        #end if\n+\n+        #if $advanced_options.llocal:\n             --llocal $advanced_options.llocal\n-            #if $advanced_options.broad_options.broad_options_selector == "broad":\n-                --broad\n-                --broad-cutoff=\'${ advanced_options.broad_options.broad_cutoff }\'\n-            #else\n-                $advanced_options.broad_options.call_summits\n-            #end if\n+        #end if\n \n-            #if str( $advanced_options.keep_dup_options.keep_dup_options_selector ) == "user":\n-                --keep-dup \'${ advanced_options.keep_dup_options.user_keepdup }\'\n-            #else\n-                --keep-dup \'${ advanced_options.keep_dup_options.keep_dup_options_selector }\'\n-            #end if\n+        #if $advanced_options.broad_options.broad_options_selector == "broad":\n+            --broad\n+            --broad-cutoff=\'${ advanced_options.broad_options.broad_cutoff }\'\n+        #else\n+            $advanced_options.broad_options.call_summits\n+        #end if\n \n+        #if str( $advanced_options.keep_dup_options.keep_dup_options_selector ) == "user":\n+            --keep-dup \'${ advanced_options.keep_dup_options.user_keepdup }\'\n+        #else\n+            --keep-dup \'${ advanced_options.keep_dup_options.keep_dup_options_selector }\'\n         #end if\n \n+\n         ## With --bdg two additional output files will be generated.\n         #if "bdg" in str($outputs).split(\',\'):\n             --bdg\n@@ -89,6 +86,13 @@\n         #if $nomodel_type.nomodel_type_selector == "nomodel":\n             --nomodel\n             --extsize \'${ nomodel_type.extsize }\'\n+            --shift \'${ nomodel_type.shift}\'\n+        #else\n+            --mfold \'${nomodel_type.mfold_lower}\' \'${nomodel_type.mfold_upper}\'\n+\n+            #if $nomodel_type.band_width:\n+            --bw \'${nomodel_type.band_width}\'\n+            #end if\n         #end if\n \n         2>&1 > $temp_stderr)\n@@ -111,7 +115,7 @@\n             if [ \\$count != 0 ];\n             then\n                 mkdir \'${ output_extra_files.file'..b'the original size, about 90% or 70% of the genome size. The default hs -- 2.7e9 is recommended for UCSC human hg18 assembly. Here are all precompiled parameters for effective genome size from the MACS2_ website:\n+\n+ hs: 2.7e9\n+ mm: 1.87e9\n+ ce: 9e7\n+ dm: 1.2e8\n+\n -----\n \n **Outputs**\n \n-This tool produces a BED file of narrowPeaks as default output. It can also produce additional outputs, which can be selected under the **Additional Outputs** option above. \n+This tool produces a BED file of narrowPeaks as default output. It can also produce additional outputs, which can be selected under the **Additional Outputs** option above.\n \n     * **a BED file of peaks** (default)\n     * a tabular file of peaks\n@@ -366,13 +386,13 @@\n \n **Peaks BED File**\n \n-The default output is the narrowPeak BED file (BED6+4 format). This contains the peak locations, together with peak summit, pvalue and qvalue. You can load it to UCSC genome browser. \n+The default output is the narrowPeak BED file (BED6+4 format). This contains the peak locations, together with peak summit, pvalue and qvalue. You can load it to UCSC genome browser.\n \n     Example:\n \n     ======= ========= ======= ============ ==== === ======= ======== ======= =======\n     1          2        3          4        5    6     7       8         9   **10**\n-    ======= ========= ======= ============ ==== === ======= ======== ======= ======= \n+    ======= ========= ======= ============ ==== === ======= ======== ======= =======\n     chr1    840081    840400  MACS2_peak_1  69   .  4.89872 10.50944 6.91052 158\n     chr1    919419    919785  MACS2_peak_2  87   .  5.85158 12.44148 8.70936 130\n     chr1    937220    937483  MACS2_peak_3  66   .  4.87632 10.06728 6.61759 154\n@@ -394,7 +414,7 @@\n \n **Peaks tabular File**\n \n-A tabular file which contains information about called peaks. You can open it in Excel and sort/filter using Excel functions. \n+A tabular file which contains information about called peaks. You can open it in Excel and sort/filter using Excel functions.\n \n     Example:\n \n@@ -428,7 +448,7 @@\n \n     Example:\n \n-    ======= ========= ======= ============ ======= \n+    ======= ========= ======= ============ =======\n     1          2        3          4        **5**\n     ======= ========= ======= ============ =======\n     chr1    840239    840240  MACS2_peak_1 6.91052\n@@ -487,13 +507,13 @@\n \n     Example:\n \n-    ======= ========= ======= ============ ==== === ======= ======= ======= \n+    ======= ========= ======= ============ ==== === ======= ======= =======\n     1        2         3       4            5    6   7       8       9\n-    ======= ========= ======= ============ ==== === ======= ======= ======= \n+    ======= ========= ======= ============ ==== === ======= ======= =======\n     chr1    840081    840400  MACS2_peak_1  52   .  4.08790 8.57605 5.21506\n     chr1    919419    919785  MACS2_peak_2  56   .  4.37270 8.90436 5.60462\n     chr1    937220    937483  MACS2_peak_3  48   .  4.02343 8.06676 4.86861\n-    ======= ========= ======= ============ ==== === ======= ======= ======= \n+    ======= ========= ======= ============ ==== === ======= ======= =======\n \n \n Columns contain the following data:\n@@ -531,14 +551,14 @@\n * **4th**: name of peak\n * **5th**: 10*-log10qvalue, to be more compatible to show grey levels on UCSC browser\n * **6th**: strand, either "." (=no strand) or "+" or "-"\n-* **7th**: start of the first narrow peak in the region \n+* **7th**: start of the first narrow peak in the region\n * **8th**: end of the peak\n-* **9th**: RGB color key, default colour is 0 \n+* **9th**: RGB color key, default colour is 0\n * **10th**: number of blocks, including the starting 1bp and ending 1bp of broad regions\n * **11th**: length of each block, comma-separated values if multiple\n * **12th**: start of each block, comma-separated values if multiple\n-* **13th**: fold-change \n-* **14th**: -log10pvalue \n+* **13th**: fold-change\n+* **14th**: -log10pvalue\n * **15th**: -log10qvalue\n \n -----\n'
b
diff -r e8a060164e11 -r acbd3fb47f90 macs2_filterdup.xml
--- a/macs2_filterdup.xml Wed Dec 27 10:18:03 2017 -0500
+++ b/macs2_filterdup.xml Thu Jan 25 02:11:52 2018 -0500
[
@@ -7,6 +7,7 @@
     <expand macro="stdio" />
     <expand macro="version_command" />
     <command><![CDATA[
+        @home_dir@
         macs2 filterdup
             -i '${ infile }'
             -o '${ outfile }'
b
diff -r e8a060164e11 -r acbd3fb47f90 macs2_macros.xml
--- a/macs2_macros.xml Wed Dec 27 10:18:03 2017 -0500
+++ b/macs2_macros.xml Thu Jan 25 02:11:52 2018 -0500
[
@@ -9,23 +9,25 @@
         </requirements>
     </xml>
 
+    <token name="@home_dir@"><![CDATA[
+        export PYTHON_EGG_CACHE=`pwd` &&
+    ]]></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 Ns 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. (--gsize)">
-                <option value="2451960000">H. sapiens (2,451,960,000)</option>
-                <option value="2150570000">M. musculus (2,150,570,000)</option>
-                <option value="121400000">D. melanogaster (121,400,000)</option>
-                <option value="93260000">C. elegans (93,260,000)</option>
-                <option value="12400000">S. cerevisiae (12,400,000)</option>
+                Also, if repetitive regions were not included in the mapping of reads, the effective genome size needs to be adjusted accordingly. Sizes are from the MACS2 website (--gsize)">
+                <option value="2700000000">H. sapiens (2.7e9)</option>
+                <option value="1870000000">M. musculus (1.87e9)</option>
+                <option value="120000000">D. melanogaster (1.2e8)</option>
+                <option value="90000000">C. elegans (9e7)</option>
                 <option value="user_defined">User defined</option>
             </param>
-            <when value="2451960000" />
-            <when value="2150570000" />
-            <when value="121400000" />
-            <when value="93260000" />
-            <when value="12400000" />
+            <when value="2700000000" />
+            <when value="1870000000" />
+            <when value="120000000" />
+            <when value="90000000" />
             <when value="user_defined">
                 <param name="gsize" type="integer" label="Effective genome size" value=""/>
             </when>
b
diff -r e8a060164e11 -r acbd3fb47f90 macs2_predictd.xml
--- a/macs2_predictd.xml Wed Dec 27 10:18:03 2017 -0500
+++ b/macs2_predictd.xml Thu Jan 25 02:11:52 2018 -0500
[
@@ -6,8 +6,8 @@
     <expand macro="requirements"/>
     <expand macro="stdio" />
     <expand macro="version_command" />
-    <command>
-        <![CDATA[
+    <command><![CDATA[
+        @home_dir@
         macs2 predictd
 
         -i ${ ' '.join(["'%s'" % $x for $x in $infiles ]) }
@@ -24,8 +24,7 @@
         &&
 
         Rscript predictd
-        ]]>
-    </command>
+    ]]></command>
     <inputs>
         <param name="infiles" type="data" format="bam,sam,bed" multiple="True"
                label="ChIP-seq alignment file"
@@ -49,7 +48,7 @@
             <param name="band_width" value="300"/>
             <param name="lower" value="5"/>
             <param name="upper" value="50"/>
-            <output name="outfile" file="predictd_on_ChIP_200K_and_Control_200K.txt"/>
+            <output name="outfile" file="predictd_on_ChIP_200K_and_Control_200K.txt" lines_diff="2"/>
             <output name="outfile_image" file="predictd_on_ChIP_200K_and_Control_200K.pdf" compare="sim_size"/>
         </test>
     </tests>
b
diff -r e8a060164e11 -r acbd3fb47f90 macs2_randsample.xml
--- a/macs2_randsample.xml Wed Dec 27 10:18:03 2017 -0500
+++ b/macs2_randsample.xml Thu Jan 25 02:11:52 2018 -0500
[
@@ -6,8 +6,8 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <expand macro="version_command" />
-    <command>
-        <![CDATA[
+    <command><![CDATA[
+        @home_dir@
         macs2 randsample
             -t '${ infile }'
             -o '${ outfile }'
@@ -22,8 +22,7 @@
         #else:
             --number '${ method_options.number }'
         #end if
-        ]]>
-    </command>
+        ]]></command>
     <inputs>
         <param name="infile" type="data" format="sam,bam,bed" label="Sequencing alignment file" />
         <expand macro="tag_size" />
b
diff -r e8a060164e11 -r acbd3fb47f90 macs2_refinepeak.xml
--- a/macs2_refinepeak.xml Wed Dec 27 10:18:03 2017 -0500
+++ b/macs2_refinepeak.xml Thu Jan 25 02:11:52 2018 -0500
[
@@ -6,8 +6,8 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <expand macro="version_command" />
-    <command>
-        <![CDATA[
+    <command><![CDATA[
+        @home_dir@
         macs2 refinepeak
             -b '${ bed_infile }'
             -i '${ infile }'
@@ -15,8 +15,7 @@
             --cutoff '${ cutoff }'
             --window-size '${ winsize }'
             --ofile '${ outfile }'
-        ]]>
-    </command>
+    ]]></command>
     <inputs>
         <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" />
b
diff -r e8a060164e11 -r acbd3fb47f90 test-data/bwa-mem-test1.bam
b
Binary file test-data/bwa-mem-test1.bam has changed
b
diff -r e8a060164e11 -r acbd3fb47f90 test-data/callpeak_bampe_narrow.bed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/callpeak_bampe_narrow.bed Thu Jan 25 02:11:52 2018 -0500
b
@@ -0,0 +1,1 @@
+gi|251831106|ref|NC_012920.1| 0 251 MACS2_peak_1 3056 . 44.99989 308.04297 305.64328 56