# HG changeset patch
# User iuc
# Date 1389897077 18000
# Node ID 9c157b556c33febf2e956de7481374e8d30b291f
Uploaded
diff -r 000000000000 -r 9c157b556c33 dir2html.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dir2html.py Thu Jan 16 13:31:17 2014 -0500
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+import os
+import sys
+from xml.sax.saxutils import escape
+
+def make_table( directory ):
+ ret = ['
\n']
+ for file in os.listdir( directory ):
+ ret.append('%s |
\n' % ( file, escape(file).replace( 'MACS2_', '' ) ))
+ ret.append('
')
+ return ''.join(ret)
+
+def make_html( directory, stderr ):
+ return '\n'.join([''
+ '',
+ ' Additional output created by MACS2',
+ ' ',
+ '',
+ '',
+ 'Additional Files:
',
+ make_table( directory ),
+ 'Messages from MACS2:
',
+ stderr.read().replace('\n', '
'),
+ '',
+ ''])
+
+if __name__ == '__main__':
+ if len(sys.argv) == 3:
+ directory_path = sys.argv[1]
+ stderr = open( sys.argv[2] )
+ print make_html( directory_path, stderr )
+ else:
+ sys.exit( 'Two parameter expected: directory path and stderr path' )
+
diff -r 000000000000 -r 9c157b556c33 macs2_bdgbroadcall.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macs2_bdgbroadcall.xml Thu Jan 16 13:31:17 2014 -0500
@@ -0,0 +1,52 @@
+
+ from bedGraph
+
+ macs2
+ numpy
+ macs2
+ numpy
+
+
+
+ macs2 bdgbroadcall
+ --ifile $infile
+ --cutoff-peak $cutoffpeak
+ --cutoff-link $cutofflink
+ --min-length $minlen
+ --lvl1-max-gap $LVL1MAXGAP
+ --lvl2-max-gap $LVL2MAXGAP
+ --ofile $ofile
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**What it does**
+
+Call broad peaks from bedGraph output.
+bdgbroadcall from macs2
+
+------
+
+**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.
+
+
diff -r 000000000000 -r 9c157b556c33 macs2_bdgcmp.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macs2_bdgcmp.xml Thu Jan 16 13:31:17 2014 -0500
@@ -0,0 +1,84 @@
+
+ by comparing two signal tracks in bedGraph (bdgcmp)
+
+ macs2
+ numpy
+ macs2
+ numpy
+
+
+ macs2 bdgcmp
+ -t $input_treatment_file
+ -c $input_control_file
+
+ -m $bdgcmp_options.bdgcmp_options_selector
+ #if $bdgcmp_options.bdgcmp_options_selector in ['FE', 'logFR', 'logLR']:
+ -p $pseudocount
+ #end if
+ --ofile $ofile
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**What it does**
+
+With the improvement of sequencing techniques, chromatin immunoprecipitation followed by high throughput sequencing (ChIP-Seq)
+is getting popular to study genome-wide protein-DNA interactions. To address the lack of powerful ChIP-Seq analysis method, we present a novel algorithm, named Model-based Analysis of ChIP-Seq (MACS), for
+identifying transcript factor binding sites. MACS captures the influence of genome complexity to evaluate the significance of enriched ChIP regions, and MACS improves the spatial resolution of
+binding sites through combining the information of both sequencing tag position and orientation. MACS can be easily used for ChIP-Seq data alone, or with control sample with the increase of specificity.
+
+View the original MACS2 documentation: https://github.com/taoliu/MACS/blob/master/README
+
+------
+
+**Usage**
+
+**Peak Calling**: Main MACS2 Function to Call peaks from alignment results.
+
+**Compare .bdg files**: Deduct noise by comparing two signal tracks in bedGraph.
+
+
+------
+
+**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.
+
+
diff -r 000000000000 -r 9c157b556c33 macs2_bdgdiff.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macs2_bdgdiff.xml Thu Jan 16 13:31:17 2014 -0500
@@ -0,0 +1,84 @@
+
+ based on paired four bedgraph files
+
+ macs2
+ numpy
+ macs2
+ numpy
+
+
+
+ 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
+
+ # Why does #if '--ofile-cond1' in $outputs not work?
+ #if '--ofile-cond1' in str($outputs).split(','):
+ --ofile-cond1 $output_cond1
+ #end if
+
+ #if '--ofile-cond2' in str($outputs).split(','):
+ --ofile-cond2 $output_cond2
+ #end if
+
+ #if '--ofile-both-conditions' in str($outputs).split(','):
+ --ofile-both-conditions $output_both
+ #end if
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ '--ofile-cond1' in outputs
+
+
+ '--ofile-cond2' in outputs
+
+
+ '--ofile-both-conditions' in outputs
+
+
+
+
+
+
+**What it does**
+
+bdgdiff from macs2
+
+
+------
+
+**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.
+
+
diff -r 000000000000 -r 9c157b556c33 macs2_bdgpeakcall.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macs2_bdgpeakcall.xml Thu Jan 16 13:31:17 2014 -0500
@@ -0,0 +1,57 @@
+
+ from bedGraph output
+
+ macs2
+ numpy
+ macs2
+ numpy
+
+
+
+ macs2 bdgpeakcall
+ --ifile $infile
+ --cutoff $cutoff
+ --min-length $minlen
+ --max-gap $maxgap
+ $callsummits
+ $notrackline
+ --ofile $ofile
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**What it does**
+
+Call peaks from bedGraph output.
+bdgpeakcall from macs2
+
+
+------
+
+**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.
+
+
diff -r 000000000000 -r 9c157b556c33 macs2_callpeak.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macs2_callpeak.xml Thu Jan 16 13:31:17 2014 -0500
@@ -0,0 +1,253 @@
+
+ from alignment results
+
+ macs2
+ numpy
+ macs2
+ numpy
+
+
+
+ #set $temp_stderr = 'macs2_stderr'
+ macs2 callpeak
+
+ --name "MACS2"
+ -t #echo ' '.join( map(str, $input_treatment_file) )#
+
+ #if ' '.join( map(str, $input_control_file) ) != 'None':
+ -c #echo ' '.join( map(str, $input_control_file) )#
+ #end if
+
+ #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'
+
+ ##advanced options
+ #if str( $advanced_options.advanced_options_selector ) == 'on':
+ --mfold $advanced_options.mfoldlo $advanced_options.mfoldhi
+ $advanced_options.nolambda
+
+ #if str($advanced_options.broad_options.broad_options_selector) == '--broad':
+ #set $__options['broad'] = str( $advanced_options.broad_options.broad_options_selector )
+ #set $__options['broad_cutoff'] = float( str( $advanced_options.broad_options.broad_cutoff ) )
+ #end if
+
+ #if str($advanced_options.broad_options.broad_options_selector) == '--broad':
+ --broad
+ --broad-cutoff='$advanced_options.broad_options.broad_cutoff'
+ #end if
+
+ #else:
+ --mfold 10 30
+ #end if
+
+ $bdg
+
+ ##pq value select options
+ #if str( $pq_options.pq_options_selector ) == 'qvalue':
+ --qvalue $pq_options.qvalue
+ #else:
+ --pvalue $pq_options.pvalue
+ #end if
+
+ ##model options
+ #if str( $nomodel_type.nomodel_type_selector ) == 'nomodel':
+ --nomodel --shiftsize='$nomodel_type.shiftsize'
+ #end if
+
+ 2> $temp_stderr;
+ #######################################################
+ ## move files generated by callpeak command
+
+ ## TODO
+ ## run R to create pdf from model script
+ ##if os.path.exists( os.path.join( tmp_dir, "MACS2_PREFIX_model.r" ) ):
+ ## cmdline = 'Rscript "MACS2_PREFIX_model.r" > "MACS2_PREFIX_model.r.log"' )
+ ## proc = subprocess.Popen( args=cmdline, shell=True, cwd=tmp_dir )
+ ## proc.wait()
+
+
+ ## move bed out to proper output file
+ ##set $file = os.path.join( $tmp_dir, "%s_peaks.bed" % $experiment_name )
+ ##if os.path.exists( $file ):
+ ## mv $file $output_bed_file
+ ##end if
+
+ ## OICR peak_xls file
+ ##set $file = os.path.join( $tmp_dir, "%s_peaks.xls" % $experiment_name )
+ ##if os.path.exists( $file ):
+ ## mv $file output_peaks $output_peaks_file
+ ##end if
+
+ ### peaks.encodepeaks (narrowpeaks) file
+ ##set $file = os.path.join ( $tmp_dir, "%s_peaks.encodePeak" % $experiment_name )
+ ##if os.path.exists( $file ):
+ ## mv $file $output_narrowpeaks_file
+
+
+ ##parse xls files to interval files as needed
+ ##TODO is in working dir
+ #if 'peaks_interval' in str($outputs).split(','):
+ #set $file = os.path.join( $tmp_dir, 'MACS2_PREFIX_peaks.xls' )
+ #if os.path.exists( $file ):
+ echo '#peaks file' > $output_xls_to_interval_peaks_file;
+ awk '$2-=1' $file >> $output_xls_to_interval_peaks_file;
+ ##xls_to_interval( create_peak_xls_file, output_xls_to_interval_peaks_file, header = 'peaks file' )
+ #end if
+ #end if
+
+ #if 'html' in str($outputs).split(','):
+ ## if output files exists, move them to the extra_files_path and create a html result page linking to them
+ count=`ls -1 MACS2* 2>/dev/null | wc -l`;
+ if [ \$count != 0 ];
+ then
+ mkdir $output_extra_files.extra_files_path;
+ mv MACS2* $output_extra_files.extra_files_path;
+ python /home/bag/projects/github/galaxytools/macs2/dir2html.py $output_extra_files.extra_files_path $temp_stderr > $output_extra_files;
+ fi;
+ #end if
+
+ cat $temp_stderr 2>&1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'peaks_bed' in outputs
+
+
+ 'narrow' in outputs
+
+
+ 'broad' in outputs
+
+
+ 'gapped' in outputs
+
+
+ 'summits' in outputs
+
+
+ 'peaks_interval' in outputs
+
+
+ 'html' in outputs
+
+
+
+
+
+
+**What it does**
+
+With the improvement of sequencing techniques, chromatin immunoprecipitation followed by high throughput sequencing (ChIP-Seq)
+is getting popular to study genome-wide protein-DNA interactions. To address the lack of powerful ChIP-Seq analysis method, we present a novel algorithm, named Model-based Analysis of ChIP-Seq (MACS), for
+identifying transcript factor binding sites. MACS captures the influence of genome complexity to evaluate the significance of enriched ChIP regions, and MACS improves the spatial resolution of
+binding sites through combining the information of both sequencing tag position and orientation. MACS can be easily used for ChIP-Seq data alone, or with control sample with the increase of specificity.
+
+View the original MACS2 documentation: https://github.com/taoliu/MACS/blob/master/README
+
+------
+
+**Usage**
+
+**Peak Calling**: Main MACS2 Function to Call peaks from alignment results.
+
+**Compare .bdg files**: Deduct noise by comparing two signal tracks in bedGraph.
+
+
+------
+
+**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.
+
+
diff -r 000000000000 -r 9c157b556c33 macs2_filterdup.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macs2_filterdup.xml Thu Jan 16 13:31:17 2014 -0500
@@ -0,0 +1,64 @@
+
+ at the same position
+
+ macs2
+ numpy
+ macs2
+ numpy
+
+
+ macs2 filterdup
+ -t $infile
+ -o $outfile
+
+ --format '$ifile.extension.upper()'
+ --gsize $gsize
+ --tsize $tsize
+ --pvalue $pvalue
+ #if str( $keep_dup_options.keep_dup_options_selector ) == "user":
+ --keep-dup $keep_dup_options.user_keepdup
+ #else
+ --keep-dup str( $keep_dup_options.keep_dup_options_selector )
+ #end if
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**What it does**
+
+Remove duplicate reads at the same position, then convert acceptable format to BED format.
+filterdup tool from macs2
+------
+
+**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.
+
+
diff -r 000000000000 -r 9c157b556c33 macs2_randsample.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macs2_randsample.xml Thu Jan 16 13:31:17 2014 -0500
@@ -0,0 +1,62 @@
+
+ of total reads
+
+ macs2
+ numpy
+ macs2
+ numpy
+
+
+ macs2 randsample
+ -t $infile
+ -o $outfile
+
+ --format '$ifile.extension.upper()'
+
+ --tsize $tsize
+ #if str($method_options.method_options_selector ) == 'percentage':
+ $method_options.percentage
+ #else:
+ $method_options.number
+ #end if
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**What it does**
+
+randsample tool from macs2
+------
+
+**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.
+
+
diff -r 000000000000 -r 9c157b556c33 macs2_refinepeak.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macs2_refinepeak.xml Thu Jan 16 13:31:17 2014 -0500
@@ -0,0 +1,46 @@
+
+
+
+ macs2
+ numpy
+ macs2
+ numpy
+
+
+
+ macs2 refinepeak
+ -b $bed_infile
+ -i $infile
+ --format '$ifile.extension.upper()'
+ --cutoff $cutoff
+ --window-size $winsize
+ --ofile $ofile
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**What it does**
+
+(Experimental) Take raw reads alignment, refine peak summits and give scores measuring balance of forward- backward tags. Inspired by SPP.
+
+------
+
+**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.
+
+
diff -r 000000000000 -r 9c157b556c33 readme.rst
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/readme.rst Thu Jan 16 13:31:17 2014 -0500
@@ -0,0 +1,60 @@
+========================
+Galaxy wrapper for MACS2
+========================
+
+With the improvement of sequencing techniques, chromatin immunoprecipitation
+followed by high throughput sequencing (ChIP-Seq) is getting popular to study
+genome-wide protein-DNA interactions. To address the lack of powerful ChIP-Seq
+analysis method, we present a novel algorithm, named Model-based Analysis of
+ChIP-Seq (MACS), for identifying transcript factor binding sites. MACS captures
+the influence of genome complexity to evaluate the significance of enriched ChIP
+regions, and MACS improves the spatial resolution of binding sites through
+combining the information of both sequencing tag position and orientation.
+MACS can be easily used for ChIP-Seq data alone, or with control sample with the increase of specificity.
+
+
+============
+Installation
+============
+
+It is recommended to install this wrapper via the `Galaxy Tool Shed`.
+
+.. _`Galaxy Tool Shed`: http://toolshed.g2.bx.psu.edu/view/modencode-dcc/macs2
+
+
+=======
+History
+=======
+- v2.0.10.1: Initial public release
+- v2.0.10.3: add "broad peaks" options
+
+
+====================
+Detailed description
+====================
+
+View the original MACS2 documentation: https://github.com/taoliu/MACS/blob/master/README.rst
+
+
+===============================
+Wrapper Licence (MIT/BSD style)
+===============================
+
+Permission to use, copy, modify, and distribute this software and its
+documentation with or without modifications and for any purpose and
+without fee is hereby granted, provided that any copyright notices
+appear in all copies and that both those copyright notices and this
+permission notice appear in supporting documentation, and that the
+names of the contributors or copyright holders not be used in
+advertising or publicity pertaining to distribution of the software
+without specific prior permission.
+
+THE CONTRIBUTORS AND COPYRIGHT HOLDERS OF THIS SOFTWARE DISCLAIM ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE
+CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT
+OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
+OR PERFORMANCE OF THIS SOFTWARE.
+
diff -r 000000000000 -r 9c157b556c33 tool_dependencies.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml Thu Jan 16 13:31:17 2014 -0500
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+ MACS2==2.0.10.07132012
+
+
+ Macs2 installation instructions. MACS2 can be found at https://github.com/taoliu/MACS
+
+