diff SAINT_preprocessing_mq_pep.py @ 29:bd71998aec8d draft

Uploaded
author bornea
date Tue, 26 Apr 2016 15:40:35 -0400
parents 0fed3fc380c7
children 761e1ad2b130
line wrap: on
line diff
--- a/SAINT_preprocessing_mq_pep.py	Tue Apr 26 14:42:16 2016 -0400
+++ b/SAINT_preprocessing_mq_pep.py	Tue Apr 26 15:40:35 2016 -0400
@@ -31,15 +31,22 @@
 mq_file = sys.argv[1]
 ins_path = sys.argv[8]
 names_path = str(ins_path) + r"uniprot_names.txt"
-cmd = (r"Rscript "+ str(ins_path) +"pre_process_protein_name_set.R " + str(mq_file) +
-       " " + str(names_path))
-os.system(cmd)
+fasta_db = sys.argv[3]
+
+# Uses faster names list for filtering when default db used. 
+if fasta_db == "None":
+    cmd = (r"Rscript "+ str(ins_path) +"pre_process_protein_name_set.R " + str(mq_file) +
+        " " + str(names_path))
+    os.system(cmd)
+else:
+    cmd = (r"Rscript "+ str(ins_path) +"pre_process_protein_name_set.R " + str(mq_file) +
+        " " + str(fasta_db)
+    os.system(cmd)
 
 infile = "./tukeys_output.txt" 
 # The MaxQuant "Samples Report" output.
 prey = sys.argv[2] 
 # Y or N boolean from Galaxy.
-fasta_db = sys.argv[3]
 if fasta_db == "None":
     fasta_db = str(ins_path)  + "SwissProt_HUMAN_2014_08.fasta"
 make_bait = sys.argv[6]