| 0 | 1 import os | 
|  | 2 import sys | 
|  | 3 | 
|  | 4 inter_file = sys.argv[1] | 
|  | 5 prey_file = sys.argv[2] | 
|  | 6 bait_file = sys.argv[3] | 
|  | 7 num_of_rep = sys.argv[4] | 
|  | 8 vc_bool = sys.argv[5] | 
|  | 9 vc_num = sys.argv[6] | 
|  | 10 go_bool = sys.argv[7] | 
|  | 11 go_file = sys.argv[8] | 
|  | 12 output_file = sys.argv[9] | 
|  | 13 | 
|  | 14 def default_run(inter_file1,prey_file1,bait_file1,output_file1,num_of_rep1): | 
|  | 15 	cmd = r"SAINTexpress-spc " + r"-R" + str(num_of_rep1) + " " + str(inter_file1) + " " + str(prey_file1) + " " + str(bait_file1) | 
|  | 16 	os.system(cmd) | 
|  | 17 	open('list.txt') | 
|  | 18 	os.rename('list.txt', str(output_file1)) | 
|  | 19 | 
|  | 20 def with_L(inter_file1,prey_file1,bait_file1,output_file1,vc_num1,num_of_rep1): | 
|  | 21 	cmd = r"SAINTexpress-spc "+ r"-R" + str(num_of_rep1) + " " + r"-L" + str(vc_num1) + " " + str(inter_file1) + " " + str(prey_file1) + " " + str(bait_file1) | 
|  | 22 	os.system(cmd) | 
|  | 23 	open('list.txt') | 
|  | 24 	os.rename('list.txt', str(output_file1)) | 
|  | 25 | 
|  | 26 def external_data_no_L(inter_file1,prey_file1,bait_file1,output_file1,go_file1,num_of_rep1): | 
|  | 27 	cmd = r"SAINTexpress-spc "+ r"-R" + str(num_of_rep1) + " " + str(inter_file1) + " " + str(prey_file1) + " " + str(bait_file1) + " " + str(go_file1) | 
|  | 28 	os.system(cmd) | 
|  | 29 	open('list.txt') | 
|  | 30 	os.rename('list.txt', str(output_file1)) | 
|  | 31 | 
|  | 32 def external_data_with_L(inter_file1,prey_file1,bait_file1,output_file1,go_file1,num_of_rep1,vc_num1): | 
|  | 33 	cmd = r"SAINTexpress-spc "+ r"-R" + str(num_of_rep1) + " " + r"-L" + str(vc_num1) + " " + str(inter_file1) + " " + str(prey_file1) + " " + str(bait_file1) + " " + str(go_file1) | 
|  | 34 	os.system(cmd) | 
|  | 35 	open('list.txt') | 
|  | 36 	os.rename('list.txt', str(output_file1)) | 
|  | 37 | 
|  | 38 if (vc_bool == "true"): | 
|  | 39 	if (go_bool == "false"): | 
|  | 40 		with_L(inter_file, prey_file, bait_file, output_file, vc_num, num_of_rep) | 
|  | 41 	elif (go_bool == "true"): | 
|  | 42 		external_data_with_L(inter_file, prey_file, bait_file, output_file, go_file, num_of_rep, vc_num) | 
|  | 43 elif (vc_bool == "false"): | 
|  | 44 	if (go_bool == "false"): | 
|  | 45 		default_run(inter_file, prey_file, bait_file, output_file, num_of_rep) | 
|  | 46 	elif (go_bool == "true"): | 
|  | 47 		external_data_no_L(inter_file, prey_file, bait_file, output_file, go_file, num_of_rep) |