annotate Bubblebeam_For_SAINT_wrapper.py @ 11:80cc85d7d6e3 draft

Uploaded
author bornea
date Thu, 19 Nov 2015 13:26:35 -0500
parents 9617d82034c6
children e63b61738581
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]
1
248cd769eecb Uploaded
bornea
parents:
diff changeset
21
248cd769eecb Uploaded
bornea
parents:
diff changeset
22 if crapome == "None":
248cd769eecb Uploaded
bornea
parents:
diff changeset
23 crapome = "FALSE"
248cd769eecb Uploaded
bornea
parents:
diff changeset
24
248cd769eecb Uploaded
bornea
parents:
diff changeset
25
248cd769eecb Uploaded
bornea
parents:
diff changeset
26 if label == "false":
248cd769eecb Uploaded
bornea
parents:
diff changeset
27 label = "FALSE"
248cd769eecb Uploaded
bornea
parents:
diff changeset
28 elif label == "true":
248cd769eecb Uploaded
bornea
parents:
diff changeset
29 label = "TRUE"
248cd769eecb Uploaded
bornea
parents:
diff changeset
30
9
9617d82034c6 Uploaded
bornea
parents: 1
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)
1
248cd769eecb Uploaded
bornea
parents:
diff changeset
32 os.system(cmd)
248cd769eecb Uploaded
bornea
parents:
diff changeset
33 time.sleep(3)
248cd769eecb Uploaded
bornea
parents:
diff changeset
34
248cd769eecb Uploaded
bornea
parents:
diff changeset
35 open('./output.txt')
248cd769eecb Uploaded
bornea
parents:
diff changeset
36 os.rename('output.txt', str(output_file_name))
248cd769eecb Uploaded
bornea
parents:
diff changeset
37
248cd769eecb Uploaded
bornea
parents:
diff changeset
38 open('./bubble_zoom_NSAF.png')
248cd769eecb Uploaded
bornea
parents:
diff changeset
39 os.rename('bubble_zoom_NSAF.png', str(bub_zoom_NSAF))
248cd769eecb Uploaded
bornea
parents:
diff changeset
40
248cd769eecb Uploaded
bornea
parents:
diff changeset
41 open('./bubble_zoom_SAINT.png')
248cd769eecb Uploaded
bornea
parents:
diff changeset
42 os.rename('bubble_zoom_SAINT.png', str(bub_zoom_SAINT))
248cd769eecb Uploaded
bornea
parents:
diff changeset
43
248cd769eecb Uploaded
bornea
parents:
diff changeset
44 open('./bubble_SAINT.png')
248cd769eecb Uploaded
bornea
parents:
diff changeset
45 os.rename('bubble_SAINT.png', str(bub_SAINT))
248cd769eecb Uploaded
bornea
parents:
diff changeset
46
248cd769eecb Uploaded
bornea
parents:
diff changeset
47 open('./bubble_NSAF.png')
248cd769eecb Uploaded
bornea
parents:
diff changeset
48 os.rename('bubble_NSAF.png', str(bub_NSAF))
248cd769eecb Uploaded
bornea
parents:
diff changeset
49