annotate Bubblebeam_For_SAINT_wrapper.py @ 0:9ef1d870412e draft

Uploaded
author bornea
date Thu, 19 Nov 2015 11:15:43 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9ef1d870412e Uploaded
bornea
parents:
diff changeset
1 import os
9ef1d870412e Uploaded
bornea
parents:
diff changeset
2 import sys
9ef1d870412e Uploaded
bornea
parents:
diff changeset
3 import time
9ef1d870412e Uploaded
bornea
parents:
diff changeset
4
9ef1d870412e Uploaded
bornea
parents:
diff changeset
5
9ef1d870412e Uploaded
bornea
parents:
diff changeset
6 list_file = sys.argv[1]
9ef1d870412e Uploaded
bornea
parents:
diff changeset
7 prey_file = sys.argv[2]
9ef1d870412e Uploaded
bornea
parents:
diff changeset
8 crapome = sys.argv[3]
9ef1d870412e Uploaded
bornea
parents:
diff changeset
9 color = sys.argv[4]
9ef1d870412e Uploaded
bornea
parents:
diff changeset
10 label = sys.argv[5]
9ef1d870412e Uploaded
bornea
parents:
diff changeset
11 cutoff = sys.argv[6]
9ef1d870412e Uploaded
bornea
parents:
diff changeset
12 mq_sc = sys.argv[7]
9ef1d870412e Uploaded
bornea
parents:
diff changeset
13 inc_file = sys.argv[8]
9ef1d870412e Uploaded
bornea
parents:
diff changeset
14 exc_file = sys.argv[9]
9ef1d870412e Uploaded
bornea
parents:
diff changeset
15 output_file_name = sys.argv[10]
9ef1d870412e Uploaded
bornea
parents:
diff changeset
16 bub_zoom_NSAF = sys.argv[11]
9ef1d870412e Uploaded
bornea
parents:
diff changeset
17 bub_zoom_SAINT =sys.argv[12]
9ef1d870412e Uploaded
bornea
parents:
diff changeset
18 bub_SAINT = sys.argv[13]
9ef1d870412e Uploaded
bornea
parents:
diff changeset
19 bub_NSAF = sys.argv[14]
9ef1d870412e Uploaded
bornea
parents:
diff changeset
20 ins_path =sys.argv[15]
9ef1d870412e Uploaded
bornea
parents:
diff changeset
21
9ef1d870412e Uploaded
bornea
parents:
diff changeset
22 if crapome == "None":
9ef1d870412e Uploaded
bornea
parents:
diff changeset
23 crapome = "FALSE"
9ef1d870412e Uploaded
bornea
parents:
diff changeset
24
9ef1d870412e Uploaded
bornea
parents:
diff changeset
25
9ef1d870412e Uploaded
bornea
parents:
diff changeset
26 if label == "false":
9ef1d870412e Uploaded
bornea
parents:
diff changeset
27 label = "FALSE"
9ef1d870412e Uploaded
bornea
parents:
diff changeset
28 elif label == "true":
9ef1d870412e Uploaded
bornea
parents:
diff changeset
29 label = "TRUE"
9ef1d870412e Uploaded
bornea
parents:
diff changeset
30
9ef1d870412e Uploaded
bornea
parents:
diff changeset
31 cmd = r"Rscript "+ str(ins_path) + r"/bubbles_v9_NSAF_natural_log.R " + str(list_file) + r" " + str(prey_file) + r" " + str(crapome) + r" " + str(color) + r" " + str(label) + r" " + str(cutoff) + r" " + str(mq_sc) + r" " + str(inc_file) + r" " + str(exc_file)
9ef1d870412e Uploaded
bornea
parents:
diff changeset
32 os.system(cmd)
9ef1d870412e Uploaded
bornea
parents:
diff changeset
33 time.sleep(3)
9ef1d870412e Uploaded
bornea
parents:
diff changeset
34
9ef1d870412e Uploaded
bornea
parents:
diff changeset
35 open('./output.txt')
9ef1d870412e Uploaded
bornea
parents:
diff changeset
36 os.rename('output.txt', str(output_file_name))
9ef1d870412e Uploaded
bornea
parents:
diff changeset
37
9ef1d870412e Uploaded
bornea
parents:
diff changeset
38 open('./bubble_zoom_NSAF.png')
9ef1d870412e Uploaded
bornea
parents:
diff changeset
39 os.rename('bubble_zoom_NSAF.png', str(bub_zoom_NSAF))
9ef1d870412e Uploaded
bornea
parents:
diff changeset
40
9ef1d870412e Uploaded
bornea
parents:
diff changeset
41 open('./bubble_zoom_SAINT.png')
9ef1d870412e Uploaded
bornea
parents:
diff changeset
42 os.rename('bubble_zoom_SAINT.png', str(bub_zoom_SAINT))
9ef1d870412e Uploaded
bornea
parents:
diff changeset
43
9ef1d870412e Uploaded
bornea
parents:
diff changeset
44 open('./bubble_SAINT.png')
9ef1d870412e Uploaded
bornea
parents:
diff changeset
45 os.rename('bubble_SAINT.png', str(bub_SAINT))
9ef1d870412e Uploaded
bornea
parents:
diff changeset
46
9ef1d870412e Uploaded
bornea
parents:
diff changeset
47 open('./bubble_NSAF.png')
9ef1d870412e Uploaded
bornea
parents:
diff changeset
48 os.rename('bubble_NSAF.png', str(bub_NSAF))
9ef1d870412e Uploaded
bornea
parents:
diff changeset
49