annotate Bubblebeam_For_SAINT_wrapper.py @ 17:b11a6884496e draft

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