Mercurial > repos > zzhou > spp_phantompeak
comparison spp_wrapper.py @ 19:663ef5410dd7 draft default tip
Uploaded
author | zzhou |
---|---|
date | Thu, 29 Nov 2012 13:50:59 -0500 |
parents | 5648b4efe736 |
children |
comparison
equal
deleted
inserted
replaced
18:16ae2b869253 | 19:663ef5410dd7 |
---|---|
18 output_rdata_file = sys.argv[5] | 18 output_rdata_file = sys.argv[5] |
19 output_plot_file = sys.argv[6] | 19 output_plot_file = sys.argv[6] |
20 output_default_file = sys.argv[7] | 20 output_default_file = sys.argv[7] |
21 script_path = sys.argv[8] | 21 script_path = sys.argv[8] |
22 | 22 |
23 cmd = "tar -czvf spp_1.10.1.tar spp" | |
24 os.system(cmd) | |
25 cmd = "gzip spp_1.10.1.tar" | |
26 os.system(cmd) | |
27 cmd = "Rscript %s/deploy_spp.R" % script_path | |
28 os.system(cmd) | |
29 | |
30 #set file extensions and set mandatory options | 23 #set file extensions and set mandatory options |
31 #======================================================================================== | 24 #======================================================================================== |
32 experiment_name = '_'.join( options['experiment_name'].split() ) #save experiment name | 25 experiment_name = '_'.join( options['experiment_name'].split() ) #save experiment name |
33 | 26 |
34 chip_file = "%s.bam" % (options['chip_file']) | 27 chip_file = "%s.bam" % (options['chip_file']) |
38 if 'input_file' in options: | 31 if 'input_file' in options: |
39 input_file = "%s.bam" % (options['input_file']) | 32 input_file = "%s.bam" % (options['input_file']) |
40 subprocess.call(["cp", options['input_file'], input_file]) | 33 subprocess.call(["cp", options['input_file'], input_file]) |
41 cmdline = "%s -i=%s" % ( cmdline, input_file ) | 34 cmdline = "%s -i=%s" % ( cmdline, input_file ) |
42 | 35 |
43 #test = "%s_VS_%s.narrowPeak.gz" %(chip_name, input_name) | |
44 #print test | |
45 #set additional options | 36 #set additional options |
46 #======================================================================================== | 37 #======================================================================================== |
47 if (options['action'] == "cross_correlation"): | 38 if (options['action'] == "cross_correlation"): |
48 cmdline = "%s %s %s %s > default_output.txt" % ( cmdline, options['savp'], options['out'], options['rf'] ) | 39 cmdline = "%s %s %s %s > default_output.txt" % ( cmdline, options['savp'], options['out'], options['rf'] ) |
49 elif (options['action'] == "peak_calling"): | 40 elif (options['action'] == "peak_calling"): |