view Bubblebeam_For_SAINT_wrapper.py @ 18:e992232032ae draft

Uploaded
author bornea
date Fri, 20 Nov 2015 11:14:37 -0500
parents b11a6884496e
children 7ce59d092bae
line wrap: on
line source

import os 
import sys
import time


list_file = sys.argv[1]
prey_file = sys.argv[2]
crapome = sys.argv[3]
color = sys.argv[4]
label = sys.argv[5]
cutoff = sys.argv[6]
mq_sc = sys.argv[7]
inc_file = sys.argv[8]
exc_file = sys.argv[9]
output_file_name = sys.argv[10]
bub_zoom_NSAF = sys.argv[11]
bub_zoom_SAINT =sys.argv[12]
bub_SAINT = sys.argv[13]
bub_NSAF = sys.argv[14]
ins_path =sys.argv[15]
#r_path = sys.argv[16]
#r_path = str(r_path) + r"bin/"

if crapome == "None":
	crapome = "FALSE"


if label == "false":
	label = "FALSE"
elif label == "true":
	label = "TRUE" 

cmd = str(ins_path) +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)
os.system(cmd)
time.sleep(3)

open('./output.txt')
os.rename('output.txt', str(output_file_name))

open('./bubble_zoom_NSAF.png')
os.rename('bubble_zoom_NSAF.png', str(bub_zoom_NSAF))

open('./bubble_zoom_SAINT.png')
os.rename('bubble_zoom_SAINT.png', str(bub_zoom_SAINT))

open('./bubble_SAINT.png')
os.rename('bubble_SAINT.png', str(bub_SAINT))

open('./bubble_NSAF.png')
os.rename('bubble_NSAF.png', str(bub_NSAF))