annotate Bubblebeam_For_SAINT_wrapper.py @ 6:a5f4ec159731 draft

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