Mercurial > repos > stemcellcommons > macs2
changeset 20:db2805f9df66 draft
Replace simplejson with json.
author | stemcellcommons |
---|---|
date | Wed, 09 Apr 2014 18:06:03 -0400 |
parents | e9c2c7d24e4e |
children | eed6c8dcef5d |
files | macs2_wrapper.py macs2_wrapper.xml |
diffstat | 2 files changed, 9 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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 @@ <configfiles> <configfile name="outputs_file"><% -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 ) } </configfile> <configfile name="options_file"><% -import simplejson +import json %> ##======================================================================================= #set $__options = { 'experiment_name':str( $experiment_name ) } @@ -192,7 +192,7 @@ #end if ##======================================================================================= -${ simplejson.dumps( __options ) } +${ json.dumps( __options ) } </configfile> </configfiles> <tests>