Mercurial > repos > bornea > saint_preprocessing_peptideshaker
comparison Protein_report_processing.py @ 13:fcacb3f20451 draft default tip
Uploaded
author | bornea |
---|---|
date | Wed, 24 Aug 2016 12:57:25 -0400 |
parents | 9ec349fd0e66 |
children |
comparison
equal
deleted
inserted
replaced
12:ad33728cecc0 | 13:fcacb3f20451 |
---|---|
1 import sys | 1 import sys |
2 import os | 2 import os |
3 from time import sleep | 3 from time import sleep |
4 | 4 |
5 files = sys.argv[1] # read in a string of file names seperated by ", " | 5 files = sys.argv[1] # read in a string of file names seperated by ", " |
6 print files | |
7 # e.g. "Default_Protein_Report.txt, Default_Protein_Report_2.txt" | 6 # e.g. "Default_Protein_Report.txt, Default_Protein_Report_2.txt" |
8 #bait = sys.argv[2] # SAINT formatted bait file | 7 #bait = sys.argv[2] # SAINT formatted bait file |
9 # still need a way to match files to bait identifiers | 8 # still need a way to match files to bait identifiers |
10 # or they can just be required to be put in the order of the bait file | 9 # or they can just be required to be put in the order of the bait file |
11 quant_type = sys.argv[3] # what metric to use for quantification | 10 quant_type = sys.argv[3] # what metric to use for quantification |
12 print quant_type | |
13 # "#Validated Peptides", "#Peptides", "#Unique", "#Validated PSMs", "#PSMs" | 11 # "#Validated Peptides", "#Peptides", "#Unique", "#Validated PSMs", "#PSMs" |
14 db = sys.argv[4] # fasta database used in SearchGUI and PeptideShaker | 12 db = sys.argv[4] # fasta database used in SearchGUI and PeptideShaker |
15 print db | |
16 prey = sys.argv[5] | 13 prey = sys.argv[5] |
17 print prey | |
18 tool_path = sys.argv[7] | 14 tool_path = sys.argv[7] |
19 print tool_path | |
20 if db == "None": | 15 if db == "None": |
21 db = str(tool_path) + "/SwissProt_HUMAN_2015_12.fasta" | 16 db = str(tool_path) + "/SwissProt_HUMAN_2015_12.fasta" |
22 make_bait = sys.argv[6] | 17 make_bait = sys.argv[6] |
23 print make_bait | |
24 bait_bool = sys.argv[8] | 18 bait_bool = sys.argv[8] |
25 print bait_bool | |
26 | 19 |
27 def bait_create(baits, infile): | 20 def bait_create(baits, infile): |
28 # Verifies the Baits are valid in the Scaffold file and writes the Bait.txt. | 21 # Verifies the Baits are valid in the Scaffold file and writes the Bait.txt. |
29 baits = make_bait.split() | 22 baits = make_bait.split() |
30 i = 0 | 23 i = 0 |
217 if prey == "true": | 210 if prey == "true": |
218 make_prey(data,db) | 211 make_prey(data,db) |
219 | 212 |
220 os.rename("bait.txt", sys.argv[2]) | 213 os.rename("bait.txt", sys.argv[2]) |
221 os.rename("inter.txt", sys.argv[10]) | 214 os.rename("inter.txt", sys.argv[10]) |
222 os.rename("prey.txt", sys.argv[11]) | 215 if str(prey) != "None": |
216 os.rename("prey.txt", sys.argv[11]) |