# HG changeset patch
# User stemcellcommons
# Date 1397081163 14400
# Node ID db2805f9df66c9049423dc69587d2c2a49b61d2d
# Parent e9c2c7d24e4e5bbff0c904c6c99720c0e32fd233
Replace simplejson with json.
diff -r e9c2c7d24e4e -r db2805f9df66 macs2_wrapper.py
--- a/macs2_wrapper.py Wed Apr 09 18:03:05 2014 -0400
+++ b/macs2_wrapper.py Wed Apr 09 18:06:03 2014 -0400
@@ -1,12 +1,9 @@
-#purpose: macs2 python wrapper
-#author: Ziru Zhou
-#date: November, 2012
+# macs2 python wrapper
+# based on http://toolshed.g2.bx.psu.edu/view/modencode-dcc/macs2
import sys, subprocess, tempfile, shutil, glob, os, os.path, gzip
from galaxy import eggs
-import pkg_resources
-pkg_resources.require( "simplejson" )
-import simplejson
+import json
CHUNK_SIZE = 1024
@@ -57,8 +54,8 @@
#==========================================================================================
def main():
#take in options file and output file names
- options = simplejson.load( open( sys.argv[1] ) )
- outputs = simplejson.load( open( sys.argv[2] ) )
+ options = json.load( open( sys.argv[1] ) )
+ outputs = json.load( open( sys.argv[2] ) )
#=================================================================================
#parse options and execute macs2
diff -r e9c2c7d24e4e -r db2805f9df66 macs2_wrapper.xml
--- a/macs2_wrapper.xml Wed Apr 09 18:03:05 2014 -0400
+++ b/macs2_wrapper.xml Wed Apr 09 18:06:03 2014 -0400
@@ -114,7 +114,7 @@
<%
-import simplejson
+import json
%>
##=======================================================================================
#set $__outputs = { 'command':str( $major_command.major_command_selector ) }
@@ -132,10 +132,10 @@
#set $__outputs['output_bdgcmp_file'] = str( $output_bdgcmp_file )
#end if
-${ simplejson.dumps( __outputs ) }
+${ json.dumps( __outputs ) }
<%
-import simplejson
+import json
%>
##=======================================================================================
#set $__options = { 'experiment_name':str( $experiment_name ) }
@@ -192,7 +192,7 @@
#end if
##=======================================================================================
-${ simplejson.dumps( __options ) }
+${ json.dumps( __options ) }