Mercurial > repos > bornea > saint_preprocessing_peptideshaker
comparison Protein_report_processing.py @ 9:e01bdd338210 draft
Uploaded
author | bornea |
---|---|
date | Tue, 23 Aug 2016 19:21:40 -0400 |
parents | e1d6909836cd |
children | 9ec349fd0e66 |
comparison
equal
deleted
inserted
replaced
8:e1d6909836cd | 9:e01bdd338210 |
---|---|
7 # e.g. "Default_Protein_Report.txt, Default_Protein_Report_2.txt" | 7 # e.g. "Default_Protein_Report.txt, Default_Protein_Report_2.txt" |
8 #bait = sys.argv[2] # SAINT formatted bait file | 8 #bait = sys.argv[2] # SAINT formatted bait file |
9 # still need a way to match files to bait identifiers | 9 # 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 | 10 # 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 | 11 quant_type = sys.argv[3] # what metric to use for quantification |
12 print quant_type | |
12 # "#Validated Peptides", "#Peptides", "#Unique", "#Validated PSMs", "#PSMs" | 13 # "#Validated Peptides", "#Peptides", "#Unique", "#Validated PSMs", "#PSMs" |
13 db = sys.argv[4] # fasta database used in SearchGUI and PeptideShaker | 14 db = sys.argv[4] # fasta database used in SearchGUI and PeptideShaker |
15 print db | |
14 prey = sys.argv[5] | 16 prey = sys.argv[5] |
17 print prey | |
15 tool_path = sys.argv[7] | 18 tool_path = sys.argv[7] |
19 print tool_path | |
16 if db == "None": | 20 if db == "None": |
17 db = str(tool_path) + "/SwissProt_HUMAN_2015_12.fasta" | 21 db = str(tool_path) + "/SwissProt_HUMAN_2015_12.fasta" |
18 make_bait = sys.argv[6] | 22 make_bait = sys.argv[6] |
23 print make_bait | |
19 bait_bool = sys.argv[8] | 24 bait_bool = sys.argv[8] |
25 print bait_bool | |
20 | 26 |
21 def bait_create(baits, infile): | 27 def bait_create(baits, infile): |
22 # Verifies the Baits are valid in the Scaffold file and writes the Bait.txt. | 28 # Verifies the Baits are valid in the Scaffold file and writes the Bait.txt. |
23 baits = make_bait.split() | 29 baits = make_bait.split() |
24 i = 0 | 30 i = 0 |
132 error.close | 138 error.close |
133 seqlength = 'NA' | 139 seqlength = 'NA' |
134 genename = 'NA' | 140 genename = 'NA' |
135 return ReturnValue1(seqlength, genename) | 141 return ReturnValue1(seqlength, genename) |
136 def concatenate_files(file_list_string, bait_file): | 142 def concatenate_files(file_list_string, bait_file): |
137 file_list = file_list_string.split(", ") | 143 file_list = file_list_string.split(",") |
138 bait = read_tab(bait_file) | 144 bait = read_tab(bait_file) |
139 master_table = [] | 145 master_table = [] |
140 header_check = 0 | 146 header_check = 0 |
141 file_cnt = 0 | 147 file_cnt = 0 |
142 table_cnt = 0 | 148 table_cnt = 0 |